
function PopUp (url, hWind, nWidth, nHeight, nScroll, nToolbar, nLocation, nDirectories, nStatus, nMenubar, nLeft, nTop) {
	var cToolBar = "toolbar=" + nToolbar + ",location=" + nLocation + ",directories=" + nDirectories + ",status=" + nStatus + ",menubar=" + nMenubar + ",scrollbars=" + nScroll + ",resizable=1,width=" + nWidth + ",height=" + nHeight + ",left=" + nLeft + ",top=" + nTop
	//alert (cToolBar);
	var popupwin = window.open(url, hWind, cToolBar);
}

function setInsertDate(selctObj, textobj){
	var incrementor = selctObj.options[selctObj.selectedIndex].value
	if (incrementor.length){
		var thisdate = new Date();
		thisdate.setMonth(thisdate.getMonth() + parseInt(incrementor));
		var monthInt = thisdate.getMonth() + 1;
		var dayInt = thisdate.getDate();
		var yearInt = thisdate.getYear();
		textobj.value = monthInt.toString() + "/" +dayInt.toString() + "/" + yearInt.toString();
	}
}


function GetDef(sAnchor){
	var newWin = window.open('shop_help.cfm##' + sAnchor,'_shopHelp','height=400,width=300,scrollbars=1')
	newWin.focus()
}

function ErrorMSG(formObj){
var email = formObj.vEmail.value;
var atChar = email.indexOf('@');
var SecondatChar = email.indexOf('@',(atChar + 1));
var periodChar = email.indexOf('.');
//1
if (email == ''){
alert('Email address cannot be blank.');}
//2
else if (atChar == -1){
alert('No @ sign was detected.  An @ sign is part of every e-mail address.');}
//3
else if (atChar + 1 == email.length){
alert('An @ sign cannot be the last character of the e-mail address.');}
//4
else if (atChar == 0){
alert('An @ sign cannot be the first character of the e-mail address.');}
//5
else if (SecondatChar != -1){
alert('A valid e-mail address contains only one @ sign.');}
//6
else if (periodChar == -1){
alert('No period was detected.  An e-mail address contains at least one period.');}
//7
else if (periodChar + 1 == email.length){
alert('The last character of the e-mail address cannot be a period.');}
//8
else if (periodChar == 0){
alert('The first character of the e-mail address cannot be a period');}
//9
else if (email.indexOf(',') != -1){
alert('A valid e-mail address cannot contain a comma.');}
//10
else if (email.indexOf(' ') != -1){
alert('You cannot have a space as part of a single e-mail address.');}
//11
else if (email.indexOf('*') != -1){
alert('You cannot have an asterisk in an e-mail address.');}
//12
else if (email.indexOf(')') != -1){
alert('You cannot have a close parenthesis sign in an e-mail address.');}
//13
else if (email.indexOf('(') != -1){
alert('You cannot have an open parenthesis sign in an e-mail address.');}
//14
else if (email.indexOf('>') != -1){
alert('You cannot have a greater than sign in an e-mail address.');}
//15
else if (email.indexOf('<') != -1){
alert('You cannot have a less than sign in an e-mail address.');}
//16
else if (email.indexOf(':') != -1){
alert('You cannot have a colon in an e-mail address.');}
//16
else if (email.indexOf(';') != -1){
alert('You cannot have a semicolon in an e-mail address.');}
//17
else if (email.indexOf('"') != -1){
alert('You cannot have a double quote in an e-mail address.');}
}


function EmailVal(formObj){
var email = formObj.vEmail.value;
var atChar = email.indexOf('@');
var SecondatChar = email.indexOf('@',(atChar + 1));
var periodChar = email.indexOf('.');
//1
if (email == ''){
return (false);}
//2
else if (atChar == -1){
return (false);}
//3
else if (atChar + 1 == email.length){
return (false);}
//4
else if (atChar == 0){
return (false);}
//5
else if (SecondatChar != -1){
return (false);}
//6
else if (periodChar == -1){
return (false);}
//7
else if (periodChar + 1 == email.length){
return (false);}
//8
else if (periodChar == 0){
return (false);}
//9
else if (email.indexOf(',') != -1){
return (false);}
//10
else if (email.indexOf(' ') != -1){
return (false);}
//11
else if (email.indexOf('*') != -1){
return (false);}
//12
else if (email.indexOf(')') != -1){
return (false);}
//13
else if (email.indexOf('(') != -1){
return (false);}
//14
else if (email.indexOf('>') != -1){
return (false);}
//15
else if (email.indexOf('<') != -1){
return (false);}
//16
else if (email.indexOf(':') != -1){
return (false);}
//16
else if (email.indexOf(';') != -1){
return (false);}
//17
else if (email.indexOf('"') != -1){
return (false);}

else{
return (true);}
}



