//cross browser compliant addEvent
function addEvent(oObj, sEvt, fFunc, bCaptures) {
	if (!bCaptures) { bCaptures = false; } //set this to false by default
	if (oObj.attachEvent)
		{
		//must be IE	
		oObj.attachEvent("on" + sEvt,fFunc);
		}
		else
		{
		//must be dom compliant browser	
		oObj.addEventListener(sEvt,fFunc,bCaptures);
		}
}

function stopDefault(event) {
	if (typeof event == "undefined")
		{
		event = window.event; //must be IE, lets convert it to DOM	
		}
	
	if (typeof event.preventDefault == "undefined")
		{
		event.returnValue = false; //the IE way	
		}
		else
		{
		event.preventDefault(); // Dom Approach	
		}
}

function thisTarget(event) {
	if (typeof event == "undefined")
		{
		event = window.event; //must be IE, lets convert it to DOM	
		}
	
	if (event.currentTarget == "undefined")
		{
		return event.srcElement; //the IE way		
		}
		else
		{
		return event.currentTarget; // Dom Approach	
		}
	
}

//Pop-Up Window

function popUp(pageURL, title,w,h) {
	var left = (screen.width/2)-(w/2);
	var top = (screen.height/2)-(h/2);
	var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);


} 


//Check Email Validation

function checkEmail(myForm) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.emailAddress.value)){
	
popUp('thankYou.html', 'confirmationPopUp',500,333)



return (true)

}
else
{
alert("Invalid E-mail Address! Please re-enter.")
return (false)
}
}


