function getElementByClass(classname) {
	var inc=0;
	var result=new Array();
	var alltags=document.getElementsByTagName("div");
	if (!alltags) alltags=document.all;
	//var alltags=document.all? document.all : document.getElementsByTagName("DIV");
	for (i=0; i < alltags.length; i++) {
		if (alltags[i].className==classname) {
			result[inc++]=alltags[i];
		}
	}
	return result;
 }

function IENavigation() {
	menus = getElementByClass('rollupmenu');
	for (i=0; i < menus.length; i++) {
		ulnode=menus[i].childNodes[0];
		for (ii=0; ii < ulnode.childNodes.length; ii++) {
			node = ulnode.childNodes[ii];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className += ' hover';
				}
				node.onmouseout=function() {
					this.className = this.className.replace(' hover', '');
				}
			}
		}
	}

	menus = getElementByClass('verticalmenu');
	for (i=0; i < menus.length; i++) {
		ulnode=menus[i].childNodes[1];
		for (ii=0; ii < ulnode.childNodes.length; ii++) {
			node = ulnode.childNodes[ii];
			if (node.tagName=="li") {
				node.onmouseover=function() {
					this.className += ' hover';
				}
				node.onmouseout=function() {
					this.className = this.className.replace(' hover', '');
				}
			}
		}
	}

}

function pageload() {
	if (navigator.appName == 'Microsoft Internet Explorer') {
//	IENavigation();
	ulnode=document.getElementsByTagName('li');
		for (ii=0; ii < ulnode.length; ii++) {
			node = ulnode[ii];
			if (node.tagName=="li" || node.tagName=="LI") {
				node.onmouseover=function() {
					this.className += ' hover';
				}
				node.onmouseout=function() {
					this.className = this.className.replace(' hover', '');
				}
			}
		}
	}
}

function FocusElement($id) {
	window.document.getElementById($id).focus();
	return true;
}


function LoginFocus(el) {
	if (el.value=='Uživatel')
		el.value='';
}

function LoginBlur(el) {
	if (el.value=='')
		el.value='Uživatel';
}

function PasswordFocus(el) {
	if (el.value=='Heslo') {
		el.type='password';
		el.focus();
		el.value='';
	}
}

function PasswordBlur(el) {
	if (el.value=='') {
		el.value='Heslo';
		el.type='text';
	}
}