   function activeMenu(cell,color,descrID,description) {
       
       highlight(cell,color)
       //descrID.innerHTML = "<font face='verdana' color='#FFFFFF' size='1'>" + description + "</font>";
       docObj = eval("document.all." + descrID + ".innerHTML = '<font face=verdana size=1 color=#FFFFFF><b>" + description + "</b></font>'")
   }

   function highlight(cell,color) {
   //set cross-browser DOM
      if (document.all) {
         docObj = eval("document.all." + cell + ".style");
      } else {
         docObj = eval("document." + cell);
      }
   //change highlight color
      docObj.background = color;
   }

 function confirmLink(sURL,sAlert) {
	var resetform = confirm(sAlert);
	if (resetform == true)
		document.location.href = sURL;
	
 }

 function confirmSubmit(sAlert) {
	var resetform = confirm(sAlert);
	if (resetform)
		return true;
	else
		return false;
}

function toggleDiv(srcElement, srcArrow) {
	if (srcElement.style.display == "none") {
		srcElement.style.display = "";
		srcArrow.src = "/images/fnc/expand.gif";
	} else {
		srcElement.style.display = "none"
		srcArrow.src = "/images/fnc/collapse.gif";
	}
}

 function simplePopup(page,title,w,h) {
   window.open(page,title,'resizable=no,location=no,directories=no,toolbar=no,status=no,scrollbars=auto,width=' + w + ',height=' + h);
		}

function CheckLength(iMaxLenght,field)
  {
	var frmCounter = field.form.name + "." + field.name + "_counter";
	
  with (eval('document.' + field.form.name))
  {
    chars=field.value
    if (chars.length > iMaxLenght)
      {
      field.value=chars.substr(0,iMaxLenght);
      field.blur();
      }
   eval(frmCounter + ".value = iMaxLenght-field.value.length;");
   
    }
  }

function resize(x,y,cont) {
//alert (screen.availHeight+" -- "+screen.availWidth);
contr=0;
if (cont==0) {
if (navigator.appName != 'Microsoft Internet Explorer') {

if (x>450 || y>550){
contr=1;
}
}
else {
if ((x>450) || (y>550)){
contr=1;

}
}
if (contr==1) {
if (screen.availHeight==572) {
if  (x>600 && y>522) {
window.resizeTo((600),(522))
}
else if (x>600 && y<572){
window.resizeTo((600),(y+33))
}
else if (x<600 && y<572){
window.resizeTo((x+28),(y+33))
}
else {
window.resizeTo((x+28),(522))
}
}
if (screen.availHeight==740 || screen.availHeight==768) {
//alert (x+" -- "+y);
if (x>800 && y>722) {
window.resizeTo((800),(708))
}
else if (x>800 && y<672){
window.resizeTo((800),(y+50))
}
else if (x<800 && y<672){
window.resizeTo((x+28),(y+33))
}
else if (x<800 && y>672){
window.resizeTo((x+28),(screen.availHeight-50))
}
else {
window.resizeTo((x+28),(708))
}
}
if (screen.availHeight>740) {window.resizeTo((x+28),(y+33))}
}
else{
window.resizeTo((x+28),(y+33))}
}
}