
function writeFlash(file, width, height) {
	if (width == null) { width = 234; }
	if (height == null) { height = 60; }

	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	 document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
	 document.write('WIDTH="'+width+'" HEIGHT="'+height+'" id="'+file+'" ALIGN="">');
	 document.write('<PARAM NAME=movie VALUE="'+file+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="'+file+'" quality=high bgcolor=#FFFFFF WIDTH="'+width+'" HEIGHT="'+height+'" NAME="'+file+'" ALIGN=""');
	 document.write('TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
	document.write('</OBJECT>');
}


	// Login Form

	function login() {
		document.forms.Login.submit();
	}


		// Dynamic Menues
	var menus = new Object();
	var visible = new Object();
	var names = new Array();
	var refs = new Array();

	var tempTr;
	var hideTimer;

	function showMenu(menuName, tr, event) {
		clearTimeout(hideTimer);
		if (tempTr == tr) {
			return;
		}

		tempTr = tr;

		visible[menuName] = false;
		for (var name in visible) {
			visible[name] = false;
		}
		visible[menuName] = true;
		refs[menuName] = tr;
		checkMenu(event);
	};

	function hideMenu(menuName, tr) {
		clearTimeout(hideTimer);
		visible[menuName] = false;
		hideTimer = setTimeout('checkMenu()', 200);
	}

	function checkMenu(event) {
		for (var menuName in visible) {
			if (menus[menuName] == null) {
				menu = document.getElementById(menuName);
				if (menu != null) {
					menus[menuName] = menu;
				}
			}

			if (visible[menuName]) {
				if (menus[menuName] != null) {
					menus[menuName].style.visibility = "visible";
					if (event) {
						menus[menuName].style.left = mouseX(event) + "px";
					}
				}
			}
			else {
				if (menus[menuName] != null) {
					menus[menuName].style.visibility = "hidden";
				}
			}
		}
		tempTr = null;
	}

	function mouseX(evt) {
		if (evt.pageX) return evt.pageX;
		else if (evt.clientX)
		   return evt.clientX + (document.documentElement.scrollLeft ?
		   document.documentElement.scrollLeft :
		   document.body.scrollLeft);
		else return null;
	}

	// Ticker for News

	var delay=4000 //set delay between message change (in miliseconds)
	var news = new Array();
	var indexNews=-1;

	//function to change content
	function changecontent(){
		div = getDiv(indexNews);
		if (div) {
			div.style.display = 'none';
		}
		indexNews++;

		div = getDiv(indexNews);
		if (!div) {
			indexNews = 0;
			div = getDiv(indexNews);
		}

		div.style.display = 'block';

		setTimeout("changecontent()",delay)
	}

	function getDiv(index) {
		var name = 'newsBox' + indexNews;
		var div = $(name);
		return div;
	}

window.onload=changecontent


