function lastGasp( name ) //get the HTTP param value of the sent in name and return it as a string
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); //replace any illegal characters with legal ones
  
  //Execute a regluar expression on the url and get the params being sent in with the given var name
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );

  if( results == null ) //if nothing then return nothing
    return "";
  else //else return the given var name's value
    return results[1];
}


function getLanguage() //gets the default language of the web browser/system
{
	language=navigator.systemLanguage.toString();
	
	if(language) //if it got the language then get the first two characters for the language code, f the regional dialect
	{
		language = language.substring(0,2);
	}
	
	return language;
}