// Flash enabled check
function check() {
	checkBrowserVer('','older_browser.html');
	MM_checkPlugin('Shockwave Flash','','no_flash.html',true);
}

// preLoad-Function for void-gifs and onMouseOVer-gifs

function preLoad (imgfile) {
  Cache = new Image();
  eval ("Cache.src = \"" + p + "img/" + imgfile+"\"");
}

// reloads the window if Nav4 resized
function MM_reloadPage(init) {
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function init() {
	NS4 = (document.layers);
	IE4 = (document.all);
        nummenus = 75;
	NS4 = (document.layers);
  	IE4 = (document.all);

	MM_reloadPage(true);

	preLoad ('void_uv.gif');
	preLoad ('n_home_on_nl.gif');
  	preLoad ('n_inno_on_nl.gif');
  	preLoad ('n_news_on_nl.gif');
  	preLoad ('n_success_on_nl.gif');
  	preLoad ('n_safety_on_nl.gif');
	preLoad ('n_busy_on_nl.gif');
	preLoad ('n_events_on_nl.gif');
  	preLoad ('go_on_uv.gif');
  	preLoad ('n_search_adv_on_en.gif');
}

// onMouseOver switch function
function SwitchImage(imgSource,imgName) {
  if (document.images[imgName]) {
    document.images[imgName].src = imgSource;
    return true;
  }
}

// olderbrowser check
	function checkBrowserVer(four,notfour) {
		var browser = new Object();
		if (navigator.appName.indexOf("Netscape") >= 0) browser.type = "N";
		else if (navigator.appName.indexOf("Microsoft") >= 0) browser.type = "M";
		else browser.type = "O";
		browser.version = parseFloat(navigator.appVersion);

		if ((browser.type == "N") || (browser.type == "M"))
		{
  		if (browser.version < 4) {
				location.href = p + notfour;
				return true;
			}
		}
		else if ((browser.type == "O") || (browser.version >= 4))
		{
			location.href = four;
			return true;
		}
	return true;
	}

// flash check
	function MM_checkPlugin(plugin, theURL, altURL, IEGoesToURL) { //v2.0
  	if ((navigator.plugins && navigator.plugins[plugin]) || //if NS, or
    	  (IEGoesToURL &&  //if flag set, and MSIE browser for Win95/NT (ActiveX)
      	 navigator.appName.indexOf('Microsoft') != -1 &&
       	navigator.appVersion.indexOf('Mac') == -1 &&
       	navigator.appVersion.indexOf('3.1') == -1)) {
	    if (theURL.length>2) window.location = theURL;
  	} else {
    	if (altURL.length>2) window.location = altURL;
	  }
  	document.MM_returnValue = false;
	}

function checkIt() {
	if (navigator.appVersion.indexOf("(X11") != -1 || navigator.appVersion.indexOf("(Mac") != -1) return 1
	else return 0
}

function closed() {
	return true;
}

// window opener
function openMiniWin2(src,W,H) {
	MiniWin=window.open( src , 'toolbar','toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width='+W+',height='+H);
}

// necessary for quicksearch form validation
function quickCheck(form, pos)
{
		if (form.elements[pos].value == "") {
			alert ("Please enter a search query!");
			form.elements[pos].focus();
		} else
			form.submit();
}
