var xmlHttp;

function manageVideo(id)
{
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null)
	  return;
	
	//var url="http://debian/MAMMOTH/SHARK-CAGE-DIVING-2011/wp-content/themes/twentyten/pullvideo.php?id="+id;
	var url="http://www.sharkcagediving.net/pullvideo.php?id="+id;
	
	xmlHttp.onreadystatechange = updateVideo;
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}

function updateVideo()
{
	if (xmlHttp.readyState == 4) 
  	{
		if (xmlHttp.status == 200) 
		{
   			document.getElementById('titlename').innerHTML = xmlHttp.responseText;
		}	
	}
}

function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
	  // Firefox, Opera 8.0+, Safari
	  xmlHttp=new XMLHttpRequest();
	}
	catch (e)
  	{
		// Internet Explorer
		try
	    {
	    	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    	}
		catch (e)
    	{
    		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    	}
    }
	return xmlHttp;
}

