iHomeOn = new Image();
iHomeOff = new Image();
iNewOn = new Image();
iNewOff = new Image();
iAbtOn = new Image();
iAbtOff = new Image();
iAdvOn = new Image();
iAdvOff = new Image();
iConOn = new Image();
iConOff = new Image();


function preLoad() {
	iHomeOn.src = "/img/but_home.gif";
	iHomeOff.src = "/img/buton_home.gif";
	iNewOn.src = "/img/but_news.gif";
	iNewOff.src = "/img/buton_news.gif";
	iAbtOn.src = "/img/but_about.gif";
	iAbtOff.src = "/img/buton_about.gif";
	iAdvOn.src = "/img/but_ad.gif";
	iAdvOff.src = "/img/buton_ad.gif";
	iConOn.src = "/img/but_contact.gif";
	iConOff.src = "/img/buton_contact.gif";
	}

//ihome inew iabt iadv icon 

function ShowHome(){ihome.src=iHomeOff.src;}
function HideHome(){ihome.src=iHomeOn.src;}
function ShowNew(){inew.src=iNewOff.src;}
function HideNew(){inew.src=iNewOn.src;}
function ShowAbt(){iabt.src=iAbtOff.src;}
function HideAbt(){iabt.src=iAbtOn.src;}
function ShowAdv(){iadv.src=iAdvOff.src;}
function HideAdv(){iadv.src=iAdvOn.src;}
function ShowCon(){icon.src=iConOff.src;}
function HideCon(){icon.src=iConOn.src;}


function barSize() {
	var oParent = topbar.offsetParent;
	var iWindowWidth = oParent.clientWidth;
	if (iWindowWidth > 802) {
		//window.status = iWindowWidth;
		topbar.style.width = iWindowWidth ;
		if(iWindowWidth < 839) {
			smid.style.width = 0;	
		}
		else {
			smid.style.width = iWindowWidth - 839;
		}
		//sright.style.left = iWindowWidth - 234;
		}
	}


function openWin(sDoc, iHt, iWd)
	{
	var sOption = 'menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,height=' + iHt + ',width=' + iWd;
	window.name='NewPop';
	window.open(sDoc, 'Other', sOption);
	}

preLoad();
