var website = "www.romannemec.cz";

var onloaded;
var overlay, video, movie, image, scrollbar_pos, arrow_left, arrow_right;
var galleryImages = new Array();


window.onload = function()
{
	overlay = document.getElementById("overlay");
	video = document.getElementById("video");
	movie = document.getElementById("movie");
	image = document.getElementById("gallery_image");
	
	arrow_left = document.getElementById("arrow_left");
	arrow_right = document.getElementById("arrow_right");
	
	highlight_arrows();
	preload_images();
	//animate_images();
	
	onloaded = true;
}

function highlight_arrows()
{
	if (arrow_left && arrow_right)
	{
		with (arrow_left.getElementsByTagName("img")[0])
		{
			onmouseover = function()
			{
				this.src = 'template/templates/output/romannemeccz/images/button_left_up.gif';
			}
			onmouseout = function()
			{
				this.src = 'template/templates/output/romannemeccz/images/button_left.gif';
			}
		}
		
		with (arrow_right.getElementsByTagName("img")[0])
		{
			onmouseover = function()
			{
				this.src = 'template/templates/output/romannemeccz/images/button_right_up.gif';
			}
			onmouseout = function()
			{
				this.src = 'template/templates/output/romannemeccz/images/button_right.gif';
			}
		}
		
		with (document.getElementById("close").getElementsByTagName("img")[0])
		{
			onmouseover = function()
			{
				this.src = 'template/templates/output/romannemeccz/images/button_close_up.gif';
			}
			onmouseout = function()
			{
				this.src = 'template/templates/output/romannemeccz/images/button_close.gif';
			}
			
			onclick = overlay_hide;
		}
	}
}

/* SCROLLING */

function disable_scrolling()
{
	scrollbar_pos = document.documentElement.scrollTop;
	
	window.onscroll = function()
	{
		window.scroll(0, scrollbar_pos);
	}
}

function enable_scrolling()
{
	window.onscroll = null;
}

/* ANIMATING OBJECTS */
/*
var _anim, _animobj, _animstep = 0;

function animate_images()
{
	var img = document.getElementsByTagName("img");
	
	for (var i = 0; img[i]; i++)
		if (img[i].className == "label")
		{
			_animobj = img[i];
			_anim = window.setInterval("animate();", 1);
		}
}

function animate()
{
	if (_animstep++ < 100)
		with (_animobj.style)
		{
			filter = "alpha(opacity=" + _animstep + ");";
			opacity = (_animstep / 100);
		}
	else
		window.clearInterval(_anim);
}
*/







