
function openInNewWindow(aObj,w,h,attr)
{
	var aURL
	var aTarget = aObj.target;
	
	if(aObj.href)
	{
		aURL = aObj.href;
	}
	else
	{
		aURL="about:blank";
	}
	
	x=(screen.availWidth-w)/2
	y=(screen.availHeight-h)/2
	if(aObj.popUpWin)
	{
		aWindow = aObj.popUpWin
		if(!window.aWindow.closed)
		{ 
			window.aWindow.close();
		}
	}
	aWindow = window.open(aURL,aTarget,"width="+w+",height="+h+",left="+x+",top="+y+","+(attr ? attr : "location=no,status=yes,menubar=no,scrollbars=yes,resizable=no"))
	aObj.popUpWin = aWindow;
	return false;
}



normalState = "_normal.";
overState = "_over.";
activeState = "_down.";

var currentSubBlok=null;

function showBlok(aElm,subBlokId,mOver)
{
	var imgElm = aElm.getElementsByTagName('img')[0];
	var subBlokObj = document.getElementById(subBlokId);
	
	imgElm.src = imgElm.src.replace(normalState,overState);
	
	if(currentSubBlok)
	{
		currentSubBlok.style.visibility="hidden";
	}
		
	if(subBlokObj)
	{
	/*	subBlokObj.style.left=aElm.offsetLeft+"px"; */
		subBlokObj.style.visibility="visible";
		currentSubBlok=subBlokObj;
		document.onmouseup = function()
		{
			currentSubBlok.style.visibility="hidden";
			document.onmouseup=null;
		}
	}
	
	aElm.onmouseout = function()
	{
		var imgElm = this.getElementsByTagName('img')[0];
		imgElm.src = imgElm.src.replace(overState,normalState);
	}
}
