function sitestat(ns_l) {
	ns_l+="&ns__t="+new Date().getTime();ns_pixelUrl=ns_l;
	ns_0=top.document.referrer;
	ns_0=(ns_0.lastIndexOf("/")==ns_0.length-1)?ns_0.substring(ns_0.lastIndexOf("/"),0):ns_0;
	if(ns_0.length>0)ns_l+="&ns_referrer="+escape(ns_0);
	if(document.images) {
		ns_1=new Image();ns_1.src=ns_l;
	} else
	document.write("<img src="+ns_l+" width=\"1\" height=\"1\" />");
}

function searchclick() {
	if (document.getElementById('search').value == 'vul hier je zoekterm in') {
		document.getElementById('search').value	=	'';
	}
}

function showHide(theid) {
	var switch_id =	document.getElementById(theid);
	if (switch_id.className == 'show list') {
		switch_id.className = 'hide list';
	} else {
		switch_id.className = 'show list';
	}
}


function playVideoSmall(videoURL,divID,posID) {
	var flashURL;
	
	//http://player.nos.nl/index.php/embedded/playlist/tcmid/
	
	flashURL	=	"autostart=false";
	flashURL	=	flashURL + "&height=218";
	flashURL	=	flashURL + "&file=" + videoURL;
	flashURL	=	flashURL + "&width=352";
	flashURL	=	flashURL + "&bufferlength=8";
	flashURL	=	flashURL + "&image=http://tour2008.nos.nl/data/mijntourmoment/" + posID + ".jpg";
	
	var F0 = { movie:"http://player.nos.nl/nos/media/flash/mediaplayer.swf", width:"352", height:"218", quality:"high", bgcolor:"#000000", majorversion:"7", build:"0",  allowscriptaccess:"true", allowfullscreen:"true",  flashvars: flashURL };
	UFO.create(F0, divID);
	
	var rnumber		= Math.floor(Math.random()*10000);
	var siteStatUrl	= 'http://nl.sitestat.com/klo/nosrtv/s?player.' + videoURL + '&amp;category=nieuws&ns__t=' + rnumber;
	sitestat(siteStatUrl);
}


function playVideoNoStart(videoURL,divID) {
	var flashURL;
	flashURL	=	"autostart=false";
	flashURL	=	flashURL + "&height=232";
	flashURL	=	flashURL + "&file=" + videoURL;
	flashURL	=	flashURL + "&width=378";
	flashURL	=	flashURL + "&bufferlength=8";
	
	var F0 = { movie:"http://player.nos.nl/nos/media/flash/mediaplayer.swf", width:"378", height:"232", quality:"high", bgcolor:"#000000", majorversion:"7", build:"0",  allowscriptaccess:"true", allowfullscreen:"true",  flashvars: flashURL };
	UFO.create(F0, divID);
	
	var rnumber		= Math.floor(Math.random()*10000);
	var siteStatUrl	= 'http://nl.sitestat.com/klo/nosrtv/s?player.' + videoURL + '&amp;category=nieuws&ns__t=' + rnumber;
	sitestat(siteStatUrl);
}


function playVideo(videoURL,divID) {
	var flashURL;
	flashURL	=	"autostart=true";
	flashURL	=	flashURL + "&height=232";
	flashURL	=	flashURL + "&file=http://player.nos.nl/index.php/embedded/playlist/tcmid/" + videoURL;
	flashURL	=	flashURL + "&width=378";
	flashURL	=	flashURL + "&bufferlength=8";
	
	var F0 = { movie:"http://player.nos.nl/nos/media/flash/mediaplayer.swf", width:"378", height:"232", quality:"high", bgcolor:"#000000", majorversion:"7", build:"0",  allowscriptaccess:"true", allowfullscreen:"true",  flashvars: flashURL };
	UFO.create(F0, divID);
	
	var rnumber		= Math.floor(Math.random()*10000);
	var siteStatUrl	= 'http://nl.sitestat.com/klo/nosrtv/s?player.' + videoURL + '&amp;category=nieuws&ns__t=' + rnumber;
	sitestat(siteStatUrl);
}


function playVideoGemist(videoURL,divID) {
	var flashURL;
	flashURL	=	"autostart=true";
	flashURL	=	flashURL + "&height=308";
	flashURL	=	flashURL + "&file=http://player.nos.nl/index.php/embedded/playlist/tcmid/" + videoURL;
	flashURL	=	flashURL + "&width=512";
	flashURL	=	flashURL + "&bufferlength=8";
	
	var F0 = { movie:"http://player.nos.nl/nos/media/flash/mediaplayer.swf",width:"512", height:"308", quality:"high", bgcolor:"#000000", majorversion:"7", build:"0",  allowscriptaccess:"true", allowfullscreen:"true",  flashvars: flashURL };
	UFO.create(F0, divID);
	
	var rnumber		= Math.floor(Math.random()*10000);
	var siteStatUrl	= 'http://nl.sitestat.com/klo/nosrtv/s?player.' + videoURL + '&amp;category=nieuws&ns__t=' + rnumber;
	sitestat(siteStatUrl);
}


function showImage(url,title,divID) {
	var html;
	html = '<img src="' + url + '" width="378" height="126" alt="' + title + '" />';
	html = html + '<p class="description">' + title + '</p>';
	document.getElementById(divID).innerHTML = html;
}

function playAudio(url,divID) {
var flashURL;
	flashURL	=	"autostart=true";
	flashURL	=	flashURL + "&height=232";
	flashURL	=	flashURL + "&file=" + url;
	flashURL	=	flashURL + "&width=378";
	flashURL	=	flashURL + "&bufferlength=8";
	flashURL	=	flashURL + "&image=http://www.nos.nl/static/global/player/images/bg_audio.jpg";
	
	var F0 = { movie:"http://player.nos.nl/nos/media/flash/mediaplayer.swf", width:"378", height:"232", quality:"high", bgcolor:"#000000", majorversion:"7", build:"0",  allowscriptaccess:"true", allowfullscreen:"true",  flashvars: flashURL };
	UFO.create(F0, divID);
	
	var rnumber		= Math.floor(Math.random()*10000);
	var siteStatUrl	= 'http://nl.sitestat.com/klo/nosrtv/s?player.' + url + '&amp;category=nieuws&ns__t=' + rnumber;
	sitestat(siteStatUrl);
}
