var sURL = new String(location.href);
var sCurrentPage = '';

while (sURL.indexOf('/') != -1)
{
	sURL = sURL.substr(sURL.indexOf('/')+1);
}
sCurrentPage = sURL;

function GetCurrentPage() {
	return(sCurrentPage);
}

function ShowMenus(iMenuId) {

	sMenuId = 'Menu'+iMenuId;
	MM_showHideLayers(sMenuId,'','show');
}

function HideMenus() {
	for (i=1;i<=4;i++) {
		sMenuId = 'Menu'+i;
		MM_showHideLayers(sMenuId,'','hide');	
	}
}

function CheckReload() {
	window.location.href = window.location.href;
}

function OverMenuItem(iMenuItemId,iSubMenuItemId) {
var sImageId = 'Imgmenu'+iMenuItemId+'_'+iSubMenuItemId;
var sImageName = 'images/menu/menu'+iMenuItemId+'_'+ iSubMenuItemId +'_mo.gif'
var	sPictureId = 'ImgMenuPic'+iMenuItemId;
var	sPictureName = 'images/menu/menu'+iMenuItemId+'_'+ iSubMenuItemId +'_pic.jpg'

 	ShowMenus(iMenuItemId);
	MM_swapImage(sImageId, '', sImageName, sPictureId, '', sPictureName, 1)
}

function GoToPage(sPageName,bNew) {
	if (sPageName == parent.frames['main'].GetCurrentPage()) {
		return;
	}
	if (bNew == true) {
		MM_openBrWindow(sPageName,'','')
	}
	else {
		parent.frames['main'].window.location.href=sPageName;
	}
}

function ShowPage(iMenuId, iItemId) {
var sNewPage = 'doc'+iMenuId+'_'+iItemId+'.shtml';

	if(sNewPage == sCurrentPage) {
		return;
	}
	window.location.href=sNewPage;
}