function checkFrames() { if (top.frames.length <= 2) { reloadFrames(); } else { setValues(); checkCampaign(); } } function reloadFrames() { top.location.href="/" + mainDb + "!OpenDatabase&db=/" + thisDb + "&v=" + categoryCode + "&e=" + language + menuredirect + "&c=" + unid; } function setValues() { if (this.frames.name != 'external') { headerform = top.frames["header"].document.forms[0]; if (headerform) { headerform.Page.value=window.location.href; } } } function checkFramesMain() { if (top.frames.length == 0) { reloadFramesMain(); } else { setValues(); checkCampaign(); } } function reloadFramesMain() { top.location.href="/" + thisDb + "!OpenDatabase&main=/" + thisDb + "/vwMainPage/" + unid; } function Jump(newurl) { if (newurl == 'skip') return; result = newurl.split('|'); url = result[0]; target = result[1]; //target = '3' is used from template 4, where the content frame is split into 2 new frames. //target = '4' is used when "left" is the target. (Link page - link to left menu) //target = '5' is used when this is a link page to contact us. if (target == '0') top.location.href = url; if (target == '1') top.frames["main"].location.href = url; if (target == '2') window.open(url, "pieviewer", "menubar=1,status=1,location=1,toolbar=1,scrollbars=1,resizable=1,width=640,height=480"); if (target == '3') top.frames["main"].frames["content"].location.href = url; if (target == '4') top.frames["main"].frames["left"].location.href = url; if (target == '5') window.location.href = url; } function go(newurl) { if (newurl == 'skip') return; if (newurl.indexOf('|') > 0) { Jump(newurl); } else { window.location.href = newurl; } } function openContactusFromPage(contactdb, siteTitle) { var soPageURL; soPageURL = new String(window.location.href); i1 = soPageURL.indexOf('http://'); if (i1 >= 0) soPageURL = escape(soPageURL.substring(7, soPageURL.length)); contactus = window.open(contactdb + "/frmWebFeedback!OpenForm&Site=" + siteTitle + "&Section=" + categoryName + "&Page=" + soPageURL + "&Language=" + language, "contactus","width=420,height=435,toolbar=0,directories=0,menubar=0,status=no,resizable=0,location=0,scrollbars=0,copyhistory=0,alwaysRaised=1"); contactus.focus(); } function openSearchFromPage() { var popupsearch = window.open("http://"+document.searchForm.searchIp.value+"/inside/index.asp?template=normal&maxdocs=200&resultperpage=10&search=search&query1="+utfEncode(document.searchForm.searchInput.value),"popupsearch","width=840,height=600,toolbar=0,directories=0,menubar=0,status=1,resizable=1,location=0,scrollbars=1,copyhistory=0"); popupsearch.focus(); } function openSearchFromPageWithIp( ip, searchText ) { var popupsearch = window.open("http://"+ ip+"/inside/index.asp?template=normal&maxdocs=200&resultperpage=10&search=search&query1="+utfEncode(searchText),"popupsearch","width=840,height=600,toolbar=0,directories=0,menubar=0,status=1,resizable=1,location=0,scrollbars=1,copyhistory=0"); popupsearch.focus(); } function hexEncode(invalue) { return "%" + invalue.toString(16); } function utfEncode(inputstring) { outcode = ""; for (a=0; a>6)); outcode += hexEncode((0x80 | c & 0x3F)); } else if (c < 0x10000) { outcode += hexEncode((0xE0 | c>>12)); outcode += hexEncode((0x80 | c>>6 & 0x3F)); outcode += hexEncode((0x80 | c & 0x3F)); } else if (c < 0x200000) { outcode += hexEncode((0xF0 | c>>18)); outcode += hexEncode((0x80 | c>>12 & 0x3F)); outcode += hexEncode((0x80 | c>>6 & 0x3F)); outcode += hexEncode((0x80 | c & 0x3F)); } } // Return result return outcode; } function openSalesContacts(scCategory,scCountry) { href = document.URL; window.open("/" + "global/seitp/seitp179.nsf" + "/frmWebFrameset?ReadForm&SClang=" + language + "&SCcat=" + scCategory + "&SCcountry=" + scCountry + "&SCref=" + href + "&SC", "_new","width=420,height=544,resizable=no,toolbar=no,titlebar=yes,status=no,scrollbar=no,menubar=no,location=no"); } function onChangeCountryCategory(scCat,cntry) { if (scCat != "" & scCat != "skip" & cntry !="skip") { openSalesContacts(scCat,cntry); } } function openUrl( urlStr, target ) { if( target == '' ){ this.window.location.href = urlStr; } else if(parent.frames[target]){ parent.frames[target].document.location = urlStr; } else if( parent.parent.frames[target] ){ parent.parent.frames[target].document.location = urlStr; } else { window.open( urlStr, target ); } } function replaceUrl( urlStr, target ) { re = /viewInside/gi; newUrl=urlStr.replace(re, "viewUNID"); pos = newUrl.indexOf( 'javascript' ); if( pos > -1 ) { eval( newUrl ); } else { i1 = newUrl.indexOf('://'); if (i1 > 0 && (target == '' || target == 'main' || target == 'content' || target == 'left')) { fixedUrl = newUrl.substring(0, i1) + '%$$' + newUrl.substring(i1 +3, (newUrl.length + i1)); newUrl="/" + thisDb + "/frmRedirect!ReadForm&&url=" + escape(fixedUrl); } openUrl( newUrl, target ); } } function printDocument( type) { if (type == 1) { if (nn) { printWindow = window.open("../lupLongPrint/" + unid + "!OpenDocument&r=2"); } else { printWindow = window.open("../lupLongPrint/" + unid + "!OpenDocument&r=2", "printWindow", "width=665, height=540, toolbar=1, directories=0, menubar=1, status=1, resizable=1, location=0, scrollbars=1, copyHistory=0, alwaysRaised=1"); } } else { if (nn) { printWindow = window.open("/" + thisDb + "/viewUNID/" + unid + "?OpenDocument&r=2"); } else { printWindow = window.open("/" + thisDb + "/viewUNID/" + unid + "?OpenDocument&r=2", "printWindow", "width=665, height=540, toolbar=1, directories=0, menubar=1, status=1, resizable=1, location=0, scrollbars=1, copyHistory=0, alwaysRaised=1"); } } printWindow.focus(); } function emailPage() { emailWindow = window.open("/" + thisDb + "/wfrmMailToFriend?ReadForm&c=" + unid + "&db="+ thisDb, "emailWindow", "menubar=0,status=0,location=0,toolbar=0,scrollbars=0,resizable=0,height=360,width=430"); emailWindow.focus(); } function bookmarkPage() { if (ie) { var strProfDocID = getCookie( "MPUserName" ); if ( strProfDocID != null ) { newUrl = "/global/seitp/seitp241.nsf/agnAddNewLink!OpenAgent&**title=" + headline + "&**url=" + this.location.href + "&**unid=" + strProfDocID; openUrl( escape( newUrl ), "content" ) } else { window.external.AddFavorite(this.location.href, document.title); } } else { alert("Your browser does not support opening of the bookmark/favorites window.\n\nBookmark this page manually by clicking on your right mouse button in the content part of the window."); } } function openCalculator() { calcWindow = window.open("/global/abbzh/abbzh252.nsf/pgCalc?OpenPage","calcWindow","width=420,height=485,toolbar=0,directories=0,menubar=1,status=no,resizable=1,location=0,scrollbars=1,copyhistory=0,alwaysRaised=1"); } function openVisualIdentitySearch() { viSearchWindow = window.open("/global/abbzh/abbzh252.nsf/frmSearch?ReadForm","viSearchWindow","width=670,height=485,toolbar=0,directories=0,menubar=0,status=no,resizable=1,location=0,scrollbars=1,copyhistory=0,alwaysRaised=1"); } function getCookie(name) { var cookieString = document.cookie; var valueStart = cookieString.indexOf(name); if(valueStart == -1) { return null; } valueStart += name.length + 1; var valueEnd = cookieString.indexOf(";", valueStart); if(valueEnd == -1) { valueEnd = cookieString.length; } var value = cookieString.substring(valueStart, valueEnd); return unescape(value); }