function clearField(clearThis){
	return clearThis.value='';
}

var sPath = window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);

var revert = new Array();
var inames = new Array('img_11', 'img_11_1', 'img_11_2', 'img_11_3', 'img_11_4', 'img_11_5');


// Preload
/*if (document.getElementById('menu')) {*/
  var flipped = new Array();
  for(i=0; i< inames.length; i++) {
    flipped[i] = new Image();
    flipped[i].src = "img/"+inames[i]+".png";
  }
/*}*/
window.onload=function(){
 if (sPage == "signup.php"){
  document.getElementById('menu').style.backgroundImage = "url("+flipped[1].src+")";
  document.getElementById(sPage).style.color = "#000";
 }
 if (sPage == "services.php"){
  document.getElementById('menu').style.backgroundImage = "url("+flipped[2].src+")";
  document.getElementById(sPage).style.color = "#000";
 }
 if (sPage == "features.php"){
  document.getElementById('menu').style.backgroundImage = "url("+flipped[3].src+")";
  document.getElementById(sPage).style.color = "#000";
 }
 if (sPage == "help.php"){
  document.getElementById('menu').style.backgroundImage = "url("+flipped[4].src+")";
  document.getElementById(sPage).style.color = "#000";
 }
 if (sPage == "about.php"){
  document.getElementById('menu').style.backgroundImage = "url("+flipped[5].src+")";
  document.getElementById(sPage).style.color = "#000";
 }
}

function over(num) {
  if(document.images) {
    revert[num] = document.getElementById('menu').style.backgroundImage;
    document.getElementById('menu').style.backgroundImage = "url("+flipped[num].src+")";
  }
}
function out(num) {
  if(document.getElementById('menu').style.backgroundImage) document.getElementById('menu').style.backgroundImage = revert[num];
}

