var myProcess

function GetXmlHttpObject(handler)
{ 
	var objXmlHttp=null
	
	if (navigator.userAgent.indexOf("Opera")>=0)
	{
		alert("This example doesn't work in Opera") 
		return 
	}
	if (navigator.userAgent.indexOf("MSIE")>=0)
	{ 
		var strName="Msxml2.XMLHTTP"
		if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
		{
			strName="Microsoft.XMLHTTP" 
		} 
		try
		{ 
			objXmlHttp=new ActiveXObject(strName)
			objXmlHttp.onreadystatechange=handler 
			return objXmlHttp
		} 
		catch(e)
		{ 
			alert("Error. Scripting for ActiveX might be disabled") 
			return 
		} 
	} 

	if (navigator.userAgent.indexOf("Mozilla")>=0)
		{
			objXmlHttp=new XMLHttpRequest()
			objXmlHttp.onload=handler
			objXmlHttp.onerror=handler 
			return objXmlHttp
		}
} 


function display_city() 

{ 

   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 

		//alert(xmlHttp.responseText);

		str = xmlHttp.responseText;

		document.getElementById("show_products").innerHTML = str;

	}

}
function display_press()
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
         str = xmlHttp.responseText;
        document.getElementById("pressarchive").innerHTML = str;	
}
}

function display_character() 
{ 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   {
   //alert(xmlHttp.responseText);
   document.getElementById("showcharacter").innerHTML=xmlHttp.responseText;
   }
}

function display_blogs() 
{ 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		//alert(xmlHttp.responseText);
		str = xmlHttp.responseText.split("@@");
		document.getElementById("show_blogs").innerHTML = str[0] ;
	}
}

function display_prime() 
{ 
  if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {
    document.getElementById("showprime").innerHTML=xmlHttp.responseText;
    //showOnLineCelebrity();
	//setTimeout("showOnLineCelebrity()",8000);
  }
}

function display_schedule()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
  		str = xmlHttp.responseText;
  		document.getElementById("replace_schedule").innerHTML = str;	
	}
}

function Display_downpagin() 
{ 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		//alert(xmlHttp.responseText);
		str = xmlHttp.responseText;
		document.getElementById("downloadpagin").innerHTML = str ;
	}
}

function display_imagetab() 
{ 
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("countrydivcontainer").innerHTML=xmlHttp.responseText;
	}
}
function display_contenttab() 
{ 
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("showcontent").innerHTML=xmlHttp.responseText;
	}
}

function display_topics() 
{ 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
     {
      document.getElementById("show_topics").innerHTML=xmlHttp.responseText;
     }
}

function displayCategory() 
{ 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("showCategory").innerHTML = xmlHttp.responseText;
		
	}
} 


function display_post() 
{ 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("show_post").innerHTML = xmlHttp.responseText;
		
	}
} 

function display_topic()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("show_topic").innerHTML = xmlHttp.responseText;
	}
}
function remove_file() 
{
  if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		//document.getElementById("all_image").innerHTML = xmlHttp.responseText
		//alert(xmlHttp.responseText);
		str = xmlHttp.responseText.split("@@");
		document.getElementById("all_image1").innerHTML = str[0];
		for(i=0;i<=str[2];i++)
		{
		//	alert(document.getElementById("new_image_"+i).value)
		  document.getElementById("new_image_"+i).value = "";
		//	alert(document.getElementById("new_image_"+i).value)
		}
        if(str[1] != " ")
		{
		new_str  = str[1].split(",");
		for(i=0;i<new_str.length;i++)
		{
			document.getElementById("new_image_"+i).value = new_str[i];
		}
		}
	}
} 
function Display_mainwall() 
{ 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
     {
      document.getElementById("show_wallpaper").innerHTML=xmlHttp.responseText;
     }
}
function Display_mainscreen() 
{ 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
     {
      document.getElementById("show_screensaver").innerHTML=xmlHttp.responseText;
     }
} 

 function display_search() 
{ 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		//alert(xmlHttp.responseText);
		str = xmlHttp.responseText.split("@@");
		//alert(str);
		document.getElementById("show_search").innerHTML = str[0] ;
		//alert(str[0]);
		document.getElementById("count_search").innerHTML = "<b>"+str[1]+"</b>" ;
		//alert(str[1]);
	}
} 
function displayName() 
{ 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	
	    str = xmlHttp.responseText.split("@@");
		document.getElementById("show_search").innerHTML = str[0];
		document.getElementById("count_search").innerHTML = "<b>"+str[1]+"</b>" ;
	}
} 

function displayMessage()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		//document.getElementById("show_topic").focus();
		//alert(xmlHttp.responseText)
		//setTimeout("scrollTops()",2000);
		setTimeout("scrollDown()",20);
	}
}

function displayMessageArea()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var splitArea = xmlHttp.responseText.split("##########17eb7ecc4c38e4705361cccd903ad8c6@@@@@@@@@@")
		if(splitArea[0] == "log_out")
		{
			alert("Celebrity Logout!!!!!!!")
			location.replace("../../index.php")
		}
		else if(splitArea[0] == "log_out_cel")
		{	
			var total= "<br />Time:(00:00)";
			document.getElementById('timefordisplay').innerHTML=total;
			alert("Your Time is out!!!!!!!")
			location.replace("celeblogin.php")
		}
		//alert(splitArea[1])
		if(splitArea[1] != "user_available")
		{
			var splitMessage = splitArea[1].split("##&&##");
			alert(splitMessage[0])
			location.replace(splitMessage[1])
		}
		// function will come here 
		document.getElementById("chatbox").innerHTML = document.getElementById("chatbox").innerHTML + splitArea[2];
		// function will come here
		document.getElementById("chatroom").innerHTML = splitArea[3];
		setTimeout("scrollDown()",1000);
		//setTimeout("refreshMessageDiv()",200);
	}
}


function displayUserArea()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("chatroom").innerHTML = xmlHttp.responseText;

		setTimeout("refreshUserDiv()",200);
	}
}

function deleteUserArea()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		alert(xmlHttp.responseText);
	}
}
function display_celebirty()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("showonline").innerHTML = xmlHttp.responseText;
		//setTimeout("showOnLineCelebrity()",1000);
	}
}

function display_schedule_new()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
  		str = xmlHttp.responseText.split("#######@@@@@@");
  		document.getElementById("replace_schedule").innerHTML = str[0];	
  		document.getElementById("full_date").innerHTML = str[1];	
	}
}

function displayState()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("showState").innerHTML = xmlHttp.responseText;
	}
}
function display_image() 
{ 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("pcontent").innerHTML = xmlHttp.responseText
		//alert(xmlHttp.responseText);
	}
} 

function removeSubscriber()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("listofuser").innerHTML = xmlHttp.responseText
		//alert(xmlHttp.responseText);
	}
}

function addedToBookMarked()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		if(xmlHttp.responseText == 1)
		{
			document.getElementById("bookmarked").innerHTML = "Successfull Added here"
		}else
		{
			document.getElementById("bookmarked").innerHTML = "Already you are bookmarked to this video "
		}
		//alert(xmlHttp.responseText);
	}
}
function displayLatestVideo()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("viewvideos").innerHTML = xmlHttp.responseText
		//alert(xmlHttp.responseText);
	}
}
function displayAllFeaturedVideo()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("viewvideos").innerHTML = xmlHttp.responseText
		//alert(xmlHttp.responseText);
	}
}
function addedSubscription()
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("subscription_image").style.display = 'none';
document.getElementById("subscription").style.display = '';
if(xmlHttp.responseText == 1)
{
document.getElementById("subscription").innerHTML = "<b>Your subscription to this channel has been added. </b>"
}else
{
document.getElementById("subscription").innerHTML = "<b>You have already subscribed to this channel</b>"
}
//alert(xmlHttp.responseText);
}
}


function displayvideocat()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("videocatlisting").innerHTML=xmlHttp.responseText;
	}
}
function displaycategoryVideo()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("videocatlisting").innerHTML = xmlHttp.responseText
		//alert(xmlHttp.responseText);
	}
}
function display_videocat()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("videocatlisting").innerHTML=xmlHttp.responseText;
	}
}
function DisplayVCOM()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("vidcomments").innerHTML = xmlHttp.responseText;
	}
}
function display_vidcomm()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("other_vidcomm").innerHTML = xmlHttp.responseText;
	}
}
function Display_imagetab() 
 { 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   {
	
  //alert(xmlHttp.responseText);
	 document.getElementById("videoaddon").innerHTML=xmlHttp.responseText;
	 
   }
}
function Display_flagmsg()
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("videoaddon").innerHTML=xmlHttp.responseText;
}
}

 function ShowHeadContent()
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("changecontent").innerHTML=xmlHttp.responseText;
}
} 

function Display_addressmsg()
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("videoaddon").innerHTML=xmlHttp.responseText;
}
}

function newaddedSubscription()
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("newsubscription_image").style.display = 'none';
document.getElementById("newsubscription").style.display = '';
if(xmlHttp.responseText == 1)
{
document.getElementById("newsubscription").innerHTML = "<b>Your subscription to this channel has been added. </b>"
}else
{
document.getElementById("newsubscription").innerHTML = "<b>You have already subscribed to this channel</b>"
}
//alert(xmlHttp.responseText);
}
}

function ShowHeadContent()
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("changecontent").innerHTML=xmlHttp.responseText;
}
} 
function deleteSubscription()
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
var strImage = xmlHttp.responseText.split("##@@###");
var nowTotal = parseInt(document.getElementById("myusersubscriberno").value);
nowTotal = nowTotal -1;
//alert(nowTotal);
var startCount = parseInt(strImage[strImage.length-1]);
document.getElementById("usersubscriberno").innerHTML = nowTotal;
//alert(nowTotal);
document.getElementById("myusersubscriberno").value = nowTotal;
var a =0;
for(i=startCount;i<=9;i++)
{
	var aa = i-startCount;
	
	if(a < strImage.length-1)
	{
		document.getElementById("subs"+i).innerHTML = strImage[aa];
	}
	else 
	{
		document.getElementById("subs"+i).innerHTML = "";
	}
	a++;
}


}
}
function Display_imagetabforchannels()
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
	document.getElementById("channeladdon").innerHTML=xmlHttp.responseText;
}
}

function display_myqueuelisting()
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
	document.getElementById("queuelisting").innerHTML=xmlHttp.responseText;
}
}

function display_subscribers()
{

if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("subscribers").innerHTML=xmlHttp.responseText;

}
}

function display_manage()
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("chanedesc").innerHTML = xmlHttp.responseText ;
}
}

function only_feed()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("changenext").innerHTML=xmlHttp.responseText;
	}
}

function display_morereminder()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("changenext").innerHTML=xmlHttp.responseText;
	}
}

function displayShowVideo() 
{ 
   if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		//alert(xmlHttp.responseText);
		str = xmlHttp.responseText;
		document.getElementById("pressarchive").innerHTML = str ;
	}
}
