function subscribe_new()
{
	mail_value=document.homepg.txt_mailid.value;
	if(mail_value=="")
	{
		alert("Enter the E-mail ID");
		return false;
	}
	if(validateEmail())
	{
		//open('subscribe.html?mail_val='+mail_value,'subscribe','width=350 height=100');
	}
}

function validateEmail()
{
var loc;

	of_email=document.homepg.txt_mailid.value;
	if(of_email=="")
	{
		alert("Enter a valid E-Mail ID");
		document.homepg.txt_mailid.focus();
		return;
	}
	
	var str=of_email;
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
		alert("Invalid E-mail ID")
		document.homepg.txt_mailid.focus();
		return false
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		alert("Invalid E-mail ID")
		document.homepg.txt_mailid.focus;
		return false
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		alert("Invalid E-mail ID")
		document.homepg.txt_mailid.focus();
		return false
	}
	if (str.indexOf(at,(lat+1))!=-1){
		alert("Invalid E-mail ID")
		document.homepg.txt_mailid.focus();
		return false
	}
	if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		alert("Invalid E-mail ID")
		document.homepg.txt_mailid.focus();
		return false
	}
	if (str.indexOf(dot,(lat+2))==-1){
		alert("Invalid E-mail ID")
		document.homepg.txt_mailid.focus();
		return false
	}
	if (str.indexOf(" ")!=-1){
		alert("Invalid E-mail ID")
		document.homepg.txt_mailid.focus();
		return false
	}
	
	loc=window.location;
	//location.href("../mail_subscribe/mail_subscribe.aspx?mailid="+mail_value+"&loc="+loc);
	location.href("./Mail_Subscribe/mail_subscribe.aspx?mailid="+mail_value+"&loc="+loc);
	return true						
}
function tellloc()
{
var loc;
loc=window.location;
window.open('./Mail_Subscribe/tellfriend.aspx?locat='+loc,'mywin',
	'left=230,top=210,width=490,height=360,toolbar=no,resizable=yes,scrollbars=yes');	
}