//**************************// //* clpa_functions.js by JWL 10.05.2010 //* //**************************// //check IE browser version var Browser = { Version: function() { var version = 999; //set up variable //if ie, check version if (navigator.appVersion.indexOf("MSIE") != -1) { version = parseFloat(navigator.appVersion.split("MSIE")[1]); } return version; } } // if client is using IE6 or lower, run this code} if (Browser.Version() < 7) { redirectURL = '/eprise/main/sites/CC-Link/Home/default' window.location = redirectURL; } //will run onload function setup() { } //contact us CLPA email submission function - adpated from old site by JWL 10.15.2010 function f_onsubmit() { //alert ("In f_onsubmit Function") if (f.Name.value=="") { f.Name.focus(); alert("Name is a required field."); return false; } if (f.Email.value=="") { f.Email.focus(); alert("Email Address is a required field."); return false; } if ((f.Email.value.indexOf("@")==-1) || (f.Email.value.indexOf(".")==-1)) { f.Email.focus(); alert("Email Address format is incorrect."); return false; } if (f.Company.value=="") { f.Company.focus(); alert("Company is a required field."); return false; } if (f.Address.value=="") { f.Address.focus(); alert("Address is a required field."); return false; } if (f.City.value=="") { f.City.focus(); alert("City is a required field."); return false; } if (f.State.value=="") { f.State.focus(); alert("State/Region is a required field."); return false; } if (f.Zip.value=="") { f.Zip.focus(); alert("Zip / Postal Code is a required field."); return false; } if (f.Country.value=="") { f.Country.focus(); alert("Country is a required field."); return false; } if (f.Phone.value=="") { f.Phone.focus(); alert("Phone Number is a required field."); return false; } if (f.Message.value=="") { f.Message.focus(); alert("Message is a required field."); return false; } } // Start - Functions below will handle the generic call to redirect the user to an outside site with a delayed redirect from a pop-up page - by jwl 10.22.2010 function redirect(redirectURL) { if (redirectURL!='') { //alert ("this is the redirect URL: *" + redirectURL + "*") var myLink = "/eprise/main/SiteGen/clpa/Content/UnplacedPages/redirect_delay_popup.html?redirect=" + redirectURL //timedPopup=window.open(myLink,'timedPopup','width=' + screen.availWidth-400 + ',height=' + screen.availHeight-800 + ',toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); //timedPopup=window.open(myLink,'timedPopup','width=800,height=600,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); timedPopup=window.open(myLink,'_blank','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); } } function timedMove(redirectURL) { if (redirectURL!='') { var timer=setTimeout("timedRedirect('" + redirectURL + "')",5000); } } function timedRedirect(redirectURL) { if (redirectURL!='') { //alert ("Will Redirect to: *" + redirectURL + "*"); window.location = redirectURL; } } // End - Functions below will handle the generic call to redirect the user to an outside site with a delayed redirect from a pop-up page //**** Transform Mailto links jQuery.fn.mailto = function() { return this.each(function(){ var txt = $(this).html(); var addr = $(this).attr('href').replace('(at)','@'); addr=addr.replace('(dot)','.'); $(this).before('' + txt + '').remove(); }); }; //**** Init Page $(document).ready(function(){ //Modified Mailto links $('.addr').mailto(); });