var sDiv;

function showPage(url,Div)
{
	sDiv = Div;

	if (url.length==0)
	{	 
		document.getElementById(sDiv).innerHTML=""
		return
	}
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 


function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		document.getElementById(sDiv).innerHTML=xmlHttp.responseText;
} 

function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
		objXMLHttp=new XMLHttpRequest()
	else if (window.ActiveXObject)
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	
	return objXMLHttp
} 


//----Open/close DIV's--------
function checkDiv(sDiv,style,imgID,img1,img2){

	if (style)
		document.getElementById(sDiv).style.display = style;
	else
	{
		if (document.getElementById(sDiv).style.display == 'block')
		{
			document.getElementById(sDiv).style.display = "none";
		}
		else
		{
			document.getElementById(sDiv).style.display = "block";
		}	
	}

	if (imgID)
		if (document.getElementById(imgID).src.search(img1) > 0)
			document.getElementById(imgID).src = img2;
		else
			document.getElementById(imgID).src = img1;
}


function fOpenWin(url,Winparam){
	var win;
	win = window.open(url,'News',Winparam);
	win.focus();
}
