/* Javascript written by Paula Molinero, */ /* based on sevaral code samples and */ /* other online resources. */ /* _______________________________________ */ var thisAction = ''; function createRequestObject() { var ro; if (browser == "Microsoft Internet Explorer") { ro = new ActiveXObject("Microsoft.XMLHTTP"); } else { ro = new XMLHttpRequest(); } return ro; } var http = createRequestObject(); //___ Load full section (s1) function sndReq (thisAction,backToTop) { var prevAction = readCookie ('s0'); var savedAction = readCookie ('s0p'); if((prevAction) && (savedAction) && (prevAction != savedAction)) { createCookie ('s0p',prevAction); } createCookie ('s0',thisAction); http.open ('get', 'index.php?a=1&s0=' + thisAction); http.onreadystatechange = handleResponse; http.send(null); if (backToTop) { topOfThePage(); } } //___ Run a customized process and load full section (s1) function sndReq2 (thisAction,vars) { //alert ('a: ' + thisAction + ' - ' + vars); if(thisAction != '') { http.open ('get', 'index.php?proc=1&flag=' + thisAction + '&v=' + vars); http.onreadystatechange = handleGralResponse; http.send(null); } } /* function sndReq2 (thisAction,gralResponse) { if(thisAction != '') { http.open ('get', 'index.php?proc=1&flag=' + thisAction); if (gralResponse) { http.onreadystatechange = handleGralResponse; } else { http.onreadystatechange = handleResponse; } http.send(null); } } */ //___ Other stuff ______________________________________________________________________________ // function initPage () { co = readCookie ('s0'); if (co) { sndReq (co); } else { sndReq ('home'); } //window.history.forward(1); //location.replace(this.URL); //window.history.forward(1); } function goBack() { var s0p = readCookie('s0p'); if (s0p === false) { s0p = 'home'; } sndReq (s0p); //alert (s0p) } function grabGetVars () { var idx = document.URL.indexOf('?'); var params = new Array(); if (idx != -1) { var pairs = document.URL.substring(idx+1, document.URL.length).split('&'); for (var i=0; i