function _remove(id)
{
	var r = document.getElementById(id);
	document.body.removeChild(r);
}
function _loadFile(file)
{
	var url= "http://www.portakabin.co.uk/contact/" + file + ".php";
	/*
	fileContent=document.ReadURL.readFile(url);;
	alert(fileContent);
	*/
	if(document.getElementById('express'))
	{
		_remove('express')	
	}

	/*
	obj = GetXmlHttpObject();
	obj.open("GET", url, true)
	*/
	var newDiv = document.createElement("div");
	newDiv.id="express";
	
	var ihtml = "<div class=\"framer\"><div class=\"top-bar\"><a href=\"#\"><img src=\"/images/close-button.gif\" alt=\"Click to close\" border=\"0\" onclick=\"_remove('express')\" /></a></div><iframe height=\"400\" align=\"top\" width=\"400\" src=\"http://www.portakabin.co.uk/contact/contact-portaloo-form.php\" frameborder=\"0\" scrolling=\"no\"></iframe></div><div class=\"shadow\"></div>";
	newDiv.innerHTML = ihtml;
	document.body.appendChild(newDiv);
	/*
	obj.send(null);
	obj.onreadystatechange = function()
	{
		
		if (obj.readyState==4)
		{
			if(obj.status==200)
			{
				
				t.innerHTML=obj.responseText;
			}
		}
	}
	*/
}


function GetXmlHttpObject()
{
	 var objXmlHttp=null
	if ((navigator.userAgent.indexOf("Opera")>=0) || (navigator.userAgent.indexOf("Mozilla")>=0))
	{
		objXmlHttp=new XMLHttpRequest()
		return objXmlHttp
		
	}
	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)
			return objXmlHttp
		} 
		catch(e)
		{ 
			alert("Error. Scripting for ActiveX might be disabled") 
			return 
		} 
	}
}

