var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) // JScript gives us Conditional compilation, we can cope with old IE versions. // and security blocked creation of the objects. try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @end @*/ if (!xmlhttp && typeof XMLHttpRequest!='undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } } if (!xmlhttp && window.createRequest) { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } } var lastId = -1; var pleaseWait = false; function getUrl(myURL, divId, changeStyle, cat, org, okayToTrack, prefill){ if(pleaseWait){ org = "'" + org + "'"; setTimeout("getUrl('"+myURL+"', '"+divId+"', "+changeStyle+", "+cat+", "+org+", "+okayToTrack+", "+prefill+")", 1); return; } xmlhttp.abort(); try{ myDiv = document.getElementById("prefilled"); if(prefill){ myDiv.style.display = "block"; myDiv.innerHTML = "[loading]"; }else{ myDiv.style.display = "none"; myDiv.innerHTML = ""; } }catch(ex){} //pleaseWait = true; myDiv = document.getElementById(divId); myDiv.innerHTML = "[loading]"; if(isan(divId) && isan(lastId)){ if(lastId > 0){ try{ lastDiv = document.getElementById(lastId); lastDiv.innerHTML = ""; }catch(ex){} } lastId = divId; }else{ lastId = -1; } xmlhttp.open("GET", myURL,true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { myDiv.innerHTML = xmlhttp.responseText; myDiv = document.getElementById("prefilled"); if(prefill){ orgDiv = document.getElementById(divId + "-prefill"); myDiv.innerHTML = orgDiv.innerHTML; myDiv.style.display = "block"; }else{ /*myDiv.innerHTML = "";*/ myDiv.style.display = "none"; } if(changeStyle){ //myDiv.style.borderLeft = "thin dashed black"; } pleaseWait=false; tmpSub4 = cat; if(okayToTrack){ s_hier3 = "cxnt:"+s_siteName+":"+tmpTool+":"+tmpSub1+":"+tmpSub2+":"+tmpSub3+":"+tmpSub4; tmp = new String(document.location); s_pageName = tmp.replace(/^http:\/\//, ""); if(cat != ""){ s_pageName += cat + "/"; } if(org != ""){ s_pageName += org + "/"; } sendAnalyticsEvent(); } } } xmlhttp.send(null) } function resetDiv(divId){ myDiv = document.getElementById(divId); myDiv.innerHTML = ""; myDiv.style.borderLeft = ""; lastId = -1; } function isan(string) { if (string.length == 0) return false; for (var i=0;i < string.length;i++) if ((string.substring(i,i+1) < '0') || (string.substring(i,i+1) > '9')) return false; return true; } function sendAnalyticsEvent(){ void(s_gs(s_account)) } function prefillFromQuery(){ var mycat; var org; var url = ""; if( getQueryVariable('c') ){ mycat = getQueryVariable('c'); org = getQueryVariable('o'); }else if( getVarFromUrl(0) ) { url = getVarFromUrl(-1); mycat = getVarFromUrl(0); org = getVarFromUrl(1); }else{ return; } if( mycat != false ){ getUrl( url + mycat + "/index.html?no_owrap=true", "categoryBox", true, mycat, "", false, false); pleaseWait = true; cxnt_subchan3 = mycat; }else{ return; } if( org != false ){ prefill = true; window.setTimeout("getUrl('" + url + mycat + "/" + org + ".html?no_owrap=true', "+org+", "+false+", "+mycat+", "+org+", "+false+", "+true+")", 1); //getUrl(mycat + '/' + org + '.html?no_owrap=true', org, false, mycat, org, false); } } function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i 0){ //tmpLoc += "?c=" + cat; tmpLoc += cat + "/"; if(org > 0){ //tmpLoc += "&o=" + org; tmpLoc += org + "/"; } } document.location = tmpLoc; }