function route(urlMain,urlMenu) {
	with (parent) {
		Main.location.replace(gCheckUrl+urlMain+'&newMenu='+urlMenu+'&x='+new Date().getTime());
		SideBarTop.location.replace('blank.html');
		SideBarBot.location.replace('blank.html');
	}
	return false;
}

function showMsg(msg) {
	window.status=msg;
	return true;
}

function hideMsg() {
	window.status='';
	return true;
}

function bldImages() {
	var i;
	for (i=0; i<IMAGECOUNT; i++) 
		gImg[i]=new Image();
	for (i=0; i<SLOTS; i++)
		showPic(i);
	setInterval('changePic()',25000);
}

function changePic() {
	//showPic(Math.round(Math.random()*(SLOTS-1)));
	gNextSlot=(gNextSlot+1) % SLOTS;
	showPic(gNextSlot);
}

function showPic(slot) {
	var obj;
	if (document.all) {
		obj=eval('document.all.pic'+slot)
	} else {
		if (document.getElementById) {
			obj=document.getElementById('pic'+slot);
		}
		else {
			obj=getLayer("DivPic");
			if (obj) obj=obj.document.images[slot];
		}
	}
	if (!obj) return;
	if (!gImg[gNextImg].src) {
		gImg[gNextImg].src="images/title/slide"+gNextImg+".jpg";
	}
	obj.src=gImg[gNextImg++].src;
	gNextImg %= IMAGECOUNT;
}

function sbm(url,buildFramesUrl) {
	if (parent.Main) {
		parent.Main.location.href = url;
	} else {
		location.href = buildFramesUrl;
	}
	return false;
}
function sbmTab(url,buildFramesUrl) {
	if (parent.Main) {
		var curPage;
		if (gThisPage=="") {
			curPage=mainFrame();
		} else {
			curPage=gThisPage;
		}
		url += curPage;
		parent.Main.location = url;
	} else {
		location = buildFramesUrl;
	}
	return false;
}
