// JavaScript Document
//<![CDATA[
//if(top.location != self.location){
//	top.location = self.location;
//}

function _$(obj){
	return document.getElementById(obj);
}

function setDisabled(obj, b){
	var db = _$(obj);
	if (db){db.disabled = b;}
}

function setDisplay(obj, b){
	var dp = _$(obj);
	if (dp){dp.style.display = b;}
}

function ShowHidden(obj){
	var sh = _$(obj);
	if(sh){
		if(sh.offsetHeight == 0 || sh.style.display == 'none'){
			sh.style.display = 'block';
		}else{
			sh.style.display = 'none';
		}
	}
}

function getValue(obj1, obj2){
	var gv = _$(obj1);
	var strValue = _$(obj2);
	if (gv){gv.value = strValue.value;}
}

function openWindow(sFile, sWidth, sHeight){ 
	var l = (screen.width - sWidth) / 2; 
	var t = (screen.height - sHeight) / 2; 
	var s = 'width=' + sWidth + ', height=' + sHeight + ', top=' + t + ', left=' + l; 
	s += ', toolbar=no, scrollbars=yes, menubar=no, location=no, resizable=no'; 
	window.open(sFile, 'oWin', s); 
}
//]]>
