// JavaScript Document<!-- //

function popup_show_menu(menu) { //v3.0
	menuObj = document.getElementById(menu);
	if (menuObj) {
		if (menuObj.style)
			menuObj.style.visibility = "visible";
	}
}

function popup_hide_menu(menu) {
	menuObj = document.getElementById(menu);
	if (menuObj) {
		if (menuObj.style)
			menuObj.style.visibility = "hidden";
	}
}

function popup_resize_children(div_id) {
	body = document.body;
	elements = body.getElementsByTagName("div");
	var re = new RegExp(div_id+"_(.*)_[0-9]+");
	var i = 0;
	var width = 0;
	var popup = null;
	
	for (i=0; i < elements.length; i++) {
		id = elements[i].id;
		matches = re.exec(id);
		if (matches && matches.length > 0) {
			elem_id = div_id+"_menu_" + matches[1];
			popup = document.getElementById(div_id+"_menu_" + matches[1]);
			width = popup.offsetWidth - 2;
			elements[i].style.left = width + "px";
		}
	}
	
	return;
}

function popup(url, height, width)
{

	if(!height || height < 1)
		height = 600;

	if(!width || width < 1)
		width = 600;


	window.open(url, url.replace(/[^a-z|0-9]/g,""), "width=" + width + ",height=" + height +",menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes");


}


function act() { };
function inact() { };


