// JavaScript Document
function CountryComboList()
   {
   		 
		 document.getElementById('IDcountrycombo').innerHTML='<img src=ajax_loader2.gif>';
		 new Ajax.Updater('IDcountrycombo', "countrycombo.php", {asynchronous:true, evalScripts:true });
   }
   
   
function CountryCityList()
{ 
	
	
   		 var  parentid =document.getElementById('SelectCountry').value;
		 var geturl = document.getElementById('cUrl').value;
 				var tid = document.getElementById('tid').value;
	
	document.getElementById('IDCountryCityList').innerHTML="<div style='width:420px; height:320px; background:#CCCCCC; text-align:center; vertical-align:middle; line-height:300px; background:url(images/ajax-loader.gif) center center no-repeat;'>&nbsp;</div>";
	
	doAjax('homeCityList.php','parentid='+parentid+'&tid='+tid,'change_imgssdrs','GET');
}


function change_imgssdrs(item)
{
	if(item)
	{
		document.getElementById('IDCountryCityList').innerHTML = item;	
	}
	else
	{
		document.getElementById('IDCountryCityList').innerHTML= '';
	}

}

   
 /* function CountryCityList()
   {
   		 var  parentid =document.getElementById('SelectCountry').value;
		 var geturl = document.getElementById('cUrl').value;
	
		alert('hello');
		
		 var  tid =document.getElementById('tid').value;
		 	if(parentid==0) 
		   		{
		    	 alert('Please Choose Country'); 
			 	 return false; 
				}
		
			//if(parentid=='all_listing')
			//	{
					//window.location = geturl+"all_listing";
			//	}
			//else
			//	{
		 		  document.getElementById('IDCountryCityList').innerHTML='<center><br><br><br><br><br><br><img src=ajax_loader2.gif></center>';
		 		  new Ajax.Updater('IDCountryCityList', "homeCityList.php?parentid="+parentid+"&tid="+tid+"", {asynchronous:true, evalScripts:true });
  	  		//   }
			
			
   }*/
   
   
   
 function CountryCityList2(mmd){
          var  tid =document.getElementById('tid').value;
 		 new Ajax.Updater('IDCountryCityList', "homeCityList.php?parentid="+mmd+"&tid="+tid+"", {asynchronous:true, evalScripts:true });

 
 }
 
 
function counterUpdate(opt_countedTextBox, opt_countBody, opt_maxSize) 
	{
		 var countedTextBox = opt_countedTextBox ? opt_countedTextBox : "Comments";
		 var countBody = opt_countBody ? opt_countBody : "countBody";
		 var maxSize = opt_maxSize ? opt_maxSize : 1024;
	
		 var field = document.getElementById(countedTextBox);
			 if (field && field.value.length >= maxSize) 
				 {
					field.value = field.value.substring(0, maxSize);
				 }
			 var txtField = document.getElementById(countBody);
            if (txtField) 
				{ 
                	txtField.innerHTML = field.value.length;
        		}
	}
	
 