//to pull a value from a query string in to the javascript file
function getQuerystring(key, default_)
{
  if (default_==null) default_=""; 
  key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
  var qs = regex.exec(window.location.href);
  
  if(qs == null)
    return default_;
  else
    return qs[1];
}

// url example
//http://www.bloggingdeveloper.com?author=bloggingdeveloper
// to get the value
//var author_value = getQuerystring('author');


function S4() {
   return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
}
function guid() {
   return (S4()+"cl"+S4());
}


