// JavaScript Document

// Image PreLoader Function
function loadProgress(that) {
	//document.body.style.opacity = 0.25;
	document.body.style.backgroundColor = '#CCC';
	var oImg = false;
	var oBox = false;
	var oWrap = false;
		oBox = document.getElementById('progress');
	 	if (typeof(oBox) == undefined || oBox == null) {
			oBox = document.createElement('div');
			oBox.className = 'search-wait-popup';
			oBox.id = 'progress';
			oBox.align = 'center';
			oBox.innerHTML = 'Please Wait...';
			//oBox.innerHTML = '<img src="http://www.mysecurityparts.com/includes/templates/mysecure_default/images/progress-bars/loader-roller-lrg.gif" />';
		}
		
		/*	//create img element for search progress
			oImg = document.createElement('img');
			if (!oImg) {
				oImg.className = 'search-wait-image'; //oImg.addClassName('search-wait-image');
				//this all go into css
				oImg.src = "images/progress-bars/loader-roller-lrg.gif";	
				oBox.appendChild(oImg);							
			}*/
			//get the container box and fade its image
			oWrap = document.getElementById('mainWrapper');
			//if (!oWrap) {
				oWrap.style.opacity = 0.25; //object2.style.backgroundColor = '#3A7C28';
				oWrap.style.filter = 'alpha(opacity=25)';
				oWrap.appendChild(oBox);	//document.body.appendChild(object);
			//}
	
	document.body.onclick = "return true;";
	return false;	
		
		
};