if (window.XMLHttpRequest) {
   http = new XMLHttpRequest();
} else if (window.ActiveXObject) {
   http = new ActiveXObject("Microsoft.XMLHTTP");
}

var _div;

function GetAjaxContent(div, php)
{
//http=GetXmlHttpObject();
if (http==null)
  {
  alert ("Your browser does not support XMLHTTP!");
  return;
  }
var url=php;
_div = div;
http.overrideMimeType('text/html;charset=iso-8859-1');
http.onreadystatechange=contentReady;
http.open("GET",url,true);
http.send(null);
}

function CallAjaxPage(php)
{
//http=GetXmlHttpObject();
if (http==null)
  {
  alert ("Your browser does not support XMLHTTP!");
  return;
  }
var url=php;

http.overrideMimeType('text/html;charset=iso-8859-1');
http.open("GET",url,true);
http.send(null);
}


function contentReady()
{
if (http.readyState==4)
  { 
   document.getElementById(_div).innerHTML = http.responseText;   
  }
}

function SetProcessingImage(div, arrows) 
{
	var proccessingHtml = '<td align="center" style="width:758px;"><img src="/templates/sx-friends/images/processing.gif"></td>';
	
	if (arrows == "true")
		proccessingHtml = '<td style="height:70px;"><img src="/templates/sx-friends/images/prev_grey.png" /></td>' + proccessingHtml + '<td><img src="/templates/sx-friends/images/next_grey.png" /></td>';
	
  document.getElementById(div).innerHTML = proccessingHtml;
}

function AdjustElementSize(newWidth, newHeight, element)
{
   document.getElementById(element).style.width = newWidth +"px";      
   document.getElementById(element).style.height = newHeight +"px";   
}
