var Timelimit;
var target = null;
var i = 10;
//--------------------------------------------------------------------------------------------------------------------------
function GetElement(strElement)
{
if (document.getElementById){return (document.getElementById(strElement));}
else if (document.all){return (eval("document.all." + strElement));}
else if (document.layers){return (eval("document." + strElement));}
else{return (null);}
}
//--------------------------------------------------------------------------------------------------------------------------
function GetParentElement(strElement)
{
if (document.getElementById){return (parent.document.getElementById(strElement));}
else if (document.all){return (eval("parent.document.all."+strElement));}
else if (boolNS4){return (eval("document."+strElement));}
else{return (null);}
}
//--------------------------------------------------------------------------------------------------------------------------
function ChgImg(ImageID,src)
{
	objimg = GetElement(ImageID);
	if(objimg!=null){objimg.src = src;}	
}
//--------------------------------------------------------------------------------------------------------------------------
function ToggleDiv(ID)
{
	objTable = GetElement(ID);
	if (objTable.style.display == 'none')
	{
		objTable.style.display = '';
	}
	else
	{
		objTable.style.display = 'none';
	}
}
//--------------------------------------------------------------------------------------------------------------------------
function HdDiv(ID)
{
	objElem = GetElement(ID);
	if (objElem!=null)
	{
		objElem.style.display = 'none';
	}
}
//--------------------------------------------------------------------------------------------------------------------------
function ShDiv(ID)
{
	objElem = GetElement(ID);
	if (objElem!=null)
	{
		objElem.style.display = '';
	}
}
//--------------------------------------------------------------------------------------------------------------------------
function ChkDo(ChkID)
{
	objChk = GetElement(ChkID);
	if(objChk.checked == true){objChk.checked = false;}
	else{objChk.checked = true;}
}
//--------------------------------------------------------------------------------------------------------------------------
function GetChk(ChkID)
{
	objChk = GetElement(ChkID);
	if(objChk.checked == true){return false;}
	else{return true;}
}
//--------------------------------------------------------------------------------------------------------------------------
function MenuPopup(Url) { //v2.0
  features = "fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=auto,resizable=no,directories=no,location=no,width=240,height=350,left = " + ((screen.width/2)-120) + ",top = " + ((screen.height/2)-170) + ""
  window.open(Url,'_blank',features);
}
//--------------------------------------------------------------------------------------------------------------------------
function WPopup(Url,Height,Width) { //v2.0
  features = "fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=auto,resizable=no,directories=no,location=no,width=" + Width + ",height=" + Height + ",left = " + ((screen.width/2)-(Width/2)) + ",top = " + ((screen.height/2)-(Height/2)) + ""
  window.open(Url,'_blank',features);
}
//--------------------------------------------------------------------------------------------------------------------------
function SubmitForm(FormID)
{
Objfrm = GetElement(FormID);
if(Objfrm!=null)
{
Objfrm.submit();
}
}
//--------------------------------------------------------------------------------------------------------------------------
function FormAction(FormID,Action)
{
Objfrm = GetElement(FormID);
if(Objfrm!=null)
{
Objfrm.action = Action;
}
}
//--------------------------------------------------------------------------------------------------------------------------
function EnDisableBnt(bntID,Action)
{
Objfrm = GetElement(bntID);
if(Objfrm!=null)
{
Objfrm.disabled = Action;
}
}
//--------------------------------------------------------------------------------------------------------------------------
function SEDBnt(FirstBntID,SecondBntID,Action)
{
Objbnt1 = GetElement(FirstBntID);
Objbnt2 = GetElement(SecondBntID);
if(Objbnt1!=null){Objbnt1.disabled = Action;}
if(Objbnt2!=null){Objbnt2.disabled = InvertVal(Action);}
}
//--------------------------------------------------------------------------------------------------------------------------
function InvertVal(Action)
{
if(Action==true){return false;}
if(Action==false){return true;}
}
//--------------------------------------------------------------------------------------------------------------------------
function SetFocus(bntID)
{
Objfrm = GetElement(bntID);
if(Objfrm!=null)
{
Objfrm.focus()
}
}
//----------------------------------------------------------------------------------------------------------------------------------------------
function wo(url,target)
{
	var fr = new Date();
	if (url.indexOf("?") > -1){window.open(url + "&ForceRefresh=" + fr.getSeconds() + fr.getMinutes() + fr.getHours() + fr.getFullYear() + fr.getMonth() + fr.getDate(),target);}
	else{window.open(url + "?ForceRefresh=" + fr.getSeconds() + fr.getMinutes() + fr.getHours() + fr.getFullYear() + fr.getMonth() + fr.getDate(),target);}
	fr = null;
}
//----------------------------------------------------------------------------------------------------------------------------------------------
function st(target,caption)
{
	var objspan = GetElement(target);
	objspan.innerText = caption;
	objspan = null;
}
//--------------------------------------------------------------------------------------------------------------------------

