function getValue(varname) { //First, we load the URL into a variable var url = window.location.href; if (url.indexOf("?") != -1) { //Next, split the url by the ? var qparts = url.split("?"); //Check that there is a querystring, return "" if not if (qparts.length == 0) { return ""; } //Then find the querystring, everything after the ? var query = qparts[1]; //Split the query string into variables (separates by &s) var vars = query.split("&"); //Initialize the value with "" as default var value = ""; //Iterate through vars, checking each one for varname for (i=0;iSearch Websites';