/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Codewise Presentation Manager - Master Script File

Copyright (c) 2004-2008 Codewise Systems Inc. All rights reserved.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

if(liveServerName!=''){lPCD=liveServerName.substring(7,liveServerName.length);};URL=location.href;URLProtocol=location.protocol;URLHostName=location.hostname;URLPort=location.port;URLPath=location.pathname;URLHash=location.hash;URLSearch=location.search;if(URL.indexOf('?')!=-1){var URLMinusQueryStringTemp=URL.split('?');URLMinusQueryString=URLMinusQueryStringTemp[0];}else{URLMinusQueryString=URL;};var pathTemp;if(is_wince){fDPO=fDPOFL=rFS;}else{var regExpStr01=new RegExp('\/','gi');var URLPathTemp=URLPath.replace(regExpStr01,'\\');var masterPathOffset=URLPathTemp.split('\\');URLPathTemp=URLHostName.split('.');URLTopLevelDomain=URLPathTemp[0];if(URLPath.substring(0,1)=='/'){URLPath=URLPath.substring(1,URLPath.length);};if((URLProtocol.indexOf('file')!=-1)&&((is_ie)&&(!is_ie7up))){pathTemp=URLPath.split('\\');}else{pathTemp=URLPath.split('/');};if(URLProtocol.indexOf('file')!=-1){if((is_mac)&&(URL.indexOf('CSI_')!=-1)){sFDO+=3;};fD=masterPathOffset.length-3-sFDO;lPCD='';masterCookieDomain='';mFPO='__projects\/'+skinPreference+'\/';}else{fD=masterPathOffset.length-2-sFDO;};if(URL.indexOf('http:\/\/codewise')!=-1){mFPO='__projects\/'+skinPreference+'\/';};fN=pathTemp[pathTemp.length-1];if(fN==''){fN=dFN;}else if(fN==dFN){isHomePage=1;}else if(fN.indexOf('test_page')!=-1){isTestPage=1;};dMsg+='masterPathOffset = '+masterPathOffset+'|';dMsg+='fD = '+fD+'|';dMsg+='fN = '+fN+'|';if(isRemotePage){fDPO=webServerName+rFS;fDPOFL=liveServerName+rFS;}else if(fD=='unknown'){fDPO=fDPOFL=rFS;}else{for(loop00=0;loop00<fD;loop00++){fDPO+='..\/';fDPOFL+='..\/';};};};dMsg+='fDPO = \''+fDPO+'\'|fDPOFL = \''+fDPOFL+'\'|';nextYear=new Date();nextYear.setFullYear(nextYear.getFullYear()+1);lastYear=new Date();lastYear.setFullYear(lastYear.getFullYear()-1);function getCookie(cookieName){if(!is_avantgo){var sOCSS=document.cookie.indexOf(cookieName+'=');var lOCSS=sOCSS+cookieName.length+1;if((!sOCSS)&&(cookieName!=document.cookie.substring(0,cookieName.length))){return null;};if(sOCSS==-1){return null;};var eOCSS=document.cookie.indexOf(';',lOCSS);if(eOCSS==-1){eOCSS=document.cookie.length;};return unescape(document.cookie.substring(lOCSS,eOCSS));}else{return null;};};function setCookie(cookieName,cookieValue,cookieExpirationDate,cookiePath,cookieDomain,cookieSecure){if(!is_avantgo){cC=cookieName+'='+escape(cookieValue);if(cookieExpirationDate){cC+=';expires='+cookieExpirationDate.toGMTString();};if(cookiePath){cC+=';path='+cookiePath;};if(cookieDomain){cC+=';domain='+cookieDomain;};if(cookieSecure){cC+=';secure';};document.cookie=cC;};};function deleteCookie(cookieName,cookiePath,cookieDomain){if(getCookie(cookieName)){cC=cookieName+'=';if(cookiePath){cC+=';path='+cookiePath;};if(cookieDomain){cC+=';domain='+cookieDomain;};cC+=';expires=Thu, 01-Jan-1970 00:00:01 GMT';document.cookie=cC;};};if(URLProtocol=='file:'){masterCookiePath=fDPO;masterCookieDomain=fDPO;};function storeMasterCookie(){if(!getCookie('CodewiseMasterCookie')){setCookie('CodewiseMasterCookie','enabled',nextYear,masterCookiePath,masterCookieDomain);};};function storeIntelligentCookie(cookieName,cookieValue,cookieExpirationDate,cookiePath,cookieDomain){if(getCookie('CodewiseMasterCookie')){var intelligentCookie=getCookie(cookieName);if((!intelligentCookie)||(intelligentCookie!=cookieValue)){setCookie(cookieName,cookieValue,cookieExpirationDate,cookiePath,cookieDomain);intelligentCookie=getCookie(cookieName);if((!intelligentCookie)||(intelligentCookie!=cookieValue)){};};if((cookieName=='developerTestMode')&&(getCookie('developerTestMode'))){setTimeout('aDTM();',500);};};};function aDTM(){alert(ui_note02+':\n\nDeveloper test mode enabled.'+aMWS);};if(getCookie('displayLanguagePreference')){if(skinPreference!='_admin'){displayLanguage=getCookie('displayLanguagePreference');languagePreference=getCookie('displayLanguagePreference');}else{displayLanguage=languagePreference;};}else{displayLanguage=languagePreference;};if((displayLanguage=='en')||(languagePreference=='en')){lPS='_en';}else if((displayLanguage=='fr')||(languagePreference=='fr')){lPS='_fr';}else if((displayLanguage=='es')||(languagePreference=='es')){lPS='_es';};if(getCookie('developerTestMode')){dTM=1;};function HM_f_PopUp(cE,evt){return false;};function HM_f_PopDown(cE,evt){return false;};var popUp=HM_f_PopUp;var popDown=HM_f_PopDown;function splitSearchStringContent(pCPString,textToSplitBy){pCPArray=pCPString.split(textToSplitBy);pCPIndex=pCPArray.length;};var defaultSearchStringContent='';var searchStringContent='';if(location.search){searchStringContent=location.search.substring(1,location.search.length);};if(searchStringContent!=''){qSS='&';splitSearchStringContent(searchStringContent,qSS);for(loop01=0;loop01<pCPArray.length;loop01++){cQSE=pCPArray[loop01];if((cQSE=='printMode=on')||(cQSE=='printMode=true')||(cQSE=='print=on')||(cQSE=='print=true')||(cQSE=='print=1')){pM=true;};if(cQSE=='displaySection=1'){sTD=1;};if(cQSE=='displaySection=2'){sTD=2;};if(cQSE=='displaySection=3'){sTD=3;};if(cQSE=='displaySection=4'){sTD=4;};if((cQSE=='skin=noSkin')||(cQSE=='skin=none')||(cQSE=='skin=off')||(cQSE=='skin=false')||(cQSE=='skin=0')){skinPreference='';};if((cQSE=='testMode=on')||(cQSE=='testMode=true')||(cQSE=='debugMode=on')||(cQSE=='debugMode=true')){dM=1;};if(cQSE=='debugMode=noisy'){dM=1;dMN=1;};if((dTM)||(fN.indexOf('sample_page')!=-1)||(fN.indexOf('test_page')!=-1)){if((cQSE=='HM=off')||(cQSE=='HM=false')){iHM=0;};if((cQSE=='windowScroll=on')||(cQSE=='windowScroll=true')||(cQSE=='windowScroll=1')){windowScroll=1;};if((cQSE=='windowScroll=off')||(cQSE=='windowScroll=false')||(cQSE=='windowScroll=0')){windowScroll=0;};if((cQSE=='centerUserInterface=on')||(cQSE=='centerUserInterface=true')||(cQSE=='centerUserInterface=1')){centerUserInterface=1;};if((cQSE=='showHidden=on')||(cQSE=='showHidden=true')||(cQSE=='showHidden=1')){sHC=true;};if((cQSE=='imageBorders=on')||(cQSE=='imageBorders=true')||(cQSE=='imageBorders=1')){imageBorders=true;iBS=1;};if((cQSE=='siteLogo=0')){siteLogoPreference=0;};if(cQSE=='siteLogo=1'){siteLogoPreference=1;};if(cQSE=='siteLogo=2'){siteLogoPreference=2;};if(cQSE=='siteLogo=3'){siteLogoPreference=3;};if(cQSE=='skin=admin'){skinPreference='_admin';};if(cQSE=='skin=palmos'){skinPreference='_palmos';};if(cQSE=='skin=pocketpc'){skinPreference='_pocketpc';};};if(cQSE=='lang=en'){displayLanguage='en';languagePreference='en';lPS='_en';};if(cQSE=='lang=fr'){displayLanguage='fr';languagePreference='fr';lPS='_fr';};if(cQSE=='lang=es'){displayLanguage='es';languagePreference='es';lPS='_es';};if(cQSE=='lang=jp'){displayLanguage='jp';languagePreference='jp';lPS='_jp';};if(cQSE.indexOf('pageType=')!=-1){tempPageType=cQSE.split('=');pageType=tempPageType[(tempPageType.length-1)];};};};btnBlur00HTML+='this.blur(); ';btnBlur01HTML+=' this.blur();';btnBlur02HTML+=' onclick="this.blur();"';function wHC(hCS){if((document.write)&&(!is_blazer)){document.write(hCS);};};var embedScriptTag01HTML='<s'+'cr';var embedScriptTag02HTML='ipt s'+'rc="';var embedScriptTag03HTML='.j'+'s" ty'+'pe="te'+'xt\/ja'+'vas'+'cr'+'ip'+'t"><\/s'+'cr';var embedScriptTag03bHTML='.c'+'3'+'c" ty'+'pe="te'+'xt\/ja'+'vas'+'cr'+'ip'+'t"><\/s'+'cr';var embedScriptTag04HTML='ip'+'t>';function wCSSFL(CSSFileType){if(CSSFileType=='internal'){iSSHTML='<style type="text\/css" media="screen"><!-'+'-'+iSSHTML+'-'+'-><\/style>';wHC(iSSHTML);}else if((CSSFileType=='print')&&(sSPCSSV!='n\/a')){wHC('<link type="text\/css" rel="stylesheet" media="print" href="'+fDPO+sSFN+dSFN+skinPreference+'_print_'+sSPCSSV+'.css" \/>');}else if((CSSFileType=='layout')&&(sSLCSSV!='n\/a')){wHC('<link type="text\/css" rel="stylesheet" media="screen" href="'+fDPO+sSFN+dSFN+skinPreference+'_layout_'+sSLCSSV+'.css" \/>');};};function setWindowStatus(statusMessageText){setTimeout('window.status="'+statusMessageText+'"',10);};function pI(){doNothing();};window.onload=function(){storeMasterCookie();highlightingInitialization();pI();aPI();iPL();};function gCOT(){if(document.getElementsByTagName){tAArray=document.getElementsByTagName('a');tDivArray=document.getElementsByTagName('div');tIFrameArray=document.getElementsByTagName('iframe');tImgArray=document.getElementsByTagName('img');tLiArray=document.getElementsByTagName('li');tObjectArray=document.getElementsByTagName('object');tPArray=document.getElementsByTagName('p');tSpanArray=document.getElementsByTagName('span');};};document.getElementsByClassName=function(className){var allElementsByClassName=new Array();var allElements=document.getElementsByTagName('*');for(var loop00=0;loop00<allElements.length;loop00++){if(allElements[loop00].className.indexOf(className)!=-1){allElementsByClassName[allElementsByClassName.length]=allElements[loop00];};};return allElementsByClassName;};document.getElementsByTagNameAndClassName=function(tagName,className){var allElementsByTagNameAndClassName=new Array();var allElements=document.getElementsByTagName('*');for(var loop00=0;loop00<allElements.length;loop00++){if((allElements[loop00].tagName.toLowerCase()==tagName)&&(allElements[loop00].className.indexOf(className)!=-1)){allElementsByTagNameAndClassName[allElementsByTagNameAndClassName.length]=allElements[loop00];};};return allElementsByTagNameAndClassName;};function dEV(){if(window.innerHeight){cDIB=screen.pixelDepth;win_IH=window.innerHeight;win_IW=window.innerWidth;win_OH=window.outerHeight;win_OW=window.outerWidth;win_ISH=document.height;win_ISW=document.width;win_PT=window.screenY;win_PL=window.screenX;}else if((document.documentElement)&&(document.documentElement.clientHeight)){cDIB=screen.colorDepth;win_IH=document.documentElement.clientHeight;win_IW=document.documentElement.clientWidth;win_OH='unknown in IE, but it is > '+win_IH;win_OW=(document.documentElement.offsetWidth);win_ISH=document.documentElement.scrollHeight;win_ISW=document.documentElement.scrollWidth;win_PT=window.screenTop;win_PL=window.screenLeft;}else if(document.body){cDIB=screen.colorDepth;win_IH=document.body.clientHeight;win_IW=document.body.clientWidth;win_OH='unknown in IE, but it is > '+win_IH+aMWS;win_OW=(document.body.offsetWidth);win_ISH=document.body.scrollHeight;win_ISW=document.body.scrollWidth;win_PT=window.screenTop;win_PL=window.screenLeft;};if(document.body.scrollHeight){win_ISH=document.body.scrollHeight;};if(document.body.scrollWidth){win_ISW=document.body.scrollWidth;};if(is_nav6){win_ISH=document.height;};if((is_nav6up)||(is_mozilla)||((is_firefox)&&(!is_firefox1r0))){win_ISH=document.documentElement.scrollHeight;};if(is_opera){};if(is_ie7){win_ISH=document.documentElement.scrollHeight;};if((is_winxp)&&(is_ie)&&((win_OW-win_IW)==20)){is_winxp_classic=true;};eVMsg+='|cDIB = '+cDIB+'|'+'scrW = '+scrW+'|'+'scrH = '+scrH+'|'+'win_IW = '+win_IW+'|'+'win_IH = '+win_IH+'|'+'win_OW = '+win_OW+'|'+'win_OH = '+win_OH+'|'+'win_PT = '+win_PT+'|'+'win_PL = '+win_PL+'|'+'win_ISH = '+win_ISH+'|'+'win_ISW = '+win_ISW;dMsg+=eVMsg+'|';};window.onresize=function(){oWR();};var FAC=0;function oWR(){if(wROE){aRITP();};};function aRITP(){pI();};if(skinPreference.substring(1,0)!='_'){customSkinEnabled=1;dSFN+='__custom\/'+skinPreference+rFS;}else{if((skinPreference!='_pocketpc')&&(skinPreference!='_palmos')&&(skinPreference!='_admin')&&(skinPreference!='_print')){iHM=1;};dSFN+=skinPreference+rFS;};dMsg+='sSFN = '+sSFN+'|';if((skinPreference=='_admin')||(window.name=='CodewiseAdmin')){skinPreference='_admin';sSPEJSV='1-01';sSIPSJSV='n\/a';}else if(skinPreference=='_palmos'){is_wince=true;iHM=false;sSPEJSV='1-00';sSIPSJSV='n\/a';}else if(skinPreference=='_pocketpc'){is_wince=true;iHM=false;sSPEJSV='1-00';sSIPSJSV='n\/a';};if((iHM)&&(pageType!='blank')){wHC(embedScriptTag01HTML+embedScriptTag02HTML+fDPOFL+'_config\/nav_config'+lPS+embedScriptTag03bHTML+embedScriptTag04HTML);};wHC(embedScriptTag01HTML+embedScriptTag02HTML+fDPO+sSFN+'codewise_functions_'+fJSV+embedScriptTag03HTML+embedScriptTag04HTML);if(skinPreference!=''){if(sSIPSJSV!='n\/a'){wHC(embedScriptTag01HTML+embedScriptTag02HTML+fDPO+sSFN+dSFN+skinPreference+'_in_page_styles_'+sSIPSJSV+embedScriptTag03HTML+embedScriptTag04HTML);};if(sSPEJSV!='n\/a'){wHC(embedScriptTag01HTML+embedScriptTag02HTML+fDPO+sSFN+dSFN+skinPreference+'_page_elements_'+sSPEJSV+embedScriptTag03HTML+embedScriptTag04HTML);};};if(iHM){if(pageType!='blank'){wHC(embedScriptTag01HTML+embedScriptTag02HTML+fDPOFL+'_config\/nav_config'+lPS+embedScriptTag03bHTML+embedScriptTag04HTML);if((!customSkinEnabled)&&(fN=='sample_page.php')){wHC(embedScriptTag01HTML+embedScriptTag02HTML+'http:\/\/www.codewise.ca\/_config\/nav_config'+lPS+embedScriptTag03bHTML+embedScriptTag04HTML);};wHC(embedScriptTag01HTML+embedScriptTag02HTML+fDPO+sSFN+'_menus\/menu_script'+embedScriptTag03HTML+embedScriptTag04HTML);};};iSSHTML=' .lowLevelBrowserContent { display: none; }';iSSHTML+=' div.ExpandOMaticContent { display: none; }';iSSHTML+=' span.ExpandOMaticGraphic { display: inline; }';iSSHTML+=' img.EOMIcon { width: 16px; height: 16px; float: left; margin-right: 3px; margin-bottom: 0px; vertical-align: bottom; border: 0px dashed lime; }';wHC('<style type="text\/css"><!-'+'-\n'+iSSHTML+'\n-'+'-><\/style>');function dDMsg(){if(!dTM){return;};var tempArray;cDM='';if(dMN){tempArray=dMsg.split('|');for(loop03=0;loop03<(tempArray.length-1);loop03++){if(tempArray[loop03]!=''){cDM+='- '+tempArray[loop03]+aMWS+'\n';}else{cDM+=aMWS+'\n';};};dMsg='Codewise(TM) debugging information:\n\n'+cDM;}else{tempArray=dMsg.split('|');for(loop04=0;loop04<(tempArray.length-1);loop04++){if(loop04!=0){cDM+=';'+aMWS;};cDM+=tempArray[loop04];};dMsg='Codewise(TM) debugging information:'+cDM;};if(dM){if(dMN){copyToClipboard(dMsg);}else{if(cDM!=''){setScrollWindowStatusMessage(dMsg);};scrollWindowStatus();};}else{dMsg='';};};dMsg+='The _codewise\/codewise_master.js script has loaded...|';
