var Page ={onload :null,
init :function (){if(Page.isPopup){Page.setupPopup();}else{Page.checkTabNavNaming();Page.adjustLayout();}if(!Page.onload && typeof PageOnload == "function"){Page.onload = PageOnload;}if(typeof Page.onload == "function"){Page.onload();}},
adjustLayout :function(){Page.adjustContentTopPosition();Page.adjustShadowLayout();Page.adjustLeftcolHeight();},
adjustContentTopPosition :function(){var has2ndTab = false;var has2lines = false;if(	Navigation && Navigation.getById("tabnav") &&
Navigation.getById("tabnav").getViewById("tabmenu") && Navigation.getById("tabnav").getViewById("tabmenu").isinit){var navigation = document.getElementById("tabNavRoot");var leftCol = document.getElementById("leftCol");var mainArea = document.getElementById("mainArea");if(navigation && leftCol && mainArea){var items = navigation.getElementsByTagName("ul");if(items[0]){var childs = items[0].childNodes;for(var i = 0; i < childs.length; i++){if(childs[i].nodeName.toLowerCase() == "li"){if(childs[i].className.indexOf("current") > -1){var subnav = childs[i].childNodes;for(var j = 0; j < subnav.length; j++){if (childs[i].childNodes[j].nodeName.toLowerCase() == "ul"){has2ndTab = true;}if (childs[i].childNodes[j].innerHTML && childs[i].childNodes[j].innerHTML.toLowerCase().indexOf("<br") > -1){has2lines = true;}}}}}if(has2ndTab){if (has2lines){leftCol.style.marginTop = "3.91667em";mainArea.style.marginTop = "3.91667em";}}else{leftCol.style.marginTop = "0.83333333em";mainArea.style.marginTop = "0.83333333em";}}}}},
adjustShadowLayout :function(){var cnt_height = document.getElementById("content").offsetHeight;var win_height = (window.innerHeight)? window.innerHeight :document.body.clientHeight;var cnt_height = parseFloat(cnt_height);var win_height = parseFloat(win_height);var height = ((cnt_height > win_height)? cnt_height :win_height) + "px";var sl = document.getElementById("shadowLeft");if(sl) sl.style.height = height;var sr = document.getElementById("shadowRight");if(sr) sr.style.height = height;},
adjustLeftcolHeight :function(){var leftcol = document.getElementById("leftCol");var navroot = document.getElementById("lefthandNavRoot");if(leftcol && navroot){var navmenus = navroot.getElementsByTagName("ul");if(!(navmenus.length > 0)){var mar_height = document.getElementById("mainArea").offsetHeight;mar_height = ((mar_height - 15) / 12) + "em";leftcol.style.height = mar_height;}}},
ENUM_POPUPSIZES :{inter_small :[460, 500], inter_large :[642, 500], intra_small :[331, 650], intra_large :[628, 650], apps_small :[331, 500], apps_medium :[446, 500], apps_large :[628, 500], apps_xlarge :[860, 500]},
DEFAULT_POPUP_HEIGHT :[500, 650],
openPopup :function(pop_url, pop_name, pop_type){var w_factor = (navigator.userAgent.match(/msie/gi))? -1 :1;if(!pop_type){var pop_params = "";}else if(this.ENUM_POPUPSIZES[pop_type]){var pop_width = this.ENUM_POPUPSIZES[pop_type][0] + w_factor;var pop_height = this.ENUM_POPUPSIZES[pop_type][1];var pop_params = "width=" + pop_width + ",height=" + pop_height + ",scrollbars=1,resizable=0";}else if(pop_type.match(/\d{1,4},\d{1,4}/) != ""){var dims = pop_type.split(",");var pop_width = parseInt(dims[0]) + w_factor;var pop_height = parseInt(dims[1]);var pop_params = "width=" + pop_width + ",height=" + pop_height + ",scrollbars=1,resizable=0";}pop_name = (pop_name != "")? pop_name :("pop_" + new Date().getTime());var popup = window.open(pop_url, pop_name, pop_params);if(pop_width) Page.currentPopup_width = pop_width;},
setupPopup :function(){var maclass = document.getElementById("mainArea").className;if(window["ShowHeader"] && ShowHeader){document.getElementById("logo").className = "visible";}if(window["HideFooter"] && HideFooter){document.getElementById("footer").className = "invisible";}if(maclass.indexOf("content2Col") > -1){var PopID = "popup2Col";}else if(maclass.indexOf("contentMedium") > -1){var PopID = "popupMedium";}else if(maclass.indexOf("contentWide") > -1){var PopID = "popupWide";}else if(maclass.indexOf("MainWeather") > -1){var PopID = "popupWeather";}else if(maclass.indexOf("MainOrgChart") > -1){var PopID = "popupOrgChart";}else{var PopID = "popupSpecial";}var body = document.getElementsByTagName("body")[0];with(body){style.textAlign = "left";style.background = "none";style.backgroundColor = "#ffffff";setAttribute("id", PopID);className = className + " popup";}if(opener && opener.Page && opener.Page.currentPopup_width){var content = document.getElementById("content");content.style.height = "auto";content.style.minHeight = "1px";var cheight = content.offsetHeight;var dheight = (window["HideFooter"] && HideFooter) ? 51 :27;var h_factor = ((navigator.userAgent.match(/opera/gi) || navigator.userAgent.match(/gecko/gi)) && !navigator.userAgent.match(/netscape/gi))? 28 :10;var pop_height = cheight + dheight + h_factor;var pop_width = parseInt(opener.Page.currentPopup_width) + 10;var default_height = (Navigation && Navigation.getById("metanav"))? this.DEFAULT_POPUP_HEIGHT[1] :this.DEFAULT_POPUP_HEIGHT[0];if(pop_height <= default_height){if(browser.agent == AbstractBrowser.AGENT_MZ){pop_width = pop_width - 22;}else if(browser.agent == AbstractBrowser.AGENT_OP){pop_width = pop_width - 18;}if( browser.agent == AbstractBrowser.AGENT_IE && navigator.appVersion.match(/MSIE 7/gi) ){pop_height += 51;}window.resizeTo(pop_width, pop_height);}}self.focus();},
openInParent :function(url){if(top.opener && url != ""){top.opener.location.href = url;}},
ENUM_LANGUAGES :supportedLangs,
changeLanguage :function(newlang){var langs = "";for(var l in this.ENUM_LANGUAGES) langs += l + "|";langs = langs.substring(0, langs.length - 1);var url_rexp = new RegExp("(.[\\./])(" + langs + ")([\\./])");var doc_rexp = new RegExp("_(" + langs + ")\\.");var prm_rexp = new RegExp("language=(" + langs + ")");var url = document.location.pathname;var prm = document.location.search;var match = null;match = url.match(url_rexp);if(match){var url = url.replace(url_rexp, (RegExp.$1 + newlang + RegExp.$3));}var match = null;match = url.match(doc_rexp);if(match){var url = url.replace(doc_rexp, ("_" + newlang + "."));}var match = null;match = prm.match(prm_rexp);if(match){var prm = prm.replace(prm_rexp, ("language=" + newlang));}var new_url = url + prm;document.location.href = new_url;},
detectLanguage :function(){var langs = "";for(var l in this.ENUM_LANGUAGES) langs += l + "|";langs = langs.substring(0, langs.length - 1);var url = document.location.pathname;var prm = document.location.search;var url_rexp = new RegExp(".[\\./](" + langs + ")[\\./]");var doc_rexp = new RegExp("_(" + langs + ")\\.");var prm_rexp = new RegExp("language=(" + langs + ")");var act_lang = null;url_rexp.exec(url);if(RegExp.$1){var act_lang = RegExp.$1;}else{doc_rexp.exec(url);if(RegExp.$1){var act_lang = RegExp.$1;}else{prm_rexp.exec(prm);if(RegExp.$1){var act_lang = RegExp.$1;}}}this.act_lang = (act_lang)? act_lang :null;},
writeLanguageSelector :function(pagelangs){if(window["SettingsLabel"] && SettingsLabel.length > 0) return;if(!this.act_lang){this.detectLanguage();}if(this.ENUM_LANGUAGES[this.act_lang]){var html_langsel = this.ENUM_LANGUAGES[this.act_lang][1] + ":&nbsp;";var pagelangs = pagelangs.split(".");var lang_count = 0;var lang_act = false;for(var i = 0; i < pagelangs.length; i++){if(this.ENUM_LANGUAGES[pagelangs[i]]){if(pagelangs[i] == this.act_lang){lang_act = true;html_langsel += "<span class=\"active\" title=\"" + this.ENUM_LANGUAGES[pagelangs[i]][0] + "\">" + this.ENUM_LANGUAGES[pagelangs[i]][2].toUpperCase() + "</span> ";}else{html_langsel += "<a class=\"lang\" href=\"javascript:Page.changeLanguage('" + pagelangs[i] + "');\" title=\"" + this.ENUM_LANGUAGES[pagelangs[i]][0] + "\">" + this.ENUM_LANGUAGES[pagelangs[i]][2].toUpperCase() + "</a> ";}lang_count++;}}var html = html_langsel;if(lang_count != 1 || lang_act == false){document.write(html);document.getElementById("languageSelector").className = "languageSelector";}}},
writeElement :function(item, param1, param2){if(item && item.length && item.length > 0){if(!param1 && !param2){if(item.constructor && item.constructor.toString().toLowerCase().indexOf("array") > -1){var html = "";for(var i = 0; i < item.length; i++){if(i != 0) html += "/ ";html += item[i] + " ";}}else var html = item;}else if(param1 && !param2){if(item.constructor && item.constructor.toString().toLowerCase().indexOf("array") > -1){}else{if(param1.indexOf("{$}") > -1){param1 = param1.replace(/&lt;/gi, "<").replace(/&gt;/gi, ">");var html = param1.replace(/\{\$\}/, item);}else{var html = "<a href=\"" + param1 + "\">" + item + "</a>";}}}else if(param1 && param2){if(item.constructor && item.constructor.toString().toLowerCase().indexOf("array") > -1){if(param2.indexOf("{$}") > -1){param2 = param2.replace(/&lt;/gi, "<").replace(/&gt;/gi, ">");var html = "";for(var i = 0; i < item.length; i++){var link = "<a href=\"" + ((param1[i])? param1[i] :"#") + "\">" + item[i] + "</a>";html += param2.replace(/\{\$\}/, link);}}}else{if(param2.indexOf("{$}") > -1){param2 = param2.replace(/&lt;/gi, "<").replace(/&gt;/gi, ">");var html = "<a href=\"" + param1 + "\">" + item + "</a>";html = param2.replace(/\{\$\}/, html);}}}if(html) document.write(html);}},
writeStatefullElement :function(param1, param2){var html = " <a class=\"prefs\" href=\"" + param2 + "\">" + param1 + "</a>";if(param2.length==0){html = "<span class=\"active\">" + param1 + "</span>";}document.write(html);},
writeFooterInfo :function(date, datehtml, owner, ownerurl, ownerhtml){if(!date || date.length == 0){datehtml = "";}else{datehtml = datehtml.replace(/&lt;/gi, "<").replace(/&gt;/gi, ">");datehtml = datehtml.replace(/\{\$\}/, date);}if(!owner || owner.length == 0){ownerhtml = "";}else{ownerhtml = ownerhtml.replace(/&lt;/gi, "<").replace(/&gt;/gi, ">");ownerhtml = ownerhtml.replace(/\{\$\}/, "<a href=\"" + ownerurl + "\">" + owner + "</a>");}document.write(datehtml + ownerhtml);},
print :function(){if(window.print){window.print();}else{alert("Your browser does't support this feature.\nPlease, use your browser's normal print command.");}},
getCookie :function( name ){var n = name + "=";var tokens = document.cookie.split( ";" );for(var i = 0; i < tokens.length; i++ ){var token = tokens[i].replace( /^( )*/, "" );if( token.indexOf( n ) == 0 ){return token.substring( n.length, token.length );}}return null;},
setCookie :function( name, value, days ){var expires = "";if( days ){var date = new Date();date.setTime( date.getTime() + ( days * 24 * 60 * 60 * 1000 ) );expires = "; expires=" + date.toGMTString();}document.cookie = name + "=" + escape( value ) + expires + "; path=/";},
eraseCookie :function( name ){Page.setCookie( name, "", -1 );},
checkTabNavNaming :function(){var pathCookie = Page.getCookie("CsgBasePath");var tabNavCookie = Page.getCookie("CsgTabNaming");if (pathCookie){Page.setNaming(pathCookie.split("/")[1]);}else if (tabNavCookie){Page.setNaming(tabNavCookie);}else{var countrycode = Page.checkReferrer();if(countrycode){Page.setCookie( "CsgTabNaming", countrycode, 3650);Page.setNaming( countrycode );}}},
setNaming :function( countrycode ){var languagecode = Page.act_lang;var supportedNaming = window.supportedNaming;if (supportedNaming && countrycode &&  supportedNaming[countrycode] && languagecode && supportedNaming[countrycode][languagecode]){var naming = supportedNaming[countrycode][languagecode];var navNode = document.getElementById("n02");if (navNode && naming){navNode.getElementsByTagName("a")[0].firstChild.nodeValue = naming;}}},
checkReferrer :function(){var ref = document.referrer;var supportedDomain = window.supportedDomain;if (ref && supportedDomain){var protocol = new RegExp("http:\/\/");ref = ref.replace(protocol,"");ref = ref.split("/")[0];for (var domain in supportedDomain){if (ref == supportedDomain[domain][0]){var countrycode = supportedDomain[domain][1];return countrycode;}}}else{return false;}}};window.onload = Page.init;if(self.name == ""){window.onresize = Page.adjustLayout;}
