function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } function prodDetail(height,width,prodName,code) { var theHeight = height var theWidth = width var ZoomWin = window.open("","","height="+theHeight+",width="+theWidth+", scrollbars=yes") var output = ""+prodName+"" output += "" output += "" ZoomWin.document.write(output) ZoomWin.document.close() } ///// validation code function val_contact() { errorText = "" errorMessage = "" f = document.forms[0] if(IsEmpty(f.name)) errorText = errorText + "-Your name is missing.\n" if(!IsEmailValid("contact", "email")) errorText = errorText + "-Your email address is incorrect or missing.\n" if(IsEmpty(f.message)) errorText = errorText + "-Include a comment or question so we know what you need.\n" if(errorText) { errorMessage = "Your message cannot be sent.\n\n"+errorText+"\n\nPlease correct your form and resubmit your message. Thanks!" alert(errorMessage) return false } else { return true } } // ----------------------------------------------------------------- // Function : IsEmailValid // Language : JavaScript // Description : Checks if given email address is of valid syntax // Copyright : (c) 1998 Shawn Dorman // http://www.goodnet.com/~sdorman/web/IsEmailValid.html // ----------------------------------------------------------------- // Ver Date Description of modification // --- ---------- -------------------------------------------------- // 1.0 09/04/1996 Original write // 1.1 09/30/1998 CHG: Use standard header format // ----------------------------------------------------------------- // Source: Webmonkey Code Library // (http://www.hotwired.com/webmonkey/javascript/code_library/) // ----------------------------------------------------------------- function IsEmailValid(FormName,ElemName) { var EmailOk = true var Temp = document.forms[FormName].elements[ElemName] var AtSym = Temp.value.indexOf('@') var Period = Temp.value.lastIndexOf('.') var Space = Temp.value.indexOf(' ') var Length = Temp.value.length - 1 // Array is from 0 to length-1 if ((AtSym < 1) || // '@' cannot be in first position (Period <= AtSym+1) || // Must be atleast one valid char btwn '@' and '.' (Period == Length ) || // Must be atleast one valid char after '.' (Space != -1)) // No empty spaces permitted { EmailOk = false } return EmailOk } function IsEmpty(v) { var theValue = v if(!theValue.value) { return true } else { return false } }