// JavaScript Document

  function GetStateList()
   {
   		 
		 var  CountryID =document.getElementById('frmCountryID').value;
		
		 var  un_time =document.getElementById('un_time').value;
		
		if(CountryID=='') 
		   {
		     alert('Please Choose Country'); 
			 return false; 
			}
			 
		
		
		var GetCountryCurrenmcy = document.getElementById('GetCountryCurrenmcy').value;
		
				
		 document.getElementById('DivState').innerHTML='<img src=images/ajax_loader.gif >';
		
		// document.getElementById('DivCity').innerHTML='<select name="frmCityID" id="frmCityID" class="box"><option value=""> - Select One - </option></select>';
		 
		 new Ajax.Updater('DivState', "get_state_list.php?CountryID="+CountryID+"&GetCountryCurrenmcy="+GetCountryCurrenmcy+"&un_time="+un_time+"", {asynchronous:true, evalScripts:true });
   }
 

   function GetCityList()
   {
   		 
		 var  StateID =document.getElementById('frmStateID').value;
		 var  un_time =document.getElementById('un_time').value;
		 if(StateID=='') 
		   {
		     alert('Please Choose State'); 
			 return false; 
			}
			 
		 document.getElementById('DivCity').innerHTML='<img src=images/ajax_loader.gif >';
		 
		 new Ajax.Updater('DivCity', "get_city_list.php?StateID="+StateID+"&un_time="+un_time+"", {asynchronous:true, evalScripts:true });
   }
 
    function GetSubCategoryList()
   {
   		 
		 var  CategoryID =document.getElementById('frmCategoryID').value;
		 var  un_time =document.getElementById('un_time').value;
		 if(CategoryID=='') 
		   {
		     alert('Please Choose Category'); 
			 return false; 
			}
			 
		 document.getElementById('DivSubCategory').innerHTML='<img src=images/ajax_loader.gif >';
		 
		 new Ajax.Updater('DivSubCategory', "get_subcategory_list.php?CategoryID="+CategoryID+"&un_time="+un_time+"", {asynchronous:true, evalScripts:true });
   }
  
  
  
  function WatchThisAd()
   {
   		 
		
		 var  un_time =document.getElementById('un_time').value;
		 
		var varClassifiedID = document.getElementById('frmClassifiedID').value;    
		var varClassifiedTitle =document.getElementById('frmClassifiedTitle').value;    
		var varClassifiedPrice = document.getElementById('frmClassifiedPrice').value;    
		var varClassifiedLocation =document.getElementById('frmClassifiedLocation').value;   
		var varClassifiedDate = document.getElementById('frmClassifiedDate').value;   
		 
		 document.getElementById('DivWatchThisAd').innerHTML='<img src=images/ajax_loader.gif >';
		 
		 new Ajax.Updater('DivWatchThisAd', "watchthisad.php?varClassifiedID="+varClassifiedID+"&varClassifiedTitle="+varClassifiedTitle+"&varClassifiedPrice="+varClassifiedPrice+"&varClassifiedLocation="+varClassifiedLocation+"&varClassifiedDate="+varClassifiedDate+"&un_time="+un_time+"", {asynchronous:true, evalScripts:true });
   }

 
 
 
 function ReportAbuse(ReportAbs)
   {
		var  un_time =document.getElementById('un_time').value;
		var  frmCategoryID =document.getElementById('frmClassifiedID').value;
		var  frmUserID =document.getElementById('frmUserID').value;
		var  frmReportDate =document.getElementById('frmReportDate').value;
		document.getElementById('DivReportAbuse').innerHTML='<img src=images/ajax_loader.gif >';
		//window.open("_action.php?frmClassifiedID="+frmCategoryID+"&frmReport_Text="+ReportAbs+"&frmUserID="+frmUserID+"&frmReportDate="+frmReportDate+"&un_time="+un_time+"","","width=500,height=300");
		
		new Ajax.Updater('DivReportAbuse', "http://www.daleelkom.net/reportabuse.php?frmClassifiedID="+frmCategoryID+"&frmReport_Text="+ReportAbs+"&frmUserID="+frmUserID+"&frmReportDate="+frmReportDate+"&un_time="+un_time+"", {asynchronous:true, evalScripts:true });
		
		
   }


  
