var IE = (document.all) ? 1 : 0;
var ns6=document.getElementById ? 1:0
var myimages=new Array()

function switch_block(whichone) {
curmenuID=ns6? document.getElementById(whichone).id : eval(whichone).id
if (window.themenu&&themenu.id!=curmenuID) {
	themenuStyle.display="none"
	}
themenu=ns6? document.getElementById(whichone): eval(whichone)
themenuStyle=ns6? themenu.style : themenu

if (themenuStyle.display=="none") {
	themenuStyle.display=IE?"block":"table-row"
	}
return false
}

function switch_block2(whichone) {
thetr=ns6? document.getElementById(whichone): eval(whichone)
thetrStyle=ns6? thetr.style : thetr

if (thetrStyle.display=="none") {
	thetrStyle.display=IE?"block":"table-row"
	}
else {
	thetrStyle.display="none"
	}
return false
}

function clk(n) {
if(document.images){
	(new Image()).src="count.php?banner_id="+n;
	}
return true;
}

function imgSet(imageName,i) {
	imageName.src = myimages[i].src;	
}

function loadimg(img) {
	var a = new Image();
	a.src = img;
	return a;
}

function preload(links) {
	for (i=0;i<links.length;i++) {
		myimages[i]=loadimg('menu/' + links[i]);
	}
}
