// JavaScript Document
function showHomeMessage()
{
    alert("Per accedere al servizio devi essere un utente registrato! Registrati adesso!");
    return ;
}
function showError()
{
    alert("II Servizio non e ancora disponibile.Registrati per essere tenuto aggiornato!");
    return;
}
function setFoucs()
{
	var eValue = document.getElementById("ctl00_SMLogin_UserName").value;
	if(eValue=="Login Email")
    document.getElementById("ctl00_SMLogin_UserName").value="";
}
function loseFoucs()
{
	var eValue = document.getElementById("ctl00_SMLogin_UserName").value;
	if(eValue=='')
		document.getElementById("ctl00_SMLogin_UserName").value="Login Email";
}
function setPwdFoucs()
{
    var eValue = document.getElementById("ctl00_SMLogin_Password").value;
	if(eValue=='')
        document.getElementById("ctl00_SMLogin_Password").className="password2";
}
function losePwdFoucs()
{
	var eValue = document.getElementById("ctl00_SMLogin_Password").value;
	if(eValue=='')
		document.getElementById("ctl00_SMLogin_Password").className="password";
}
function showTab(TabID)
{   
    for(var i=1;i<=6;i++)
    {
        if(i==TabID)
        { 
            
            $('.0'+i).css("background","url(img/menu.main.0"+i+".over.jpg) top left no-repeat"); 
            $('.0'+i+'>span').addClass("main_over");
            $('#tab'+i).show().css("background","url(img/comparison.bg0"+i+".jpg) top left no-repeat");
            $('#tab'+i).find('input').each(function(){
               var toupper= $(this).attr('toupper');
               if(toupper!="" && toupper!=undefined)
               {
                    $(this).attr('toupper','true'); 
               } 
            }); 
        }
        else
        {
             
            $('.0'+i).css("background","url(img/menu.main.0"+i+".jpg) top left no-repeat");
            $('.0'+i+'>span').removeClass("main_over");
            $('#tab'+i).hide(); 
            $('#tab'+i).find('input').each(function(){
               var toupper= $(this).attr('toupper');
               if(toupper!="" && toupper!=undefined)
               {
                    $(this).attr('toupper','false'); 
               } 
            }); 
        }
    }
}
function hidepopu(hideID)
{
    $("#pop1").hide();
    $("#pop2").hide();
}
function showpopu(showID,obj)
{  
    $("#"+showID).show();  
    var position =$('#'+obj).position(); 
    $("#"+showID).css({left:position.left+300+'px',top:position.top+30+'px'});
}
 
function CreateDiv_Wait()
{
    var mainDiv
    var newQuestionDiv;
    var newControl;

    document.getElementById("ctl00_ctl00_MainContent_QueryForm_lblQuestion").innerHTML = "";

    // get the refference of the main options Div
        mainDiv=document.getElementById('divQuestions');
        mainDiv.innerHTML = ""; //Blank Existing Contents in Div
   
    // create new div that will work as a container
        newQuestionDiv=document.createElement('div');
        newQuestionDiv.setAttribute('id','divOptions'); //Naming it as Option1 / Option2 etc.

    newControl = "<img src='/Images/WaitImage.gif' alt='' />"

    newQuestionDiv.innerHTML = newControl;
    mainDiv.appendChild(newQuestionDiv);    
    return false;
}


function flagAlert(strAlertText)
{
    //if (alertFlag == "On")
    //{
        alert(strAlertText);
    //}
}

function ToolTip(ToolTipText)
{
    TContent = ToolTipText;
    if(TContent=="")
    {    
    document.getElementById("toolTipImage").style.display='none';    
    }  
    else
    {
    document.getElementById("toolTipImage").style.display='';    
    }   
}
