// JavaScript Document

function _obj(id)
{
	return document.getElementById(id);
}

function _url(path)
{
	window.location = path;	
}


//drop menu
var drop_status = new Array(0,0,0,0,0);
var hide_time = 250;

function show_drop(num)
{
	_obj('drop'+num).style.display = 'block';
}

function hide_drop(num)
{
	if (drop_status[num] == 0) { _obj('drop'+num).style.display = 'none'; }
}

function prepare2hide(num)
{
	setTimeout("hide_drop("+num+");",hide_time);
}

function ch_status(num,status)
{
	drop_status[num] = status;	
	if (status == 1) 
	{
		show_drop(num);
	}
	else
	{
		prepare2hide(num);
	}
}

function enlarge(url)
{
var w = 640+24;
var h = 480+24;
var t = Math.round((screen.height - h) /2);
var l = Math.round((screen.width - w) /2);
var nwind = window.open('/enlarge.php?pic='+escape(url),'enlarger','top='+t+',left='+l+',width='+w+',height='+h+',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes');
nwind.focus();
}
						
function openwindow (lang) {
	switch ( lang ) {
		case 'LT':
			var page = "uzsiprenumeruoti-naujienas-ir-akcijas";
			break;
		case 'EN':
			var page = "newsletter-submission";
			break;
		case 'LV':
		default:
			var page = "registracija-na-novosti";

	}
	window.open("/index.php?page=" + page, "test", "width=400, height=300, resize=true");
}

