var requests = new Array(); if(typeof(XMLHttpRequest) == 'undefined') var XMLHttpRequest = function() { var request = null; try { request = new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) { try { request = new ActiveXObject('Microsoft.XMLHTTP'); } catch(ee) {} } return request; } function ajax_create_request(context) { for(var i=0; i%\\^[]`\+\$\,;/?:@=&#"; // deleted these chars from the include list ";", "/", "?", ":", "@", "=", "&" and # // so that we could analyze actual URLs function isUnsafe(compareChar) // this function checks to see if a char is URL unsafe. // Returns bool result. True = unsafe, False = safe { if (unsafeString.indexOf(compareChar) == -1 && compareChar.charCodeAt(0) > 32 && compareChar.charCodeAt(0) < 123) { return false; } // found no unsafe chars, return false else { return true; } } function decToHex(num, radix) // part of the hex-ifying functionality { var hexString = ""; while (num >= radix) { temp = num % radix; num = Math.floor(num / radix); hexString += hexVals[temp]; } hexString += hexVals[num]; return reversal(hexString); } function reversal(s) // part of the hex-ifying functionality { var len = s.length; var trans = ""; for (i=0; i 0) { lastpercent = val.lastIndexOf("%"); if (lastpercent != -1) // we found a % char. Need to handle { // everything *after* the % frag = val.substring(lastpercent+1,val.length); // re-assign val to everything *before* the % val = val.substring(0,lastpercent); if (frag.length >= 2) // end contains unencoded { // alert ("frag is greater than or equal to 2"); encval = frag.substring(0,2); newStr = frag.substring(2,frag.length) + newStr; //convert the char here. for now it just doesn't add it. if ("01234567890abcdefABCDEF".indexOf(encval.substring(0,1)) != -1 && "01234567890abcdefABCDEF".indexOf(encval.substring(1,2)) != -1) { encval = String.fromCharCode(parseInt(encval, 16)); // hex to base 10 newStr = encval + newStr; // prepend the char in } // if so, convert. Else, ignore it. } // adjust length of the string to be examined backlen = lastpercent; // alert ("backlen at the end of the found % if is: " + backlen); } else { newStr = val + newStr; backlen = 0; } // if there is no %, just leave the value as-is } // end while } // end 'state=none' conversion else // value needs to be converted to URL encoded chars { for (i=0;i