winload=function() {
	if(document.all&&document.getElementById) {
		navRoot=document.getElementById("navUl");
		num=navRoot.childNodes.length;
		for(i=0;i<num;i++) {
			node=navRoot.childNodes[i];
			if(node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
	links=document.getElementById("content").getElementsByTagName("a");
	num=links.length;
	for(i=0; i<num; i++) {
		if(links[i].rel == "external") {
			links[i].target="_blank";
		}
	}
}

window.onload=winload;

function show_pop(file) {
	var wWidht = 788;
	var wHeight = 650;
	var pLeft = screen.width / 2 - wWidht / 2;
	var pTop = screen.height / 2 - wHeight / 2;
	mywin = window.open(file,'mywin','left='+pLeft+',top='+pTop+',width='+wWidht+',height='+wHeight+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1');
	mywin.focus();
	return false;
}
function openVideos(vid) {
	w = 800;
	h = 480;

	url = "http://www.be-nice.nl/videoplayer.php";

	if(typeof(vid) == 'number') {
		url += '?file='+vid; 
	}

	mywin = window.open( url, 'video', 'width=' + w + ',height=' + h + ',left=' + ( screen.width/2 - w/2 ) + ',top=' + ( screen.height/2 - h/2 ) + ',scrollbars=no,status=yes');
	if(mywin.focus()) {
		mywin.focus();
	}
}

function openVideos1(vid) {
	w = 500;
	h = 303;

	url = "http://www.be-nice.nl/videoplayer.php?file=3";

	if(typeof(vid) == 'number') {
		url += '?file='+vid; 
	}

	mywin = window.open( url, 'video', 'width=' + w + ',height=' + h + ',left=' + ( screen.width/2 - w/2 ) + ',top=' + ( screen.height/2 - h/2 ) + ',scrollbars=no,status=yes');
	if(mywin.focus()) {
		mywin.focus();
	}
}

function openVideos2(vid) {
	w = 500;
	h = 303;

	url = "http://www.be-nice.nl/videoplayer.php?file=1";

	if(typeof(vid) == 'number') {
		url += '?file='+vid; 
	}

	mywin = window.open( url, 'video', 'width=' + w + ',height=' + h + ',left=' + ( screen.width/2 - w/2 ) + ',top=' + ( screen.height/2 - h/2 ) + ',scrollbars=no,status=yes');
	if(mywin.focus()) {
		mywin.focus();
	}
}

function openVideos3(vid) {
	w = 500;
	h = 303;

	url = "http://www.be-nice.nl/videoplayer.php?file=2";

	if(typeof(vid) == 'number') {
		url += '?file='+vid; 
	}

	mywin = window.open( url, 'video', 'width=' + w + ',height=' + h + ',left=' + ( screen.width/2 - w/2 ) + ',top=' + ( screen.height/2 - h/2 ) + ',scrollbars=no,status=yes');
	if(mywin.focus()) {
		mywin.focus();
	}
}


function TextCounter(field, maxlimit) {
	if (field.value.length > maxlimit) {
		field.value = field.value.substring(0, maxlimit);
	}
	else {
		document.getElementById('textindication').innerHTML = maxlimit - field.value.length;
	}
}
