function changecity(id)
{
 	document.getElementById('selid').value=id;
 	document.cfrm.submit();
 }
function showcity()
{
	document.getElementById('cbox').innerHTML=document.getElementById('cbox1').innerHTML
	document.getElementById('selbox').style.display='';
}
function shiftab(id)
{

	document.getElementById('td_'+srchid).className ='';
	document.getElementById('a_'+srchid).className ='oranglink';
	srchid = id;
	document.getElementById('td_'+id).className ='darkgreennbgselected'
	document.getElementById('a_'+id).className ='whitelink';
	callcats(id);
}
function focusc(id,ourtext)
{
 	if( document.getElementById(id).value == ourtext )
		document.getElementById(id).value ='';
}
function blurc(id,ourtext)
{
	
 	if( document.getElementById(id).value == '' )
		document.getElementById(id).value = ourtext;
}
function callcats(id)
{
	//var loc = '&locid='+locid+'&locname='+locname+'&locparname='+locparname+'&locparid='+locparid;
 
	srch='mid='+id;
	var str='';
	switch(id)
	{
		case '1' : str='Sale'; break;
		case '222' : str='Flats/Houses'; break;
		case '84' : str='Friends/Dating'; break;
		case '123' : str='Busines Services'; break;
		case '89' : str='Jobs'; break;
	}
 
	var keyword = document.getElementById('srch').value;
	if(keyword.search(/search/i) == 0 || keyword.length==0 )
	   document.getElementById('srch').value = 'Search For ' + str;
	//poststr = poststr+loc;  // Eg., poststr = "feedurl=" + ajaxfeedurl+"&divname="+filldivname;
   // $.post("ajx_morecats.php", poststr , function(data){   $('#dyncontent').html(data); } );
	 
}
function searchcat()
{
	var keyword = document.getElementById('srch').value;
 	//alert(keyword + keyword.search(/search/i) + keyword.length);
	if(keyword.search(/search/i) == 0  )
	{
		alert('Enter Search Key');
		 
	}
	else
		window.location = 'searchpost.php?key='+keyword+'&'+srch;
 
}
function blurc( )
{
	callcats(srchid);
}
function focusc( )
{
	var keyword = document.getElementById('srch').value;
	if(keyword.search(/search/i) == 0)
		document.getElementById('srch').value = '';
}
