web_url="http://toybox-studios.com/harlem/new/";
var xmlHttp;
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;
}

//*******************For the Radio Button*******************
 function video_view(id){
	 var video_id=id;
	 alert(video_id)
	xmlHttp=GetXmlHttpObject() 
	 if (xmlHttp==null)
	 {
		 alert ("Browser does not support HTTP Request")
		 return
	 }
     var url=web_url+"ajax.php?video_id="+video_id;
	 alert(url)
     xmlHttp.onreadystatechange = sitechange; 
	 xmlHttp.open("GET",url,true);
	 xmlHttp.send(null);
	
  }
 
 function sitechange()
 {
    document.getElementById("td_video").innerHTML=xmlHttp.responseText;
}

var topheight;
function viewsubcat(top,cat_id,cat_name){
	topheight=top;	
	document.getElementById("div_"+cat_id).style.top=topheight+'px';
	//alert(document.getElementById("div_"+cat_id).style.top)
	 xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
		 alert ("Browser does not support HTTP Request")
		 return
	 }
	var url=web_url+"viewsubcategories.php";
	url=url+"?cat_id="+cat_id + "&catname="+ cat_name;
	url=url+"&sid="+Math.random();
    xmlHttp.onreadystatechange = stateChangedSubcategory; 
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
 function stateChangedSubcategory()
  { 
	 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 		{ 		
		    
            document.getElementById("mymenu1").style.display='block';		
			document.getElementById("mymenu1").style.top=topheight;
    		document.getElementById("Div_Subcategory").innerHTML=xmlHttp.responseText;
		}
 }
 
//**************************************************************	