String.prototype.trim=function() {return this.replace(/^\s*|\s(?=\s)|\s*$/g,"");};function confirmDel(text,link) {var j=1;var answer=confirm(text) if(answer) {window.open(link,'_self');}} function encode_pass() {var pass=document.getElementById('parola_d').value;var code=document.getElementById('pass_code').value;document.getElementById('parola_d').value=hex_md5(pass+code);document.frm_login.submit();} function encode_password() {var pass=document.getElementById('parola').value;var code=document.getElementById('pass_code2').value;document.getElementById('parola').value=hex_md5(pass+code);document.form_log.submit();} function encode_pass_cont_nou(tip_cont) {if(tip_cont==1) {var parola=document.getElementById('parola').value;var parola_cod=document.getElementById('parola_cod').value;document.getElementById('parola_hidden').value=parola;var formez_cod=hex_md5(parola+parola_cod);document.getElementById('parola').value=formez_cod;document.getElementById('parola2').value=formez_cod;document.frm_fizica.submit();} else if(tip_cont==2) {var parola=document.getElementById('parola').value;var parola_cod=document.getElementById('parola_cod_2').value;document.getElementById('parola_hidden').value=parola;var formez_cod=hex_md5(parola+parola_cod);document.getElementById('parola3').value=formez_cod;document.getElementById('parola4').value=formez_cod;document.frm_juridica.submit();}} function valideaza(link) {var j=1;var answer=confirm("Sunteti sigur ca doriti sa stergeti aceasta inregistrare?") if(answer) {window.open(link,'_self');}} function valideaza_del_prod(link) {var j=1;var answer=confirm("Sunteti sigur ca doriti sa stergeti acest produs\nimpreuna cu toate variantele si imaginile aferente?") if(answer) {window.open(link,'_self');}} function valideaza_variante_adm() {if(document.getElementById('are_variante').checked) {document.getElementById('zona_variante').style.display='block';} else {document.getElementById('zona_variante').style.display='none';document.getElementById('tx_variante').value='';}} function keyRestrict(e,validchars){var key='',keychar='';key=getKeyCode(e);if(key==null)return true;keychar=String.fromCharCode(key);keychar=keychar.toLowerCase();validchars=validchars.toLowerCase();if(validchars.indexOf(keychar)!=-1) return true;if(key==null||key==0||key==8||key==9||key==13||key==27) return true;return false;} function getKeyCode(e) {if(window.event) return window.event.keyCode;else if(e) return e.which;else return null;} function show_comments() {document.getElementById("comments").style.display="block";} function cmt_peste_3() {document.getElementById("cmtpeste3").style.display="block";document.getElementById("btn_mmc").style.display="none";} function afisez_producatori(){var id_prod_hidd=document.getElementById('id_prod_hidd').value;var tabl_prod_hidd=new Array();tabl_prod_hidd=id_prod_hidd.split(',');for(var i=0;i'+temp_specs+'';document.getElementById('spec_but_'+real_categ_nr).style.display='';document.getElementById('spec_but_'+old_categ_nr).style.display='none';document.forms['formAdd']['specs'][old_categ_nr].value='';document.forms['formAdd']['desc'][old_categ_nr].value='';} function add_categ(mode) {var err=0;var categ_name=document.forms['formAdd']['categ_specs'].value;if(mode=='add') {if(categ_name=='') {document.getElementById('errorJava').style.display='';window.open('#top','_self');err=1;}} if(mode=='edit') {if(categ_name=='') {var answer=confirm("Esti sigur ca vrei sa stergi aceasta categorie?") if(answer) {err=0;} else {err=1;}}} if(err==0) {document.forms['formAdd'].submit();}} function show_hide_categ1(id_categ){var toate_idcat=document.getElementById('categ1_id').value;var tabl_idcat=new Array();tabl_idcat=toate_idcat.split(',');for(var i=0;i