﻿//define the options and function for opening a new window

var strOptions = 'location=no';

strOptions += ',toolbar=no';

strOptions += ',menubar=no';

strOptions += ',status=no';

strOptions += ',scrollbars=no';

strOptions += ',resizable=no';

strOptions += ',top=40';

strOptions += ',left=300';

strOptions += ',width=640';

strOptions += ',height=920';

function OpenNewWin(strUrl)

	{window.open(strUrl,'newwindow',strOptions);

}


function isValidEmail($emailAddress) {
	
	email = $emailAddress
	alert("email = " + email); 
	AtPos = email.indexOf("@")
	StopPos = email.lastIndexOf(".")
	
	if (email == "") {
		return false;
	}
	
	if (AtPos == -1 || StopPos == -1) {
		return false;
	}
	
	if (StopPos < AtPos) {
		return false;
	}
	
	if (StopPos - AtPos == 1) {
		return false;
	} 

	return true;
}

function confirmEmail($edEmail,$edConfirmEmail) {
	// compare the two email addresses provided
	if ($edEmail != $edConfirmEmail) {
		return false;
	}
	else
	{
		return true;
	}
}
