//copyright 2005, 2006 Michael Devey
//this script must not be used or reproduced without written concent from its authour

//if ( !window.location.search )
//	eval(unescape('%77%69%6e%64%6f%77%2e%6c%6f%63%61%74%69%6f%6e%2e%68%72%65%66%20%3d%20%27%2f%3f%61%70%70%6c%69%61%6e%63%65%27%3b'));

var STD = (document.getElementById) ? 1 : 0;

if (STD) window.onresize = pos;

function we(){
	document.write("For all enquires email info@parts-appliance.com")
}

function pos(){

	if (STD){

		divElements = document.body.getElementsByTagName("DIV");

		if( typeof( window.innerWidth ) == 'number' ) {
			winWidth = window.innerWidth;

		} else if( document.documentElement &&	document.documentElement.clientWidth ) {
			//IE 6+ in 'standards compliant mode'
			winWidth = document.documentElement.clientWidth + 18;

		} else if( document.body && document.body.clientWidth ) {
			winWidth = document.body.clientWidth + 18;
		}
		
		mainPos = parseInt(document.getElementById("main").style.left) - 8;

		xOffSet = winWidth/2-400-mainPos;
		
		if (xOffSet < -mainPos) xOffSet = - mainPos;
		
		divSub = document.getElementById("sub");
		for (i=0; i<divElements.length; i++){
		
			divObj = divElements[i];
			
			if (divObj != divSub){
				pos = parseInt(divObj.style.left);
				
				if (pos) {
					pos +=xOffSet;
					divObj.style.left=pos+"px";
				}
			}
		}
	}
}