function validateEmail() {
var oksofar=true
	var foundat=document.referralForm.referredEmail.value.indexOf("@",0)
	if (foundat < 1 && oksofar) {
		oksofar=false
		alert ("Please enter a valid EMAIL ADDRESS.")
		document.referralForm.referredEmail.focus()
		}
	var foundat=document.referralForm.referredEmail.value.indexOf(".",0)
	if (foundat < 1 && oksofar) {
		alert ("Please enter a valid EMAIL ADDRESS.")
		document.referralForm.referredEmail.focus()
		oksofar=false
		}
	if (oksofar==false){
		location.href = "flaviaStore_Dept.cfm<cfoutput>#querystring#</CFOUTPUT>action=pointsDept&show=products";
		document.referralForm.referredEmail.focus()
	   }
	}

//<!---This function intended to resize the window on mac machines by 1 pixel,
//	To fix bug #002 - screen not appearing on mac-IE5---> 

function resizeMacWindow() {
	//determine if the user is on a mac and using IE5
	var bV = parseInt(navigator.appVersion);
	var bIE = navigator.appName=="Microsoft Internet Explorer";
	var mac = navigator.userAgent.indexOf('Mac') != -1;
		

	if(bV == 5 && bIE && mac) {

		document.body.onLoad = document.body.onLoad 			+ "document.location=document.location";
	}
		
}


// popup window script
var win = null;
function popper(theURL,winName,features) {
  win = window.open(theURL,winName,features);
}






