/*************************************************************************************************************
File Name 		: jsignin.js

Created Date 	: Last week, dec 2006
************************************************************************************************************/
function chk_login_top()
{
	if(Trim(document.top_login.top_email.value)=="")
	{
		/*alert("Please Enter User Name");
		document.top_login.username.focus();
		return false;*/
		TB_show("Important Message","#TB_inline?height=55&width=450&inlineId=topmsg_1","");
		return false;
	}
	if(Trim(document.top_login.top_email.value) != "")
	{
		if(!isValidEmail_withoutalert(document.top_login.top_email.value))
		{
			TB_show("Important Message","#TB_inline?height=55&width=450&inlineId=topmsg_2","");
			return false;
     	  }
	}
	if(Trim(document.top_login.password.value)=="")
	{
		/*alert("Please Enter Password");
		document.top_login.password.focus();
		return false;*/
		TB_show("Important Message","#TB_inline?height=55&width=450&inlineId=topmsg_3","");
		return false;
	}
	document.top_login.mode.value = 'login';
	document.top_login.top_login_value.value = true;
	document.top_login.submit();
}
function checkvalid()
{
	if(document.signin.radiobutton[0].checked == true)
	{
		/*if(document.signin.ForCheckout.value != '')
			var ForCheckout = document.signin.ForCheckout.value;
		window.location = site_url+'Plan_Package/'+ForCheckout;*/
		window.location = site_url+'Plan_Package/';
	}
	else if((document.signin.radiobutton[0].checked == false) && (document.signin.radiobutton[1].checked == false) && (Trim(document.signin.vEmail.value) == ""))
	{
		TB_show("Important Message","#TB_inline?height=70&width=450&inlineId=msg_1","");
		return false;
	}
	else if((document.signin.radiobutton[1].checked == false || document.signin.radiobutton[1].checked == true) && (Trim(document.signin.vEmail.value) != "") && (Trim(document.signin.vPassword.value) != ""))
	{
		document.signin.mode.value = 'login';
		document.signin.submit();
	}
	else if(document.signin.radiobutton[1].checked == true)
	{
		if(Trim(document.signin.vPassword.value) == "")
		{
			TB_show("Important Message","#TB_inline?height=90&width=450&inlineId=msg_2","");
		}
		else if(Trim(document.signin.vEmail.value) == "")
		{
			TB_show("Important Message","#TB_inline?height=90&width=450&inlineId=msg_3","");
		}
		return false;
	}

	else if((document.signin.radiobutton[1].checked == false) && (Trim(document.signin.vEmail.value) != ""))
	{
			TB_show("Important Message","#TB_inline?height=90&width=450&inlineId=msg_4","");
		return false;
	}
}
function checkvalid_forget_pwd()
{
	if(Trim(document.signin.vEmail1.value) == "")
	{
		TB_show("Important Message","#TB_inline?height=90&width=450&inlineId=msg_forpas","");
		return false;
	}
	document.signin.mode.value = 'forget_pwd';
	document.signin.submit();
}