var axId = null;

function getHTTPObject()
{
  if ( window.ActiveXObject )
    return new ActiveXObject( "Microsoft.XMLHTTP" );
  else if ( window.XMLHttpRequest )
    return new XMLHttpRequest();
  else 
  {
    alert( "You may wish to consider upgrading to a browser that supports AJAX." );
  	return NULL;
  }
}

function getAX( url, id )
{
  axId = null;
  httpObject = getHTTPObject();
  if ( httpObject != null ) 
	{
	  axId = id;
	  httpObject.open( "GET", url, true );
		httpObject.send( null );
		httpObject.onreadystatechange = setOutput;
	}
}

function setOutput()
{
  if( httpObject.readyState == 4 && axId != null )
    document.getElementById( axId ).innerHTML = httpObject.responseText;
}

function sendForm(d)
{
  if (typeof d != "undefined")
    document.getElementById( "maskForm" ).action = d;
  document.getElementById( "maskForm" ).submit();
}

function buttons(o)
{
  if ( o.className.indexOf( '_over' ) == -1 )
	  o.className += '_over';
	else
	  o.className = o.className.replace( '_over', '' );
}

function goto(o, b, conf) 
{
  if (typeof b == "undefined")
	  b = '';
  if (typeof conf == "undefined")
	  conf = 0;
	if ( conf == 0 || ( conf == 1 && confirm( 'Are you sure you want to delete this record?' ) ) )	
    location.href = o+b;
}

function checkNumeric( o, e )
{
  //var temp = o.value;
  //if ( ( e >= 48 && e <= 57 ) || e == 8 || e == 46 )
  //  return o.value;
	//else
  //  return temp;
}

function cloneIt( Id )
{
  //var tblBody = document.getElementById( Id ).tBodies[0];
	//var rowCount = tblBody.rows.length - 1;
  //var newNode = tblBody.rows[rowCount].cloneNode(true);
  //tblBody.appendChild(newNode);
	//return false;
}
