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 =========================== */

function DisplayChange() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("DispPhDetails").innerHTML=xmlHttp.responseText
	} 
}
 

//================================================================illuminate =================================================================
function Cal_adclick(bannerid)
{ 
 	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=siteurl+"advertise_ajax.php"
	url=url+"?bannerid="+bannerid
 	url=url+"&sid="+Math.random()
  	xmlHttp.onreadystatechange=illumin_Adv 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function illumin_Adv() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("Cal_adclick").innerHTML=xmlHttp.responseText 
	} 
}
    

//================================================================illuminate =================================================================
function Showprod_image(prodid,prod_image,id)
{ 
  
   	 /* alert(prodid);
   	  alert(prod_image);
      alert(id);*/
	  
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=siteurl+"prodimage.php"
	url=url+"?prodid="+prodid
	url=url+"&prod_image="+prod_image
	url=url+"&id="+id
	
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=illumin_Changed 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function illumin_Changed() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("show_prodid").innerHTML=xmlHttp.responseText 
	} 
}
//==============================================================Show Add / Edit tables==========================================================
function Show_comment(action,catid)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=siteurl+"category_ajax.php"
	url=url+"?action="+action
	url=url+"&catid="+catid
	
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=illumin_cat 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function illumin_cat() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("Show_comment").innerHTML=xmlHttp.responseText 
	} 
}

////////////////////send report image


function send_report(memberid,session,photoid,action)
{ 
	
	/*alert(memberid);
	alert(session);
	alert(photoid);
	alert(action);*/
	
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=siteurl+"image_comment.php"
	url=url+"?memberid="+memberid
	url=url+"&session="+session
	url=url+"&photoid="+photoid
	url=url+"&action="+action
	
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=illumin_report1 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function illumin_report1() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("send_report").innerHTML=xmlHttp.responseText 
	} 
}

////////////////////send report video


function send_reportvideo(memberid,session,videoid,action)
{ 
	
	 /* alert(memberid);
	alert(session);
	alert(videoid);
	alert(action);  */
	
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=siteurl+"video_comment.php"
	url=url+"?memberid="+memberid
	url=url+"&session="+session
	url=url+"&videoid="+videoid
	url=url+"&action="+action
	
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=illumin_reportvid 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function illumin_reportvid() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("send_reportvideo").innerHTML=xmlHttp.responseText 
	} 
}



////////////////////send report inbox


function send_inboxr(memberid,session,messageid,action)
{ 
	/*
	 alert(memberid);
	alert(session);
	alert(messageid);
	alert(action); 
	*/
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=siteurl+"inbox_comment.php"
	url=url+"?memberid="+memberid
	url=url+"&session="+session
	url=url+"&messageid="+messageid
	url=url+"&action="+action
	
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=illumin_report 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function illumin_report() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("send_inboxr").innerHTML=xmlHttp.responseText 
	} 
}


//============================================================


//================================================================media manager =================================================================
function show_media(videoid,memberid)
{ 
   	   /*alert(videoid); 
	   alert(memberid);*/
   	xmlHttp1=GetXmlHttpObject()
	if (xmlHttp1==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url1=siteurl+"videocomment_ajax.php"
	url1=url1+"?action="
	url1=url1+"&video="+videoid
	url1=url1+"&page="
	url1=url1+"&sid="+Math.random()
	xmlHttp1.onreadystatechange=illumin_media11
	xmlHttp1.open("GET",url1,true)
	xmlHttp1.send(null)
	  
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=siteurl+"media_ajax.php"
	url=url+"?videoid="+videoid
	url=url+"&memberid="+memberid
	/*url=url+"&id="+id*/
	
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=illumin_manage 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
	
	
	
}
function illumin_manage() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("show_media").innerHTML=xmlHttp.responseText 
	} 
}
function illumin_media11() 
{ 
 	if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")
	{ 
		document.getElementById("addcomment1").innerHTML=xmlHttp1.responseText 
	} 
}


//================================================================top videos=================================================================
function show_topvideo(videoid)
{ 
   //alert(videoid);
   //alert("DISPLAY VIDEO");
   	   /*alert(videoid); 
	   alert(memberid);*/
   	 
	  
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=siteurl+"topvideo_ajax.php"
	url=url+"?videoid="+videoid
 	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=illumin_topvid 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function illumin_topvid() 
{ 
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("show_topvid").innerHTML=xmlHttp.responseText 
	} 
}

