function submitform(formname) {
	document.forms[formname].submit();
}
//ggogggo
function showHide(id){
	document.getElementById(id).style.display = (document.getElementById(id).style.display == 'none')?'block':'none';
}

function showMenu(mName){
	document.getElementById(mName).style.display = 'block';
	for(i=1;i<=109;i++){
		if(('menu'+i)!=mName){
			closeMenu('menu'+i);
		}
	}
}

function closeMenus(){
	for(i=1;i<=109;i++){
		closeMenu('menu'+i);
	}
}

function closeMenu(mName){
	if(document.getElementById(mName)){
		document.getElementById(mName).style.display = 'none';
	}
}

function ShowPopup(){
	document.getElementById('Popup').style.display = 'block';	
}

function ClosePopup(){
	if(document.getElementById('Popup')){
		document.getElementById('Popup').style.display = 'none';
	}
}


var xmlHttp

function GetXmlHttpObject(){
	var xmlHttp=null;
	try{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e){
		// Internet Explorer
		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}



function openWindow(mypage, myname, w, h, scroll){
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		if(screen.availHeight < h){
			scroll='Yes';
		}else if (screen.availWidth < w){
			scroll='Yes';
		}
		//alert(scroll);
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable,tollbars'
		gmtWindow = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4) { 
			gmtWindow.window.focus(); 
		}
}
