// JavaScript Document

function testValues()
{
		
	if(window.document.form.email.value=="")
	{
		alert("E-mail field is Mandatory");
		window.document.form.email.focus();
		return(false);
	}

	str=window.document.form.email.value;
	if(str.indexOf("@")==-1 ||str.indexOf(".")==-1 ||str.indexOf(",")!=-1||str.indexOf("?")!=-1||str.indexOf("%")!=-1||str.indexOf("<")!=-1||str.indexOf(">")!=-1||str.indexOf("&")!=-1||str.indexOf("+")!=-1||str.indexOf("=")!=-1||str.indexOf(" ")!=-1)
	{
		alert("Enter A Valid E-mail Id");
		window.document.form.email.focus();
		return(false);
	}
		return true;
}
	
	

	

function emailForm(){

var daReferrer = document.referrer;
var email = "yours@email.com";
var errorMsg = "here here here is the error error error error";
var subject = "Please check this site";
var body_message = "http://www.smilefoundationindia.org";

var mailto_link = 'mailto:'+email+'?subject='+subject+'&body='+body_message;

win = window.open(mailto_link,'emailWindow');
if (win && win.open &&!win.closed) win.close();
}

document.write ("<table width='980' height='144' border='0' align='center' cellpadding='0' cellspacing='0' background='images/top_menu.png'><tr> <td height='144' rowspan='2' valign='top'><table width='780' border='0' align='right' cellpadding='0' cellspacing='0'><tr><td width='600' height='35' align=right><form  method=post action=subscribenews.asp style='margin-bottom:0' name=form onSubmit='return testValues()'><input type='text' name=email  size=20  maxlength='40' class='subfield'> <input type=image src=images/subscribenews.png  style='margin-bottom:-8'></form></td><td width='140' valign='absmiddle' align=right><a href='http://www.facebook.com/smilefoundationindia.org'><img src='images/facebook.png' width='27' height='27' border='0' vspace=8></a>&nbsp;&nbsp;&nbsp;<a href='http://www.youtube.com/user/ashokkumarmahapatra'><img src='images/youtube_logo.png' width='25' height='14' border='0' vspace=8></a>&nbsp;&nbsp;&nbsp;<a href='http://delicious.com/Smilefoundation'><img src='images/delicious.png' width='20' height='20' border='0' vspace=8></a>&nbsp;&nbsp;&nbsp;<a href='http://twitter.com/smilefoundation'><img src='images/twitter_logo.png' width='25' height='25' border='0' vspace=8></a><font color='#FFFF66'><a href='#' onclick='emailForm();'></a> <a href='index.htm' onClick='window.print();return false'></a> </font></td></tr></table><br> <br>  &nbsp;&nbsp;</td><td valign='top'><table width='50' border='0' align='right' cellpadding='0' cellspacing='0'><tr><td><font color='#FFFF66'><a href='#' onclick='emailForm();'><img src='images/email.png' width='20' height='13'border='0'></a></font></td><td><font color='#FFFF66'><a href='index.htm' onClick='window.print();return false'><img src='images/print.png' width='20' height='22' border='0'></a></font></td></tr></table></td></tr><tr><td valign='bottom'><table width='188' border='0' align='right' cellpadding='0' cellspacing='0'><tr><td width='150' height='19' valign='bottom'><a href='http://www.smilefoundationindia.org/girls-education.asp'><img src='images/how_to_help.jpg' width='147' height='54' hspace='0' vspace='0' border='0' align='bottom'></a> </td></tr></table></td></tr></table>")


