// STYLESHEETS LADEN OP BASIS VAN SCHERMGROOTTE
	function LaadCSS() {
		document.write('<link rel="stylesheet" type="text/css" href="http://www.the-wishes.com/ws-0000.css">');
		if (screen.width <= 800) {
			document.write('<link rel="stylesheet" type="text/css" href="http://www.the-wishes.com/ws-800.css">');
			if (navigator.userAgent.indexOf("Firefox") != -1) {
				document.write('<link rel="stylesheet" type="text/css" href="http://www.the-wishes.com/ws-800-ff.css">');
			}
		} else if (screen.width <= 1024) {
			document.write('<link rel="stylesheet" type="text/css" href="http://www.the-wishes.com/ws-1024.css">');
			if (navigator.userAgent.indexOf("Firefox") != -1) {
				document.write('<link rel="stylesheet" type="text/css" href="http://www.the-wishes.com/ws-1024-ff.css">');
			}
		} else {
			document.write('<link rel="stylesheet" type="text/css" href="http://www.the-wishes.com/ws-1280.css">');
			if (navigator.userAgent.indexOf("Firefox") != -1) {
				document.write('<link rel="stylesheet" type="text/css" href="http://www.the-wishes.com/ws-1280-ff.css">');
			}
		}
	}
// VARIABELEN VOOR DRIJFMENU
	
	var W3CDOM	= (document.createElement && document.getElementsByTagName);
	var Ff		= (navigator.userAgent.indexOf("Firefox") != -1) ? true : false;
	var menuLinks;
	if (screen.width <= 800) {
		var TopLinks	= 71;
		if (navigator.userAgent.indexOf("Firefox") != -1) {
			var TopLinks	= 61;
		}
	}
	else if (screen.width <= 1024) {
		var TopLinks	= 92;
		if (navigator.userAgent.indexOf("Firefox") != -1) {
			var TopLinks	= 82;
		}
	}
	else {
		var TopLinks	= 146;
		if (navigator.userAgent.indexOf("Firefox") != -1) {
			var TopLinks	= 133;
		}
	}
	var pos;
	var oldLinks	= TopLinks;


// FUNCTIES VOOR DRIJFMENU

function getObj(name) {
	if (document.getElementById) {
  		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	} else if (document.all) {
		this.obj = document.all[name];
		this.style = document.all[name].style;
	} else if (document.layers) {
		this.obj = document.layers[name];
		this.style = document.layers[name];
	}
}

function DrijfLinks() {
		if (window.innerHeight) {
			pos = window.pageYOffset;
		} else if (document.documentElement && document.documentElement.scrollTop) {
			pos = document.documentElement.scrollTop;
		} else if (document.body) {
			pos = document.body.scrollTop;
		}
		if (pos < TopLinks) {
			pos = TopLinks;
		} else {
			pos += TopLinks;
		}
		if (pos == oldLinks) {
			menuLinks.style.top = pos + "px";
		}
		oldLinks = pos;
		setTimeout('DrijfLinks()',0);
}

function initNavi() {
	if (!W3CDOM) {
		return;
	} else {
		menuLinks = new getObj("Navi");
	}
	DrijfLinks();
}

// PLAATJE LATEN DRIJVEN
	function DrijfRS() {
		if(document.all) {
			document.all.DrijfMenu.style.pixelLeft =  "33";
			document.all.DrijfMenu.style.visibility = 'visible';
				document.all.DrijfMenu.style.pixelTop = document.body.scrollTop + document.body.clientHeight  - 148;
		}
		window.onscroll = DrijfRS;
	}

// FRAMESET ZOEKEN BIJ "LOS" GELADEN FRAMES
	function find_frameset(frameset) {
		framesetpage=frameset;
		thispage=window.location.href;
		if (thispage.indexOf('://')<0) {thispage="://"+thispage;};
		prefix=thispage.substring(0,thispage.lastIndexOf('://'));
		suffix=thispage.substring(thispage.lastIndexOf('://')+3,thispage.length);
		if (parent.location.href==window.location.href) {parent.location.href=framesetpage+"?"+prefix+"&&&"+suffix};
	}

// AFBEELDINGEN BESCHERMEN
function BeschermFoto(e) {
	if (event.button==2) {
		alert('Niet kopieren alsjeblieft!')
	}
}

// FUNCTIES VOOR LOOPLETTERS
	var ie4 = false;
	if(document.all) {
		ie4 = true;
	}
	function setContent(name, value) {
		var d;
		if (ie4) {
			d = document.all[name];
		} else {
			d = document.getElementById(name);
		}
		d.innerHTML = value;
	}

	function getContent(name) {
		var d;
		if (ie4) {
			d = document.all[name];
		} else {
			d = document.getElementById(name);
		}
		return d.innerHTML;
	}

	function setColor(name, value) {
		var d;
		if (ie4) {
			d = document.all[name];
		} else {
			d = document.getElementById(name);
		}
		d.style.color = value;
	}

	function getColor(name) {
		var d;
		if (ie4) {
			d = document.all[name];
		} else {
			d = document.getElementById(name);
		}
		return d.style.color;
	}

	function animate(name, col) {
		var value = getContent(name);
		if (value.indexOf('<span') >= 0) { return; }
		var length = 0;
		var str = '';
		var ch;
		var token = '';
		var htmltag = false;
		for (i = 0; i < value.length; i++) {
			ch = value.substring(i, i+1);
			if (i < value.length - 1) { nextch = value.substring(i+1, i+2); } else { nextch = ' '; }
			token += ch;
			if (ch == '<' && '/aAbBpPhHiIoOuUlLtT'.indexOf(nextch) >= 0) { htmltag = true; }
			if (ch == '>' && htmltag) { htmltag = false; }
			if (!htmltag && ch.charCodeAt(0) > 30 && ch != ' ' && ch != '') {
				str += '<span id="' + name + '_' + length + '">' + token + '</'+'span>';
				token = '';
				length++;
			}
		}
		setContent(name, str);
		command = 'animateloop(\'' + name + '\', ' + length + ', 0, 1, \'' + col + '\')';
		setTimeout(command , 500);
	}

	function animateloop(name, length, ind, delta, col) {
		var next = ind + delta;
		if (next >= length) {
			delta	= delta * -1;
			next		= ind + delta;
		}
		if (next < 0) {
			delta	= delta * -1;
			next		= ind + delta;
		}
		setColor(name + '_' + ind, getColor(name + '_' + next));
		setColor(name + '_' + next, col);
		command = 'animateloop(\'' + name + '\', ' + length + ', ' + next + ', ' + delta + ', \'' + col + '\')';
		setTimeout(command , 500);
	}

// VERANDER BUTTON KLEUR BIJ MOUSEOVER
	function button_onmouseover(x) {
		//Change the color when the mouse pointer is over the button area.
		if (x.style.backgroundColor != "#FF9900") {
			x.style.backgroundColor = "#F5F5F5"
		}
	}

	function button_onmouseout(x) {
		//Change the color when the mouse pointer leaves the button area.
		if (x.style.backgroundColor != "#F5F5F5") {
			x.style.backgroundColor = "#FF9900"
		}
	}

	function button_onclick(x) {
		//Toggle the button color when clicked.
		if (x.style.backgroundColor == "#F5F5F5") {
			x.style.backgroundColor = "#FF9900"
		}
		else {
			//Change the button color and reset other buttons.
			x.style.backgroundColor = "#FF9900"
		}
	}

// VERLENG TEXTAREA VELD AAN DE HAND VAN INVOER

	function VerlengVeld(elem) {
		elem		= document.getElementById(elem);
		var ic	= elem.cols;
		var ir	= elem.rows;
		var j	= elem.value.length;
		var k	= ic * (ir-1);
		if (j > k) {
			elem.rows = (ir + 1);
		}
	}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImgRestore2() { //v3.0
  var i,x,a=document.MM_sr2; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_swapImage2() { //v3.0
  var i,j=0,x,a=MM_swapImage2.arguments; document.MM_sr2=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr2[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  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 MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

LaadCSS();
MM_reloadPage(true);
document.onmousedown=BeschermFoto;
x		= 'ok';
email	= 'alex@linkerhand.nl';