// JavaScript Document
function show_playlist(profile_id,page)
{
	var url = "profile_show_playlist.php?profile_id="+profile_id+"&p="+page;
	xmlHttp = GetXmlHttpObject(); 
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 

function stateChanged() 
{ 
	if(xmlHttp.readyState<4)
	{
		document.getElementById('load_playlist').innerHTML='<strong>Loading Playlist</strong>';
	}
	else if (xmlHttp.readyState==4)
	{
		document.getElementById('load_playlist').innerHTML=xmlHttp.responseText;
		document.getElementById('load_playlist').style.display='block'
		document.getElementById('show_button').style.display='none'
		document.getElementById('hide_button').style.display='block'
	}
}

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;
}