var vck={
 cp: '1,0,0',
 cs: '1,0,0',
 text:'5,0,0',
 textziar:'5,0,0'
}
function ajfc(m,s){var xmlHttp;try{xmlHttp=new XMLHttpRequest();}catch(e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return false;}}}
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){procajfc(m,s,xmlHttp.responseText);}}
xmlHttp.open("POST","ajf.asp",true);
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=iso-8859-2");
s=enc(s);
xmlHttp.send('m=servicii_'+m+'&'+s);
}
function procajfc(m,s,r){
qs(s);
switch(m){
 case 'ccs':{
  document.getElementById('fcs').innerHTML=r;
  break}
 case 'presearch':{
  if (parseInt(r)>0){
  document.location='servicii.asp?'+create_request_string(document.getElementById('search'));
  }else{
  rl='rss.asp?m=3&'+create_request_string(document.getElementById('search'));
  document.getElementById('btnsearch').className='disp';
  document.getElementById('sload').innerHTML='Nu sunt rezultate pentru această căutare!<br> Abonați-vă la RSS pentru a afla noutăți <a href="'+rl+'"><img src="img/nrss.gif"></a> <a href="ajutor.asp?id=2">află mai multe</a>.';}
  break}
 default: {break}
  }
}

function ccs(){
cp=document.getElementById('cp').value;
ajfc('ccs','cp='+cp+'&sel='+scs);
}

function presearch(){
if ((document.getElementsByName('judet')[0].value=='')&&(document.getElementsByName('cp')[0].value=='')){return null;}
document.getElementById('btnsearch').className='dispno';loading('sload');a=create_request_string(document.getElementById('search'));ajfc('presearch',a);
}