function toggleMenu(currMenu) {
	if (document.getElementById){
		thisMenu      = document.getElementById(currMenu).style;
		thisMenuLink  = document.getElementById(currMenu + "link");
		thisMenuImage = document.getElementById(currMenu + "image")

		if (thisMenu.display == "block") {
			thisMenu.display = "none";

			if (thisMenuLink)
				thisMenuLink.style.backgroundImage = "url(/images/img_plus.gif)"

			if (thisMenuImage)
				thisMenuImage.src = "/images/img_plus.gif"
		} else {
			thisMenu.display = "block";

			if (thisMenuLink)
				thisMenuLink.style.backgroundImage = "url(/images/img_minus.gif)"

			if (thisMenuImage)
				thisMenuImage.src = "/images/img_minus.gif"
		}
		return false;
	}
	else {
		return true;
	}
}

function gblGetPopupDimension(){
	var winDimension=new Array();
	
	if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
		winDimension[0] = window.innerWidth;
		winDimension[1] = window.innerHeight;
	} else {	// IE
		if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight )){					//IE 5 and below
			winDimension[0]  = document.documentElement.clientWidth;
			winDimension[1] = document.documentElement.clientHeight;
		}else{								
			winDimension[0]  = document.body.clientWidth;
			winDimension[1] = document.body.clientHeight;
			
		}
	}
	return(winDimension);
}

function gblCenterPopup(){
	var winDimension=new Array();
	winDimension = gblGetPopupDimension();
	
	var leftPos=0; var topPos=0;
	
	if (screen) {
		leftPos = (screen.width / 2) - (winDimension[0]/2);
		topPos = (screen.height / 2) - (winDimension[1]/2);
	}
	window.moveTo(leftPos,topPos);
}



function gblPopupPage(URL, l, t, w, h){
	window.name = "parentWindow";
	var windowprops = "location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no" + ",left=" + l + ",top=" + t + ",width=" + w + ",height=" + h;
	popup = window.open(URL, "MenuPopup", windowprops);
	popup.focus();
}


function gblPopupPageCenter(URL, w, h){
	var top = 0;
	var left = 0;
	if (screen) {
		left = (screen.width / 2) - (w/2);
		top = (screen.height / 2) - (h/2);
	}
	gblPopupPage(URL, left, top, w, h);
}


function gblTextFocus(element) {
	if (element.value == element.defaultValue) {
		element.value = '';
	}
}

	
function gblTextBlur(element) {
     /*if (element.value == '') {
       element.value = element.defaultValue;
     }*/
}


function printpage() {
	window.print();  
}