var xmlHttpTmp;

function GetXmlHttpObject()
{

var xmlHttpTmp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpTmp=new XMLHttpRequest();
 }

catch (e)
 {
 // Internet Explorer

 try
  {
  xmlHttpTmp=new ActiveXObject("Msxml2.XMLHTTP");
  }

 catch (e)
  {
  xmlHttpTmp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }

return xmlHttpTmp;

}

function loadContent(content,usediv){
    xmlHttpLoad=GetXmlHttpObject();
	if (xmlHttpLoad==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
    //Show page is loading
    //document.getElementById(usediv).innerHTML = '<div class="loading"><img src="graphics/ajax-load.gif"><br>lastar innhald...</div>';
       
	//send data
    xmlHttpLoad.onreadystatechange = function(){
    //Check page is completed and there were no problems.
    	if ((xmlHttpLoad.readyState == 4) && (xmlHttpLoad.status == 200)) {
       		//Write data returned to page
        	document.getElementById(usediv).innerHTML = xmlHttpLoad.responseText;
        	setupZoom();
    	}
    }
    xmlHttpLoad.open("GET", content);
    xmlHttpLoad.setRequestHeader("If-Modified-Since","0");
    xmlHttpLoad.send(null);

}

