

/*======================================================================
	emailPopUp()
	
	Description: 
	     Create Woof pub e-mail pop up window dynamically.
	     
	 action="/cgi-bin/dbstore.exe" method="POST"
====================================================================== */
function emailPopUp(title, url) {
	EMWindow = window.open("", "ePop", "scrollbars=yes,resizable=yes,height=600,width=415");
	EMWindow.creator = self;	
	EMWindow.document.write('<html><head>');
	EMWindow.document.write('<title>Unclematty.com</title>');
	EMWindow.document.write('<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">');
	//EMWindow.document.write('<!--	');
	EMWindow.document.write("function checkFields(){");
	EMWindow.document.write("var fName = document.woofemail.firstname.value;");
	EMWindow.document.write("var lName = document.woofemail.lastname.value;");
	EMWindow.document.write("var gCity = document.woofemail.city.value;");
	EMWindow.document.write("var gState = document.woofemail.state.value;");
	EMWindow.document.write("var gCountry = document.woofemail.country.value;");
	EMWindow.document.write("var zip = document.woofemail.zip.value;");
	EMWindow.document.write("var gEmail = document.woofemail.email.value;");	
	EMWindow.document.write("var validFlag = true;");
	EMWindow.document.write('var msg = "";');
	EMWindow.document.write('if(dphone != ""){ if(area == ""){validFlag = false;msg += "You must enter an area code.\\n";}}');
	EMWindow.document.write('if(fName == ""){validFlag = false;msg += "Please enter your first name.\\n";}');
	EMWindow.document.write('if(lName == ""){validFlag = false;msg += "Please enter your last name.\\n";}');
	EMWindow.document.write('if(gCity == ""){validFlag = false;msg += "Please enter your city.\\n";}');
	EMWindow.document.write('if(gState == ""){validFlag = false;msg += "Please enter your state.\\n";}');
	EMWindow.document.write('if(gCountry == ""){validFlag = false;msg += "Please enter a country.\\n";}');
	EMWindow.document.write('if(zip == ""){validFlag = false;msg += "Please enter your Zip.\\n";}');
	EMWindow.document.write('if(gEmail == ""){validFlag = false;msg += "Please enter your e-mail address.\\n";}else{validFlag = ValidEmail();}');
	EMWindow.document.write('if(gMessage == ""){validFlag = false;msg += "Please enter your message.\\n";}');
	EMWindow.document.write('if (msg != ""){ alert(msg);return validFlag;}');
	EMWindow.document.write('return validFlag;}');
	EMWindow.document.write('function ValidEmail(){var inField = document.woofemail.email.value;');
	EMWindow.document.write('if (inField.indexOf("@")!= -1){return true;}else{alert("You have forgotten the @ in your e-mail address.");');
	EMWindow.document.write('document.woofemail.email.focus();');
	EMWindow.document.write('return false;}}');
	//EMWindow.document.write("//-->");
	EMWindow.document.write("</SCRIPT>");
	EMWindow.document.write('</head>');





/*======================================================================
	CloseWin()
	
	Description: 
	     
	
====================================================================== */
function CloseWin() {
	EMWindow.close();	
	creator.location = "/woofpub/index.htm";
}



