<!--

// Copyright 2004-2010 Aventin d.o.o.
function SelectMenu(ObjectId)
{
	s = document.getElementById(ObjectId).style;
	s.backgroundColor = '#FFFFCC';
}
function DeselectMenu(ObjectId)
{
	s = document.getElementById(ObjectId).style;
	s.backgroundColor = '#ECFBFF';
}
function CheckHomePage()
{
	if (window.top != window)
	{
		window.top.location = window.location;
	}
}
function InitHomePage()
{
	PageErrorCookie = GetCookie('PageError');
	if (PageErrorCookie != '' && PageErrorCookie != ";")
	{
		document.cookie = "PageError=";
		window.open(PageErrorCookie, 'Content');
	}
	//document.getElementById('title').style.visibility = 'hidden';
	//document.getElementById('title').innerHTML = '<span style=\'font-size: 120%\'><b><span style=\'color:red\'>*** LASTMINUTE ***</span></b><br>26.6.-3.7.2010. <b>250&euro;</b></span>';
	//window.setTimeout('Lastminute(1);', 1000);
}
function Lastminute(seq)
{
	var s = document.getElementById('title').style;
	if (seq == 1)
	{
		s.backgroundColor = '#80FF80';
		window.setTimeout('Lastminute(2);', 2000);
	}
	else
	{
		s.backgroundColor = '#C0FFC0';
		window.setTimeout('Lastminute(1);', 2000);
	}
}
function Slika(datoteka)
{
	window.open(datoteka, '_blank', 'scrollbars,resizable');
}
function PopupCenter(url, width, height)
{
	var left = (screen.width - width) / 2;
	var top = (screen.height - height) / 2;
	window.open(url, '_blank', 'fullscreen=no,location=no,left=' + left + ',top=' + top + ',height=' + height + ',width=' + width + ',menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
}
function PopupCenterResize(url, width, height)
{
	var left = (screen.width - width) / 2;
	var top = (screen.height - height) / 2;
	window.open(url, '_blank', 'fullscreen=no,location=no,left=' + left + ',top=' + top + ',height=' + height + ',width=' + width + ',menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no');
}
function CheckPageAccess()
{
	if (window.top == window)
	{
		document.cookie = "PageError=" + escape(document.URL);
		window.location = 'index.htm';
	}
}
function GetCookie(cookiename)
{
	var cookiestring = "" + document.cookie;
	var index1 = cookiestring.indexOf(cookiename);
	if (index1 == -1 || cookiename == "")
		return ""; 
	var index2 = cookiestring.indexOf(';', index1);
	if (index2 == -1)
		index2 = cookiestring.length; 
	return unescape(cookiestring.substring(index1 + cookiename.length + 1,index2));
}
function PosaljiMail(primalac, poruka)
{
	var adresa = 'mai' + 'lto:' + primalac + '@' + 'aventin.hr' + poruka;
	window.open(adresa, '_self');
}
function PosaljiMailEx(primalac, poruka, adresa)
{
	adresa = 'mai' + 'lto:' + primalac + '@' + adresa + poruka;
	window.open(adresa, '_self');
}
function Setnja()
{
	var turist = document.getElementById('turist').style;
	turist.left = x + 'px';
	turist.top = y + 'px';
	x = x + 1.78;
	y = y + 2;
	if (y > 240)
	{
		x = 306;
		y = 126;
		setTimeout('javascript:Setnja()', 3000);
	}
	else
	 	setTimeout('javascript:Setnja()', 300);
}
function InitPrikaz()
{
	var link = document.getElementById('link');
	var natrag = document.getElementById('natrag');
	
	if (window.top == window)
	{
		link.href = 'http://silba.aventin.hr';
	}
	
	// strelica natrag
	lang = location.search;
	if (lang == '?lang=HR')
	{
		natrag.innerHTML = "natrag";
	}
	if (lang == '?lang=EN')
	{
		natrag.innerHTML = "back";
	}
	else if (lang == '?lang=DE')
	{
		natrag.innerHTML = "zur&uuml;ck";
	}
	else if (lang == '?lang=IT')
	{
		natrag.innerHTML = "indietro";
	}
	else if (lang == '?lang=FR')
	{
		natrag.innerHTML = "retour";
	}
	else if (lang == '?lang=ES')
	{
		natrag.innerHTML = "atr&aacute;s";
	}
	
	// opis slike
	var text = document.getElementById('text');
	if (text != null)
	{
		if (lang == '?lang=HR')
		{
			text.innerHTML = document.getElementById('textHR').innerHTML;
		}
		else if	(lang == '?lang=IT' && document.getElementById('textIT') != null)
		{
			text.innerHTML = document.getElementById('textIT').innerHTML;
		}
		else
		{
			text.innerHTML = document.getElementById('textEN').innerHTML;
		}
	}
}
// -->