var xmlHttp

function GetXmlHttpObject()
{ 
 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}

/*================== Start Photo Section =========================== */
//==============================================================Show Add / Edit tables==========================================================
/* for all vidoes */

function Page_records(action,id,page)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url=siteurl+"pagemedia.php"
	url=url+"?action="+action
	url=url+"&page="+page
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=illumin_menu
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function illumin_menu() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("allvideo").innerHTML=xmlHttp.responseText 
	} 
}

/* for top vidoes */

function Page_records11(action,id,page)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url=siteurl+"pagemediatop.php"
	url=url+"?action="+action
	url=url+"&page="+page
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=illumin_menu11
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function illumin_menu11() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("topvideo").innerHTML=xmlHttp.responseText 
	} 
}



/* for member vidoes */

function Page_recordsmem(action,memberid,page)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url=siteurl+"pagemediamem.php"
	url=url+"?action="+action
	url=url+"&page="+page
	url=url+"&memberid="+memberid
	//alert(url);
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=illumin_menu1
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function illumin_menu1() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("memvideo").innerHTML=xmlHttp.responseText 
	} 
}


/* gold member video */


function Page_records12(action,id,page)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url=siteurl+"pagemediagold.php"
	url=url+"?action="+action
	url=url+"&page="+page
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=illumin_menu12
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function illumin_menu12() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("fvideo").innerHTML=xmlHttp.responseText 
	} 
}











function Show_comment2(action,video)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=siteurl+"videocomment_ajax.php"
	url=url+"?action="+action
	url=url+"&video="+video
	url=url+"&sid="+Math.random()

	xmlHttp.onreadystatechange=illumin_media 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function Show_comment1(action,video,commentid,page)
{ 
	/*alert(action);
	alert(memberid);*/
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=siteurl+"videocomment_ajax.php"
	url=url+"?action="+action
	url=url+"&video="+video
	url=url+"&commentid="+commentid
	url=url+"&page="+page
	url=url+"&sid="+Math.random()
	 
	xmlHttp.onreadystatechange=illumin_media 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function illumin_media() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("Show_comment").innerHTML=xmlHttp.responseText 
	} 
}
function illumin_media1() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("addcomment1").innerHTML=xmlHttp.responseText 
	} 
}


function addcomment(action,video)
{

//alert(memberid);*/

var comment=document.getElementById("comment").value;		 
 
if (comment.length==0)
  { 
  document.getElementById("txtHint").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=siteurl+"videocomment_ajax.php";
url=url+"?comment="+escape(comment);
url=url+"&action="+escape(action)
url=url+"&video="+escape(video)

url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=illumin_media1;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function addcomment1(action,video,commentid,page)
{

//alert(memberid);*/

var comment=document.getElementById("comment").value;		 
 
if (comment.length==0)
  { 
  document.getElementById("txtHint").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=siteurl+"videocomment_ajax.php";
url=url+"?comment="+escape(comment);
url=url+"&action="+escape(action)
url=url+"&video="+escape(video)
url=url+"&commentid="+commentid
url=url+"&page="+page

url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=illumin_media1;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function Page_records1(action,video,page)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url=siteurl+"videocomment_ajax.php"
	url=url+"?action="+action
	url=url+"&video="+video
	url=url+"&page="+page
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=illumin_media1
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function hidethis(action,video,commentid,page)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=siteurl+"videocomment_ajax.php"
	url=url+"?action="+action
	url=url+"&video="+video
	url=url+"&commentid="+commentid
	url=url+"&page="+page
	url=url+"&sid="+Math.random()
	//alert(url);
	xmlHttp.onreadystatechange=illumin_media1 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function send_videocomment_report(commentid)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=siteurl+"report_comment.php";
url=url+"?action=videocomment"
url=url+"&commentid="+commentid
  
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=reportComments;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function reportComments() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("reportComment").innerHTML=xmlHttp.responseText;
}
}

