var SCdomain='http://www.endress.com'; var SCproductpath="/eh/productDBs/homeDBs/showroom/ca/en/home.nsf/"; var popup; function get_SCdomain(SChome){ if(!SChome) return SCdomain; if(SChome.indexOf('/eh/')!=-1) return SChome.split('/eh/')[0]; else if(SChome.indexOf('/eh-new/')!=-1) return SChome.split('/eh-new/')[0]; else return SCdomain; } function get_location_country(SChome){ var tmp=SChome.split("endress.")[0]; if(tmp.indexOf(".")>0) tmp=tmp.split(".")[1]; if(tmp.indexOf("www")!=-1) tmp=tmp.split("www").join(""); if(!tmp) tmp="en"; if(tmp.length>3) tmp="de"; return tmp; } // opencontactlink function do_opencontactlink(SChome){ var SCdomain = ""; var home_country=""; if(SChome){ SCdomain=get_SCdomain(SChome); if(SChome.indexOf('/dach/')!=-1) home_country=get_location_country(SChome); } if(window.location_country) home_country=location_country; // index mnurl=SCdomain+'/eh/central/info/contact.nsf/contactdisplay/ca?Open&en'; if(home_country) mnurl=SCdomain+'/eh/central/info/contact.nsf/contactdisplay/'+home_country+'?Open&en'; popup=window.open(mnurl,'v1','width=600,height=620,resizable=yes,scrollbars=yes'); popup.focus(); var contactsitestaturl=''; if(home_country) contactsitestaturl='http://de.sitestat.com/endress/canada/s?'+home_country+'.contact-db'; else contactsitestaturl='http://de.sitestat.com/endress/canada/s?en.contact-db'; if(contactsitestaturl) if(window.sitestat) sitestat(contactsitestaturl); return false; } // openorderproductlink function do_openorderproductlink(SChome, edirect, ordercode){ try{ var home_country=""; if(SChome){ SCdomain=get_SCdomain(SChome); if(SChome.indexOf('/dach/')!=-1) home_country=get_location_country(SChome); } if(edirect) edirect='ca'; if(edirect=='com' || edirect=='en') edirect='ca'; // dach? if(!home_country) home_country='ca'; if(edirect){ edirect=home_country; if(home_country=='at') edirect='co.at'; } mnurl=SCdomain+'/eh/central/info/contact.nsf/orderdisplay/'+home_country+'?Open&edirect='+edirect+'?language='; if('en'=='da'){ mnurl=mnurl+'en&country='+home_country+'&'+ordercode; } else mnurl=mnurl+'en&country='+home_country+'&'+ordercode; popup=window.open(mnurl,'v1','width=600,height=520,resizable=yes,scrollbars=yes'); popup.focus(); var orderproductlink=''; var productRoot=''; if(home_country) orderproductlink='http://de.sitestat.com/endress/canada/s?'+home_country+'.contact-db.orderinfo'; else orderproductlink='http://de.sitestat.com/endress/canada/s?en.contact-db.orderinfo'; productRoot = ordercode.split('='); if(productRoot[1]){ if(productRoot[1].charAt(productRoot[1].length-1)=='-') orderproductlink += '.'+productRoot[1].substring(0,productRoot[1].length-2); else orderproductlink += '.'+productRoot[1]; } if(orderproductlink) if(window.sitestat) sitestat(orderproductlink); } catch(e) { // alert("error:"+ e); } return false; } function recommendProductWin(SChome, productroot){ if(SChome && productroot){ popup=window.open(SChome+"systemcontentview/x_recommend.html?Open&ProductRoot="+productroot,"popup","width=410,height=440,resizable=no").focus(); /* var sitestaturl=get_sitestaturl(sitecountry,'recommend.',1); if(sitestaturl) sitestat(sitestaturl); */ } } function selectBookmark(SChome, productroot){ var EHbookmarkSelect=window.open(SChome+'systemcontentview/x_bookmark.html?Open&SChome='+SChome+'&ProductRoot='+productroot+'&anticache='+String(Math.random()).split('.')[1] , 'EHbookmark','width=570,height=300,left=250,top=160,resizable=yes, menubar=no,scrollbars=yes'); if(SChome.indexOf('.softwerk.') !=-1) return; var home_country=""; if(SChome){ SCdomain=get_SCdomain(SChome); if(SChome.indexOf('/dach/')!=-1) home_country=get_location_country(SChome); } var bookmarksitestaturl=''; if(home_country) bookmarksitestaturl='http://de.sitestat.com/endress/canada/s?'+home_country+'.bookmarkselect.product-container.'+productroot; else bookmarksitestaturl='http://de.sitestat.com/endress/canada/s?en.bookmarkselect.product-container.'+productroot; if(bookmarksitestaturl) if(window.sitestat) sitestat(bookmarksitestaturl); } function bookmarkWinContainer(SChome, productroot){ var tmphost=SChome; if(tmphost.indexOf('.softwerk.') !=-1) tmphost='http://www.endress.com/eh/sc/america/ca/en/home.nsf/'; var bookURL= tmphost+'?Open&DirectProductURL='+productroot; if(navigator.userAgent.indexOf('MSIE') != -1 && navigator.userAgent.indexOf('Win') != -1) { window.external.AddFavorite(bookURL,'Endress+Hauser - '+productroot); } else { alert('Please click Bookmarks - Add Bookmark'); //'Please click Bookmarks - Add Bookmark' EHbookmarkOwn = window.open(bookURL,"EHbookmarkOwn","width=800,height=500,resizable=yes,menubar=yes,scrollbars=yes"); EHbookmarkOwn.focus(); } if(SChome.indexOf('.softwerk.') !=-1) return; var home_country=""; if(SChome){ SCdomain=get_SCdomain(SChome); if(SChome.indexOf('/dach/')!=-1) home_country=get_location_country(SChome); } var bookmarksitestaturl=''; if(home_country) bookmarksitestaturl='http://de.sitestat.com/endress/canada/s?'+home_country+'.bookmark.product-container.'+productroot; else bookmarksitestaturl='http://de.sitestat.com/endress/canada/s?en.bookmark.product-container.'+productroot; if(bookmarksitestaturl) if(window.sitestat) sitestat(bookmarksitestaturl); } function bookmarkProductWin(SChome, productroot) { /* kann entfallen, wird bald nicht mehr benötigt */ if(SChome&& productroot){ SCdomain=get_SCdomain(SChome); var bookURL= SCdomain+'/eh/productDBs/homeDBs/showroom/ca/en/home.nsf/'+'contentview/'+productroot; if(navigator.userAgent.indexOf('MSIE') != -1 && navigator.userAgent.indexOf('Win') != -1) { window.external.AddFavorite(bookURL,'Endress + Hauser - '+productroot) } else { alert('Please click Bookmarks - Add Bookmark'); EHbookmark = window.open(bookURL,"EHbookmark","width=800,height=500,resizable=yes,menubar=yes,scrollbars=yes"); EHbookmark.focus(); } } } function do_callingDB(directURL, SChome) { if(directURL){ var SCdomain = ""; var home_country=""; if(SChome){ SCdomain=get_SCdomain(SChome); mnurl=SCdomain+'/eh/productDBs/homeDBs/showroom/ca/en/home.nsf/contentview/'+directURL; } else{ mnurl=SCdomain+'/eh/sc/america/ca/en/home.nsf/contentview/'+directURL; // call from productDBs/homeDBs } if(!window.contentFrame) document.location.href=mnurl; else contentFrame.document.location.href=mnurl; } } if (!window.do_download) { // product container window.do_download = function(prodArea,prodID,bundleID,conttype,type) { var sitelang='en'; if(window.sitelanguage) sitelang=window.sitelanguage; theUrl='https://wa001.endress.com/sap/bc/bsp/euh/dla/extern/call.htm?language='+sitelang+'&cont_type=&type='; if(prodID){ if(type) theUrl=theUrl+type; theUrl=theUrl+"&root_id="+prodID; document.location.href=theUrl; } else if (bundleID){ if(type) theUrl=theUrl+type; theUrl=theUrl+"&bundle_id="+bundleID; document.location.href=theUrl; } } }