   function createRequestObject() {
    var ro;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
        ro = new XMLHttpRequest();
    }
    return ro;
	}
   

	
	function getElementPosition(elemID){
 var offsetTrail = document.getElementById(elemID);
 var offsetLeft = 0;
 var offsetTop = 0;
 while (offsetTrail){
  offsetLeft += offsetTrail.offsetLeft;
  offsetTop += offsetTrail.offsetTop;
  offsetTrail = offsetTrail.offsetParent;
 }
 if (navigator.userAgent.indexOf('Mac') != -1 && typeof document.body.leftMargin != 'undefined'){
  offsetLeft += document.body.leftMargin;
  offsetTop += document.body.topMargin;
 }
 return {left:offsetLeft,top:offsetTop};

} 

function setElementHeight(eID, offset, minheight) {
	var p = getElementPosition(eID);
	var t = document.getElementById(eID);
	var wh = document.documentElement.clientHeight;

	var newheight = wh -  p.top - offset;
	if (minheight>1) {
		newheight = (newheight>minheight)?newheight:minheight;
    }

	t.style.height=newheight + "px" ;
	
}

function ChangeTabFancy(tab) {
	var othertab = document.getElementById(currentTab);
	//new Effect.FadeTo( othertab.getAttribute('tabpage'), .1,  100, 5,  {complete:function() {ChangeTab(tab);}} );
	//new Effect.FadeTo( tab.getAttribute('tabpage'), 1.0,  100, 1,  {complete:function() {}} );
	ChangeTab(tab);
}	

function ChangeTab(tab) {
	var myclass=tab.className;
	var othertab = document.getElementById(currentTab);
	document.getElementById(othertab.getAttribute('tabpage')).style.display="none";
	document.getElementById(tab.getAttribute('tabpage')).style.display="block";
	tab.className=othertab.className;
	othertab.className=myclass;
	currentTab=tab.id;
	if(typeof FixSizes == "function")  {
		FixSizes();
	}
	
}


function SelectTab(tabname,tabclass) {
	var tab = document.getElementById(tabname);
	tab.className=tabclass;
	document.getElementById(tab.getAttribute('tabpage')).style.display="block";
	currentTab=tabname;
	if(typeof FixSizes == "function")  {
		FixSizes();
		FixSizes();
		FixSizes();
	}
}

function HighlightRow(row, newcolor) {
	newcolor = newcolor || "#FFFFCC";
	oldrowid = row.parentNode.getAttribute('oldrow');
	if(row.id!=oldrowid) {
		row.setAttribute('oldcolor',row.style.backgroundColor);
		row.style.backgroundColor=newcolor;
	}
	return true;
}

function UnHighlightRow(row) {
	oldrowid = row.parentNode.getAttribute('oldrow');
	if(row.id!=oldrowid) {
		row.style.backgroundColor=row.getAttribute('oldcolor');

	}
	return true;
}

function HighlightSelectRow(row) {
	oldrowid = row.parentNode.getAttribute('oldrow');
	oldrow=document.getElementById(oldrowid);
	if(oldrow) {
		oldrow.style.backgroundColor=oldrow.getAttribute('oldselcolor');
	}
	row.setAttribute('oldselcolor',row.getAttribute('oldcolor'));
	row.style.backgroundColor="#CCFFCC";	
	row.parentNode.setAttribute('oldrow',row.id);
}



/********
STRINGS
********/
// like Trim( ) in vbscript. removes trailing and
// leading whitespace from a string
String.prototype.trim = function() {
 return this.replace(/^\s*|\s*$/g, "")
}


