// var Base64 = { _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", encode : function (input) { var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = Base64._utf8_encode(input); while (i < input.length) { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); } return output; }, decode : function (input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); } if (enc4 != 64) { output = output + String.fromCharCode(chr3); } } output = Base64._utf8_decode(output); return output; }, _utf8_encode : function (string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }, _utf8_decode : function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } } function SetCookie(sName, sValue) { var d=new Date(); document.cookie=sName+"="+escape(sValue) +"; expires=Fri, 31 Dec 2099 23:59:59 GMT;"; } function GetCookie(sName) { var aCookie = document.cookie.split("; "); for(var i=0; iString(str).length) return str; return String(str).substring(0,n); } function Right(str,n){ if(n<=0) return ""; var nLength = String(str).length; if(n>nLength) return str; return String(str).substring(nLength, nLength - n); } function isValidEmail(stEmail) { var cstEmailModel = /^[\S|x20]+@[\S|x20]+\.[\S|x20]+$/; if (stEmail.toLowerCase().match(cstEmailModel) == null) return false; return true; } function PagePopupWinTips(stMessage) { var winTips=document.all("PageWinTips"); if(!winTips) return; elems = document.body.getElementsByTagName("select"); if(elems) { for(var n=0;n"+stMessage +""; winTips.innerHTML = stContent; var skn=winTips.style; if(document.all) { skn.left = event.clientX + document.body.scrollLeft; skn.top = event.clientY + document.body.scrollTop; } else { document.onmousemove=PageMoveWinTips; } skn.visibility = "visible"; return; } function PageMoveWinTips(e) { var winTips=document.all("PageWinTips"); if(!winTips) return; var skn=winTips.style; skn.left = e.pageX + 5 + 'px'; skn.top = e.pageY + 10 + 'px'; return; } function PagePopoutWinTips() { var winTips=document.all("PageWinTips"); if(!winTips) return; elems = document.body.getElementsByTagName("select"); if(elems) { for(var n=0;n)(?![^<>]*?>)','gi'); //var reg = new RegExp('(?!<.*?)(?!)(?![^<>]*?>)','gi'); stHtml=stHtml.replace(reg,PageHotSpotLinks[n][1]); } tagBody.innerHTML=stHtml; } return; } function DisplayDateTime() { if(!document.all) return; if(!document.all.PageDateTime) return; var d=new Date(); PageDateTime.innerHTML=d.toLocaleDateString()+" "+ Right("00"+d.getHours(),2)+":"+Right("00"+d.getMinutes(),2); setTimeout("DisplayDateTime()",300000); } function PageSubmitNewsArchive() { var currentForm=document.forms[1]; if(!currentForm.PageNewsArchiveSearch) return; var stQuery=currentForm.PageNewsArchiveSearch.value; if(currentForm.PageNewsArchivePeriod) { var stPeriod=currentForm.PageNewsArchivePeriod.value; if(stPeriod!='') stQuery=stQuery+"#"+stPeriod; } if(stQuery!='') { location.replace("?OpenDocument&qa="+Base64.encode(stQuery)); } return; } function PageSubmitLogin() { var currentForm=document.forms[1]; var loginForm=document.forms['loginForm']; if(!loginForm) return; if(!loginForm.username) return; if(!currentForm.PageLoginUser) return; if(!currentForm.PageLoginPassword) return; if(currentForm.PageLoginUser.value=='') return; loginForm.username.value=currentForm.PageLoginUser.value; loginForm.password.value=currentForm.PageLoginPassword.value; var stDbName=currentForm.tmpCurrentDatabase.value; loginForm.redirectto.value=stDbName+'/WebAgentRedirect?OpenAgent&login&a=1'; loginForm.submit(); return; } function PageLoginOnKeyDown(thisEvent) { var currentForm=document.forms[1]; if(!currentForm.PageLoginUser) return; var stUserName=currentForm.PageLoginUser.value; if(thisEvent.keyCode==13&&stUserName!='') { return PageSubmitLogin(); } return; } function PageSubmitAction(stActionCode) { var currentForm=document.forms[1]; if(!currentForm.tmpCurrentURL) { currentForm.tmpCurrentURL.value=location.href; } currentForm.tmpAction.value=stActionCode; currentForm.submit(); return ; } function PageSearch(stQuery) { var currentForm=document.forms[1]; if(!currentForm.tmpCurrentDatabase) return; var stDbName=currentForm.tmpCurrentDatabase.value; var stSite=""; if(currentForm.tmpCurrentSite) stSite="&s="+currentForm.tmpCurrentSite.value; location.replace(stDbName+"/WebPage?OpenForm"+stSite+"&q="+Base64.encode(stQuery)); return; } function PageSearchSubmit() { var currentForm=document.forms[1]; if(!currentForm.Search) return; var stQuery=currentForm.Search.value; if(!currentForm.tmpCurrentDatabase) return; var stDbName=currentForm.tmpCurrentDatabase.value; if(currentForm.Search.value!='') { var stSite=""; if(currentForm.tmpCurrentSite) stSite="&s="+currentForm.tmpCurrentSite.value; location.replace(stDbName+"/WebPage?OpenForm"+stSite+"&q="+Base64.encode(stQuery)); } return; } function PageSearchOnKeyDown() { var currentForm=document.forms[1]; if(!currentForm.Search) return; var stQuery=currentForm.Search.value; if(!currentForm.tmpCurrentDatabase) return; var stDbName=currentForm.tmpCurrentDatabase.value; if(event.keyCode==13&&stQuery!='') { var stSite=""; if(currentForm.tmpCurrentSite) stSite="&s="+currentForm.tmpCurrentSite.value; location.replace(stDbName+"/WebPage?OpenForm"+stSite+"&q="+Base64.encode(stQuery)); } return; } function OnChangeProductSearchRange() { var currentForm=document.forms[1]; var stValue=currentForm.ProductSearchRange.value; if(stValue=='' || stValue==undefined) return; if(currentForm.ProductSearchFamilly) { currentForm.ProductSearchFamilly.selectedIndex=0; } return PageSubmitAction('30'); } function OnChangeProductSearchFamilly() { var currentForm=document.forms[1]; var stValue=currentForm.ProductSearchFamilly.value; if(stValue=='' || stValue==undefined) return; return PageSubmitAction('30'); } function OnChangeProductSearchCaract() { var currentForm=document.forms[1]; if(!currentForm.ProductSearchRange) return; if(!currentForm.ProductSearchFamilly) return; if(currentForm.ProductSearchFamilly.value=="") return; if(!currentForm.tmpCurrentDatabase) return; var stDbName=currentForm.tmpCurrentDatabase.value; if(!currentForm.tmpCurrentDocUNID) return; var stDocUNID=currentForm.tmpCurrentDocUNID.value; var stQuery=""; for(var n=1;n<=20;n++) { if(currentForm['PageSearchCaract'+n]) { var stValue=currentForm['PageSearchCaract'+n].value; if(stValue!='' && stValue!=undefined) { if(stQuery!="") stQuery+="&"; stQuery+=stValue; } } } var stSite=""; if(currentForm.tmpCurrentSite) stSite="&s="+currentForm.tmpCurrentSite.value; location.replace(stDbName+"/WebPage?OpenForm"+stSite+"&Doc="+stDocUNID +"&p="+currentForm.ProductSearchFamilly.value +"&q="+Base64.encode(stQuery)); return; } function OnChangeSearchLeafletsRange() { var currentForm=document.forms[1]; if(!currentForm.PageSearchLeafletsRange) return; if(currentForm.PageSearchLeafletsRange.value=="") return; if(!currentForm.tmpCurrentDatabase) return; var stDbName=currentForm.tmpCurrentDatabase.value; if(!currentForm.tmpCurrentDocUNID) return; var stDocUNID=currentForm.tmpCurrentDocUNID.value; var stSite=""; if(currentForm.tmpCurrentSite) stSite="&s="+currentForm.tmpCurrentSite.value; var stLanguage=""; if(currentForm.PageSearchLeafletsLanguage) stLanguage="&l="+currentForm.PageSearchLeafletsLanguage.value; location.replace(stDbName+"/WebPage?OpenForm"+stSite+stLanguage+"&Doc="+stDocUNID +"&p="+currentForm.PageSearchLeafletsRange.value); return; } function OnChangeSearchLeafletsFamilly() { var currentForm=document.forms[1]; if(!currentForm.PageSearchLeafletsFamilly) return; if(currentForm.PageSearchLeafletsFamilly.value=="") return; if(!currentForm.tmpCurrentDatabase) return; var stDbName=currentForm.tmpCurrentDatabase.value; if(!currentForm.tmpCurrentDocUNID) return; var stDocUNID=currentForm.tmpCurrentDocUNID.value; var stSite=""; if(currentForm.tmpCurrentSite) stSite="&s="+currentForm.tmpCurrentSite.value; var stLanguage=""; if(currentForm.PageSearchLeafletsLanguage) stLanguage="&l="+currentForm.PageSearchLeafletsLanguage.value; location.replace(stDbName+"/WebPage?OpenForm"+stSite+stLanguage+"&Doc="+stDocUNID +"&p="+currentForm.PageSearchLeafletsFamilly.value); return; } function OnSubmitSearchLeaflets() { var currentForm=document.forms[1]; if(!currentForm.PageSearchLeafletsRange) return; var stProductRange=currentForm.PageSearchLeafletsRange.value; if(currentForm.PageSearchLeafletsFamilly) { if(currentForm.PageSearchLeafletsFamilly.value!="") { stProductRange=currentForm.PageSearchLeafletsFamilly.value; } } if(!currentForm.tmpCurrentDatabase) return; var stDbName=currentForm.tmpCurrentDatabase.value; if(!currentForm.tmpCurrentDocUNID) return; var stDocUNID=currentForm.tmpCurrentDocUNID.value; var stSite=""; if(currentForm.tmpCurrentSite) stSite="&s="+currentForm.tmpCurrentSite.value; var stLanguage=""; if(currentForm.PageSearchLeafletsLanguage) stLanguage="&l="+currentForm.PageSearchLeafletsLanguage.value; var stSearch=""; if(currentForm.PageSearchLeafletsSearch) stSearch="&q="+currentForm.PageSearchLeafletsSearch.value; location.replace(stDbName+"/WebPage?OpenForm"+stSite+stSearch+stLanguage +"&Doc="+stDocUNID+"&p="+stProductRange); return; } function OnChangeSearchLeafletsLanguage() { return OnSubmitSearchLeaflets(); } function OnChangeDocRequestRange() { var currentForm=document.forms[1]; if(!currentForm.DocProductRange) return; if(currentForm.DocProductRange.value=="") return; if(location.href.indexOf('.html')>0) { location.replace(strLeft(location.href,".html") +".html&p="+strLeft(currentForm.DocProductRange.value,'#')+"&f=WebPageFormDocRequest"); return; } location.replace("?OpenDocument&p="+strLeft(currentForm.DocProductRange.value,'#') +"&f=WebPageFormDocRequest"); return; } function OnChangeDocRequestFamilly() { var currentForm=document.forms[1]; if(!currentForm.DocProductFamilly) return; if(currentForm.DocProductFamilly.value=="") return; SetCookiesFormFields(); if(location.href.indexOf('.html')>0) { location.replace(strLeft(location.href,".html") +".html&p="+strLeft(currentForm.DocProductFamilly.value,'#')+"&f=WebPageFormDocRequest"); return; } location.replace("?OpenDocument&p=" +strLeft(currentForm.DocProductFamilly.value,'#')+"&f=WebPageFormDocRequest"); return; } function OnChangeContactDocRequestRange() { var currentForm=document.forms[1]; if(!currentForm.DocProductRange) return; if(currentForm.DocProductRange.value=="") return; SetCookiesFormFields(); if(location.href.indexOf('.html')>0) { location.replace(strLeft(location.href,".html") +".html&p="+strLeft(currentForm.DocProductRange.value,'#')); return; } location.replace("?OpenDocument&p="+strLeft(currentForm.DocProductRange.value,'#')); return; } function OnChangeContactDocRequestFamilly() { var currentForm=document.forms[1]; if(!currentForm.DocProductFamilly) return; if(currentForm.DocProductFamilly.value=="") return; SetCookiesFormFields(); if(location.href.indexOf('.html')>0) { location.replace(strLeft(location.href,".html") +".html&p="+strLeft(currentForm.DocProductFamilly.value,'#')); return; } location.replace("?OpenDocument&p="+strLeft(currentForm.DocProductFamilly.value,'#')); return; } function PageOpenDialogBox(stUrl,stOptions) { var win=window.open(stUrl,'KuhnDialog',stOptions); return; } function PageButtonWindowPrint(stUrl) { var win=window.open(stUrl,'KuhnPagePrint'); win.print(); return; } function PageButtonPrint() { window.print(); return; } function PageButtonSendTo() { var currentForm=document.forms[1]; if(currentForm.tmpCurrentLocation&¤tForm.tmpCurrentLocation.value!="") { location.replace(currentForm.tmpCurrentLocation.value+"&f=WebPageFormSendTo"); return; } location.assign(location+"&f=WebPageFormSendTo"); return; } function PageButtonDocRequest() { var currentForm=document.forms[1]; if(currentForm.tmpCurrentLocation&¤tForm.tmpCurrentLocation.value!="") { location.replace(currentForm.tmpCurrentLocation.value+"&f=WebPageFormDocRequest"); return; } location.assign(location+"&f=WebPageFormDocRequest"); return; } function SubmitTrainingRegistration() { var stReturn=ValidateFormFields(); if(stReturn!='') { return alert(stReturn); } SetCookiesTrainingFields(); return PageSubmitAction('27'); } function SubmitTrainingFormRefresh() { SetCookiesTrainingFields(); return PageSubmitAction('28'); } function SubmitNewsLetterRegistration() { var stReturn=ValidateFormFields(); if(stReturn!='') { alert(stReturn); return ; } SetCookiesFormFields(); return PageSubmitAction('25'); } function SubmitNewsLetterUnRegister() { var stReturn=ValidateFormFields(); if(stReturn!='') { alert(stReturn); return ; } SetCookiesFormFields(); return PageSubmitAction('26'); } function SubmitContactInfos() { var stReturn=ValidateFormFields(); if(stReturn!='') { alert(stReturn); return ; } SetCookiesFormFields(); return PageSubmitAction('20'); } function SubmitSendTo() { var stReturn=ValidateFormFields(); if(stReturn!='') { alert(stReturn); return ; } SetCookiesFormFields(); return PageSubmitAction('21'); } function SubmitDocRequest() { var stReturn=ValidateFormFields(); if(stReturn!='') { alert(stReturn); return ; } SetCookiesFormFields(); return PageSubmitAction('22'); } function SubmitContactAssistance() { var stReturn=ValidateFormFields(); if(stReturn!='') { alert(stReturn); return ; } SetCookiesFormFields(); return PageSubmitAction('23'); } function SubmitHumanResource() { var stReturn=ValidateFormFields(); if(stReturn!='') { alert(stReturn); return ; } var currentForm=document.forms[2]; if(currentForm) { currentForm.tmpAction.value='24'; currentForm.submit(); } return ; } function SubmitReplyHumanResource() { location.replace("?EditDocument&reply=1"); return; } function PageBannerOpenLink() { location.href=this.link; return; } function ImagePreloadWell() { var thisImg = ImagePreloadWell.arguments[0]; thisImg.well = new Array(); thisImg.well[0] = new Image(); thisImg.well[0].src = thisImg.src; for (var i=1; i < ImagePreloadWell.arguments.length; i++) { thisImg.well[i] = new Image(); thisImg.well[i].src = ImagePreloadWell.arguments[i]; } } function ImageRandomSwap() { var img=document.images['ProductBannerImg']; if(!img) return; if(!img.well) return; for (var i=1; i < img.well.length; i++) { if(img.src==img.well[i].src) { if((i+1)'+NavigationPathName[n]+'' } navPath.innerHTML=stPathContent; } function LinkPathReset() { var nLength=NavigationPathName.length; for (var n=0; n=0) stHtml = '
' + '' + '' + '
' + ''; else stHtml = '
' + '' + '' + '' + '' + '
' + ''; objProductHolder.innerHTML = stHtml; Parent = document.getElementById('ProductPicture').parentNode; Parent.insertBefore(objProductHolder, Parent.firstChild); if (typeof(xt_click)=='function') { var stPageName=(xtpage=='') ? UrlVideo : rightBack(xtpage,'::'); xt_click(this,'C','18',stPageName,'A'); } } function ProductMediaClose() { objProductHolder = document.getElementById('ProductMediaHolder'); if (!objProductHolder) return; objProductHolder.parentNode.removeChild(objProductHolder); } function PageSurveySubmit(idForm) { if(!idForm||idForm=='') return; var currentSurvey = document.forms[1]; if (!currentSurvey || !currentSurvey.tmpSurveyId || !currentSurvey.tmpSurveyValue) return; var field=currentSurvey.elements['PageSurvey' + idForm]; if (!field) return; var stSelectedValue = ''; for (var n=0;n