function preloadImages() { 
  var d=document; 
  if(d.images){ 
  	if(!d.p)
	d.p=new Array();
    var i,
	j=d.p.length,
	a=preloadImages.arguments;
	for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function preloadNav() {
	preloadImages('assets/pixels/our_guarantee_hover.gif', 'assets/pixels/contact_us_hover.gif', 'assets/pixels/about_us_hover.gif' )
}

function changecss(theClass,element,value) {
	 var cssRules;
	 if (document.all) {
	  cssRules = 'rules';
	 }
	 else if (document.getElementById) {
	  cssRules = 'cssRules';
	 }
	 for (var S = 0; S < document.styleSheets.length; S++){
	  for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
	   if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
	    document.styleSheets[S][cssRules][R].style[element] = value;
	   }
	  }
	 }	
	}
	
function showImage() {
		if (document.all) {
			changecss('.image','visibility','visible');
			changecss('.imageFinal','visibility','visible');
	}
}

function revealMap(showID) {
	if (document.all) {
	var showElement = document.all(showID).style;
	}
	else if (document.getElementById&&!document.all) {
	var showElement = document.getElementById(showID).style;
	}
	showElement.visibility = "visible";
}

function hideMap(hideID) {
	if (document.all) {
	var hideElement = document.all(hideID).style;
	}
	else if (document.getElementById&&!document.all) {
	var hideElement = document.getElementById(hideID).style;
	}
	hideElement.visibility = "hidden";
}


function reveal(showID) {
	if (document.all) {
	var showElement = document.all(showID).style;
	var showFooter = document.all('tableFooter').style;
	var showMask = document.all('mask').style;
	}
	else if (document.getElementById&&!document.all) {
	var showElement = document.getElementById(showID).style;
	var hideTable = document.getElementById('tableContent').style;
	var showFooter = document.getElementById('tableFooter').style;
	var showMask= document.getElementById('mask').style;
	}
	showElement.visibility = "visible";
	showMask.visibility = "visible";
	showMask.filter = "alpha(opacity=75)";
	showFooter.visibility = "visible";
	showImage()
}

function hide(hideID) {
	if (document.all) {
	var showElement = document.all(hideID).style;
	var hideTable = document.all('tableContent').style;
	var hideMask = document.all('mask').style;
	}
	else if (document.getElementById&&!document.all) {
	var showElement = document.getElementById(hideID).style;
	var hideTable = document.getElementById('tableContent').style;
	var hideMask= document.getElementById('mask').style;
	}
	showElement.visibility = "hidden";
	hideMask.visibility = "hidden";
	hideTable.visibility = "visible";
}