function popup(mypage, myname, w, h, scroll) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable' win = window.open(mypage, myname, winprops) if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } function borderit(which,color){ if (document.all||document.getElementById) { which.style.borderColor=color } } function ShowMsg(msg) { alert(msg); return false; } function ValidateLogin() { var x; var alertmsg; x=0; alertmsg = "Username and Password are required."; if (document.login.username.value == "") { x = x + 1; } if (document.login.password.value == "") { x = x + 1; } if (x == 0) { document.login.submit(); } else { alert(alertmsg); return false; } } function ValidateAccount() { var x; var alertmsg; x=0; alertmsg = "The following fields are required: "; if (document.form.username.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "Username"; x = x + 1; } if (document.form.password.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "Password"; x = x + 1; } if (document.form.city.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "City"; x = x + 1; } if (document.form.state.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "state"; x = x + 1; } if (document.form.zip.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "zip"; x = x + 1; } if (document.form.phone.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "Phone"; x = x + 1; } if (x == 0) { document.form.submit(); } else { alert(alertmsg); return false; } } function ValidateContact() { var x; var alertmsg; x=0; alertmsg = "The following fields are required: "; if (document.form.name.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "Your Name"; x = x + 1; } if (document.form.phone.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "Your Phone"; x = x + 1; } if (document.form.email.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "Your Email"; x = x + 1; } if (document.form.city.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "Your City"; x = x + 1; } if (document.form.state.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "Your State"; x = x + 1; } if (document.form.zip.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "Your Zip"; x = x + 1; } if (document.form.subject.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "Subject"; x = x + 1; } if (document.form.body.value == "") { if (x > 0) { alertmsg = alertmsg + ", "; } alertmsg = alertmsg + "Body"; x = x + 1; } if (x == 0) { document.form.submit(); } else { alert(alertmsg); return false; } }