var agent_isIE = true; var agent_isNS = 0; var agent_isMac = 0; var agent_isAOL = 0; var H_URL_BASE = "http://localhost/help/"; function goUrl(target) { top.document.location.href = "http://locaLhost/celtel/files/frameset.htm?page=" + escape(target); } var h_win var iTopicTimer var Topic_URL var help_w, help_h, help_l, help_t, fudgeW var bResize = true H_VER='1.3' function getCurrentDomain() { var selfURL = self.location.href var i1 = selfURL.indexOf(":") + 3 //:// in URL var i2 = selfURL.indexOf("/",i1) // / following TLD // note this code not robust for : ports in URLs selfURL = selfURL.substring(i1,i2) var URLsegments = selfURL.split(".") if (URLsegments.length < 2) return selfURL else return (URLsegments[URLsegments.length-2] + "." + URLsegments[URLsegments.length-1]) } function DoHelp() { var agent_isMSN = (navigator.userAgent.toLowerCase().indexOf('HelpCELTEL') > 0) //Are we using MSN? Sample string is:'mozilla/4.0 (compatible; msie 5.01; windows 98; msn 6.0b1)' var domaincheck = getCurrentDomain() //set to root domain //bSearch is set in calling page Topic_URL="INI="+H_CONFIG+"&H_APP="+escape(L_H_APP) if (bSearch==true) { //do context sensative search Topic_URL = "?"+Topic_URL+"&SearchTerm="+H_KEY+"&S_Text="+escape(L_H_TEXT) } else { //jump directly to topic Topic_URL = "?TOPIC="+H_KEY+"&"+Topic_URL } //name the window, so that topic from Help window can change URL of main app window. window.name="HelpCELTEL"; if(agent_isAOL==false || agent_isMac==true) { //for Non AOL-WIN browsers myURL = H_URL_BASE+"help.asp"+Topic_URL+"&BrandID="+H_BRAND+"&Filter="+H_FILTER+"&H_VER="+H_VER } else { //for AOL-WIN versions. AOL-WIN have problems displaying after redirection & don't resize well myURL = H_URL_BASE+"help.asp"+Topic_URL+"&BrandID="+H_BRAND+"&Filter="+H_FILTER+"&H_VER="+H_VER } var agent = navigator.userAgent.toLowerCase() var version = navigator.appVersion.toLowerCase() var agent_MSNMajor = '' var agent_MSNMinor = '' var agent_isMSN = (agent.indexOf('HelpCELTEL')>0) if (agent_isMSN) { version = version.substr(version.indexOf("HelpCELTEL")+4) //get past msn and the space agent_MSNMajor = version.substring(0, version.indexOf(".")) agent_MSNMinor = version.substring(version.indexOf(".")+1, version.indexOf(")")) } if (agent_isMSN && agent_MSNMinor != '0b1') { if(screen.width <= 800) { WIDTH = 180 } else { WIDTH = 230 } window.external.showHelpPane(myURL, WIDTH) //h_win=window.open(myURL,"_help") } else { //set defaults for Help window size for 3.x browsers help_w=230;help_h=450;help_l=640-help_w;help_t=0; //bScreen is set by calling page - bScreen means can do screen.availWidth stuff if(bScreen == true) { fudgeW = 0 if (agent_isMac==true) { if (agent_Major == 4) { fudgeW = 7 mac_heightoffset = 1.7 startbarH = (screen.height-screen.availHeight) startbarW = (screen.width-screen.availWidth) } else { fudgeW = 2 mac_heightoffset=0 startbarH = 0//(screen.height-screen.availHeight) startbarW = (screen.width - screen.availWidth) } if(agent_isAOL==true) { WIDTH = 248 aoltoolbar = 70 } else { if(agent_Major==4) { WIDTH = 230 } else { WIDTH = 230 } aoltoolbar=0 } } else { mac_heightoffset = 0 startbarH = 0 startbarW = 0 if(screen.width <= 800) { WIDTH = 180 } else { WIDTH = 230 } if(agent_isAOL==true) { aoltoolbar = 150 } else { aoltoolbar=0 } } help_w = WIDTH; help_h = screen.availHeight; help_l = screen.availWidth - WIDTH; if(agent_isNS && (screen.availWidth - WIDTH != window.innerWidth)) { top.window.resizeTo(screen.availWidth - WIDTH - (window.outerWidth - window.innerWidth), screen.availHeight - (window.outerHeight-window.innerHeight)) top.window.moveTo(0,(startbarH * mac_heightoffset)+aoltoolbar) } else { help_h=help_h - startbarH - aoltoolbar if(agent_isAOL==false || agent_isMac==true) { top.window.resizeTo(screen.availWidth - WIDTH - (startbarW*fudgeW), screen.availHeight - startbarH-aoltoolbar) top.window.moveTo(0,(startbarH * mac_heightoffset)+aoltoolbar) } } w_dressing = "toolbar=0,status=0,menubar=0,width="+help_w+",height="+help_h+",left="+help_l+",top="+help_t+",resizable=1" } else { //3.x browsers w_dressing = "toolbar=0,status=0,menubar=0,width="+help_w+",height="+help_h+",,,resizable=1" } if(bScreen == true && agent_isNS == false && h_win != null && agent_isMac == false && agent_Major ==4) { if (H_URL_BASE.indexOf(domaincheck) > -1 && !(h_win.closed)) { h_win.name='' h_win.close() } else { h_win = null } } bResize = false h_win=window.open(myURL,"_help", w_dressing) if(agent_isNS && agent_isMac) h_win=window.open(myURL,"_help", w_dressing); } } var L_H_APP="MSN+Hotmail"; var H_CONFIG="hotmail.ini"; var bSearch = false; //if (H_KEY.toLowerCase().indexOf('htm') == -1) // bSearch = true; var H_BRAND = ''; var H_FILTER = ''; if (((agent_isNS) || (agent_isIE) || (agent_isMac)) && (navigator.appVersion.indexOf("4.")>=0)) bScreen = true; else bScreen = false; var agent_Major = 0 // an integer; if (agent_isIE && navigator.appVersion.indexOf("MSN") == -1) { agent_Major = navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE") + 5,navigator.appVersion.indexOf(".")); agent_Major = parseInt(agent_Major); } if (agent_isNS) agent_Major = parseInt(navigator.appVersion.substr(0,2));