// JavaScript Document
function getQueryStringValueFor(thisQuery) {
   //Get the query string
   location.url = /\?.+/.exec(location.href)
   // create the url array
   location.url = location.url?(location.url[0].substring(1).split('&')):[];

   // loop over the tag pairs
   for (var i=0,len=location.url.length;i<len;i++) {
     var nameValuePair = location.url[i].split('=');
     location.url[nameValuePair[0]]=unescape(nameValuePair[1]);
     if(nameValuePair[0] == thisQuery) {
       return nameValuePair[1];
     }
   }
   return;
}