galalpha = 0;
galalphaie = 0;

function createshade()
{
document.getElementById('shade0').innerHTML = '<div style="position:absolute; left:0px; top:0px; width:100%; height:1000px; background-color:#000000; visibility:hidden; opacity:0; FILTER:alpha(opacity=0);" id="shadediv">&nbsp;</div>';
}

function showphoto(url)
{
document.getElementById('shadediv').style.visibility = 'visible';
document.getElementById('top1_flash').style.visibility = 'hidden';
document.getElementById('top2_flash').style.visibility = 'hidden';

if (galalpha==0)
{
func = 'chalpha(\''+url+'\')';
shading = setInterval(func,10);
}
else
{
document.getElementById('shadediv').style.opacity = 0.7;
document.getElementById('shadediv').filters.alpha.opacity = 70;
}
var posx = screen.width/2-400;
var posy = screen.height/2-300;
adres = './showphoto.php?url='+url;
//window.open(adres,'photo','scrollbars=no,toolbar=no,left='+posx+',top='+posy+',width=800,height=600');
}

function chalpha(url2)
{
if (galalpha<0.7)
{
galalpha = galalpha+0.1;
galalphaie = galalphaie+10;
document.getElementById('shadediv').style.opacity = galalpha;

document.getElementById('shadediv').filters.alpha.opacity = galalphaie;

}
else
{
clearInterval(shading);
galalpha = 0;
galalphaie = 0;
document.getElementById('bigphoto').src = url2;
document.getElementById('photodiv').style.visibility = 'visible';

var pYoff=((document.all&&!window.opera)?(document.documentElement||document.body).scrollTop:window.pageYOffset)+30;
var pYsize = 0;
if (document.body.scrollHeight!=null && document.body.scrollHeight>screen.height) pYsize=document.body.scrollHeight;
else if (document.height!=null && document.height>screen.height) pYsize = document.height;
else pYsize = screen.height;

  document.getElementById('photodiv').style.top = pYoff+'px';
  document.getElementById('shadediv').style.height = pYsize+'px';
}
}

function hidephoto(url3)
{
document.getElementById('top1_flash').style.visibility = 'visible';
document.getElementById('top2_flash').style.visibility = 'visible';
document.getElementById('bigphoto').src = url3;
document.getElementById('photodiv').style.visibility = 'hidden';
document.getElementById('shadediv').style.visibility = 'hidden';
document.getElementById('shadediv').style.opacity = 0;
document.getElementById('shadediv').filters.alpha.opacity = 0;
}
