// 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 GetUrlVars() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for (var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0].toLowerCase()] = hash[1]; } return vars; } 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 PageSubmitNewsSearch() { var currentForm=document.forms[0]; if(!currentForm.PageNewsSearch) return; var stQuery=currentForm.PageNewsSearch.value; if(stQuery!='') { location.replace("?OpenDocument&qn="+Base64.encode(stQuery)); } return; } function PageSubmitNewsArchive() { var currentForm=document.forms[0]; 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[0]; 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[0]; if(!currentForm.PageLoginUser) return; var stUserName=currentForm.PageLoginUser.value; if(thisEvent.keyCode==13&&stUserName!='') { return PageSubmitLogin(); } return; } function PageSubmitAction(stActionCode) { var currentForm=document.forms[0]; if(!currentForm.tmpCurrentURL) { currentForm.tmpCurrentURL.value=location.href; } currentForm.tmpAction.value=stActionCode; currentForm.submit(); return ; } function PageSearch(stQuery) { var currentForm=document.forms[0]; 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[0]; 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() { if(event.keyCode!=13) return; var currentForm=document.forms[0]; 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[0]; 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[0]; var stValue=currentForm.ProductSearchFamilly.value; if(stValue=='' || stValue==undefined) return; return PageSubmitAction('30'); } function OnChangeProductSearchCaract() { var currentForm=document.forms[0]; 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[0]; 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[0]; 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[0]; 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[0]; 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[0]; 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 OnChangeContactDocRequestLanguage() { var currentForm = document.forms[0]; if (!currentForm.DocProductRange) return; var stProduct = strLeft(currentForm.DocProductRange.value, '#'); if ((currentForm.DocProductFamilly) && (currentForm.DocProductFamilly.value != "")) { stProduct = strLeft(currentForm.DocProductFamilly.value, '#'); } SetCookiesFormFields(); var stLang = (currentForm.DocProductLanguage) ? "&l=" + currentForm.DocProductLanguage.value : ''; if (location.href.indexOf('.html') > 0) { location.replace(strLeft(location.href, ".html") + ".html&p=" + stProduct + stLang); return; } location.replace("?OpenDocument&p=" + stProduct + stLang); return; } function OnChangeContactDocRequestRange() { var currentForm = document.forms[0]; if (!currentForm.DocProductRange) return; if (currentForm.DocProductRange.value == "") return; SetCookiesFormFields(); var stLang = (currentForm.DocProductLanguage) ? "&l=" + currentForm.DocProductLanguage.value : ''; if (location.href.indexOf('.html') > 0) { location.replace(strLeft(location.href, ".html") + ".html&p=" + strLeft(currentForm.DocProductRange.value, '#') + stLang); return; } location.replace("?OpenDocument&p=" + strLeft(currentForm.DocProductRange.value, '#') + stLang); return; } function OnChangeContactDocRequestFamilly() { var currentForm = document.forms[0]; if (!currentForm.DocProductFamilly) return; if (currentForm.DocProductFamilly.value == "") return; SetCookiesFormFields(); var stLang = (currentForm.DocProductLanguage) ? "&l=" + currentForm.DocProductLanguage.value : ''; if (location.href.indexOf('.html') > 0) { location.replace(strLeft(location.href, ".html") + ".html&p=" + strLeft(currentForm.DocProductFamilly.value, '#') + stLang); return; } location.replace("?OpenDocument&p=" + strLeft(currentForm.DocProductFamilly.value, '#') + stLang); 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[0]; 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[0]; 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[1]; if(currentForm) { currentForm.action=currentForm.tmpCurrentDatabase.value+"/WebMainPage?CreateDocument&f=WebPageFormHumanResource"; currentForm.encoding="multipart/form-data"; 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) return; PageApplyBackgroundShader(true); objProductHolder = document.createElement("div"); objProductHolder.id = 'ProductMediaHolder'; objProductHolder.style.marginLeft = '-50px'; objProductHolder.style.marginTop = '40px'; objProductHolder.style.position = 'absolute'; objProductHolder.style.zIndex = 10; objProductHolder.className = 'PageProductMedia'; if(navigator.appVersion.indexOf('MSIE')>=0) stHtml = '
' + '' + '' + '
' + ''; else stHtml = '
' + '' + '' + '' + '' + '
' + ''; objProductHolder.innerHTML = stHtml; var ProductPicture = document.getElementById('ProductPicture'); if (ProductPicture) { Parent = ProductPicture.parentNode; Parent.insertBefore(objProductHolder, Parent.firstChild); if (typeof (xt_click) == 'function') { var stPageName = (xtpage == '') ? UrlPlayerVideo : rightBack(xtpage, '::'); xt_click(this, 'C', '18', stPageName, 'A'); } } } function PageMediaCreateEx(UrlPlayerVideo) { return ProductMediaCreateSize(UrlPlayerVideo, '620', '420'); } function ProductMediaCreateSize(UrlPlayerVideo, nWidth, nHeight) { objProductHolder = $('#ProductMediaHolder'); if (objProductHolder.length > 0) return; PageApplyBackgroundShader(true); objProductHolder = document.createElement("div"); objProductHolder.id = 'ProductMediaHolder'; objProductHolder.style.marginLeft = '140px'; objProductHolder.style.position = 'absolute'; objProductHolder.style.zIndex = 10; objProductHolder.className = 'PageProductMedia'; if (navigator.appVersion.indexOf('MSIE') >= 0) stHtml = '
' + '' + '
' + ''; else stHtml = '
' + '' + '' + '' + '
' + ''; objProductHolder.innerHTML = stHtml; var PageContent = document.getElementById('PageContent'); if (PageContent) { Parent = PageContent.parentNode; Parent.insertBefore(objProductHolder, Parent.firstChild); if (typeof (xt_click) == 'function') { var stPageName = (xtpage == '') ? UrlPlayerVideo : rightBack(xtpage, '::'); xt_click(this, 'C', '18', stPageName, 'A'); } } } function PageMediaCreate(UrlPlayerVideo) { objProductHolder = $('#ProductMediaHolder'); if (objProductHolder.length>0) return; PageApplyBackgroundShader(true); objProductHolder = document.createElement("div"); objProductHolder.id = 'ProductMediaHolder'; objProductHolder.style.position = 'absolute'; objProductHolder.style.marginLeft = '-50px'; objProductHolder.style.zIndex = 10; objProductHolder.className = 'PageProductMedia'; if (navigator.appVersion.indexOf('MSIE') >= 0) stHtml = '
' + '' + '
' + ''; else stHtml = '
' + '' + '' + '' + '
' + ''; objProductHolder.innerHTML = stHtml; var PageContent= document.getElementById('PageContent'); if (PageContent) { Parent = PageContent.parentNode; Parent.insertBefore(objProductHolder, Parent.firstChild); if (typeof (xt_click) == 'function') { var stPageName = (xtpage == '') ? UrlPlayerVideo : rightBack(xtpage, '::'); xt_click(this, 'C', '18', stPageName, 'A'); } } } function ProductMediaClose() { objProductHolder = document.getElementById('ProductMediaHolder'); if (!objProductHolder) return; PageApplyBackgroundShader(false); objProductHolder.parentNode.removeChild(objProductHolder); } function PageSurveySubmit(idForm) { if(!idForm||idForm=='') return; var currentSurvey = document.forms[0]; if (!currentSurvey || !currentSurvey.tmpSurveyId || !currentSurvey.tmpSurveyValue) return; var field=currentSurvey.elements['PageSurvey' + idForm]; if (!field) return; var stSelectedValue = ''; for (var n=0;n0) { tabProducts.splice(n,1); break; } } } $("input[name='tmpProductSelection']").val(tabProducts.join('##')); var stFamily=$("input[name='tmpProductSelectionFamily']").val(); if(stFamily!='') SetCookie("PrdSelection"+stFamily, tabProducts.join('##')); var stHtmlContent='
    '; for (var n = 0; n < tabProducts.length; n++) { stHtmlContent += '
  • ' + leftBack(tabProducts[n], '|') + '
  • '; } stHtmlContent += '
'; $('#ProductSelectionList').contents().remove(); $('#ProductSelectionList').append(stHtmlContent); } function PageProductSelectionOnLoad() { var stFamily = $("input[name='tmpProductSelectionFamily']").val(); if (stFamily == '') return; var tabProducts = $("input[name='tmpProductSelection']").val(); if (tabProducts == "") tabProducts = GetCookie("PrdSelection" + stFamily); if (tabProducts == "") return; tabProducts = $.unique(tabProducts.split('##')); var stHtmlContent = '
    '; for (var n = 0; n < tabProducts.length; n++) { var oImg = $("img[name='Prd" + rightBack(tabProducts[n], '|') + "']"); if (oImg != undefined) { var stImgSrc = $(oImg).attr('src'); if (stImgSrc != undefined && stImgSrc.indexOf('Selected') < 0) $(oImg).attr('src', leftBack(stImgSrc, '.gif') + 'Selected.gif'); } stHtmlContent += '
  • ' + leftBack(tabProducts[n], '|') + '
  • '; } stHtmlContent += '
'; if ($("input[name='tmpProductSelection']").val() != "") { SetCookie("PrdSelection"+stFamily, tabProducts.join('##')); } else { $("input[name='tmpProductSelection']").val(tabProducts.join('##')); $('#ProductSelectionList').contents().remove(); $('#ProductSelectionList').append(stHtmlContent); } } function PageProductSelectionReset() { var tabProducts=$("input[name='tmpProductSelection']").val().split('##'); $("input[name='tmpProductSelection']").val(''); $('#ProductSelectionList').contents().remove(); var stFamily = $("input[name='tmpProductSelectionFamily']").val(); if (stFamily != '') SetCookie("PrdSelection" + stFamily, ''); for (var n = 0; n < tabProducts.length; n++) { var oImg = $("img[name='Prd" + rightBack(tabProducts[n], '|') + "']"); if (oImg!=undefined) { var stImgSrc=$(oImg).attr('src'); if (stImgSrc!=undefined && stImgSrc.indexOf('Selected')>0) $(oImg).attr('src', leftBack(stImgSrc, 'Selected.gif') + '.gif'); } } } function PageProductSelectionSubmit() { var tabProducts = $("input[name='tmpProductSelection']").val().split('##'); if (tabProducts[0] == '') return; var stPrdList = ''; for (var n = 0; n < tabProducts.length; n++) { if (stPrdList == '') stPrdList = rightBack(tabProducts[n], '|'); else stPrdList += ',' + rightBack(tabProducts[n], '|'); } //return location.assign(location.href + '&c=' + stPrdList); var stCurrentUrl = $("input[name='tmpCurrentDatabase']").val(); var stLocation = document.location.href; var vParams=GetUrlVars(); var stCurrentDoc = $("input[name='tmpCurrentDocUNID']").val(); var stDocId=(stCurrentDoc!='') ? stCurrentDoc : (vParams['doc']) ? vParams['doc'] : rightBack(strLeft(window.location.href, '?'), '/'); var stParams = 'doc=' + stDocId + '&p=' + (vParams['p'] ? vParams['p'] : '')+ '&c=' + stPrdList + '&a=comparativetable'; $.ajax({ type: 'post', dataType: 'html', data: stParams, url: stCurrentUrl + '/WebServices', success: function(data) { if (data.indexOf("table")==0) return; PageApplyBackgroundShader(true); $("#PageProductComp").html(data); $("#PageProductComp").show(); } }); } function PageProductSelectionClose() { PageApplyBackgroundShader(false); $("#PageProductComp").hide(); } function PageProductSelectionMail() { PageApplyBackgroundShader(false); $("#PageProductComp").hide(); var currentForm=document.forms[0]; if(currentForm.tmpCurrentLocation&¤tForm.tmpCurrentLocation.value!="") { location.replace(currentForm.tmpCurrentLocation.value+"&f=WebPageFormSendTo"); return; } location.assign(location+"&f=WebPageFormSendTo"); return; } function PageProductSelectionPrint() { var tabProducts = $("input[name='tmpProductSelection']").val().split('##'); if (tabProducts[0] == '') return; var stPrdList = ''; for (var n = 0; n < tabProducts.length; n++) { if (stPrdList == '') stPrdList = rightBack(tabProducts[n], '|'); else stPrdList += ',' + rightBack(tabProducts[n], '|'); } var stCurrentUrl = $("input[name='tmpCurrentDatabase']").val(); var stLocation = document.location.href; var vParams=GetUrlVars(); var stDocId=(vParams['doc']) ? vParams['doc'] : rightBack(strLeft(window.location.href, '?'), '/'); var stParams = 'doc=' + stDocId + '&p=' + vParams['p'] + '&c=' + stPrdList + '&a=comparativetableprint'; var win=window.open('','KuhnPagePrint'); $.ajax({ type: 'post', dataType: 'html', data: stParams, url: stCurrentUrl + '/WebServices', success: function(data) { if (data.indexOf('table')==0) return; win.document.write(data); win.print(); return; } }); return; } function PagePopupProductDescription(stContentUrl) { $.get(stContentUrl + ' #PageBodyContent', function(data) { var obj = $("#PageProductDescription"); var stHtml = '' + '' + '' + '
' + '' + '
' + data + '
'; obj.html(stHtml); //obj.css('left',$(elem).offset().left); //obj.css('top',$(elem).offset().top); obj.show(); }); } function PagePopoutProductDescription() { $("#PageProductDescription").hide(); } function PageDialogOpenKeyword(stCatalogUrl, id) { var stSite=$("input[name='tmpCurrentSite']").val(); $("#PageDialogKeyword").dialog({ autoOpen: false, height: 608, width: 631, modal: true/*, buttons: { Ok: function() { $(this).dialog("close"); } }*/ }); $.ajax({ type: 'get', dataType: 'html', data: 'action=5&site='+stSite, url: stCatalogUrl+'/(wMC)/OLD'+id+'?OpenDocument&Site='+stSite, success:function(data) { $("#PageDialogKeyword").html(data); $("#PageDialogKeyword").dialog("open"); } }); }