// -- required form fields for "Tell a Friend" form:
function checkFieldsTaf() {
missinginfo = "";
if (document.formtaf.yourname.value == "") {
missinginfo += "\n     -  your name";
}
if ((document.formtaf.youremail.value == "") || 
(document.formtaf.youremail.value.indexOf('@') == -1) || 
(document.formtaf.youremail.value.indexOf('.') == -1)) {
missinginfo += "\n     -  your email";
}
if ((document.formtaf.friendsemail.value == "") || 
(document.formtaf.friendsemail.value.indexOf('@') == -1) || 
(document.formtaf.friendsemail.value.indexOf('.') == -1)) {
missinginfo += "\n     -  friend's email";
}
if (missinginfo != "") {
missinginfo ="Please fill in the following fields:\n" +
missinginfo + "\n\nThanks!";
alert(missinginfo);
return false;
}
else return true;
}

// -- required form fields for "Contact" form:
function checkContactFields() {
missinginfo = "";
if (document.formContact.name.value == "") {
missinginfo += "\n     -  name";
}
if ((document.formContact.email.value == "") || 
(document.formContact.email.value.indexOf('@') == -1) || 
(document.formContact.email.value.indexOf('.') == -1)) {
missinginfo += "\n     -  valid email";
}
if (document.formContact.message.value == "") {
missinginfo += "\n     -  message";
}
if (missinginfo != "") {
missinginfo ="Please fill in the following fields:\n" +
missinginfo + "\n\nThanks!";
alert(missinginfo);
return false;
}
else return true;
}

//---- tell a friend popup:
function tafpop(URL) { 
  window.open(URL,'taf','scrollbars=yes,resizable=yes,width=425,height=475');
}

//---- forgot password popup:
function pwpop(URL) { 
  window.open(URL,'pw','scrollbars=yes,resizable=yes,width=325,height=300');
}

// --- Google map popup window:
function mappop(url) {
mywin =
window.open(url,"map",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=440,height=440');
}


// simmer javascript ??necessary??
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}