// JavaScript Document

function validate(chkTnc,chkSpam)
	{
		if (chkTnc.checked == 1)
		{}
		else
		{	
			alert("Please click the checkbox to agree to Terms and Conditions!!");
			//chk.checked = 1; 
		}
		if (chkSpam.checked == 1){}
		else
		{
		 alert("Please click the checkbox to agree that you would not Spam user to increase Sales!!");
			//chk.checked = 1; 
		}
	}
	
	function showHelp(divId,flag,source)
	{
		
		if(!document.getElementById(divId))return false;
		var div1 = document.getElementById(divId);	
		if (flag==1)
		{
			div1.style.display='';
			 if (navigator.appName=='Netscape')
			{
				var y = (source.offsetTop - source.offsetHeight) -35;
				var x = source.offsetLeft+30;
			}
			else if (navigator.appName=='Microsoft Internet Explorer')
			{
				var y = (source.offsetTop - source.offsetHeight) -35 ;
				var x = source.offsetLeft+30;
			}
			while (source.offsetParent) 
				{
					source = source.offsetParent;
					x += source.offsetLeft;
					y += source.offsetTop ;
				}
			div1.style.left = x + "px";
			div1.style.top = y + "px";
		 }
		 else if (flag==0)
		 {
			div1.style.display='none';
		 }
		 else
		 {}
	}
	function showHelpLeftAligned(divId,flag,source)
	{
		
		if(!document.getElementById(divId))return false;
		var div1 = document.getElementById(divId);	
		if (flag==1)
		{
			div1.style.display='';
			var x = source.offsetLeft - 340;
			var y = (source.offsetTop - source.offsetHeight) - 40 ;
			while (source.offsetParent) 
				{
					source = source.offsetParent;
					x += source.offsetLeft;
					y += source.offsetTop ;
				}
			div1.style.left = x + "px";
			div1.style.top = y + "px";
		 }
		 else if (flag==0)
		 {
			div1.style.display='none';
		 }
		 else
		 {}
	}
	function hideApproveBox()
	{
		if(!document.getElementById('ApproveBox'))return false;
		var div1 = document.getElementById('ApproveBox');	
		div1.style.display='none';
	}
	
	function showApproveBox()
	{
		if(!document.getElementById('ApproveBox'))return false;
		var div1 = document.getElementById('ApproveBox');	
		div1.style.display='';
		var email=document.getElementById('username').value;
		var fp = document.getElementById('txtfp');
		if(email!="")
		{
		 fp.value=email;	
		}
		else
		{
		 fp.value=email;
		}
	  }
	
	
	function SendPassword()
	{
	  
		var fp = document.getElementById('txtfp').value;	
		document.getElementById('doAction').src='/i/doaction.aspx?act=sendpassword&email=' + fp ;
		hideApproveBox();
			
	}
	
	
