function createXMLHttpRequest() 
{

   try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
   try { return new XMLHttpRequest(); } catch(e) {}
   alert("XMLHttpRequest not supported");
   return null;
   
 }
 
 function GetElementContents( name )
 {
	Target = document.getElementById( name );	
	if (!Target) return '';
	
	return Target.innerHTML;
 }

 function SetElement( name, text )
 {
 	Target = document.getElementById( name );	
	if (!Target) return;
	
	Target.innerHTML = text;
 }
 
 function AddElement( name, text )
 {
 	Target = document.getElementById( name );	
	if (!Target) return;
	
	Target.innerHTML = Target.innerHTML + text;
 }
 
 function ShowElement( name, show )
 {
	Target = document.getElementById( name );	
	if (!Target) return;
	
	if ( !show )
	{
		Target.style.display = "none";
	}
	else
	{
		Target.style.display = "";
	}
 }
 
 function OpenScrollWindow(theURL,winName,theWidth,theHeight) {
	var x=Math.min(screen.width,theWidth);
	var y=Math.min(screen.height-25,theHeight);
	window.open(theURL,winName,'width='+x+',height='+y+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,top='+((screen.height/2)-(y/2))+',left='+((screen.width/2)-(x/2))+'');
}
