<!-- <![[CDATA[
function applystyle(eid,tip,op){
//eid - TR pe linia caruia sch culoarea
//op - Efect de OVER(1) si OUT(2)
//tip - MOD(2) DEL(1)
style_forjs="border-style:solid;border-width:1px;border-color:black";
color_tr_delete='#f91335';
color_tr_edit='#589ee4';
nrch=eid.getElementsByTagName('TD').length;
i=0;
while(i<=nrch){
 if(tip==1){
    if(eid.getElementsByTagName('TD')[i]!=null&&op==1)
      eid.getElementsByTagName('TD')[i].style.cssText='background-color:'+color_tr_delete+';'+style_forjs;
    if(eid.getElementsByTagName('TD')[i]!=null&&op==2)
      eid.getElementsByTagName('TD')[i].style.cssText='background-color:#ffffff;'+style_forjs;
 }
 if(tip==2){
    if(eid.getElementsByTagName('TD')[i]!=null&&op==1)
      eid.getElementsByTagName('TD')[i].style.cssText='background-color:'+color_tr_edit+';'+style_forjs;
    if(eid.getElementsByTagName('TD')[i]!=null&&op==2)
      eid.getElementsByTagName('TD')[i].style.cssText='background-color:#ffffff;'+style_forjs;
 }
 
i++;
 } 
//.setAttribute('bgcolor','#ffffff');
//tempEl.style.setAttribute('cssText', 'left:150px; top:150px;', 0);
}

function forpro(){
if(document.getElementById('id_sablon').value=="0"||document.getElementById('id_sablon').value=="6"){
 document.getElementById('forpro').style.display="none";
 document.getElementById('div_file').style.display="none";
 }
else{
 document.getElementById('forpro').style.display="";
 document.getElementById('div_file').style.display="";
 }
}
function ch()
{
if(document.getElementById('id_sablon').value=="0")
{
alert("Nu ai ales nici o categorie");
return false;
}
if(document.getElementById('pret').value=="")document.getElementById('pret').value="0";
if(document.getElementById('pret_mp')!=null){
  if(document.getElementById('pret_mp').value=="")document.getElementById('pret_mp').value="0";
  }
return true;
}
function doSpecial(v){
if(v==0)
  {
  if(document.getElementById('urgent').checked==true)
    document.getElementById('special').checked=true;
  }
if(v==1)
  {
  if(document.getElementById('urgent').checked==true)
    document.getElementById('special').checked=true;
  }
}
function popup(mylink, windowname,width,height,options)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, '', 'width='+width+',height='+height+','+options);
return false;
}
fetch_unix_timestamp = function()
{
	return parseInt(new Date().getTime().toString().substring(0, 10))
}
function go_there(v1,v2,v3,vx)
{
window.location.search="page=admin/pages/anunt/lista_anunt&id_xcats="+v1+"&id_tranzactie="+v2+"&cod_intern="+v3+"&cod_unic="+vx;
}
function onc(){
if(document.getElementById('ca7').checked==false)
 document.getElementById('ca7').checked=true;
if(document.getElementById('ca6').checked==false)
 document.getElementById('ca6').checked=true;

}
function doSpecial(v){
if(v==0)
  {
  if(document.getElementById('urgent').checked==true)
    document.getElementById('special').checked=true;
  }
if(v==1)
  {
  if(document.getElementById('urgent').checked==true)
    document.getElementById('special').checked=true;
  }
}
function go_there(v1,v2,v3,vx)
{
window.location.search="page=admin/pages/anunt/lista_anuntx&id_xcats="+v1+"&id_tranzactie="+v2+"&cod_intern="+v3+"&cod_unic="+vx;
}
function go_there1(v1,v2,v3,vx)
{
window.location.search="page=admin/pages/anunt/lista_anunt&id_xcats="+v1+"&id_tranzactie="+v2+"&cod_intern="+v3+"&cod_unic="+vx;
}
function go_there_banner(v1){
window.location.search="page=admin/pages/bannere/banner&job=lista&btype="+v1
}
function go_there_companii(v1){
window.location.search="page=admin/pages/servicii/companii&job=listac&id_get_cat="+v1
}
function numericdot_value(str,ids){
 ids.value=str.replace(/[^0-9.]/g,'');
}
function numeric_value(str,ids){
 ids.value=str.replace(/[^0-9]/g,'');
}
function newsch(){
if(!checkemail(document.getElementById('email_news').value))
 {
 alert("Adresa de email nu este valida!");
 return false; 
 }
return true;
}
function checkemail(str){
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
if (filter.test(str))
return true;
else
return false;
}




//NOT USE YET
function numericdot_value_banner(str,ids,v){
 ids.value=str.replace(/[^0-9]/g,'');
 if(v==1&&parseInt(ids.value)>1020){
   ids.value="1020";
   alert("Lungime depasita!");
   }
 if((v==4||v==5)&&parseInt(ids.value)>553){
    ids.value="553";
    alert("Lungime depasita!");
    }
}
function conf_banner(v,ids,do_gr,lungime){
if(do_gr.checked==true&&(v!=2&&v!=3)){
    //if(v==2||v==3){}
    lungime.value="";
    ids.style.display='';
   }
else{ 
  lungime.value="";
  ids.style.display='none';
  do_gr.checked=false;
 }
}
// ]] -->
