function produseRandom() { var trim=''; Ejax('includes/ajax_php/default.php',trim,'produseRand'); setTimeout('produseRandom()',time); } //AJAX STARTS HERE if (window.location.hash.match(/^#?redir=/)) { var myregex=/^#?redir=(.+)$/; var match=myregex.exec(window.location.hash); if (match[1].match(/^http:/)) {match[1]=window.siteurl+match[1];} window.location=match[1]; } var ajax_callback=function () { $('#'+this.id+' a[@rel*=lightbox]').lightBox(); scroll(0,0); } function ajax_loadstickysections(ahref) { var ajaxlink; var sections=['box_categorii','box_topvizualizari']; for (var i=0;iLoading...");} $('#'+sections[i]).load(ajaxlink,null,ajax_callback); } } function ajax_sectionformsubmit(form,sections) { var ajaxlink; var postwhat; if (form.method=='get') { if (form.action.match(/\?[^?]*$/)) {ajaxlink=form.action+'&ajax='+sections[0]+"&"+$(form).serialize();} else {ajaxlink=form.action+'?ajax='+sections[0]+"&"+$(form).serialize();} $('#'+sections[0]).prepend("
Loading...
"); $('#'+sections[0]).load(ajaxlink,null,ajax_callback); } else { if (form.action.match(/\?[^?]*$/)) {ajaxlink=form.action+'&ajax='+sections[0];} else {ajaxlink=form.action+'?ajax='+sections[0];} postwhat=$(form).serializeArray(); $('#'+sections[0]).prepend("
Loading...
"); $('#'+sections[0]).load(ajaxlink,postwhat,ajax_callback); } for (var i=1;iLoading...");} $('#'+sections[i]).load(ajaxlink,null,ajax_callback); } ajax_loadstickysections(form.action); } function ajax_sectionload(ahref,sections) { var ajaxlink; for (var i=0;iLoading...");} if (sections[i]=='content') { var ahref2=ahref; if (ahref2.indexOf(window.siteurl)==0) { ahref2=ahref2.slice(window.siteurl.length); } window.location.hash='#redir='+ahref2; } $('#'+sections[i]).load(ajaxlink,null,ajax_callback); } ajax_loadstickysections(ahref); } //AJAX ENDS HERE var culoareCosB=''; var p_vizitat=Array(); var zIndexuri=100; //======[Large Image over image START]=====| function ShowImage(whatimage){ init(); zIndexuri++; document.getElementById("mouse_over_"+whatimage).style.display='block'; document.getElementById("mouse_over_"+whatimage).style.zIndex=zIndexuri; if (y_cursor+280 > document.body.scrollHeight ){ document.getElementById("mouse_over_"+whatimage).style.top=y_cursor-200+'px'; } else { if (y_cursor+400 > document.body.scrollHeight ){ document.getElementById("mouse_over_"+whatimage).style.top=y_cursor-100+'px'; } else { document.getElementById("mouse_over_"+whatimage).style.top=y_cursor+14+'px'; } } document.getElementById("mouse_over_"+whatimage).style.left=x_cursor+14+'px'; } function HiddeImage(whatimage){ document.getElementById("mouse_over_"+whatimage).style.display='none'; } //======[Large Image over image END]=====| function operatiiCont(t) { if (t=='personale') { var trim=''; var redir=$val('tip_redir'); trim+='nume='+$val('nume'); trim+='&prenume='+$val('prenume'); trim+='&dataNasterii='+$val('dataNasterii'); trim+='&cnp='+$val('cnp'); trim+='&seria='+$val('seria'); trim+='&numar='+$val('numar'); trim+='&adresa='+$val('adresa'); trim+='&cod_postal='+$val('cod_postal'); trim+='&oras='+$val('oras'); trim+='&judet='+$val('judet'); trim+='&tara='+$val('tara'); trim+='&telefon='+$val('telefon'); trim+='&fax='+$val('fax'); trim+='&tip_pers='+$val('tip_pers'); trim+='&compania2='+$val('compania2'); trim+='&cif2='+$val('cif2'); trim+='&banca2='+$val('banca2'); trim+='&cont2='+$val('cont2'); trim+='®Com2='+$val('regCom2'); trim+='&tip='+t; trim+='&tip_redir='+$val('tip_redir'); Ejax('includes/ajax_php/operatii_cont.php',trim,'datePersonale'); if (redir==1) { var t=setTimeout("window.location='comanda.html';",3000); } } else { if (t=='email') { var trim=''; trim+='email='+$val('email'); trim+='&email2='+$val('email2'); trim+='&tip='+t; Ejax('includes/ajax_php/operatii_cont.php',trim,'modificaEmail'); } else { if (t=='parola') { var trim=''; trim+='oldPass='+$val('oldPass'); trim+='&newPass='+$val('newPass'); trim+='&newPass2='+$val('newPass2'); trim+='&tip='+t; Ejax('includes/ajax_php/operatii_cont.php',trim,'modificaParola'); } else { if (t=='firma') { var trim=''; trim+='compania='+$val('compania'); trim+='&cif='+$val('cif'); trim+='&banca='+$val('banca'); trim+='&cont='+$val('cont'); trim+='®Com='+$val('regCom'); trim+='&tip='+t; Ejax('includes/ajax_php/operatii_cont.php',trim,'modificaFirma'); } } } } } function newsletter() { var mail=$val('emailnews'); if (mail=='') { alert('Completeaza adresa de email!'); } else { var trim=''; trim+='mail='+mail; Ejax('includes/ajax_php/newsletter.php',trim,''); document.getElementById('emailnews').value=''; } } function filtru_comenzi(v,p) { $('#istoricComenzi').load('includes/ajax_php/istoric_comenzi.php?val='+v+'&af_pag='+p); } function verDateContact(tip,value) { if (tip=='send') { var trim=''; trim+='tip='+tip; trim+='&nume='+eurl($val('nume')); trim+='&prenume='+eurl($val('prenume')); trim+='&email='+eurl($val('email')); trim+='&adresa='+eurl($val('adresa')); trim+='&codPostal='+eurl($val('codPostal')); trim+='&oras='+eurl($val('oras')); trim+='&judet='+eurl($val('judet')); trim+='&tara='+eurl($val('tara')); trim+='&mesaj='+eurl($val('mesaj')); Ejax('includes/ajax_php/ver_date_contact.php',trim,'',function (r) { alerta(r); }); document.getElementById('nume').value=''; document.getElementById('prenume').value=''; document.getElementById('email').value=''; document.getElementById('adresa').value=''; document.getElementById('codPostal').value=''; document.getElementById('oras').value=''; document.getElementById('judet').value=''; document.getElementById('tara').value=''; document.getElementById('mesaj').value=''; document.getElementById('verNume').innerHTML=''; document.getElementById('verPrenume').innerHTML=''; document.getElementById('verEmail').innerHTML=''; document.getElementById('verAdresa').innerHTML=''; document.getElementById('verTara').innerHTML=''; document.getElementById('verMesaj').innerHTML=''; } else { var trim=''; trim+='tip='+tip; trim+='&value='+value; Ejax('includes/ajax_php/ver_date_contact.php',trim,tip); } } function recomanda_unui_prieten(tip,val,val2) { if (tip=='open') { AjaxW('link='+val,window.siteurl+'includes/windows/win_recomanda.php','recomanda_win','Recomanda unui prieten',500,530,0,0,1); } if (tip=='send') { if ($val('nume')=='') { document.getElementById('numele').innerHTML="Va rugam completati numele dumneavoastra!"; } else if ($val('email')=='') { document.getElementById('emailul').innerHTML="Va rugam completati emailul dumneavoastra!"; } else if ($val('emailPrieten')=='') { document.getElementById('emailPrietens').innerHTML="Va rugam completati emailul prietenului!"; } else { var trim=''; trim+='tip='+tip; trim+='&link='+val; trim+='&nume='+eurl($val('nume')); trim+='&email='+eurl($val('email')); trim+='&emailPrieten='+eurl($val('emailPrieten')); trim+='&numePrieten='+eurl($val('numePrieten')); trim+='&mesaj='+eurl($val('mesaj')); Ejax(window.siteurl+'includes/ajax_php/recomanda.php',trim,'div_nimic'); NSS_winClose('recomanda_win'); alerta ('Mesajul a fost trimis!'); var timp=setTimeout(function () { close_alerta(); },4000); } } } function email_to_friend(tip,val,val2) { if (tip=='open') { AjaxW('link='+val,window.siteurl+'includes/windows/win_recomanda.php','recomanda_win','www.DraculaGlobe.com - Tell a friend',500,530,0,0,1); } if (tip=='send') { if ($val('nume')=='') { document.getElementById('numele').innerHTML="Please fill in your name!"; } else if ($val('email')=='') { document.getElementById('emailul').innerHTML="Please fill in your email!"; } else if ($val('emailPrieten')=='') { document.getElementById('emailPrietens').innerHTML="Please fill email friend!"; } else { var trim=''; trim+='tip='+tip; trim+='&link='+val; trim+='&nume='+eurl($val('nume')); trim+='&email='+eurl($val('email')); trim+='&emailPrieten='+eurl($val('emailPrieten')); trim+='&numePrieten='+eurl($val('numePrieten')); trim+='&mesaj='+eurl($val('mesaj')); Ejax(window.siteurl+'includes/ajax_php/recomanda.php',trim,'0'); NSS_winClose('recomanda_win'); alerta ('The message was sent!'); var timp=setTimeout(function () { close_alerta(); },2000); } } } function am_uitat_parola(tip,val,val2) { if (tip=='open') { AjaxW('',window.siteurl+'includes/windows/win_am_uitat_parola.php','parola_win','Recuperare parola',500,530,0,0,1); } if (tip=='send') { if ($val('email')=='') { document.getElementById('raspuns').innerHTML='
Completati corect emailul!
'; } else { var trim=''; trim+='email='+eurl($val('email')); Ejax(window.siteurl+'includes/ajax_php/am_uitat_parola.php',trim,'raspuns'); document.getElementById('email').value=''; } } } function newsletter_op(tip,val,val2) { if (tip=='open') { AjaxW('',window.siteurl+'includes/windows/win_newsletter.php','news_win','Newsletter Gastromed.ro',500,530,0,0,1); } if (tip=='send') { if ($val('email')=='') { document.getElementById('raspuns').innerHTML='
Completati corect emailul!
'; } else { var trim=''; trim+='email='+eurl($val('email')); Ejax(window.siteurl+'includes/ajax_php/newsletter.php',trim,'raspuns'); document.getElementById('email').value=''; } } } function operatii_sondaje(t,v) { var fint=$val('fintrebare'); if (t=='paginare') { var trim=''; trim+='fint='+fint; trim+='&af_pag='+v; trim+='&tip='+t; Ejax('includes/ajax_php/sondaje_op.php',trim,'sondaje'); } if (t=='filtru') { var trim=''; trim+='fint='+fint; trim+='&tip='+t; Ejax('includes/ajax_php/sondaje_op.php',trim,'sondaje'); } if (t=='sterge') { if ($val('ids')!='') { var trim=''; trim+='fint='+fint; trim+='&tip='+t; trim+='&id='+$val('ids'); trim+='&af_pag='+$val('pagina'); Ejax('includes/ajax_php/sondaje_op.php',trim,'sondaje'); } else { alert('Alege un sondaj!'); } } if (t=='modifica') { if ($val('ids')=='') { alert('Trebuie sa selectezi un sondaj!'); } else { var id=$val('ids').split(','); if (id.length>1) { alert('Alege doar un sondaj!'); } else { var paginare=$val('pagina'); window.location='index.php?action=sondaj_add_edit&id='+id+'&paginare='+paginare; } } } } function statut_sondaj(i,t) { var id=i; var tip=t; var trim=''; trim+='id='+id; trim+='&tip='+tip; Ejax('includes/ajax_php/statut_sondaj.php',trim,''); if (tip=='activare') { var img_on=$id('activare'+id); img_on.src='images/okshield.png'; var img_off=$id('dezactivare'+id); img_off.src='images/cancel2.png'; } else { if (tip=='dezactivare') { var img_on=$id('activare'+id); img_on.src='images/okshield2.png'; var img_off=$id('dezactivare'+id); img_off.src='images/cancel.png'; } } } function operatii_sandaje_add(t,v,v2,v3) { if (t=='adaugaRasp') { if ($val('raspuns')=='') { alert('Completeaza Raspunsul!'); } else { var trim=''; trim+='idSondaj='+v; trim+='&tip='+t; trim+='&val='+$val('raspuns'); Ejax('includes/ajax_php/sondaj_add_op.php',trim,'raspunsuri'); document.getElementById('raspuns').value=''; } } if (t=='stergeRasp') { var trim=''; trim+='idSondaj='+v; trim+='&tip='+t; trim+='&id='+v2; Ejax('includes/ajax_php/sondaj_add_op.php',trim,'raspunsuri'); } if (t=='updateRasp') { var trim=''; trim+='idSondaj='+v; trim+='&tip='+t; trim+='&id='+v2; trim+='&val='+v3; Ejax('includes/ajax_php/sondaj_add_op.php',trim,'raspunsuri'); } }