window.onload = initAll;

function initAll(){
	topNavOut();
	footerOut();
	ebayOut();
winSize();
}

function winSize(){
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	
	if (y < 650) {
		document.getElementById("maincontainer").style.top = '0px';
		document.getElementById("maincontainer").style.marginTop = '0px';
		document.getElementById("copyright").style.top = '595px';
		document.body.parentNode.style.background = "#F4EBD2 url(../images/bg.jpg) repeat-x scroll center top";
	}
	
	if (x < 900) {
		document.getElementById("maincontainer").style.left = '0px';
		document.getElementById("maincontainer").style.marginLeft = '0px';
		document.getElementById("copyright").style.left = '0px';
		document.getElementById("copyright").style.marginLeft = '0px';
	}
}

function topNavOver(thisNav){
	document.getElementById("topnav").src = "../images/topnav/topnav_" + thisNav + "_hov.png";
}

function topNavOut(){
	document.getElementById("topnav").src = "../images/topnav/topnav_rst.png";
}

function footerOver(thisNav){
	document.getElementById("footerimg").src = "../images/footer_" + thisNav + "_hov.png";
}

function footerOut(){
	document.getElementById("footerimg").src = "../images/footer_rst.png";
}

function ebayOut(){
	document.getElementById("ebayimg").src = "../images/ebay_rst.png";
}