function setStyle(x)
{
document.getElementById(x).className ="white"
}
function setStyle2(x)
{
if (document.getElementById(x).value == "")
		{
document.getElementById(x).className ="blank"
		}
}
function getValue(varname)
{	
  // First, we load the URL into a variable
  var url = window.location.href;

  // 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];//alert("test"+query);
  // Split the query string into variables (separates by &s)
	  if (query ==null)
  {
    return "";
  }
  var vars = query.split("&");
  // Initialize the value with "" as default
	
  var value = ""; //
  // Iterate through vars, checking each one for varname
  for (i=0;i<vars.length;i++)
  {
    // Split the variable by =, which splits name and value
    var parts = vars[i].split("=");
    
    // Check if the correct variable
    if (parts[0] == varname)
    {
      // Load value into variable
      value = parts[1];

      // End the loop
      break;
    }
  }
  
  // Convert escape code
  value = unescape(value);

  // Convert "+"s to " "s
  value.replace(/\+/g," ");

  // Return the value
  return value;
}


 function validar(form){
	  
	 /* if (document.sales.first_name.value == "")
		{ alert("Please enter your first name."); document.sales.first_name.focus(); return false; }
		  if (document.sales.last_name.value == "")
		{ alert("Please enter your last name."); document.sales.last_name.focus(); return false; }*/
		
		document.sales.page.value = window.location.href+"?page=form";
		
		//alert(document.sales.page.value);
	 /*if (document.sales.phone.value == "")
		{ alert("Please enter your telephone number."); document.sales.phone.focus(); return false; }

     if (document.sales.email.value == "")
		{ alert("Please enter your email address."); document.sales.email.focus(); return false; }
				
		else{
		return true;
		}*/
				return true;
    }
	
	