imgArray=new Array('roll0','roll1','roll2');var i=0;function rollBanner(){if(i==3){i=0;};document['bannerImg'].src='img/'+imgArray[i]+'.png';i++;window.setTimeout('rollBanner()',3000)}function eMailMe(){var mailUser='valentini.marcov';var mailDomain='gmail.com';parent.location='mailto:'+mailUser+'@'+mailDomain}function openGallery(menuActiveItem){if(menuActiveItem.className=='active'){menuActiveItem.className='';document.getElementById('content').style.minHeight=440+'px';menuActiveItem.parentNode.getElementsByTagName('ul')[0].style.display='none'}else{menuActiveItem.className='active';var x=menuActiveItem.parentNode.parentNode.getElementsByTagName('a');for(var i=0;i<x.length;i++){if(x[i].className=='active'&&x[i]!=menuActiveItem){x[i].className='';x[i].parentNode.getElementsByTagName('ul')[0].style.display='none'}}var y=menuActiveItem.parentNode.getElementsByTagName('a');var rows=Math.ceil((y.length-1)/6);var newHeight=menuActiveItem.offsetTop-document.getElementById('content').offsetTop+116.2*rows+11;if(newHeight>440){document.getElementById('content').style.minHeight=newHeight+'px'}else{document.getElementById('content').style.minHeight=440+'px'}menuActiveItem.parentNode.getElementsByTagName('ul')[0].style.display='block';var z=menuActiveItem.parentNode.getElementsByTagName('img');for(var j=0;j<(z.length);j++){z[j].style.left=-((z[j].width/2)-40)+'px';z[j].style.top=-((z[j].height/2)-40)+'px'}}document.getElementById('footerPic').style.top=(document.body.clientHeight-26)+'px'}function openPicture(imgTitle,imgFile,originalWidth,originalHeight,imgClose){function zoomFactor(){var factor=1;if(document.body.getBoundingClientRect){var rect=document.body.getBoundingClientRect();var physicalW=rect.right-rect.left;var logicalW=document.body.offsetWidth;factor=Math.round((physicalW/logicalW)*100)/100}return factor}var zFactor=zoomFactor();var zfactorWidth=Math.round(document.documentElement.clientWidth/zFactor);var zfactorHeight=Math.round(document.documentElement.clientHeight/zFactor);var maxWidth=994-20;var maxHeight=zfactorHeight-20;if(originalHeight>maxHeight){var imgHeight=maxHeight;var imgWidth=Math.floor(maxHeight*originalWidth/originalHeight)}else if(originalHeight<=maxHeight&&originalWidth>maxWidth){var imgWidth=maxWidth;var imgHeight=Math.floor(maxWidth*originalHeight/originalWidth)}else{var imgWidth=originalWidth;var imgHeight=originalHeight}document['picture'].alt=imgTitle;document['picture'].title=imgTitle;document['picture'].src='img/'+imgFile;document['picture'].width=imgWidth;document['picture'].height=imgHeight;document['exitPic'].src='img/'+imgClose;document.body.style.overflow='hidden';document.getElementById('hidden_box').style.height=zfactorHeight+'px';document.getElementById('hidden_box').style.display='block';document.getElementById('hidden_pic').style.left=(zfactorWidth/2-imgWidth/2)+'px';document.getElementById('hidden_pic').style.top=((zfactorHeight/2)-(imgHeight/2)-10)+'px'}function closePicture(){document.body.style.overflow='visible';document.getElementById('hidden_box').style.display='none';document['picture'].src='pic.jpg'}window.onload=function(){rollBanner();document.getElementById('footerPic').style.left=(document.body.clientWidth/2-348)+'px'};window.onresize=function(){document.getElementById('footerPic').style.left=(document.body.clientWidth/2-348)+'px'}
