function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				req = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}
		 	
		return xmlhttp;
	}
	
	
function onload_fill()
{
	id=document.getElementById('ddl_cat').value;
	if(id==2 || id==4 || id==13 || id==10)
		{
		
		document.getElementById('dv_price').style.display='block';
			
		}
		else
		{
			document.getElementById('dv_price').style.display='none';
			
	    }
		
		if(id==3)
		{
		
		document.getElementById('dv_comp').style.display='block';
			
		}
		else
		{
			document.getElementById('dv_comp').style.display='none';
			
	    }
		if(id==9)
		{
		
		document.getElementById('dv_event').style.display='block';
			
		}
		else
		{
			document.getElementById('dv_event').style.display='none';
			
	    }
	}
	
	function show_subcat(id) 
	{		
		
		strURL="show_subcategory.php?id="+id;
		//alert(strURL);
		
		if(id==2 || id==4 || id==13 || id==10)
		{
		
		document.getElementById('dv_price').style.display='block';
			
		}
		else
		{
			document.getElementById('dv_price').style.display='none';
			
	    }
		
		if(id==3)
		{
		
		document.getElementById('dv_comp').style.display='block';
			
		}
		else
		{
			document.getElementById('dv_comp').style.display='none';
			
	    }
		if(id==9)
		{
		
		document.getElementById('dv_event').style.display='block';
			
		}
		else
		{
			document.getElementById('dv_event').style.display='none';
			
	    }
		
		
		
		var req = getXMLHTTP();
	//	alert(req);
		if (req) 
		{
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {
						
					
				
						document.getElementById('div_subcat').innerHTML=req.responseText;
						
						
						
						
						
						
						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}
				
				else
				{
					

				
			//document.getElementById('div_subcat').innerHTML="<font color=red size=-1><b>Loading...</b></font>&nbsp;<img src=\"../images/loading.gif\">";
				
				
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
		
	}
	
		function show_city(id) 
	{		
		
		strURL="show_city.php?id="+id;
		
		var req = getXMLHTTP();
		//alert(req);
		if (req) 
		{
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('div_city').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}
				
				else
				{
				document.getElementById('div_city').innerHTML="<img src=\"images/loading.gif\">";
				
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
		
	}
	
	/*function show_blanksubcat() 
	{		
		
		strURL="show_blanksubcateogy.php";
		//alert(strURL);
		var req = getXMLHTTP();
		//alert(req);
		if (req) 
		{
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('div_subcat').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}
				
				else
				{
					

				
			//document.getElementById('ddl_sub_cat').options[0].text='Loading...';
				
				
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
		
	}
	
	
	
	
	function show_city(id) 
	{		
		
		strURL="show_city.php?id="+id;
		
		var req = getXMLHTTP();
		//alert(req);
		if (req) 
		{
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('div_city').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}
				
				else
				{
				document.getElementById('div_city').innerHTML="<img src=\"images/loading.gif\">";
				
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
		
	}
	
	
	
	
	
	
		function ref_test() 
	{		
		
		strURL="banner_process.php";
		//alert(strURL);
		var req = getXMLHTTP();
		//alert(req);
		if (req) 
		{
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('timediv').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
		
	}





function get_test()
{
	

ref_test();

setTimeout("get_test()",5000);
}

window.onload =  get_test; */


function show_city_free(id) 
	{		
		
		strURL="show_city_free.php?id="+id;
		
		var req = getXMLHTTP();
		//alert(req);
		if (req) 
		{
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {
						
					
				
						document.getElementById('div_city').innerHTML=req.responseText;
						
						
						
						
						
						
						
					} else {
					//	alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}
				
				else
				{
					

				
			document.getElementById('div_city').innerHTML="<font color=red size=-1><b>Loading...</b></font>&nbsp;<img src=\"../images/loading.gif\">";
				
				
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
		
	}