var baseHeight = 70;
var targetHeight = 70;

function rollUp()
{
	targetHeight = 140;
}

function rollDown()
{
	targetHeight = 70;
}

function updateHeight()
{
baseHeight += (targetHeight-baseHeight)/20;
document.getElementById('roller').style.height = baseHeight+'px';
}
setInterval("updateHeight()",10);




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>';
	
	var pYoff=((document.all&&!window.opera)?(document.documentElement||document.body).scrollTop:window.pageYOffset)+0;
	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';
}

galalpha = 0;
galalphaie = 0;

function showphoto(url)
{
	document.getElementById('shadediv').style.visibility = 'visible';
	
	if (galalpha==0)
	{
		content0 = '<div style="text-align:center;"><a href="javascript:unshadepage();"><img src="'+url+'" alt="" style="border:0px;" /></a></div>';
		func = 'shadingpage(\''+content0+'\')';
		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;
}

function showsomething(something)
{
	document.getElementById('shadediv').style.visibility = 'visible';
	
	if (galalpha==0)
	{
		content0 = '<div class="report">';
		content0 += '<a href="javascript:unshadepage();" style="text-decoration:none; color:white;"><img class="report_img" src="./images/addshop.png" alt="" border="0" /></a>';
		content0 += '</div>';
		func = 'shadingpage(\''+content0+'\')';
		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;
}

function shadingpage(content)
{
	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_content').innerHTML = content;
		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 unshadepage()
{
	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;
}
