
function showhide(id,image)
  {
  if (document.getElementById)
    {
    obj = document.getElementById(id);
    if (obj.style.display == 'none')
      {
      obj.style.display = '';
      document.images[image].src = "iconz/arrow.up.gif";
      } 
    else 
      {
      obj.style.display = 'none';
      document.images[image].src = "iconz/arrow.down.gif"; 
      }
    }
  }
  
  
function showhidex(id)
  {
  if (document.getElementById)
    {
    obj = document.getElementById(id);
    if (obj.style.display == 'none')
      {
      obj.style.display = '';
      } 
    else 
      {
      obj.style.display = 'none';
      }
    }
  }



function verify()
  {
  msg = "Are you sure you want to delte this record?";
  return confirm(msg);
  }

function send()
   {document.form1.submit()}
   

  
var arrayOfRolloverClasses = new Array();
var arrayOfClickClasses = new Array();
var activeRow = false;
var activeRowClickArray = new Array();
	
function highlightTableRow()
	{
		var tableObj = this.parentNode;
		if(tableObj.tagName!='TABLE')tableObj = tableObj.parentNode;

		if(this!=activeRow){
			this.setAttribute('origCl',this.className);
			this.origCl = this.className;
		}
		this.className = arrayOfRolloverClasses[tableObj.id];
		
		activeRow = this;
		
	}
	
function clickOnTableRow()
	{
		var tableObj = this.parentNode;
		if(tableObj.tagName!='TABLE')tableObj = tableObj.parentNode;		
		
		if(activeRowClickArray[tableObj.id] && this!=activeRowClickArray[tableObj.id]){
			activeRowClickArray[tableObj.id].className='';
		}
		this.className = arrayOfClickClasses[tableObj.id];
		
		activeRowClickArray[tableObj.id] = this;
				
	}
	
function resetRowStyle()
	{
		var tableObj = this.parentNode;
		if(tableObj.tagName!='TABLE')tableObj = tableObj.parentNode;

		if(activeRowClickArray[tableObj.id] && this==activeRowClickArray[tableObj.id]){
			this.className = arrayOfClickClasses[tableObj.id];
			return;	
		}
		
		var origCl = this.getAttribute('origCl');
		if(!origCl)origCl = this.origCl;
		this.className=origCl;
		
	}
		
function addTableRolloverEffect(tableId,whichClass,whichClassOnClick)
	{
		arrayOfRolloverClasses[tableId] = whichClass;
		arrayOfClickClasses[tableId] = whichClassOnClick;
		
		var tableObj = document.getElementById(tableId);
		var tBody = tableObj.getElementsByTagName('TBODY');
		if(tBody){
			var rows = tBody[0].getElementsByTagName('TR');
		}else{
			var rows = tableObj.getElementsByTagName('TR');
		}
		for(var no=0;no<rows.length;no++){
			rows[no].onmouseover = highlightTableRow;
			rows[no].onmouseout = resetRowStyle;
			
			if(whichClassOnClick){
				rows[no].onclick = clickOnTableRow;	
			}
		}
		
	}

    
 
function limitText(limitField, limitCount, limitNum) 
  {
  if (limitField.value.length > limitNum) 
    {
    limitField.value = limitField.value.substring(0, limitNum);
    } else {
    limitCount.value = limitNum - limitField.value.length;
    }
  }
 