window.onload=initLinks;var myPhoto=new Array("../graph/vreau/vreauculoare1.jpg","../graph/vreau/vreauculoare2.jpg","../graph/vreau/vreauculoare3.jpg");var myText=new Array("VreauCuloare.ro","VreauCuloare.ro - Testul Culorilor","VreauCuloare.ro - Aplicatia Decoreaza!");var thisPhoto=0;function initLinks(){document.getElementById("previous").onclick=processPrevious;document.getElementById("next").onclick=processNext;}
function processPrevious(){changeOpac(0)
if(thisPhoto==0){thisPhoto=myPhoto.length;}
thisPhoto--;document.getElementById("myPicture").src=myPhoto[thisPhoto];if(document.getElementById("myPicture").src.indexOf("v")!=-1)
{document.getElementById("myPicture").style.marginTop=10+"px";}
else{document.getElementById("myPicture").style.marginTop=50+"px";}
document.getElementById('pictureText').innerHTML=myText[thisPhoto];opacityShow()
return false;}
function processNext(){changeOpac(0)
thisPhoto++;if(thisPhoto==myPhoto.length){thisPhoto=0;}
document.getElementById("myPicture").src=myPhoto[thisPhoto];if(document.getElementById("myPicture").src.indexOf("v")!=-1)
{document.getElementById("myPicture").style.marginTop=10+"px";}
else{document.getElementById("myPicture").style.marginTop=50+"px";}
document.getElementById('pictureText').innerHTML=myText[thisPhoto];opacityShow()
return false;}
function opacityFade(){timer=900;for(i=100;i>=0;i--){setTimeout("changeOpac("+i+")",(timer));timer=timer+2;}}
function opacityShow(){timer=900;for(i=0;i<=100;i++){setTimeout("changeOpac("+i+")",(timer));timer=timer+2;}}
function changeOpac(opacity){var object=document.getElementById('myPicture').style;object.opacity=(opacity/100);object.MozOpacity=(opacity/100);object.KhtmlOpacity=(opacity/100);object.filter="alpha(opacity="+opacity+")";}
