function getXMLHttpRequest()
{ 
	if (window.XMLHttpRequest)
	{    
		//XMLHttpRequest für Firefox, Opera, Safari, ...    
		return new XMLHttpRequest();  
	} 
	else if (window.ActiveXObject)
	{
		try 
		{         
			//XMLHttpRequest (neu) für Internet Explorer      
			return new ActiveXObject("Msxml2.XMLHTTP");    
		} 
		catch(e)
		{     
			try 
			{                
				//XMLHttpRequest (alt) für Internet Explorer        
				return new ActiveXObject("Microsoft.XMLHTTP");       
			}
			catch(e) 
			{       
				return null;     
			}
		}
	}  
	return null;
}

var xmlhttpreqobj = getXMLHttpRequest();

function responseHandler()
{
	if(xmlhttpreqobj.readyState == 4)
	{	
		document.getElementById("pausen").innerHTML = xmlhttpreqobj.responseText;
	}
}

function liveview(id)
{
	document.getElementById("pausen").innerHTML = '<p class="laden"><img src="img/loading.gif" /></p>';
	if (xmlhttpreqobj) 
	{  
		xmlhttpreqobj.open("GET", "ajax.liveview.php?id="+id, true);
		xmlhttpreqobj.setRequestHeader("Pragma", "no-cache");
		xmlhttpreqobj.setRequestHeader("Cache-Control", "must-revalidate");
		xmlhttpreqobj.setRequestHeader("If-Modified-Since", document.lastModified);
		xmlhttpreqobj.onreadystatechange = responseHandler;
		xmlhttpreqobj.send(null);
	}
}

