// JavaScript Document
function popWin(url,h,w) {

	supportWindow = window.open(url,"_blank","height="+h+",width="+w+",resizable=no,scrollbars=no,toolbar=no,location=no,menubar=no,copyhistory=no");
	
	supportWindow.focus();
	
	return false;
	
}
function expandMenu(submenu,mainmenu) {	
	
	var smenu = document.getElementById(submenu);
	var mmenu = document.getElementById(mainmenu);
	var pos = findLocation(mmenu);
	
	smenu.style.top = (pos.y + 35) + 'px';
	smenu.style.left = pos.x + 'px';
	smenu.style.display = "block";
	
}

function closeMenu(submenu) {
	
	var smenu = document.getElementById(submenu);
	smenu.style.display = "none";
	
}

function findLocation(obj) {
	
	var loc = { x: obj.offsetLeft, y: obj.offsetTop };
	
	if (obj.offsetParent) {
		
		var par = findLocation(obj.offsetParent);
		loc.x += par.x;
		loc.y += par.y;
		
	}
	
	return loc;
	
}

function expandElement(obj) {
	
	var tobj = document.getElementById(obj);
	tobj.style.visibility = 'visible';
	tobj.style.display = 'block';
	
	return false;
	
}

function closeElement(obj) {
	
	var tobj = document.getElementById(obj);
	tobj.style.visibility = 'hidden';
	tobj.style.display = 'none';
	
	return false;
	
}
function openClose(id) {
	
		if (document.getElementById(id).style.visibility == "visible") {
			
			document.getElementById(id).style.visibility = 'hidden';
			document.getElementById(id).style.display = 'none';
			
		} else {
			
			document.getElementById(id).style.visibility = 'visible';
			document.getElementById(id).style.display = 'block';
			
		}
		
		return false;
}


