// menu hover
function m1On(who)
{
	document.getElementById(who).oldClass     = document.getElementById(who).className;
	document.getElementById(who).oldLinkClass = document.getElementById(who).firstChild.firstChild.className;
	document.getElementById(who).style.cursor = "pointer";
	document.getElementById(who).className    = "navElementEntryActiv";
	document.getElementById(who).firstChild.firstChild.className = "n1a";
}
function m1Off(who)
{
	var goClass = document.getElementById(who).oldClass
	document.getElementById(who).style.cursor = "default";
	document.getElementById(who).className    = goClass;
	document.getElementById(who).firstChild.firstChild.className = document.getElementById(who).oldLinkClass;
}

/* safemail func */
function safemail(name, domain, display, linkclass) {
	displayed=(display.length)<1 ? name+"@"+domain : display;
	document.write('<a class="'+linkclass+'" href="mailto:' + name + '@' + domain + '">' + displayed + '</a>');                                 
}

/* very nice function from die-gestalten.de. thx */
function popup(url, w, h, f, x, y){
	if(navigator.userAgent.indexOf("Safari") != -1){
		w = w - 2;
	}
	
	if(x == null){                                                        
		x = Math.round((screen.availWidth-w)/2);
	}
	if(y == null){
		y = Math.round((screen.availHeight-h)/2);
	}
	var features = "width="+w+",height="+h+",left="+x+",top="+y+",screenX="+x+",screenY="+y+",toolbar=no,location=no,status=no,menubar=no,history=no,titlebar=no,alwaysRaised";

	if(f != null){
		features += "," + f;
	}

	eval("var win = window.open('"+url+"', '"+name+"', '"+features+"');");
	eval("win.moveTo("+x+","+y+");");
	eval("win.focus();");
}

function jumpMenu(where)
{
	window.location.href = where;
}

// dia show in dhtml
function dia()
{
	next = inow < iamount ? inow+1 : 0;
	old  = inow; 
    $('#img'+old).fadeOut("slow");
    $('#img'+next).fadeIn("slow");
    inow = next; 
}
