// URLQSParser1.1, (c) 1997 by Rui M. Silva 
// Update on URLQSParser 1.
// Now smartly parses the query string in search of boolean values.
var thisUrl=document.URL.toString(), start=1+thisUrl.indexOf('?'), qs=thisUrl.substring(start,thisUrl.length); // Capture the QueryString
if (start > 0) // If there is a QS then...
 { var sets=qs.split('&'), nsets=sets.length; // sets is an array of strings in the format var=value
   for(i=0;i<nsets;i++) // for each pair...
    { pair=sets[i].toString().split('=');    // splice it...
      var evalstr = "var "+pair[0]+"=";
      if (pair[1] == 'true' || pair[1] == 'false')
        evalstr += (pair[1] == 'true')?'true':'false';
      else
        evalstr += "'"+pair[1]+"'";
      eval(evalstr+";");  // and eval it.
    }
 }