// stores the reference to the XMLHttpRequest object
// retrieves the XMLHttpRequest object
            function createXmlHttpRequestObject() 
            {  
            // will store the reference to the XMLHttpRequest object
            var xmlHttp;
            // if running Internet Explorer
            if(window.ActiveXObject)
            {
            try
            {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e) 
            {
            xmlHttp = false;
            }
            }
            // if running Mozilla or other browsers
            else
            {
            try 
            {
            xmlHttp = new XMLHttpRequest();
            }
            catch (e) 
            {
            xmlHttp = false;
            }
            }
            // return the created object or display an error message
            if (!xmlHttp)
            alert("Error creating the XMLHttpRequest object.");
            else 
            return xmlHttp;
            }
			
  
			function vtype1(getid)
            {
            iNh = "<strong><table id=\"Table1\" bgcolor=\"#000000\" align=\"center\" border=\"0\" bordercolor=\"#000000\" cellpadding=\"0\" cellspacing=\"0\" height=\"200\" width=\"250\"><tbody><tr><td align=\"center\" bgcolor=\"white\"   valign=\"middle\" width=\"100%\"><font color=\"Black\" face=\"Arial\" size=\"4\"><b><br><img src='http://www.benesserevillage.it/public/images/ajax-loader.gif'/>&nbsp;<br>Loading, please wait...  </strong></font></td></tr></tbody></table>";
            var str2="http://www.benesserevillage.it/ajax/video/id/"+getid;
           // alert(str2);
            obj=document.getElementById("country1");
            
            obj.innerHTML = iNh;
            
            xmlHttp = createXmlHttpRequestObject(); 
            xmlHttp.open("GET",str2,true);
			//alert(xmlHttp.responseText);
            xmlHttp.onreadystatechange=function(){obj.innerHTML=xmlHttp.responseText; }
            //setTimeOut('startPoll()',2000);
            xmlHttp.send(null);	
            //setTimeOut('commart(artid)',2000);
           
           // if(obj.style.display=='none')obj.style.display='block';else obj.style.display='none';
            }
	function vtype2(getid)
            {
            iNh = "<strong><table id=\"Table1\" bgcolor=\"#000000\" align=\"center\" border=\"0\" bordercolor=\"#000000\" cellpadding=\"0\" cellspacing=\"0\" height=\"200\" width=\"250\"><tbody><tr><td align=\"center\" bgcolor=\"white\"   valign=\"middle\" width=\"100%\"><font color=\"Black\" face=\"Arial\" size=\"4\"><b><br><img src='http://www.benesserevillage.it/public/images/ajax-loader.gif'/>&nbsp;<br>Loading, please wait...  </strong></font></td></tr></tbody></table>";
            var str2="http://www.benesserevillage.it/ajax/video/id/"+getid;
           // alert(str2);
            obj=document.getElementById("country2");
            if(obj.innerHTML=='')
            {
            obj.innerHTML = iNh;
            
            xmlHttp = createXmlHttpRequestObject(); 
            xmlHttp.open("GET",str2,true);
			//alert(xmlHttp.responseText);
            xmlHttp.onreadystatechange=function(){obj.innerHTML=xmlHttp.responseText; }
            //setTimeOut('startPoll()',2000);
            xmlHttp.send(null);	
            //setTimeOut('commart(artid)',2000);
            }
           // if(obj.style.display=='none')obj.style.display='block';else obj.style.display='none';
            }
	function vtype3(getid)
            {
            iNh = "<strong><table id=\"Table1\" bgcolor=\"#000000\" align=\"center\" border=\"0\" bordercolor=\"#000000\" cellpadding=\"0\" cellspacing=\"0\" height=\"200\" width=\"250\"><tbody><tr><td align=\"center\" bgcolor=\"white\"   valign=\"middle\" width=\"100%\"><font color=\"Black\" face=\"Arial\" size=\"4\"><b><br><img src='http://www.benesserevillage.it/public/images/ajax-loader.gif'/>&nbsp;<br>Loading, please wait...  </strong></font></td></tr></tbody></table>";
            var str2="http://www.benesserevillage.it/ajax/video/id/"+getid;
            //alert(str2);
            obj=document.getElementById("country3");
            if(obj.innerHTML=='')
            {
            obj.innerHTML = iNh;
            
            xmlHttp = createXmlHttpRequestObject(); 
            xmlHttp.open("GET",str2,true);
            xmlHttp.onreadystatechange=function(){obj.innerHTML=xmlHttp.responseText; }
            //setTimeOut('startPoll()',2000);
            xmlHttp.send(null);	
            //setTimeOut('commart(artid)',2000);
            }
           // if(obj.style.display=='none')obj.style.display='block';else obj.style.display='none';
            }
			function vtype4(getid)
            {
            iNh = "<strong><table id=\"Table1\" bgcolor=\"#000000\" align=\"center\" border=\"0\" bordercolor=\"#000000\" cellpadding=\"0\" cellspacing=\"0\" height=\"200\" width=\"250\"><tbody><tr><td align=\"center\" bgcolor=\"white\"   valign=\"middle\" width=\"100%\"><font color=\"Black\" face=\"Arial\" size=\"4\"><b><br><img src='http://www.benesserevillage.it/public/images/ajax-loader.gif'/>&nbsp;<br>Loading, please wait...  </strong></font></td></tr></tbody></table>";
            var str2="http://www.benesserevillage.it/ajax/video/id/"+getid;
           // alert(str2);
            obj=document.getElementById("country4");
            if(obj.innerHTML=='')
            {
            obj.innerHTML = iNh;
            
            xmlHttp = createXmlHttpRequestObject(); 
            xmlHttp.open("GET",str2,true);
            xmlHttp.onreadystatechange=function(){obj.innerHTML=xmlHttp.responseText; }
            //setTimeOut('startPoll()',2000);
            xmlHttp.send(null);	
            //setTimeOut('commart(artid)',2000);
            }
           // if(obj.style.display=='none')obj.style.display='block';else obj.style.display='none';
            }
			function vcatg(getid,grade)
            {
            iNh = "<strong><table id=\"Table1\" bgcolor=\"#000000\" align=\"center\" border=\"0\" bordercolor=\"#000000\" cellpadding=\"0\" cellspacing=\"0\" height=\"200\" width=\"250\"><tbody><tr><td align=\"center\" bgcolor=\"white\"   valign=\"middle\" width=\"100%\"><font color=\"Black\" face=\"Arial\" size=\"4\"><b><br><img src='http://www.benesserevillage.it/public/images/ajax-loader.gif'/>&nbsp;<br>Loading, please wait...  </strong></font></td></tr></tbody></table>";
		    
            var str2="http://www.benesserevillage.it/ajax/videotype/id/"+getid;
			if(grade=='vid1')
			{
            obj=document.getElementById("perticular1");
			}
			if(grade=='vid2')
			{
            obj=document.getElementById("perticular2");
			}
			if(grade=='vid3')
			{
            obj=document.getElementById("perticular3");
			}
			if(grade=='vid4')
			{
            obj=document.getElementById("perticular4");
			}
            obj.innerHTML = iNh;
            
            xmlHttp = createXmlHttpRequestObject(); 
            xmlHttp.open("GET",str2,true);
            xmlHttp.onreadystatechange=function(){obj.innerHTML=xmlHttp.responseText; }
            //setTimeOut('startPoll()',2000);
            xmlHttp.send(null);	
            //setTimeOut('commart(artid)',2000);
           // if(obj.style.display=='none')obj.style.display='block';else obj.style.display='none';
            }
			function gallery(getid)
            {
            iNh = "<strong><table id=\"Table1\" bgcolor=\"#000000\" align=\"center\" border=\"0\" bordercolor=\"#000000\" cellpadding=\"0\" cellspacing=\"0\" height=\"200\" width=\"250\"><tbody><tr><td align=\"center\" bgcolor=\"white\"   valign=\"middle\" width=\"100%\"><font color=\"Black\" face=\"Arial\" size=\"4\"><b><br><img src='http://www.benesserevillage.it/public/images/ajax-loader.gif'/>&nbsp;<br>Loading, please wait...  </strong></font></td></tr></tbody></table>";
		    
            var str2="http://www.benesserevillage.it/ajax/gallery/id/"+getid;
            obj=document.getElementById("gallerytype");
            obj.innerHTML = iNh;
            xmlHttp = createXmlHttpRequestObject(); 
            xmlHttp.open("GET",str2,true);
            xmlHttp.onreadystatechange=function(){obj.innerHTML=xmlHttp.responseText; }
            //setTimeOut('startPoll()',2000);
            xmlHttp.send(null);	
            //setTimeOut('commart(artid)',2000);
           // if(obj.style.display=='none')obj.style.display='block';else obj.style.display='none';
            }
			function pergallery(getid,type)
            {
            iNh = "<strong><table id=\"Table1\" bgcolor=\"#000000\" align=\"center\" border=\"0\" bordercolor=\"#000000\" cellpadding=\"0\" cellspacing=\"0\" height=\"200\" width=\"250\"><tbody><tr><td align=\"center\" bgcolor=\"white\"   valign=\"middle\" width=\"100%\"><font color=\"Black\" face=\"Arial\" size=\"4\"><b><br> </strong></font></td></tr></tbody></table>";
		    
            var str2="http://www.benesserevillage.it/ajax/perticulargallery/id/"+getid;
            obj=document.getElementById("gall");
            obj.innerHTML = iNh;
            xmlHttp = createXmlHttpRequestObject(); 
            xmlHttp.open("GET",str2,true);
            xmlHttp.onreadystatechange=function(){obj.innerHTML=xmlHttp.responseText; }
            //setTimeOut('startPoll()',2000);
            xmlHttp.send(null);	
            //setTimeOut('commart(artid)',2000);
           // if(obj.style.display=='none')obj.style.display='block';else obj.style.display='none';
            }
			function perneews(getid,type)
            {
            iNh = "<strong><table id=\"Table1\" bgcolor=\"#000000\" align=\"center\" border=\"0\" bordercolor=\"#000000\" cellpadding=\"0\" cellspacing=\"0\" height=\"200\" width=\"250\"><tbody><tr><td align=\"center\" bgcolor=\"white\"   valign=\"middle\" width=\"100%\"><font color=\"Black\" face=\"Arial\" size=\"4\"><b><br><img src='http://www.benesserevillage.it/public/images/ajax-loader.gif'/>&nbsp;<br>Loading, please wait...  </strong></font></td></tr></tbody></table>";
		    
            var str2="http://www.benesserevillage.it/ajax/todayarticle/id/"+getid;
            obj=document.getElementById("perne");
            obj.innerHTML = iNh;
            xmlHttp = createXmlHttpRequestObject(); 
            xmlHttp.open("GET",str2,true);
            xmlHttp.onreadystatechange=function(){obj.innerHTML=xmlHttp.responseText; }
            //setTimeOut('startPoll()',2000);
            xmlHttp.send(null);	
            //setTimeOut('commart(artid)',2000);
           // if(obj.style.display=='none')obj.style.display='block';else obj.style.display='none';
            }
            function abc(id)
            {
            
            if(id==1)
            {
            hfdh();
            document.getElementById("country1").style.display="inline";
			document.getElementById("perticular1").style.display="inline";
            }
            if(id==2)
            {
            hfdh();
            document.getElementById("country2").style.display="inline";
			document.getElementById("perticular2").style.display="inline";
            }
            if(id==3)
            {
            hfdh();
            document.getElementById("country3").style.display="inline";
			document.getElementById("perticular3").style.display="inline";
            }
            if(id==4)
            {
            hfdh();
            document.getElementById("country4").style.display="inline";
			document.getElementById("perticular4").style.display="inline";
            }
            
            }

            function hfdh()
            {
            document.getElementById("country1").style.display="none";
            document.getElementById("country2").style.display="none";
            document.getElementById("country3").style.display="none";
            document.getElementById("country4").style.display="none";
			document.getElementById("perticular1").style.display="none";
			document.getElementById("perticular2").style.display="none";
			document.getElementById("perticular3").style.display="none";
			document.getElementById("perticular4").style.display="none";
            }
			
			function subcatg(sid)
			{
			
			iNh = "<strong><table id=\"Table1\" bgcolor=\"#000000\" align=\"center\" border=\"0\" bordercolor=\"#000000\" cellpadding=\"0\" cellspacing=\"0\" height=\"200\" width=\"250\"><tbody><tr><td align=\"center\" bgcolor=\"white\"   valign=\"middle\" width=\"100%\"><font color=\"Black\" face=\"Arial\" size=\"4\"><b><br><img src='http://www.benesserevillage.it/public/images/ajax-loader.gif'/>&nbsp;<br>Loading, please wait...  </strong></font></td></tr></tbody></table>";
            var str2="http://www.benesserevillage.it/controls/subcatg/id/"+sid;
            obj=document.getElementById("sub");
            obj.innerHTML = iNh;
            xmlHttp = createXmlHttpRequestObject(); 
            xmlHttp.open("GET",str2,true);
            xmlHttp.onreadystatechange=function(){obj.innerHTML=xmlHttp.responseText; }
            //setTimeOut('startPoll()',2000);
            xmlHttp.send(null);	
			}
			
           
