var videowindow = null;
var menuopen = null;
var menutimeout = null;
function videoframe(id, title) {
	url = '/video/'+id+'.html';
	if (videowindow && !videowindow.closed) {
		videowindow.document.getElementById('title').innerHTML = title;
		videowindow.flashProxy.call('playUrl', '/video/'+id+'.flv');
		videowindow.focus();
		} else {
		videowindow = window.open(url, 'FS_video', "menubar=0, resizable=0,width=340,height=280");
		}
	return false;
	}
function imageframe(id, url, w, h) {
	window.open(url,
	"FS_kuva_"+id,
	"menubar=0,resizable=0,width="+w+",height="+h);
	return false;
	}
function openmenu(id) {
	if (menuopen) {
		closemenu(menuopen);
		}
	if (obj = document.getElementById(id)) {
		document.getElementById(id).style.display='block';
		menuopen = id;
		menutimeout = setTimeout("closemenu('"+id+"')", 3000);
		}	
	}
function closemenu(id) {
	if (obj = document.getElementById(id)) {
		obj.style.display='none';
		menuopen = null;
		if (menutimeout) {
			clearTimeout(menutimeout);
			}
		}
	}
function hideandsubmit() {
	form = document.getElementById('crit');
	form.style.visibility = 'hidden';
	form.submit();
	}
function checkinput () {
	if (obj = document.getElementById('loginfield')) {
		obj.focus();
		}
	}
