	function checkblank()
	{
		email = Trim(document.getElementById('email').value);
		pwd = Trim(document.getElementById('pwd').value);
		var msg = "";

		if(email == "your e-mail" || email == "")
		{
				msg = "Please enter Email\n";
				alert(msg);
				document.getElementById('email').focus();
				return false;
		}
		if(email != "")
		{
			valid = validate('email');
			document.getElementById('email').focus();
			if(valid == false)
			{
				return false;
			}

		}
		if(pwd == "Your Password" || pwd == "")
		{

			msg += "Please enter Your Password";
			alert(msg);
			document.getElementById('pwd').focus();
			return false;
		}
		return true;
	}
	function displaysingup()
	{
		if(document.getElementById('divloginpopuploading').innerHTML == "editsignup")
		{
			document.getElementById('signupvalue').style.display = "block";
			document.getElementById('signinvalue').style.display = "none";
			document.getElementById("logindetail").style.display = "none";
			document.getElementById('singupdetail').style.display = "block";
			document.getElementById('errormessage').style.display = "none";
			document.getElementById('infosdetail').style.display = "none";
			document.getElementById('infosvalue').style.display = "none";
			document.getElementById('infosbutton').style.display = "block";
			document.getElementById('signinbutton_1').style.display = "block";
			document.getElementById('signupbutton_1').style.display = "none";
			document.getElementById('signupbutton').style.display = "none";
			document.getElementById('progresslayer').style.height = "834px";
		}
	}
	function displaysingin()
	{
			document.getElementById('signupvalue').style.display = "none";
			document.getElementById('signinvalue').style.display = "block";
			document.getElementById("logindetail").style.display = "block";
			document.getElementById('singupdetail').style.display = "none";
			document.getElementById('errormessage').style.display = "none";
			document.getElementById('checkmail').style.display = "none";
			document.getElementById('infosdetail').style.display = "none";
			document.getElementById('infosvalue').style.display = "none";
			document.getElementById('signupbutton').style.display = "none";
			document.getElementById('infosbutton').style.display = "block";
			document.getElementById('signupbutton_1').style.display = "block";
			document.getElementById('signinbutton_1').style.display = "none";
	}
	function displayloginsingup()
	{
			document.getElementById('signupvalue').style.display = "none";
			document.getElementById('signinvalue').style.display = "none";
			document.getElementById("logindetail").style.display = "none";
			document.getElementById('singupdetail').style.display = "none";
			document.getElementById('checkmail').style.display = "none";
			document.getElementById('infosdetail').style.display = "block";
			document.getElementById('errormessage').style.display = "none";
			document.getElementById('signupbutton').style.display = "block";
			document.getElementById('infosbutton').style.display = "none";
			document.getElementById('signinbutton_1').style.display = "block";
			document.getElementById('signupbutton_1').style.display = "none";
			document.getElementById('infosvalue').style.display = "block";
	}
	function checkval()
	{
		msg = "";
		firstname = Trim(document.getElementById('firstname').value);
		email = Trim(document.getElementById('email').value);
		//conemail = Trim(document.getElementById('cemail').value);
		pwd = Trim(document.getElementById('pwd').value);
		//cpwd = document.getElementById('cpwd').value;
		chkterms = document.getElementById('UserChkterms').checked;
		if(Trim(document.getElementById('firstname').value) == "Name/Nick Name" || Trim(document.getElementById('firstname').value) == "")
		{
			msg = "Please enter Name/Nick Name";
			document.getElementById('firstname').value = "";
			document.getElementById('firstname').focus();
			alert(msg);
			return false;
		}
		if(Trim(document.getElementById('semail').value) == "Email" || Trim(document.getElementById('semail').value) == "")
		{
			msg = "Please enter Email";
			document.getElementById('semail').value = "";
			document.getElementById('semail').focus();
			alert(msg);
			return false;
		}
		if(Trim(document.getElementById('semail').value) != "")
		{
				valid = validateemail();
				document.getElementById('semail').focus();
				if(valid != true)
				{
					return false;
				}
		}
		/*if(document.getElementById('cemail').value != document.getElementById('semail').value)
		{
			msg =  "Email and Confirm is not match";
			document.getElementById('cemail').value = "";
			document.getElementById('cemail').focus();
			alert(msg);
			return false;
		}*/
		 if(Trim(document.getElementById('spwd').value) == "" || Trim(document.getElementById('spwd').value) == "Your Password")
		{
			msg =  "Please enter Your Password";
			document.getElementById('spwd').focus();
			alert(msg);
			return false;

		}
		/*if(document.getElementById('cpwd').value != document.getElementById('spwd').value )
		{
			msg = "Password and Confirm password is not match";
			document.getElementById('cpwd').focus();
			alert(msg);
			return false;
		}*/
		if(chkterms == false)
		{
			msg =  "Please accept Terms and conditions";
			alert(msg);
			return false;
		}

		return true;
	}

function Givesucessmsg()
{
	var msg = "";
	var successmsg = "";
	msg = document.getElementById('divloginpopuploading').innerHTML;
	if(msg == "checkmail")
	{
		displaysingin();
		sucessmsg = "Your are registered. Before Log-in, please check your email for confirmation.";
		document.getElementById('checkmail').style.display = "block";
		document.getElementById('checkmail').innerHTML = sucessmsg;
		/*document.getElementById('firstname').value = "Name/Nick Name";
		document.getElementById('semail').value = "Email";
		document.getElementById('cemail').value = "Confirm Email";
		document.getElementById('showpwdsignup').innerHTML = "<input type='text' name='signpwd' value='Your Password' id='spwd' class='InputText' onblur='restoreText9(\"Your Password\")' onfocus='removetext9(\"Your Password\")'>";
		document.getElementById('showcfmpwd').innerHTML = "<input type='text' name='pswd' value='Confirm password' id='cpwd' class='InputText' onblur='restoreText4(\"Confirm password\")' onfocus='removetext4(\"Confirm password\")'>";
		document.getElementById('UserChkterms').checked = false;*/
	} else if(msg == "emailexists"){		
		document.getElementById('email').value = document.getElementById('semail').value;
		alert("Email already exists. Please choose another email. OR Log-in with "+document.getElementById('semail').value);
	}
	else
	{
		alert(msg);
		return false;
	}
}

function displaydiv()
{
	if(document.getElementById('termscondtions').style.display == "block")
	{
		document.getElementById('termscondtions').style.display = "none";
	}
	else
	{
		document.getElementById('termscondtions').style.display = "block";
	}
}
function showPopBackground()
	{
		var myHeight;
		if( typeof  window.innerHeight!= 'undefined')
		{
			myHeight=window.innerHeight;
		}
		else if( typeof document.documentElement.clientHeight!='undefined')
		{
			myHeight=document.documentElement.clientHeight;
		}
		else
		{
			myHeight=document.getElementsByTagName('body')[0].clientHeight;
		}

		if(document.body.clientHeight >= myHeight)
		{
			document.getElementById("progresslayer").style.height=document.body.clientHeight+"px";
		}
		else
		{
			document.getElementById("progresslayer").style.height=myHeight+"px";
		}

		document.getElementById("progresslayer").style.display = "block";
	}

	function hidePopBackground()
	{
		document.getElementById("progresslayer").style.display = "none";
	}

	function displaylogin(strname,strdisplay)
	{
		showPopBackground();
		document.getElementById(strname).style.display=strdisplay;
	}

	function Cancelpopup()
	{
		hidePopBackground();
		document.getElementById('login').style.display='none';
	}
