var xmlhttp
function messageforedit(myid){
	
	
	xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="messageforedit.php";
url=url+"?myid="+myid;
xmlhttp.onreadystatechange=featurededit
xmlhttp.open("POST",url,true);
showimage();
xmlhttp.send(null);
}



function mycommentis(manageno){


	xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var mytest=document.getElementById("ContentPlaceHolder").value;

var url="addcomments.php";
url=url+"?manageno="+manageno+"&mytest="+mytest;
xmlhttp.onreadystatechange=mycommentdea

xmlhttp.open("POST",url,true);
comm();
xmlhttp.send(null);
}



function comm(){
	 document.getElementById("mycomim").style.display="";
	}


function commhno(){
	 document.getElementById("mycomim").style.display="none";
	}

function mycommentdea(){

 	if (xmlhttp.readyState==4)
  {
	
	
	
     document.getElementById("ccomments").innerHTML=xmlhttp.responseText;
	
	 commhno();
	 
  }
	

}




function enjoyeditmessage(manageno){
	xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var mytest=document.getElementById("updatedvaluemanage").value;

var url="managebodyupdate.php";
url=url+"?manageno="+manageno+"&mytest="+mytest;
xmlhttp.onreadystatechange=finaldeltinan
xmlhttp.open("POST",url,true);
syem();
xmlhttp.send(null);

}

function finaldeltinan(){

 	if (xmlhttp.readyState==4)
  {
	
	
	
     document.getElementById("Questionoftheday").innerHTML=xmlhttp.responseText;
	 document.getElementById("fly").style.display="";
	 hnom();
	 
  }
	

}








function managequestio(manageno){
		
	xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
  
var url="managebody.php";
url=url+"?manageno="+manageno;
xmlhttp.onreadystatechange=managenomyid
xmlhttp.open("POST",url,true);
syem();
xmlhttp.send(null);

}

function managenomyid(){

 	if (xmlhttp.readyState==4)
  {
	
	
	
     document.getElementById("Questionoftheday").innerHTML=xmlhttp.responseText;
	 hnom();
	 
  }
	

}
	
function syem(){
	 document.getElementById("questionofd").style.display="";
	 document.getElementById("fly").style.display="none";
	}


function hnom(){
	 document.getElementById("questionofd").style.display="none";
	}	
	


function nowupdatestart(longid){
	
	
	xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
  
 var title=document.getElementById("mytext").value;
 var content=document.getElementById("mcontent").value;
  
var url="messageforeditfinal.php";
url=url+"?longid="+longid+"&title="+title+"&content="+content;
xmlhttp.onreadystatechange=featurededit
xmlhttp.open("POST",url,true);
showimage();
xmlhttp.send(null);

}

function videolatestupdate(){
syes();
 document.getElementById("myimage").style.display="none";
  document.getElementById("videolist").style.display="";
hno();
}



function syes(){
	 document.getElementById("myvideolimit").style.display="";
	}


function hno(){
	 document.getElementById("myvideolimit").style.display="none";
	}




function featurededit(){
	
	if (xmlhttp.readyState==4)
  {
	
	
	
     document.getElementById("feature_content").innerHTML=xmlhttp.responseText;
	 hideimage();
	 
  }
	
	
}

function showimage(){
	 document.getElementById("smallimageding").style.display="";
	}


function hideimage(){
	 document.getElementById("smallimageding").style.display="none";
	}


function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}
