
var xmlhttp2,xmlhttp3,xmlhttp4,xmlhttp5,xmlhttp6,xmlhttp7,xmlhttp8,xmlhttp9,xmlhttp10,xmlhttp11,xmlhttp12,xmlhttp13,xmlhttp14,xmlhttp15,xmlhttp16,xmlhttp17,xmlhttp18,xmlhttp19,xmlhttp20,xmlhttp21,xmlhttp22,xmlhttp23,xmlhttp24,xmlhttp25,xmlhttp26,xmlhttp27,xmlhttp28,xmlhttp29,xmlhttp30,xmlhttp31,xmlhttp32,xmlhttp33,xmlhttp34;

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




function showNext(toshow)
{
		document.getElementById("ajaxnewaudio").innerHTML= "<img src='images/indexload.gif' hspace='280' vspace='75'>";
		var url="pass.php?action=ajaxnewaudio&toshow="+toshow+"&status=aj";
		//alert (url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("ajaxnewaudio").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}




function showPopularAudioNext(toshow)
{
		document.getElementById("ajaxpopularaudio").innerHTML= "<img src='images/indexload.gif' hspace='280' vspace='75'>";
		var url="pass.php?action=ajaxpopularaudio&toshow="+toshow+"&status=aj";
		//alert (url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("ajaxpopularaudio").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}



function showTopRatedAudioNext(toshow)
{
		document.getElementById("ajaxtopratedaudio").innerHTML= "<img src='images/indexload.gif' hspace='280' vspace='75'>";
		var url="pass.php?action=ajaxtopratedaudio&toshow="+toshow+"&status=aj";
		//alert (url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("ajaxtopratedaudio").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}




function showNewestVideoNext(toshow)
{
		document.getElementById("ajaxnewestvideo").innerHTML= "<img src='images/indexload.gif' hspace='280' vspace='75'>";
		var url="pass.php?action=ajaxnewestvideo&toshow="+toshow+"&status=aj";
		//alert (url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("ajaxnewestvideo").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}

function showPopularVideoNext(toshow)
{
		document.getElementById("ajaxpopularvideo").innerHTML= "<img src='images/indexload.gif' hspace='280' vspace='75'>";
		var url="pass.php?action=ajaxpopularvideo&toshow="+toshow+"&status=aj";
		//alert (url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("ajaxpopularvideo").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}


function showTopRatedVideoNext(toshow)
{
		document.getElementById("ajaxtopratedvideo").innerHTML= "<img src='images/indexload.gif' hspace='280' vspace='75'>";
		var url="pass.php?action=ajaxtopratedvideo&toshow="+toshow+"&status=aj";
		//alert (url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("ajaxtopratedvideo").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}


function showNewestPictureNext(toshow)
{
		document.getElementById("ajaxnewestpicture").innerHTML= "<img src='images/indexload.gif' hspace='280' vspace='75'>";
		var url="pass.php?action=ajaxnewestpicture&toshow="+toshow+"&status=aj";
		//alert (url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("ajaxnewestpicture").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}



function showPopularPictureNext(toshow)
{
		document.getElementById("ajaxpopularpicture").innerHTML= "<img src='images/indexload.gif' hspace='280' vspace='75'>";
		var url="pass.php?action=ajaxpopularpicture&toshow="+toshow+"&status=aj";
		//alert (url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("ajaxpopularpicture").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}


function showTopRatedPictureNext(toshow)
{
		document.getElementById("ajaxtopratedpicture").innerHTML= "<img src='images/indexload.gif' hspace='280' vspace='75'>";
		var url="pass.php?action=ajaxtopratedpicture&toshow="+toshow+"&status=aj";
		//alert (url);
		xmlHttp=getxmlhttpobject();
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{	
				document.getElementById("ajaxtopratedpicture").innerHTML=xmlHttp.responseText;
			}		
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
}







function saveFavorites(id,type)
{
xmlhttp7=getxmlhttpobject()
var query="id="+id+"&favtype="+type

document.getElementById("fav").innerHTML='<img src=images/loading.gif height=20 width=20 />';
xmlhttp7.onreadystatechange=function(){
if (xmlhttp7.readyState==4)
 {
  document.getElementById("fav").innerHTML = ''
  check = xmlhttp7.responseText;
  if(check == 'This '+type+' already in your favorites list')
  alert(check);
  else if(check == 'You are not logged in . Please login first!')
  alert(check);
  else
  document.getElementById("totalfav").innerHTML = xmlhttp7.responseText;
 }
}
xmlhttp7.open("GET","pass.php?action=site_mgmt&type=5&"+query,true)
xmlhttp7.send(null)
}







