/* splash intro */
// this hack is to ovverride windows xp security check which requires to click on activex controls to activate them
function splashintro() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="990" height="640">');
	document.write('<param name="movie" value="res/swf/home2.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<embed src="res/swf/home2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="990" height="640"></embed>');
	document.write('</object>');
}

/* popup photos */
function imgpopup(foto, w, h){
	var param = foto.href.substr(foto.href.indexOf('/bin/') + 5);
	var settings = 'location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,fullscreen=no';
	//var w = 320; var h = 240;
	var x = (screen.width - w) / 2;
	var y = (screen.Height - h) / 2 - 20;
	if (x < 0) x = 0; if (y < 0) y = 0;
	//if (w > screen.width) w = screen.width;	if (h > screen.height) h = screen.height;
	var psettings = 'top=' + y + ',left=' + x + ',width=' + w + ',height=' + h + ',' + settings;
	window.open('/res/html/imgpopup.shtml?' + param, 'foto', psettings).focus();
	return false;
}

function mmenu(ID) {

var uls = document.getElementsByTagName("ul");
for (i=0;i<uls.length;i++) {
if(uls[i].getAttribute("class")=="submenu")
	uls[i].style.display = "none";
if(uls[i].getAttribute("id") && uls[i].getAttribute("id").search("submenu-")!= -1) uls[i].style.display = "none";
}



var menu = document.getElementById(ID);
var display = menu.style.display;
menu.style.display = (display == "block") ? "none" : "block";
}
