function switchPos(obj) 
{
	if(obj.style.left != obj.style.width) 
	{
		obj.style.left = obj.style.width;
	} else 
	{
		obj.style.left = '0pt';
	}
}
function cursor() { document.body.style.cursor="default"; }
function module(x) {
	
	document.body.style.cursor="pointer";

	switch(x)
	{
		case 1:
	document.getElementById('module-image').src="images/tab-image1.jpg";
	document.getElementById('module-header').innerHTML="Residential Electrical Services";
	document.getElementById('module-description').innerHTML="<ul>        <li>Same-Day Service, Around the Clock</li>        <li>Lifetime Warranty on Service Upgrades</li>        <li>Residential Protection Maintenance Plan That Helps You Save</li>        <li>Financing Available</li>        <li>Free Home-Safety Evaluations</li>        <li>All Jobs Charged by the Job-Not by the Hour... You Save Money</li>      </ul>      <p><strong>Hoover Handles All Electrical Repairs, From Simple to Complex</strong> </p>      <ul>        <li>Installation of New Electrical Devices</li>        <li>Pool &amp; Appliance Hookups</li>        <li>Generator &amp; Meter Installations</li>        <li>Home Modernization &amp; Additions</li>      </ul>";
  		break;
		case 2:
	document.getElementById('module-image').src="images/tab-image2.jpg";
	document.getElementById('module-header').innerHTML="Commercial Electrical Services";
	document.getElementById('module-description').innerHTML="<p>Experience in a wide variety of Commercial Electrical Contracting Projects</p><ul><li>One-year Warranty on all Electrical Services</li>  <li>High Standard of Performance and Professionalism</li>  </ul><p>Hoover is an Expert in Commercial Electrical Repairs, from Simple to Complex</p>  <ul>  <li>New Systems Design and Installations</li>  <li>Upgrades and Expansions</li>  <li>Trouble-Shooting, Testing and Repairs</li>  <li>Primary Electrical Services</li>  <li>Security</li>  <li>Fire Alarms for Computer Data Centers</li>  </ul>";
  		break;
		case 3:
	document.getElementById('module-image').src="images/tab-image3.jpg";
	document.getElementById('module-header').innerHTML="Industrial Electrical Services";
	document.getElementById('module-description').innerHTML="<p>Hoover has 30 years' experience in a full range of Industrial Electrical Contracting</p><ul><li>All unique challenges met</li><li>Job done right, the first time</li><li>One-year Warranty on all Electrical Services</li><li>Downtime minimized to maximize your profitability</li><li>Electrical crew response 24 hours a day, every day</li><li>Satisfaction 100% Guaranteed</li></ul><p>Hoover can handle any Industrial Electrical Repair</p><ul><li>Installation of high voltage supply, UPS, generators and lighting</li><li>Machine Relocation and Controls</li><li>Routine Maintenance of Facilities and Equipment</li></ul>";
  		break;
		case 4:
	document.getElementById('module-image').src="images/tab-image4.jpg";
	document.getElementById('module-header').innerHTML="Infrared Testing";
	document.getElementById('module-description').innerHTML="<p>The electrical system in a plant or business is often taken for granted but it does require periodic maintenance and inspection. Infrared imaging enables the user to discover hidden defects such as loose wires and overloaded circuits as well as malfunctioning mechanical equipment. Rectifying the problems found using Infrared testing can result in more efficient energy usage, reduction in potential damage to equipment, less emergency maintenance and reduced downtime. Infrared technology allows us to visually measure temperature emission of any equipment. This technology has had a dramatic impact on diagnosis for variety of problems. Regular infrared surveys are very cost-effective in the identification of current and future complications. The utilization of our scanning will improve reliability of your systems and help solve issues before they arise.</p>";
  		break;
		case 5:
	document.getElementById('module-image').src="images/tab-image5.jpg";
	document.getElementById('module-header').innerHTML="Generators";
	document.getElementById('module-description').innerHTML="<p><strong>Peace of mind when utility power goes out.</strong>  Looking for a generator specialist in Metro Detroit? Hoover Electric installs generators from Oakland, to Macomb and down to Wayne County for homes and businesses,helping to ensure a strong source of back-up power. It is important to have a generator in order to keep your home comfortable and your businesses running smoothly in the case of a power outage. You can trust us to thoroughly review your power needs so that we can install the appropriate unit to suit your home or business. We will only install quality models that have the durability to last a long time.</p><ul style='margin:0 0 0 240px;padding:0;'><li>Continuous Power</li>  <li>Protect Essential Power</li>  <li>Huge Capacities</li>  <li>Great Warranties</li>  <li>Professional Installation</li></ul>";
  		break;
		

		default:
		setDumpster(1);
	}


}


// *******************************************************************************************************
// Page Swap *********************************************************************************************
// *******************************************************************************************************
var bustcachevar=1; //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects="";
var rootdomain=""+window.location.hostname;
var bustcacheparameter="";

function ajaxpage(url){
	var page_request = false;
	if (window.XMLHttpRequest) // if Mozilla, Safari etc
		page_request = new XMLHttpRequest();
	else if (window.ActiveXObject){ // if IE
		try {
			page_request = new ActiveXObject("Msxml2.XMLHTTP");
		} 
		catch (e){
			try {
				page_request = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e){}
		}
	}
	else
		return false;
	page_request.onreadystatechange=function(){
			loadpage(page_request);
	}
	if (bustcachevar) //if bust caching of external page
		bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime();
	
	page_request.open('GET', url+bustcacheparameter, true);
	page_request.send(null);
}

function loadpage(page_request){
	if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
		document.getElementById("content").innerHTML=page_request.responseText;
}

function loadobjs(){
if (!document.getElementById)
	return
for (i=0; i<arguments.length; i++){
var file=arguments[i];
var fileref="";
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref=document.createElement('script');
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link");
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" "; //Remember this object as being already added to page
}
}
}


function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

