
function statusBar() {
	if(document.images){
		processBg = new Image(342,200);
		processBg.src="graphics/status.jpg";
		
		status = new Image(32,32);
		status.src="graphics/loading.gif";
	}
	
	var b = document.getElementsByTagName('body');
	addElement(b[0],'processBar');
	//addElement(b[0],'contact-overlay');
	
	var p = document.getElementById('sbtn');
	p.type="button";
	//var overlay = document.getElementById('contact-overlay');
	var processBar = document.getElementById('processBar');
	p.onclick=function() {
		//hideSelectBoxes();
		//overlay.style.display = "block";
		processBar.style.display = "block";
		processBar.innerHTML = "Processing please wait...<img name=\"pbar\" src=\"graphics/loading.gif\" alt=\"Please wait while we process your request.\" />";
		setTimeout('document.images["pbar"].src = "graphics/loading.gif"', 200); 
		var usersInput = document.getElementById("comments");
		usersInput = usersInput.value.toLowerCase();
		if(checkWords(usersInput,words=new Array("manual"), "Are you looking for a housing manual? If so we can redirect you to the correct location now.")){
			window.location="contact.php?form=manual-form";
		}
		if(checkWords(usersInput,words=new Array("service", "part", "repair"), "Do you have a question about Service/Parts? If so we can redirect you to the correct location now.")){
			window.location="contact.php?form=service-form";
		}
		setTimeout("document.salesRequestForm.submit()",500);
	}
}

function addElement(el,elId) {
  var newEl = document.createElement('div'); //create the alt text container
	var newElId = elId; //name and set the id of the alt text
  newEl.setAttribute('id',newElId);
	el.appendChild(newEl);
}

// ---------------------------------------------------

function showSelectBoxes(){
	selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "visible";
	}
}

// ---------------------------------------------------

function hideSelectBoxes(){
	selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "hidden";
	}
}

// ---------------------------------------------------

