function LoadImage(img, windowWidth, windowHeight)
{	
	var ScrnSize = "UnCommon";
	var screenHeight = 0;
	var screenWidth = 0;
	
	if(navigator.appVersion.indexOf("4.") != -1 && navigator.appName.indexOf("Explorer") != -1)
	{	
		ScrnSize = screen.width + "x" + screen.height;
		screenWidth = screen.width;
		screenHeight = screen.height;
	}
	else
	{	
		ScrnSize = screen.width + "x" + (screen.height + 19);
		screenWidth = screen.width;
		screenHeight = (screen.height+19);
	}
	
    theImage = new Image();
    theImage.src = img;

	if ((screenWidth > windowWidth) && (screenHeight > windowHeight))
	{	windowSize = ",width="+windowWidth+",height="+windowHeight;
		zoomWin = window.open(img, "Zoom", "toolbar=no,status=no,resizable=yes"+windowSize);
	}
	else 
	{	
		if (screenWidth < windowWidth)
		{	
			windowWidth = screenWidth;			
		}
		if (screenHeight < windowHeight)
		{	
			windowHeight = (screenHeight-70);
		}
		
			windowSize = ",width="+windowWidth+",height="+windowHeight;
			zoomWin = window.open(img, "Zoom", "toolbar=no,status=no,resizable=yes,scrollbars=yes"+windowSize);
	}
	
    zoomWin.focus();
}


var activeBtnID = "";

function pb_menuBtnOver(btnID)
{
    btnObj  = document.getElementById(btnID);
    btnObj.className  = "menuButton_on";
}

function pb_menuBtnOut(btnID)
{
    btnObj  = document.getElementById(btnID);

    if (btnID != activeBtnID)
    {
        btnObj.className  = "menuButton";
    }
}

function pb_setActiveMenuBtn()
{
    fileRegExpr = /\/(\w+)\.html/;
    arrResult = fileRegExpr.exec(location.pathname);

    if ( arrResult == null || arrResult[1] == "index" )
    {
        activeBtnID = "btn_index";
    }
    else
    {
        activeBtnID = "btn_" + arrResult[1];
    }

    pb_menuBtnOver(activeBtnID);
}

window.onload = pb_setActiveMenuBtn;

