// JavaScript Document
  function getCities()
   {
   		 
		 var  CountryID =document.getElementById('frmCountryID').value;
		 var  un_time = Math.floor(Math.random()*11)
		if(CountryID=='2') 
		   {
				  document.getElementById('DivCities').innerHTML='';
				  return false; 
		   }
		if(CountryID=='') 
		   {
				 alert('Please Choose Country'); 
				  document.getElementById('DivCities').innerHTML='';
				 return false; 
			}
			 
		 document.getElementById('DivCities').innerHTML='<img src=images/ajax_loader.gif >';
		 new Ajax.Updater('DivCities', "getCities.php?CountryID="+CountryID+"&un_time="+un_time+"", {asynchronous:true, evalScripts:true });
   }
 
 
 
  function getCategory(str)
   {
		 var  cid =str;
		 var  un_time = Math.floor(Math.random()*11)
		if(cid=='') 
		   {
				 alert('Please Choose Category'); 
				 return false; 
			}
		 //// document.getElementById('DivCateogries').innerHTML='<img src=images/ajax_loader.gif >';
		  document.getElementById('DivCateogries').innerHTML='<select name="SubCategoryID"  id="SubCategoryID" size="4" class="black12" style="height: 100%; width: 92%;"><img src=images/ajax_loader.gif ></select>';
		   document.getElementById('DivCateogriesSecond').innerHTML='<select name="SubCategoryID"  id="SubCategoryID" size="4" class="black12" style="height: 100%; width: 92%;"><img src=images/ajax_loader.gif ></select>';
		 new Ajax.Updater('DivCateogries', "getCategory.php?cid="+cid+"&un_time="+un_time+"", {asynchronous:true, evalScripts:true });
   }


  function getCategoryfinal(str)
   {
		 var  cid =str;
		 var  un_time = Math.floor(Math.random()*11)
		if(cid=='') 
		   {
				 alert('Please Choose SubCategory'); 
				 return false; 
			}
		 //// document.getElementById('DivCateogries').innerHTML='<img src=images/ajax_loader.gif >';
		  document.getElementById('DivCateogriesSecond').innerHTML='<select name="SubCategoryID"  id="SubCategoryID" size="4" class="black12" style="height: 100%; width: 92%;"><img src=images/ajax_loader.gif ></select>';
		 new Ajax.Updater('DivCateogriesSecond', "getCategoryFinal.php?cid="+cid+"&un_time="+un_time+"", {asynchronous:true, evalScripts:true });
   }









 function addTags()
   {
		var  un_time = Math.floor(Math.random()*11)
		
		var  tags =document.getElementById('txtNewTag').value;

		if(tags=='') 
		   {
				 alert('Please Enter Tags'); 
				 return false; 
			}
		
		var  ids =document.getElementById('txtClsID').value;
		
			document.getElementById('DivTags').innerHTML='<img src=images/ajax_loader.gif >';
		 
		 new Ajax.Updater('DivTags', "tagsadd.php?ids="+ids+"&tags="+tags+"&un_time="+un_time+"", {asynchronous:true, evalScripts:true });
		
		 document.getElementById('txtNewTag').value='';
   }





 function ReportAbuse(ReportAbs)
   {
		var  un_time = Math.floor(Math.random()*11)
		
		var  frmCategoryID =document.getElementById('frmClassifiedID').value;

		document.getElementById('DivReportAbuse').innerHTML='<img src=images/ajax_loader.gif >';
		
		
		
		 new Ajax.Updater('DivReportAbuse', "reportabuse.php?cid="+frmCategoryID+"&txt="+ReportAbs+"&un_time="+un_time+"", {asynchronous:true, evalScripts:true });
   }
