﻿// JScript File
function objTop(obj){
    actb_toreturn = 0;
    while(obj){
        actb_toreturn += obj.offsetTop;
        obj = obj.offsetParent;
    }
    return actb_toreturn;
}
function objLeft(obj){
    actb_toreturn = 0;
    while(obj){
        actb_toreturn += obj.offsetLeft;
        obj = obj.offsetParent;
    }
    return actb_toreturn;
}
function objWidth(objId){
    return document.getElementById(objId).offsetWidth;
}
function objHeight(objId){    
    return document.getElementById(objId).offsetHeight;
}
function removeObj(objId){
    if (document.getElementById(objId)) 
        document.body.removeChild(document.getElementById(objId));
}
function objHide(objId)
{
    if (document.getElementById(objId)) 
        document.getElementById(objId).style.display = 'none';
}
function objShow(objId)
{
    if (document.getElementById(objId)) 
        document.getElementById(objId).style.display = '';
}
function ShowPopup(in_url,in_width,in_height)
{
	winDef = 'status=no,resizable=yes,scrollbars=yes,toolbar=no,location=no,fullscreen=no,titlebar=yes,height='.concat(in_height).concat(',').concat('width=').concat(in_width).concat(',');
	winDef = winDef.concat('top=').concat((screen.height - in_height)/2).concat(',');
	winDef = winDef.concat('left=').concat((screen.width - in_width)/2);
	newwin = window.open(in_url, 'image', winDef);
}
function SelectFile(txtChoice)
{
	ShowPopup('../../filemanager/default.aspx?txtChoice='+txtChoice,580,400)
}
function SelectFile1(txtChoice)
{
	ShowPopup('../filemanager/default.aspx?txtChoice='+txtChoice,580,400)
}
/*
function CheckDisabled(formName, checkName, Disabled) {
	eval("var theform = document." + formName + ";");
	var len = theform.elements.length;
	for (var j = 0; j < len; j++) {	
		var e = theform.elements[j];
		if (e.name.indexOf(checkName)>=0) {
			if(Disabled=="true"){
				e.disabled = true;
				//e.checked = false; 
				}
			else e.disabled = false;
		}
	}
}
*/