
	function pop(URL,wName,width,height)
	{
	windowFeatures =",menubar=no,scrollbars=yes,location=no,favorites=no,resizable=no,status=no,toolbar=no,directories=no";
	var quote = "'"; 
	winLeft = (screen.width-width)/2; 
	winTop = (screen.height-(height+110))/2; 
	popup = window.open(URL,wName,"width=" + width +",height=" + height +
		 	",left=" + winLeft + ",top=" + winTop + quote + windowFeatures + quote);
	popup.focus();
	return;
	}
	function MM_jumpMenu(targ,selObj,restore){ //v3.0
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		if (restore) selObj.selectedIndex=0;
		}
	function MM_displayStatusMsg(msgStr) { //v1.0
	  status=msgStr;
	  document.MM_returnValue = true;
	}

function formvalidation(thisform)
{
with (thisform)
{
if (emptyvalidation(strEmail,"The E-mail Address is empty")==false) {strEmail.focus(); return false;};
if (emailvalidation(strEmail,"Invalid E-mail Address")==false) {strEmail.focus(); return false;};
}
} 

function emailvalidation(entered, alertbox)
{
with (entered)
{	apos=value.indexOf("@"); 
	dotpos=value.lastIndexOf(".");
	lastpos=value.length-1;
	if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
	{if (alertbox) {alert(alertbox);} return false;}
	else {return true;}
}
} 

function emptyvalidation(entered, alertbox)
{
with (entered)
{
if (value==null || value=="")
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
} 

function tellafriendvalidation(thisform)
{
with (thisform)
{
if (emptyvalidation(strYourEmail,"Your E-mail Address is empty")==false) {strYourEmail.focus(); return false;};
if (emailvalidation(strYourEmail,"Your E-mail Address is Invalid")==false) {strYourEmail.focus(); return false;};
if (emptyvalidation(strFriendEmail,"Friend's E-mail Address is empty")==false) {strFriendEmail.focus(); return false;};
if (emailvalidation(strFriendEmail,"Friend's E-mail Address is Invalid")==false) {strFriendEmail.focus(); return false;};
}
} 

