function afisareProduse(){var x;var lungime;var curent;var pelinie;var marime;var maxim;var copii;var i;if(document.getElementById("listaProduse")){x=document.getElementById("Produse").offsetWidth;copii=document.getElementById("listaProduse").childNodes;lungime=document.getElementById("listaProduse").childNodes.length;if(copii[0]){if(copii[0].childNodes[0]){curent=copii[0].childNodes[0].clientWidth;pelinie=Math.floor(x/curent);marime=Math.floor((x-pelinie*curent)/pelinie/2);for(i=0;i<lungime;i++){copii.item(i).style.paddingLeft=marime+"px";copii.item(i).style.paddingRight=marime+"px";if((i+1)%pelinie===0){copii.item(i).style.background="none";}else{copii.item(i).style.background="transparent url(http://static.itproweb.ro/demomag/grafica/separatorProduse.jpg) no-repeat scroll 100% 50%";}}
maxim=0;for(i=0;i<lungime;i++){if(document.getElementById("produs"+i)){if(document.getElementById("produs"+i).clientHeight>maxim){maxim=document.getElementById("produs"+i).clientHeight;}}}
for(i=0;i<lungime;i++){if(document.getElementById("produs"+i)){document.getElementById("produs"+i).style.height=maxim+"px";}
copii.item(i).style.height=copii.item(i).childNodes[0].clientHeight+"px";}}}}else if(document.getElementById("listaProducatori")){x=document.getElementById("Produse").offsetWidth;copii=document.getElementById("listaProducatori").childNodes;lungime=document.getElementById("listaProducatori").childNodes.length;if(copii[0]){if(copii[0].childNodes[0]){curent=copii[0].childNodes[0].clientWidth;}}
pelinie=Math.floor(x/curent);marime=Math.floor((x-pelinie*curent)/pelinie/2);for(i=0;i<lungime;i++){copii.item(i).style.paddingLeft=marime+"px";copii.item(i).style.paddingRight=marime+"px";if((i+1)%pelinie===0){copii.item(i).style.background="none";}else{copii.item(i).style.background="transparent url(http://static.itproweb.ro/demomag/grafica/separatorProduse.jpg) no-repeat scroll 100% 50%";}}
maxim=0;for(i=0;i<lungime;i++){if(copii.item(i).clientHeight>maxim){maxim=copii.item(i).clientHeight;}}
for(i=0;i<lungime;i++){copii.item(i).style.height=copii.item(i).childNodes[0].clientHeight+"px";}}}
function doResize(){var x;var lungime=0;var y;if(document.getElementById("meniuMare")&&document.getElementById("sfarsit1")){document.getElementById("meniuMare").style.paddingLeft="0px";x=document.getElementById("meniuMare").clientWidth;y=document.getElementById("siglaHolder").clientWidth;x=x+y;lungime=document.getElementById("sfarsit1").clientWidth+document.getElementById("sfarsit1").offsetLeft;x=(x-lungime)/2-y+6;x=Math.max(0,x);document.getElementById("meniuMare").style.paddingLeft=x+"px";}
x=0;y=0;lungime=0;if(document.getElementById("meniuMareOrizontalId")&&document.getElementById("sfarsit2")){document.getElementById("meniuMareOrizontalId").style.paddingLeft="0px";x=document.getElementById("meniuMareOrizontalId").clientWidth;lungime=document.getElementById("sfarsit2").clientWidth+document.getElementById("sfarsit2").offsetLeft;x=(x-lungime)/2;x=Math.max(0,x);document.getElementById("meniuMareOrizontalId").style.paddingLeft=x+"px";}
afisareProduse();}
java=function(){sfHover();proHint();doResize();};window.onresize=doResize;sfHover=function(){if(document.getElementById("dropCos").getElementsByTagName("LI")){var sfEls=document.getElementById("dropCos").getElementsByTagName("LI");for(var i=0;i<sfEls.length;i++){sfEls[i].onmouseover=function(){this.className+="sfhover";};sfEls[i].onmouseout=function(){this.className=this.className.replace(new RegExp("sfhover\\b"),"");};}}if(document.getElementById("dropMeniu")){if(document.getElementById("dropMeniu").getElementsByTagName("LI")){sfEls=document.getElementById("dropMeniu").getElementsByTagName("LI");for(var i=0;i<sfEls.length-1;i++){sfEls[i].onmouseover=function(){this.className+="sfhover";};sfEls[i].onmouseout=function(){this.className=this.className.replace(new RegExp("sfhover\\b"),"");};}}}};popitup=function(cale,nume,latime,inaltime){var ics=(screen.width-parseInt(latime))/2;var igrec=(screen.height-parseInt(inaltime))/2;window.open(cale,"nume","toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+latime+",height="+inaltime+",left = "+ics+",top = "+igrec);};proHint=function(){if(document.getElementById("formularInregistrare")){var obiecte=document.getElementById("formularInregistrare").getElementsByTagName("input");for(var i=0;i<obiecte.length;i++){if(obiecte[i].type=="text"||obiecte[i].type=="password"||obiecte[i].type=="file"){obiecte[i].onfocus=function(){if(this.parentNode.getElementsByTagName("em")){this.parentNode.getElementsByTagName("em")[0].style.display="block";}};obiecte[i].onblur=function(){if(this.parentNode.getElementsByTagName("em")){this.parentNode.getElementsByTagName("em")[0].style.display="";}};}}var obiecte2=document.getElementById("formularInregistrare").getElementsByTagName("textarea");for(var i=0;i<obiecte2.length;i++){obiecte2[i].onfocus=function(){if(this.parentNode.getElementsByTagName("em")){this.parentNode.getElementsByTagName("em")[0].style.display="block";}};obiecte2[i].onblur=function(){if(this.parentNode.getElementsByTagName("em")){this.parentNode.getElementsByTagName("em")[0].style.display="";}};}}};proComplete=function(){if(document.getElementsByTagName("form")){x=document.getElementsByTagName("form");for(i=0;i<x.length;i++){x[i].setAttribute("autocomplete","off");}}};function loadImage(thefilename,alt){var bigimage=document.getElementById("bigImage");linkul=thefilename.replace(new RegExp("_medie_"),"_mare_");bigimage.innerHTML="<a href=\"javascript:;\" onclick=\"popitup(&quot;/foto.php?poza="+linkul+"&quot;,&quot;Foto&quot;,980,700,&quot;yes&quot;)\"><img src=\""+thefilename+"\" alt=\""+alt+"\" /></a>";}
var notaCurenta=0;nota=function(){return notaCurenta;};noteaza=function(nr){notaCurenta=nr;document.getElementById("notaData").innerHTML=notaCurenta+"/5";document.getElementById("nota").value=notaCurenta;afiseazaNota(nr);};afiseazaNota=function(nr){da=document.getElementById("note").childNodes;nu=document.getElementById("noteLipsa").childNodes;for(i=0;i<nr;i++){da.item(i).style.display="block";nu.item(i).style.display="none";}for(i;i<5;i++){da.item(i).style.display="none";nu.item(i).style.display="block";}};function proEmbed(nume,id,w,h,fv){if(document.getElementById(id)){document.getElementById(id).innerHTML='<object align="center" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+w+'" height="'+h+'" id="'+id+'" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+nume+'" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="FlashVars" value="sw='+w+'&sh='+h+fv+'" /><embed src="'+nume+'" FlashVars="sw='+w+'&sh='+h+fv+'" wmode="transparent" quality="high" width="'+w+'" height="'+h+'" name="'+nume+'" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></object>';}};function listeProdus(nr){if(nr==1)
{document.getElementById("categorie1").className="meniuCategoriiProdusS";document.getElementById("specificatiiProdus").style.display="table";document.getElementById("categorie2").className="meniuCategoriiProdus";document.getElementById("documenteProdus").style.display="none";}else if(nr==2)
{document.getElementById("categorie1").className="meniuCategoriiProdus";document.getElementById("specificatiiProdus").style.display="none";document.getElementById("categorie2").className="meniuCategoriiProdusS";document.getElementById("documenteProdus").style.display="table";}}
