/*
	Module Name:- About(refer)
	File Name  :- refer_to_friend.js
	Create Date:- 10-Mar-2006
	Intially Create By :- 0026
	Update History:
*/

function ShowImage(surl)
{
   window.open(surl ,'','resizable=yes,titlebar=no,menubar=no,addressbar=no,statusbar=no,scrollbars=yes,width=550,height=500,left=225,top=100');
   return false;
}
function refer_friend(url)
{
   window.open(url ,'','titlebar=no,menubar=no,addressbar=no,statusbar=no,scrollbars=yes,width=550,height=530,left=225,top=100');
   return false;
}



function frm_refer_validation()
{
	with (document.frm_refer)
	{
		
		if(isEmpty(txt_email1.value))
		{
			alert("Please enter atleast one friend's email address");
			txt_email1.focus();
			return false;
		}
		if(!sValidateMailAddress(txt_email1.value))
		{	
			alert("Please enter valid email address: emailid@domainname.com");
			txt_email1.select();
			txt_email1.focus();
			return false;
		}
		if(txt_email2.value!="")
		{
			if(!sValidateMailAddress(txt_email2.value))
			{	
				alert("Please enter valid email address: emailid@domainname.com");
				txt_email2.select();
				txt_email2.focus();
				return false;
			}			
		}
		if(txt_email3.value!="")
		{
			if(!sValidateMailAddress(txt_email3.value))
			{	
				alert("Please enter valid email address: emailid@domainname.com");
				txt_email3.select();
				txt_email3.focus();
				return false;
			}			
		}
		if(txt_email4.value!="")
		{
			if(!sValidateMailAddress(txt_email4.value))
			{	
				alert("Please enter valid email address: emailid@domainname.com");
				txt_email4.select();
				txt_email4.focus();
				return false;
			}			
		}
		if(isEmpty(txt_name.value))
		{
			alert("Please enter your name.");
			txt_name.focus();
			return false;
		}
		if(isEmpty(txt_self_email.value))
		{
			alert("Please enter your email address");
			txt_self_email.select();
			txt_self_email.focus();
			return false;
		}
		if(!sValidateMailAddress(txt_self_email.value))
		{
			alert("Please enter valid email address. Format: emailid@domainname.com");
			txt_self_email.select();
			txt_self_email.focus();
			return false;
		}
		if (isEmpty(ta_message.value))
		{
			alert("Please enter your message")
			ta_message.focus();
			return false;
		}
		if(txt_code.value=="")
		{
			alert("Please enter secret code as shown in image.");
			txt_code.select();
			txt_code.focus();
			return false;
		}

	}
}
