var images = new Array();

function imagePreload()
{
    for(var i = 0; i < imagePreload.arguments.length; i++)
    {
        images[i] = new Image();
        images[i].src = imagePreload.arguments[i];
    } 
}

function changeImage(id,src)
{
	document.getElementById(id).src = '/dbgfx/menus/'+src;
}

function popUpWindow(url, width, height)
{
	var par = 'dependent=yes, toolbar=no,location=no,directories=no,status=no,copyhistory=no,scrollbars=yes,resizable=no,width=' + (width) + ',height=' + (height) + ',screenX=10,screenY=10';

	win1 = window.open(url, "popupWindow", par);
	win1.resizeTo(width,height);
	win1.focus();
}

function videoWindow(url, width, height)
{
	width += 30;
	height += 40;
	
	var par = 'dependent=yes, toolbar=no,location=no,directories=no,status=no,copyhistory=no,scrollbars=yes,resizable=no,width=' + (width) + ',height=' + (height) + ',screenX=10,screenY=10';

	win1 = window.open(url, "videoWindow", par);
	win1.resizeTo(width,height);
	win1.focus();
}

function empfehlenWindow(id)
{
	var width = 310;
	var height = 400;
	var par = 'dependent=yes, toolbar=no,location=no,directories=no,status=no,copyhistory=no,scrollbars=no,resizable=no,width=' + (width) + ',height=' + (height) + ',screenX=10,screenY=10';

	win1 = window.open('weiterempfehlen.php?id='+id, "empfehlenWindow", par);
	win1.resizeTo(width, height);
	win1.focus();
}

function clearSearch(event)
{
	var feld = document.getElementById('searchField').value;

	if(event=='focus')
	{
		if(feld == 'Suchbegriff')
		{
			document.getElementById('searchField').value = '';
		}
	}
	else if(event == 'blur')
	{
		if(feld == '')
		{
			document.getElementById('searchField').value = 'Suchbegriff';
		}	
	}

}


/*sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}*/
//if (window.attachEvent) window.attachEvent("onload", sfHover);
