   function openChild(url,wid,hei) {
      child = window.open(url,"NEW","kiosk,width=" + wid + ",height=" + hei + " scrollbars=yes resizable=yes");
      if( self.focus ) {
		 child.focus();
	  }
   }

   function openChild_Name(url,wid,hei, winName) {
      child = window.open(url,winName,"kiosk,width=" + wid + ",height=" + hei + " scrollbars=yes resizable=yes");
      if( self.focus ) {
		 child.focus();
	  }
}
	
   function closeChild() {
      child.close();
      self.location.reload();
   }


   function endNow() {
       opener.location.href="JavaScript:closeChild()";
   }


	// VISUAL MOUSEOVER FUNCTIONS
	function mouseOverTR(obj, color)
	{
		if (obj.className != color) obj.className = color;
	}
	
	function mouseOutTR(obj, color) 
	{
		if (obj.className != color) obj.className = color;
	}

	// FUNCTION FOR IMAGE ROLLOVERS
	function Rollover(imgName, target)
	 {
		if(document.images)
		 {
			imgchange = eval(imgName + '.src');
			document[target].src = imgchange;
		}
	}
	
	
	
	
	

	function setSidebarSession(sideURL)
	{
		//make call to server to set session state of sidebar
		xmlHttp=GetXMLHttpObject(handleHttpReturn)
		xmlHttp.open("GET",sideURL, true)
		xmlHttp.send(null)
		

	}

	// Function to Show/Hide Sidebar
	function showHideSideBar(theMode)
	{
		
		var elem = document.getElementById("sidebarID");
		var bodyElem = document.getElementById("bodyCellID");
		var image = document.getElementById("arrowID");
		var elemAjax = document.getElementById("sidebarAjaxPane");
		var bodyDivElem = document.getElementById("contentDivId");
		
		if(theMode == 1 || (theMode == -1 && elem.style.display == "none"))
		{	
			elem.style.display = "";
			image.src = "/images/side/left_arrow.gif";
			
			elemAjax.style.width = '15px';
			bodyElem.style.width = '575px';
			bodyDivElem.style.width = '535px'
			sideState = 0;
			
		}
			
		else
		{
			elem.style.display = "none";
			image.src = "/images/side/right_arrow.gif";
			
			elemAjax.style.width = '15px';
			bodyElem.style.width = '760px';
			bodyDivElem.style.width = '720px';
			sideState = 1;			

			
		}
		
		return true;
	}
	
	function handleHttpReturn()
	{
	
		if(xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")
		{
			
			if(xmlHttp.responseText == 'no')
			{
				showHideSideBar(0);
				
			}
			else if(xmlHttp.responseText == 'yes')
			{
				showHideSideBar(1);	
				
			
			}
		}
		
		return;
	}
	
	
	function GetXMLHttpObject(handler)
		{
			var objXmlHttp = false;
		    
		    	try
			{
				objXmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
			}
			
			catch (e1)
			{
				try
				{
					objXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
				}
				
				catch(e2)
				{
					try
					{
						objXmlHttp = new XMLHttpRequest();
					}
					
					catch(fail)
					{
						objXmlHttp = false;
					}
				}
			}
			
			if (!objXmlHttp)
			{
				alert("Error creating Http Object");
			}
			else
			{
				objXmlHttp.onreadystatechange = handler;
			}
			return objXmlHttp;		
	}
	
	function GetXmlHttpObjectOld(handler)
	{
	    var objXmlHttp = null
	    
	    if (navigator.userAgent.indexOf("MSIE") >= 0) {
	        var strName = "Msxml2.XMLHTTP"
	        
	        if (navigator.appVersion.indexOf("MSIE 5.5") >= 0) {
	            strName = "Microsoft.XMLHTTP"
	        }
	        
	        try {
	            objXmlHttp = new ActiveXObject(strName)
	            objXmlHttp.onreadystatechange = handler
	            return objXmlHttp
	        }
	        
	        catch(e) {
	            alert("Error creating Http Object")
	            return
	        }
	     }
	    
	      if (navigator.userAgent.indexOf("Mozilla") >= 0) {
	        objXmlHttp = new XMLHttpRequest()
	        objXmlHttp.onload = handler
	        objXmlHttp.onerror = handler
	        return objXmlHttp
	    }
	}
	


	function insertHTMLFromExt(ElementName, theHTML)
	{

		document.getElementById(ElementName).innerHTML = theHTML;

	}
	
	function clearUsername(fld) {
		if(fld.value == "username") {
			fld.value = "";
		}
	}

	function Popup(file, height, width) {
	    

	    window.open(file, 'UserInformationForm', 'height=' + height + ',width=' + width + ',toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');
	} 


	function modalWin(file) {
	    var height = 500
        var width = 400

            window.open(file,'UserInformationForm','height='+ height +',width='+ width +',toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');
    } 
