

function login() {
	comsOpenPopupSize('/dom_login.jsp', 'Login',385,300,'no','no');
}


function comsOpenPopupSize(pstrURL, pstrWindowName, pintWidth, pintHeight, pstrResize, pstrScroll) {
	var pobjWindow, pintTop, pintLeft, pstrNNResize="", pstrNNScroll="";
	
	pintTop = (screen.availHeight/2-(pintHeight/2));
	pintLeft = (screen.availWidth/2-(pintWidth/2));

	if (pintWidth>screen.availWidth*0.95) {
		pintWidth=screen.availWidth*0.95;
	}
	if (pintHeight>screen.availHeight*0.95) {
		pintHeight=screen.availHeight*0.95;
	}

	if (pstrResize == 'yes'){
		pstrNNResize = 'resizable';
	}
	else {
		pstrNNResize = '';
	}

	if (pstrScroll == 'yes'){
		pstrNNScroll = 'scrollable';
	}
	else {
		pstrNNScroll = '';
	}
	
	if (navigator.appName == 'Microsoft Internet Explorer') {
		pobjWindow = window.open(pstrURL, pstrWindowName, "directories=no, location=no, menubar=no, resizable="+ pstrResize +", scrollbars="+ pstrScroll +", status=no, toolbar=no, height="+pintHeight+", width="+pintWidth+",top="+pintTop+",left="+pintLeft);
	}	
	else {
		pobjWindow = window.open(pstrURL,pstrWindowName,pstrNNResize+","+pstrNNScroll+",height="+pintHeight+", width="+pintWidth);
	}
	pobjWindow.focus();
}


function setPageSize(pintsize){
	var pintHeight;
	if (self.innerHeight) // all except Explorer
	{
		pintHeight=(self.innerHeight-pintsize);
		pintHeight = pintHeight + 27;
		document.getElementById('maintable').style.height=pintHeight + "px";
	}
	else if (document.documentElement && document.documentElement.clientHeight)	// Explorer 6 Strict Mode
	{
		pintHeight=(document.documentElement.clientHeight-pintsize);
		document.getElementById('maintable').style.height=pintHeight;
		
	}
	else if (document.body) // other Explorers
	{
		alert('3');
		pintHeight=(document.body.clientHeight-pintsize);
		document.getElementById('maintable').style.height=pintHeight;
		alert(document.getElementById('maintable').style.height);
	}
}


function showItem(pstrId){
	document.getElementById(pstrId).style.display = '';	
}	

function hideItem(pstrId){
	document.getElementById(pstrId).style.display = 'none';	
}	

function setItem(pstrId, pstrNewValue){
	document.getElementById(pstrId).innerHTML = pstrNewValue;	
}
