function _SetUrl_Internet(href)
	{
		var data =document.getElementById("hidPasswordID").value
		var discval = document.getElementById("DiscardID");
		if(data !="")
		{
			if(discval.value=="")
				{
					window.location.href=href;
				}	
		}
		else
		{
			alert("You need to sign up by filling the About You section and activate your account by clicking on the url/link received in your email. Thereafter you can fill this section and will be able to win the mega prize of Rs. 1,00,000.");
		}
		
		if(data !="" && discval.value=="1")
		{
			var answer = confirm("Your changes have not been saved \nDiscard changes");
			if(answer==true)
				{
					window.location.href=href;
				}
			else
				{
					return answer;
				}
		}
	};
	
function _SetUrl_HouseHold(href)
	{
		var data =document.getElementById("hidPasswordID").value
		var discval = document.getElementById("DiscardID");
		if(data !="")
		{
			if(discval.value=="")
				{
					window.location.href=href;
				}	
		}
		else
		{
			alert("You need to sign up by filling the About You section and activate your account by clicking on the url/link received in your email. Thereafter you can fill this section and will be able to win the mega prize of Rs. 1,00,000.");
		}
		
		if(data !="" && discval.value=="1")
		{
			var answer = confirm("Your changes have not been saved \nDiscard changes");
			if(answer==true)
				{
					window.location.href=href;
				}
			else
				{
					return answer;
				}
		}
	};	
	
	
	 function _emailvalidator()
 {
	
	var user_mail = document.getElementById("txtEmailID").value;
	
	if(user_mail!="")
		{
			_checkmail(user_mail);
		}	
 };    
function checkdiscval()
				{
					document.getElementById("DiscardID").value=1;
					var discval = document.getElementById("DiscardID").value;
				}	
function confirmation(href)
				{
						window.location.href=href;
				};

function changebtn(pageName)
	{
	        try
	         {
			var typ = document.getElementById("Head_hidLangID").value;
			var L_Btn;
			 if(typ=="hi-in" || typ=="hi-IN")
			 {
			    L_Btn = "_H"
			 }
			 else
			 {
			    L_Btn ="";
			 }
			 //alert(typ);
			if(pageName=="demographic.aspx" || pageName=="Inte"|| pageName=="House")
				{
				document.getElementById("demographic.aspx").src="Images/Update_Btn_Dark"+L_Btn+".gif";
				}
				else
				{
				document.getElementById("demographic.aspx").src="Images/Update_Btn_Light"+L_Btn+".gif";
				}
			if(pageName=="currsurvey.aspx")
				{
				document.getElementById("currsurvey.aspx").src="Images/CurrSurvey_Btn_Dark"+L_Btn+".gif";
				}
				else
				{
				document.getElementById("currsurvey.aspx").src="Images/CurrSurvey_Btn_Light"+L_Btn+".gif";
				}
			if(pageName=="refer.aspx")
				{
				document.getElementById("refer.aspx").src="Images/Refer_Btn_Dark"+L_Btn+".gif";
				}
				else
				{
				document.getElementById("refer.aspx").src="Images/Refer_Btn_Light"+L_Btn+".gif";
				}
			if(pageName=="profile.aspx")
				{
				document.getElementById("profile.aspx").src="Images/MyAcc_Btn_Dark"+L_Btn+".gif";
				}
				else
				{
				document.getElementById("profile.aspx").src="Images/MyAcc_Btn_Light"+L_Btn+".gif";
				}
			if(pageName=="getpoll.aspx")
				{
				document.getElementById("getpoll.aspx").src="Images/Poll_btn_Dark"+L_Btn+".gif";
				}
				else
				{
				document.getElementById("getpoll.aspx").src="Images/Poll_btn_Light"+L_Btn+".gif";
				}
				
		}
		
		catch(e) {}										
	};				


function msgBox()
 {
  var UpdMsg = document.getElementById("hidUpdMsgID");
  if(UpdMsg.value!="")
    {
      _disableThisPage(); 
      var msgbox = document.getElementById("msgbox");
      msgbox.style.display = "block";
      msgbox.style.left = 350 +"px";
      msgbox.style.top = 240 +"px";
     } 
 };

 function HidemsgBox()
 {
      var msgbox = document.getElementById("msgbox");
      msgbox.style.display = "none";
      _enableThisPage();
     
 }

  
function _disableThisPage()
{
	var tranDiv2;
	var isFound = false;
	for(i = 0; i < document.body.getElementsByTagName("IFRAME").length; i++)
	{
		if(document.body.getElementsByTagName("IFRAME")[i].id == "disableDiv2")
			isFound = true;
	}
	if(isFound == false)
	{
		try{
			tranDiv2 = document.createElement("<IFRAME id=\"disableDiv2\" style=\"background-color:#626262;z-index:95;top:0;left:0;position:absolute;width:100%\">");
			hDiv = document.createElement("<div id=\"lastItem\"></div>");
		}
		catch(e)
		{
			tranDiv2 = document.createElement("IFRAME");
			tranDiv2.id = "disableDiv2";
			tranDiv2.style.backgroundColor = "#626262";
			tranDiv2.style.zIndex = "99";
			tranDiv2.style.top = 0;
			tranDiv2.style.left = 0;
			tranDiv2.style.position = "absolute";

			hDiv = document.createElement("div");
			hDiv.id = "lastItem";
		}
	}
	else
		tranDiv2 = document.getElementById("disableDiv2");
	
	if(isFound == false)
		document.body.appendChild(hDiv);

	var brsName = navigator.appName;
	var scrWidth = screen.availWidth;
	var scrHeight = document.getElementById("lastItem").offsetTop;
    if(brsName == "Microsoft Internet Explorer")
		tranDiv2.style.width = (scrWidth - 20) + "px";
	else
		tranDiv2.style.width = (scrWidth - 16)  + "px";

	tranDiv2.style.opacity = (50 / 100); 
    tranDiv2.style.MozOpacity = (20 / 100); 
    tranDiv2.style.KhtmlOpacity = (50 / 100);
    tranDiv2.style.filter = "alpha(opacity=" + 60 + ")";
	tranDiv2.style.display = "block";
	
	tranDiv2.style.height = (scrHeight + 20) + "px";
	
	if(isFound == false)
		document.body.appendChild(tranDiv2);
};

function _enableThisPage()
{
	var tranDiv2 = document.getElementById("disableDiv2");
	tranDiv2.style.display = "none";
}
