function ShowHide(strObjId) { if (document.getElementById(strObjId).style.display == 'none') { document.getElementById(strObjId).style.display = '' } else { document.getElementById(strObjId).style.display = 'none' } } function EmailAFriend(type, arg) { childWindow = window.open("/Tools/EmailAFriend.aspx?page=" + location.href + "&type=" + type + "&arg=" + arg, "EmailAFriend", 'width=470,height=470,left=' + (screen.width-265)/2 + ',top=' + (screen.height-285)/2 + ',toolbars=no,scrollbars=no,status=no,resizable=no'); } function CustomerFeedback() { childWindow = window.open("/Tools/CustomerFeedback.aspx?page=" + location.href, "CustomerFeedback", 'width=470,height=470,left=' + (screen.width-265)/2 + ',top=' + (screen.height-285)/2 + ',toolbars=no,scrollbars=no,status=no,resizable=no'); } function ProductZoom(id) { childWindow = window.open("/Tools/ProductZoom.aspx?product=" + id, "ProductZoom", 'width=470,height=545,left=' + (screen.width-265)/2 + ',top=' + (screen.height-285)/2 + ',toolbars=no,scrollbars=no,status=no,resizable=no'); } function ProductNotes(id) { childWindow = window.open("/Tools/ProductNotes.aspx?product=" + id, "ProductNotes", 'width=470,height=545,left=' + (screen.width-265)/2 + ',top=' + (screen.height-285)/2 + ',toolbars=no,scrollbars=yes,status=no,resizable=no'); } function DeliveryTimeAndCost() { childWindow = window.open("/Tools/DeliveryTimeAndCost.aspx", "DeliveryTimeAndCost", 'width=470,height=470,left=' + (screen.width-265)/2 + ',top=' + (screen.height-285)/2 + ',toolbars=no,scrollbars=no,status=no,resizable=no'); } function CustomRequiredFieldValidate(sender, args) { con = document.getElementById(sender.controltovalidate); label = document.getElementById(sender.displaycontrol); var value = ValidatorGetValue(sender.controltovalidate); if (con.value.length > 0) { if (sender.validationexpression.length > 0) { var rx = new RegExp(sender.validationexpression); var matches = rx.exec(value); if (matches != null && value == matches[0]) {} else { args.IsValid = false; } } } else if (sender.required == "True") { args.IsValid = false; } if (args.IsValid == true) label.className = sender.className; else label.className = sender.classonerror; }