/*
function $(id){
	return document.getElementById(id);
}
*/

function hoverImg(oLink,fileName){
	var regExpFileName = /[^\/]+$/ig;
	var oImg = oLink.getElementsByTagName("IMG")[0];
	var cssClass = oImg.className;
	oImg.src = oImg.src.replace(regExpFileName,fileName);
	oImg.className = "";
	oImg.className = cssClass;
}

function topMenuRollover(o,value,imgSrc){
	o.parentNode.parentNode.getElementsByTagName("SPAN")[0].style.visibility = (value)?"visible":"";
	hoverImg(o,imgSrc);
}

function secMenuRollover(o,value){
	o.parentNode.parentNode.className = (value)?"hover":"";
	var oTDs = o.parentNode.parentNode.getElementsByTagName("TD");
	for(var i=0; i < oTDs.length; i++){
		if(oTDs[i].runtimeStyle){
			oTDs[i].runtimeStyle.filter = "";
		}
		var tClassName = oTDs[i].className;
		oTDs[i].className = "";
		oTDs[i].className = tClassName;
	}
}

function popup(href, title, width, height, blocker) {
    var offsetX = Math.floor((screen.availWidth  - width)  / 2);
    var offsetY = Math.floor((screen.availHeight - height) / 2);
    var winMap = window.open(href, title, 'width=' + width + ', height=' + height + ', scrollbars=0, resizable=0, left=' + offsetX + ', top=' + offsetY);
    if (winMap)
        winMap.focus();
    else
        alert(blocker);
}
