//chart2.js for channel 5385 / widget 306 / WxH: 550x375 / skin: clean / vid: 0 / autoplay: N / shareicon: Y 
// pgstats - poor mans page statistics.. 
// NOT based on prototype or jquery - cause it must be lightweight

// // get our script src, to know our baseurl so we can call home
// var pgstatsScriptSource = (function(scripts) {
//     var scripts = document.getElementsByTagName('script'),
//         script = scripts[scripts.length - 1];	// at ths very moment, we are the last script guaranteed
// 
//     if (script.getAttribute.length !== undefined) {
//         return script.src
//     }
// 
//     return script.getAttribute('src', -1)
// }());

var pgstats= {
	browser: navigator.userAgent,
	uid: '',
	scr: screen.width.toString()+'x'+screen.height.toString(),
	url: document.URL,
	referrer: document.referrer,
	ecollect: {},
	baseurl: 'http://www.dik.nl/',	// pgstatsScriptSource.substr(0,pgstatsScriptSource.lastIndexOf('/pgstats/')),
	init: function() {
		if (!(this.uid=this.readCookie('pgstats'))) {
			this.uid= Math.round(Math.random() * 2147483647).toString();
			this.uid+= Math.round(Math.random() * 2147483647).toString();
			this.createCookie('pgstats',this.uid,365*2);
		}
	}, 
	xPageHit: function () {
		var xhReq=this.createXMLHttpRequest();
		if (!xhReq)
			return 'ERR:xhReq';	// forget it..
		if (!this.baseurl)
			return 'ERR:baseurl';	// forget it..
		xhReq.open('get',this.baseurl+'pgstats/tick?'+this.collectInfo(),true);
		// xhReq.onreadystatechange = function() {
		//     if (xhReq.readyState != 4)  { return; }
		//     var serverResponse = xhReq.responseText;
		//     alert(serverResponse);
		// };
		xhReq.send();
		return 'OK';
	},
	collectInfo: function() {
		var rv;
		rv='ts=' + new Date().getTime();
		//rv+='&br='+this.encURI(this.browser);
		rv+='&uid='+this.uid;
		rv+='&url='+this.encURI(this.url);
		rv+='&refer='+this.encURI(this.referrer);
		//rv+='&ssrc='+this.encURI(this.baseurl);
		rv+='&scr='+this.scr;
		for (i in this.ecollect) {
			rv+='&'+i+'='+this.encURI(this.ecollect[i]);
		}

		return rv;
	},
	addcollect: function(key,val) {
		this.ecollect[key]=val;
	},
	//------- helper functions ----------
	createCookie: function (name,value,days) {
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
	},
	readCookie: function(name) {
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	},
	eraseCookie: function(name) {
		createCookie(name,"",-1);
	},
	encURI: function(url) {
		//return encodeURIComponent(url);	// forgets to encode a lot of chars. Useless
		var s = escape(url);	// this is the most complete one, however forgets to encode star, slash, @ and +
		s = s.replace(/\*/g,"%2A");
		s = s.replace(/\//g,"%2F");
		s = s.replace(/\@/g,"%40");
		s = s.replace(/\+/g,"%2B");
		return s;
	},
	createXMLHttpRequest: function() {
  		try { return new XMLHttpRequest(); } catch(e) {}
		try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
		try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch (e) {}
		return null;
	}
}
pgstats.init();
//pgstats.addcollect('vid','234234');
//pgstats.xPageHit();
// Widget standard js for yubby
// NOT based on prototype or jquery - cause it must be lightweight and cant interfere with host

/**
 *	htmlspecialchars - like its php counterpart
 *	@author rvw
 *	@since 08-03-2010 12:19
 */
function htmlspecialchars(string) {
	string = string.toString();
	string = string.replace(/&/g, '&amp;');    
	string = string.replace(/</g, '&lt;').replace(/>/g, '&gt;');
	string = string.replace(/"/g, '&quot;');
	// single quote.. string = string.replace(/'/g, '&#039;');
	return string;
}

//------------ tween.js ----------------------
function Delegate() {}
Delegate.create = function (o, f) {
	var a = new Array() ;
	var l = arguments.length ;
	for(var i = 2 ; i < l ; i++) a[i - 2] = arguments[i] ;
	return function() {
		var aP = [].concat(arguments, a) ;
		f.apply(o, aP);
	}
}

Tween = function(obj, prop, func, begin, finish, duration, suffixe){
	this.init(obj, prop, func, begin, finish, duration, suffixe)
}
var t = Tween.prototype;

t.obj = new Object();
t.prop='';
t.func = function (t, b, c, d) { return c*t/d + b; };
t.begin = 0;
t.change = 0;
t.prevTime = 0;
t.prevPos = 0;
t.looping = false;
t._duration = 0;
t._time = 0;
t._pos = 0;
t._position = 0;
t._startTime = 0;
t._finish = 0;
t.name = '';
t.suffixe = '';
t._listeners = new Array();	
t.setTime = function(t){
	this.prevTime = this._time;
	if (t > this.getDuration()) {
		if (this.looping) {
			this.rewind (t - this._duration);
			this.update();
			this.broadcastMessage('onMotionLooped',{target:this,type:'onMotionLooped'});
		} else {
			this._time = this._duration;
			this.update();
			this.stop();
			this.broadcastMessage('onMotionFinished',{target:this,type:'onMotionFinished'});
		}
	} else if (t < 0) {
		this.rewind();
		this.update();
	} else {
		this._time = t;
		this.update();
	}
}
t.getTime = function(){
	return this._time;
}
t.setDuration = function(d){
	this._duration = (d == null || d <= 0) ? 100000 : d;
}
t.getDuration = function(){
	return this._duration;
}
t.setPosition = function(p){
	this.prevPos = this._pos;
	var a = this.suffixe != '' ? this.suffixe : '';
	this.obj[this.prop] = Math.round(p) + a;
	this._pos = p;
	this.broadcastMessage('onMotionChanged',{target:this,type:'onMotionChanged'});
}
t.getPosition = function(t){
	if (t == undefined) t = this._time;
	return this.func(t, this.begin, this.change, this._duration);
};
t.setFinish = function(f){
	this.change = f - this.begin;
};
t.geFinish = function(){
	return this.begin + this.change;
};
t.init = function(obj, prop, func, begin, finish, duration, suffixe){
	if (!arguments.length) return;
	this._listeners = new Array();
	this.addListener(this);
	if(suffixe) this.suffixe = suffixe;
	this.obj = obj;
	this.prop = prop;
	this.begin = begin;
	this._pos = begin;
	this.setDuration(duration);
	if (func!=null && func!='') {
		this.func = func;
	}
	this.setFinish(finish);
}
t.start = function(){
	this.rewind();
	this.startEnterFrame();
	this.broadcastMessage('onMotionStarted',{target:this,type:'onMotionStarted'});
	//alert('in');
}
t.rewind = function(t){
	this.stop();
	this._time = (t == undefined) ? 0 : t;
	this.fixTime();
	this.update();
}
t.fforward = function(){
	this._time = this._duration;
	this.fixTime();
	this.update();
}
t.update = function(){
	this.setPosition(this.getPosition(this._time));
	}
t.startEnterFrame = function(){
	this.stopEnterFrame();
	this.isPlaying = true;
	this.onEnterFrame();
}
t.onEnterFrame = function(){
	if(this.isPlaying) {
		this.nextFrame();
		setTimeout(Delegate.create(this, this.onEnterFrame), 0);
	}
}
t.nextFrame = function(){
	this.setTime((this.getTimer() - this._startTime) / 1000);
	}
t.stop = function(){
	this.stopEnterFrame();
	this.broadcastMessage('onMotionStopped',{target:this,type:'onMotionStopped'});
}
t.stopEnterFrame = function(){
	this.isPlaying = false;
}

t.continueTo = function(finish, duration){
	this.begin = this._pos;
	this.setFinish(finish);
	if (this._duration != undefined)
		this.setDuration(duration);
	this.start();
}
t.resume = function(){
	this.fixTime();
	this.startEnterFrame();
	this.broadcastMessage('onMotionResumed',{target:this,type:'onMotionResumed'});
}
t.yoyo = function (){
	this.continueTo(this.begin,this._time);
}

t.addListener = function(o){
	this.removeListener (o);
	return this._listeners.push(o);
}
t.removeListener = function(o){
	var a = this._listeners;	
	var i = a.length;
	while (i--) {
		if (a[i] == o) {
			a.splice (i, 1);
			return true;
		}
	}
	return false;
}
t.broadcastMessage = function(){
	var arr = new Array();
	for(var i = 0; i < arguments.length; i++){
		arr.push(arguments[i])
	}
	var e = arr.shift();
	var a = this._listeners;
	var l = a.length;
	for (var i=0; i<l; i++){
		if(a[i][e])
		a[i][e].apply(a[i], arr);
	}
}
t.fixTime = function(){
	this._startTime = this.getTimer() - this._time * 1000;
}
t.getTimer = function(){
	return new Date().getTime() - this._time;
}
Tween.backEaseIn = function(t,b,c,d,a,p){
	if (s == undefined) var s = 1.70158;
	return c*(t/=d)*t*((s+1)*t - s) + b;
}
Tween.backEaseOut = function(t,b,c,d,a,p){
	if (s == undefined) var s = 1.70158;
	return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
}
Tween.backEaseInOut = function(t,b,c,d,a,p){
	if (s == undefined) var s = 1.70158; 
	if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
	return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
}
Tween.elasticEaseIn = function(t,b,c,d,a,p){
		if (t==0) return b;  
		if ((t/=d)==1) return b+c;  
		if (!p) p=d*.3;
		if (!a || a < Math.abs(c)) {
			a=c; var s=p/4;
		}
		else 
			var s = p/(2*Math.PI) * Math.asin (c/a);
		
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	
}
Tween.elasticEaseOut = function (t,b,c,d,a,p){
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (!a || a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return (a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b);
	}
Tween.elasticEaseInOut = function (t,b,c,d,a,p){
	if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) var p=d*(.3*1.5);
	if (!a || a < Math.abs(c)) {var a=c; var s=p/4; }
	else var s = p/(2*Math.PI) * Math.asin (c/a);
	if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
}

Tween.bounceEaseOut = function(t,b,c,d){
	if ((t/=d) < (1/2.75)) {
		return c*(7.5625*t*t) + b;
	} else if (t < (2/2.75)) {
		return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
	} else if (t < (2.5/2.75)) {
		return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
	} else {
		return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
	}
}
Tween.bounceEaseIn = function(t,b,c,d){
	return c - Tween.bounceEaseOut (d-t, 0, c, d) + b;
	}
Tween.bounceEaseInOut = function(t,b,c,d){
	if (t < d/2) return Tween.bounceEaseIn (t*2, 0, c, d) * .5 + b;
	else return Tween.bounceEaseOut (t*2-d, 0, c, d) * .5 + c*.5 + b;
	}

Tween.strongEaseInOut = function(t,b,c,d){
	return c*(t/=d)*t*t*t*t + b;
	}

Tween.regularEaseIn = function(t,b,c,d){
	return c*(t/=d)*t + b;
	}
Tween.regularEaseOut = function(t,b,c,d){
	return -c *(t/=d)*(t-2) + b;
	}

Tween.regularEaseInOut = function(t,b,c,d){
	if ((t/=d/2) < 1) return c/2*t*t + b;
	return -c/2 * ((--t)*(t-2) - 1) + b;
	}
Tween.strongEaseIn = function(t,b,c,d){
	return c*(t/=d)*t*t*t*t + b;
	}
Tween.strongEaseOut = function(t,b,c,d){
	return c*((t=t/d-1)*t*t*t*t + 1) + b;
	}

Tween.strongEaseInOut = function(t,b,c,d){
	if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
	return c/2*((t-=2)*t*t*t*t + 2) + b;
	}

//======= end tween.js
var isIE = /MSIE ((5\.5)|[6])/.test(navigator.userAgent) && navigator.platform == "Win32";

var cvids_306= new Array();	// channelvideo's
var curvid_306=0;			// first video
var cpvideo_306=false;		// false=thumb, true=video

var matrix_curpg=1;
var matrix_npages=0;
var matrix_itemspp=3;	// 16
var tweenflip=0;
var tween1=null;
var tween2=null;

var butnext_mousein=false;
var butprev_mousein=false;
var img1_ov = new Image;
var img1_ou = new Image;
var img1_d  = new Image;
var img2_ov = new Image;
var img2_ou = new Image;
var img2_d  = new Image;
img1_ov.src="http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/iconprev24ov.png";
img1_ou.src="http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/iconprev24.png";
img1_d.src ="http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/iconprev24d.png";
img2_ov.src="http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/iconnext24ov.png";
img2_ou.src="http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/iconnext24.png";
img2_d.src ="http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/iconnext24d.png";

var wgElm_306 = document.getElementById('viidoo_chart2_306');
if (wgElm_306) {
	vp_createwg();
}

pgstats.addcollect('chid','5385');
pgstats.addcollect('hit','embed');
pgstats.addcollect('widget','chart2');
pgstats.xPageHit();

function vp_createwg() {
	var html='<div id="widget_flash_306" class="widget_flash" style="width: 550px;height:375px;overflow:hidden; margin:0;padding:0;border:0px solid #DDDDDD;background:#fff;position:relative;font-family:Arial,helvetica,sans-serif">';
	html+='<div style="margin:0px;">';
	cvids_306.push({vid:121669, thumb: 'http://i.ytimg.com/vi/W_oLzOBgIRU/0.jpg', title: 'New Jamba Juice Cheeseburger Chill Smoothie!', desc: 'www.CheeseburgerChill.com   For real? Is Jamba Juice getting into the burger business? Check out the deal on our site.'});
	cvids_306.push({vid:116910, thumb: 'http://i.ytimg.com/vi/sI53i1_JVPU/0.jpg', title: 'Streetprov - Jumping Monkeys - Eazie Flashmob Campaign', desc: 'A funny, innovating flashmob, brought to you by streetprov and eazie restaurants. A flashmob involving an orchestra, some very unconventional instruments and a lot of unexpected performances!  The best way to describe it - mix between Stomp, Vegetable Orchestra, and Improv Everywhere Musicals check out our other videos online at www.streetprov.net and if you are wondering what Eazie has to offer you check out their new campaign at www.eazie.nl'});
	cvids_306.push({vid:116046, thumb: 'http://i.ytimg.com/vi/gidr93nHkK8/0.jpg', title: 'Vakantiewerk bij IJssalon Clevers', desc: 'Margot, Femke en Marcus vertellen over het werken bij IJssalon Clevers in Grubbenvorst. Een reportage door TV Limburg.\n\nIJssalon Clevers in Grubbenvorst, Arcen en Overloon! In het seizoen elke dag geopend van 10.30-22.30.\n\nZie ook www.clevers.nl of kijk op www.gewoondelekkerste.nl'});
	cvids_306.push({vid:114480, thumb: 'http://i.ytimg.com/vi/JjVYVQOOJA8/0.jpg', title: 'McDonald\'s Piccadilly Circus', desc: 'McDonald\'s has recently launched a new interactive sign where passers-by can interact with images displayed on McDonald\'s giant LED screen, and visitors can take an interactive role at one of London\'s most photographed locations. Check it out!\n\nPhotos of the McDonald\'s Piccadilly sign on Flickr: http://www.flickr.com/groups/mcdonaldspiccadillycircus/'});
	cvids_306.push({vid:114479, thumb: 'http://i.ytimg.com/vi/CIzLd8zRwXw/0.jpg', title: 'McDonald\'s interactive billboard', desc: ' '});
	cvids_306.push({vid:114478, thumb: 'http://i.ytimg.com/vi/R5C_vkXhiyU/0.jpg', title: 'Sociale Rob over sociale media voor fastfoodsector', desc: 'Sociale Rob voor Snackkoerier over sociale media voor de fastfoodsector.'});
	cvids_306.push({vid:114091, thumb: 'http://i.ytimg.com/vi/DRV9BLSaT5E/0.jpg', title: 'Wiener\'s Circle', desc: 'One of those Extreme Restaurant specials on the Travel Channel http://www.yelp.com/biz/the-wieners-circle-chicago'});
	cvids_306.push({vid:113570, thumb: 'http://i.ytimg.com/vi/ICTcWrM4oR0/0.jpg', title: 'Burger King Wagh\u00e4usel', desc: 'Mit einem neuen Restaurant-Typus will Burger King Energieverbrauch und CO\u00b2-Aussto\u00df reduzieren. Der Prototyp entstand in Kooperation mit der Wirsol Solar AG. www.wirsol.de'});
	cvids_306.push({vid:110378, thumb: 'http://i.ytimg.com/vi/3hXh7DBPszc/0.jpg', title: 'Venezia Oudegracht Utrecht bij MTNL030', desc: 'MTNL030 Aflevering \'Ondernemerschap\' - De eerste gastarbeiders in Nederland waren Italianen. In de middeleeuwen hielpen zij hier al met het bouwen van kathedralen en later kwamen ze onder andere om in de mijnen te werken. De meeste Italiaanse Nederlanders zijn tegenwoordig werkzaam in de horeca. IJssalon Venezia aan de Oudegracht (de eerste in de stad) werd in 1928 door Guido Lorenzo geopend. Nu is het zijn kleindochter die de scepter zwaait in haar eigen ijskiosk.'});
	cvids_306.push({vid:110376, thumb: 'http://i.ytimg.com/vi/6eS_QGEuCZ4/0.jpg', title: 'IJssalon Venezia', desc: ''});
	cvids_306.push({vid:110340, thumb: 'http://i.ytimg.com/vi/x0edjmF1gfs/0.jpg', title: 'Ex-internationals Ren\u00e9 en Willy van de Kerkhof testen de officieuze WK bal.', desc: 'Mora introduceert nieuwe snack: de gehaktballetjes'});
	cvids_306.push({vid:107203, thumb: 'http://i.ytimg.com/vi/bv3Er0LOnYE/0.jpg', title: 'KFC Krushems - Full Of Real Bitz', desc: 'Introducing KFC Krushems - Full of real Bitz - Caramel Crunch, Oreo, Strawberry Shortcake and Maltesers\n\nhttp://www.kfc.co.uk/krushems/'});
	cvids_306.push({vid:107202, thumb: 'http://i.ytimg.com/vi/qkH-lFUBejQ/0.jpg', title: 'KFC Krushers, India: Really Thick, Really Tasty', desc: ' '});
	cvids_306.push({vid:106516, thumb: 'http://i.ytimg.com/vi/2JUu8sHpH6Y/0.jpg', title: 'Human Head Found In Hamburger', desc: 'An Albany, New York man was surprised to find a human head in his Double Whopper at a local Burger King.\n\nMore coverage at: http://onion.com'});
	cvids_306.push({vid:105166, thumb: 'http://i.ytimg.com/vi/HGUar6y70Tc/0.jpg', title: 'Andre Amaro bakt friet (Omroep Brabant)', desc: 'Andre Amaro laat ons in het programma Hot \& Gespot van Omroep Brabant zien hoe je \u00e8chte, lekkere friet bakt.'});
	cvids_306.push({vid:105165, thumb: 'http://i.ytimg.com/vi/bXgbDVnZSSw/0.jpg', title: 'De Groene Vraag: Frituren', desc: 'Iedereen eet wel eens een patatje in de stad. Maar hoe gezond en milieuvriendelijk is dat nou? De Groene Vraag zoekt het uit en sprak met Nicole Vervaet van Verantwoord Frituren en snackbar-eigenaar Patrick Nieuwveld.'});
	cvids_306.push({vid:105164, thumb: 'http://i.ytimg.com/vi/5PQb77Leqfc/0.jpg', title: 'Frituur \'t rond punt - Engsbergen - De grootste friet van het land', desc: 'In al die jaren heb ik \u00e9\u00e9n klant gehad die ontevreden is vertrokken. Hij vond zijn friet te groot. En hij had nog wel een kleintje besteld. Jelle Verlinden verkoopt aan t Rond Punt in Engsbergen (Tessenderlo) de grootste friet van het land. Zo groot, dat de fiscus het niet geloven wil.\n\nDe fiscus vindt dat ik drie keer meer moet verdienen dan ik aangeef, lacht Jelle. Maar ik wil niet meer verdienen, ik wil alleen tevreden klanten. Die ene klant is ook teruggekomen. Toen heb ik tijdens het scheppen wel gezegd: Het mag misschien wat minder zijn?\n\n09/01 \"Grotere friet dan dit kan gewoon niet\" + Oproep\n\nIn al die jaren heb ik \u00e9\u00e9n klant gehad die ontevreden is vertrokken. Hij vond zijn friet te groot. En hij had nog wel een kleintje besteld. Jelle Verlinden verkoopt aan t Rond Punt in Engsbergen (Tessenderlo) de grootste friet van het land. Zo groot, dat de fiscus het niet geloven wil.\n\nDe fiscus vindt dat ik drie keer meer moet verdienen dan ik aangeef, lacht Jelle. Maar ik wil niet meer verdienen, ik wil alleen tevreden klanten. Die ene klant is ook teruggekomen. Toen heb ik tijdens het scheppen wel gezegd: Het mag misschien wat minder zijn?\nKent u ook een frituur waar u zulke grote porties krijgt?\n\nDe Nationale Vereniging van Frituristen heeft het ooit berekend: het gemiddelde gewicht van een Belgische friet is 350 gram. We vroegen het aan honderd frituristen. Een gewoon pak friet woog tussen de 231 en 397 gram, zegt Bernard Lef\u00e8vre, nationaal voorzitter van Navefri.\n\nDe allerkleinste kleine friet was 165 gram zwaar. Bij de grootste familiefriet wees de weegschaal 975 gram aan. Klein bier vergeleken met de frieten die Jelle in de aanbieding heeft. Onder het gewicht van een groot pak friet, schiet onze keukenweegschaal door naar 1,250 kilo. Waarmee alle vroegere records van de tabellen worden geveegd.\n\nEn als het kon, dan maakte Jelle ze nog groter. Maar er gaat gewoon niet meer op zon bakje. Op de vraag waarom hij zijn frieten zo groot bakt, volgt een Freudiaans antwoord: In het begin heeft er eentje gereclameerd dat mijn friet te klein was.'});
	cvids_306.push({vid:105163, thumb: 'http://i.ytimg.com/vi/lckJHV9-IAU/0.jpg', title: 'Ophef rond Cafetaria', desc: 'M\'n eerste tvitem uit m\'n schoolcarriere, gemaakt voor de Lokale Omroep Ede: Edenaar Henk Imminck moet met zijn Cafetaria Simon van Kooten verhuizen. Afgelopen week werd bekend dat Stichting Woonstede hem een nieuwe locatie heeft gegeven. De buurtbewoners van de nieuwe locatie zijn echter niet blij met een cafetaria in hun buurt. Verslaggevers Bauke Deelstra en Hanno Janse namen een kijkje.'});
	cvids_306.push({vid:103182, thumb: 'http://i.ytimg.com/vi/BzVqhgKHa6I/0.jpg', title: 'Cafetaria sluit na te zijn ingebouwd door illegale muur', desc: 'Twee jaar geleden zag de eigenaar van Cafetaria de Pauw in Vlissingen de bui al hangen. Na de bouw van een illegale muur konden klanten zijn zaak nauwelijks meer vinden en liep de omzet hard terug. Na twee jaar geld in het verliesgevende cafetaria te hebben gepompt houden Gamal Fathi en zijn vrouw het voor gezien. Vier personeelsleden staan op straat. Fathi is voornamelijk boos op de gemeente Vlissingen die niets aan de illegale muur heeft gedaan.'});
	cvids_306.push({vid:100559, thumb: 'http://i.ytimg.com/vi/dAIlpwjTs2E/0.jpg', title: 'Misset Horeca Live editie 47', desc: 'Dit is de wekelijkse nieuwsshow Misset Horeca Live van www.missethoreca.nl. In deze uitzending: Cafetaria omzet stijgt explosief na serie New Kids, Kamerprimeur voor Radisson Blu Amsterdam en een toptip over wijn.'});
	cvids_306.push({vid:100558, thumb: 'http://i.ytimg.com/vi/lCu_YkMlMxE/0.jpg', title: 'SBS 6 - Proef het voorjaar - IJsvak 2010', desc: 'De meesten van ons kunnen het woord ijs niet meer horen. Iedereen verlangt nu wel naar de lente. En terwijl buiten de laatste restjes wegsmelten, hebben ze het in de Amsterdamse RAI over niets anders dan ijs. Citroenijs, straciatella of gewoon roomijs, op de vakbeurs voor ijsspecialisten kan je het voorjaar al proeven. Hart van Nederland (SBS 6), 28 februari 2010.'});
	cvids_306.push({vid:95533, thumb: 'http://i.ytimg.com/vi/0ZWAZNFBGok/0.jpg', title: 'Ijssalon video uit kaapjourmaal', desc: ''});
	cvids_306.push({vid:95532, thumb: 'http://i.ytimg.com/vi/cP6YMGPgJyU/0.jpg', title: 'Kwalitaria de dirigent', desc: 'De Dirigent op omroep flevoland!'});
	cvids_306.push({vid:95529, thumb: 'http://i.ytimg.com/vi/Eb3rA0BbnOo/0.jpg', title: 'Herman Brood + Cora van Mora', desc: 'Leuk stukje reclame.'});
	cvids_306.push({vid:95513, thumb: 'http://i.ytimg.com/vi/iJleU-jzCQQ/0.jpg', title: 'Beckers reclame (Sjef van Oekel) uit de jaren 90 (Nederlands)', desc: 'Beckers commercial (Sjef van Oekel) from the 90s (Dutch)'});
	cvids_306.push({vid:89322, thumb: 'http://i.ytimg.com/vi/up5DXjdZeko/0.jpg', title: 'duurzaamste fastservicebedrijf', desc: 'een kort verslag van de uitreiking van de verkiezing van het duurzaamste fastservice bedrijf van Nederland'});
	cvids_306.push({vid:89318, thumb: 'http://i.ytimg.com/vi/E1mc03MZfEQ/0.jpg', title: 'Jarige frikandellenfabrikant Beckers komt met snack van kwart meter', desc: 'Op 12 januari 2010 beleefden de bezoekers van de Horecava een primeur: tijdens een persconferentie in de RAI presenteerden de gebroeders Beckers, uitvinders van de frikandel, hun nieuwste vondst. De Mammoet is een 26cm lange snack met een eigen saus, die vanaf februari alleen verkrijgbaar is bij cafetaria\'s in heel Nederland.'});
	cvids_306.push({vid:84508, thumb: 'http://i.ytimg.com/vi/-F4t8zL6F0c/0.jpg', title: 'Man Drinking Fat. NYC Health Anti-Soda Ad. Are You Pouring on the Pounds?', desc: 'For a discussion of this video and more information on the topic, visit us on Facebook: www.facebook.com Tell us what you think of this video by taking a short survey at www.nyc.gov Disgusted? Most people don\'t realize how easy it is to gain weight from drinking sugary sodas, juice drinks, sport drinks and sweetened tea and coffee drinks. Just one 20-ounce bottle of soda can pack 250 calories and more than 16 teaspoons of sugar. Is the lemon-flavored iced tea any better? Not by much with 210 ...'});
	cvids_306.push({vid:82775, thumb: 'http://ak2.static.dailymotion.com/static/video/722/261/19162227:jpeg_preview_large.jpg?20091207145217', title: 'Misset Horeca Live 09-12-09 Ratelband', desc: 'Dit is de wekelijkse nieuwsshow Misset Horeca Live van www.missethoreca.nl. In deze scene: fastfoodondernemer Emile Ratelband.'});
	cvids_306.push({vid:82774, thumb: 'http://i.ytimg.com/vi/wHGSk6FrLAQ/0.jpg', title: 'Ben And Jerry\'s Scoop-A-Thon', desc: 'To celebrate the arrival of Ben \& Jerrys Down Under and to mark the grand opening of the Manly Scoop Shop, Ben \& Jerrys held a 12 hour legendairy Scoop-a-thon on Saturday 28th November from 10am 10pm. 14400 scoops of ice cream were given out in the sweet celebration, with Ben \& Jerry themselves scooping up to the public and announcing the winner of the flavour naming competition to find a distinctly Australian name for a lip-smacking mix of globs of peanut butter cookie dough and peanut ...'});
	cvids_306.push({vid:81763, thumb: 'http://i.ytimg.com/vi/0Bmv8wvyhFI/0.jpg', title: 'NYC McDonald\'s Serves Up Style', desc: 'Bianca Solorzano spoke with McDonald\'s owner Paul Hendel about his stylishly redesigned New York City restaurant.'});
	cvids_306.push({vid:74511, thumb: 'http://ak2.static.dailymotion.com/static/video/777/152/18251777:jpeg_preview_large.jpg?20091020140251', title: 'Misset Horeca Live 20-10-09 Cafetaria Top 100', desc: 'Dit is de wekelijkse nieuwsshow Misset Horeca Live van www.missethoreca.nl. In deze scene een interview met de winnaar van de Cafetaria Top 100.'});
	cvids_306.push({vid:74505, thumb: 'http://i.ytimg.com/vi/Cl4APqBZjbw/0.jpg', title: 'Smulhuis - D\u00e9 beste cafetaria', desc: 'Cafetaria \'t Smulhuis uit Brunssum is eerste geworden bij de verkiezing van beste cafetaria\'s van Nederland. Interview met Lindsey Terwint, chefkok van Cafetaria (en Restaurant) \'t Smulhuis. De prijs werd maandagavond uitgereikt. De Cafetaria Top 100 wordt jaarlijks samengesteld op basis van mystery-bezoeken door vakblad De Snackkoerier. Onderzoekers stappen de snackbar binnen zonder dat vooraf aan te kondigen. Het Smulhuis uit Brunssum werd vorig jaar tweede bij de verkiezing. Maar dit jaar ...'});
	cvids_306.push({vid:74498, thumb: 'http://ts.vimeo.com.s3.amazonaws.com/316/737/31673763_640.jpg', title: 'FrikandelTV: De Neude', desc: 'FrikandelTV nam een bezoekje aan Utrecht\'s populairste snackbar De Neude. www.frikandeltest.nl'});
	cvids_306.push({vid:57920, thumb: 'http://i.ytimg.com/vi/qfDt-qo4hXk/0.jpg', title: 'GPTV:Geen computers, wel fietsen in Sneker gracht', desc: 'In de nacht van de Hardzeildag in de Sneekweek kreeg de plaatselijke ijssalon van Min12 ongewenst bezoek. Er waren geen braaksporen. De eigenaar gaat er van uit dat de dieven zijn binnengekomen met een valse sleutel. Inbrekers uit de eigen omgeving? Getuigen hebben mensen gezien. Inmiddels is al een 22-jarige vrouw uit Sneek aangehouden, maar na verhoor weer vrijgelaten. De computer met beelden van de beveiligingscamera\'s zijn door de dieven meegenomen. Kortom een inbraak met heel ...'});
	cvids_306.push({vid:56794, thumb: 'http://i.ytimg.com/vi/9V-yphI7JPk/0.jpg', title: 'Coke\'s New Soda Machine (aka: Freestyle)', desc: 'This is a new soda machine that Coke is testing out in a few Jack in the Boxes in Southern California. It has over 100 types of flavors.'});
	cvids_306.push({vid:56793, thumb: 'http://i.ytimg.com/vi/rBmKmoaH4M0/0.jpg', title: 'Bram Ladage Verse Patat', desc: ''});
	cvids_306.push({vid:56792, thumb: 'http://i.ytimg.com/vi/tD2g_7P8JDE/0.jpg', title: 'Reacties Cafetaria Top 100 van Snackkoerier', desc: 'Hoofdredacteur Martijn Reintjes geeft antwoord op vragen over de Cafetaria Top 100, de ranglijst met honderd beste cafetaria\'s van Nederland samengesteld door Snackkoerier (www.snackkoerier.nl).'});
	cvids_306.push({vid:56791, thumb: 'http://i.ytimg.com/vi/cP6YMGPgJyU/0.jpg', title: 'Kwalitaria de dirigent', desc: 'De Dirigent op omroep flevoland!'});
	cvids_306.push({vid:56648, thumb: 'http://images.vimeo.com/20/57/89/205789693/205789693_200.jpg', title: 'Commercial ijssalon min12 Leeuwarden', desc: 'Commercial voor ijssalon min12 Leeuwarden.\nUitgezonden in de zomer van 2008 op regionale tv zender Omrop Fryslan.'});
	cvids_306.push({vid:56644, thumb: 'http://i.ytimg.com/vi/PVseupL98UU/0.jpg', title: 'Maashopper \& IJssalon Clevers in Arcen - www.uitinlimburg.nl', desc: 'Maashopper \& IJssalon Clevers in Arcen - toerisme Limburg, www.uitinlimburg.nl'});
	cvids_306.push({vid:56633, thumb: 'http://ak2.static.dailymotion.com/static/video/827/376/15673728:jpeg_preview_large.jpg?20090519100301', title: 'Misset Horeca Live 16, Vitaria Eeterji Family', desc: 'Vitaria Eeterij Family zet in op vers en gezond. '});
	cvids_306.push({vid:56632, thumb: 'http://images.vimeo.com/24/77/99/247799480/247799480_200.jpg', title: 'FrikandelTV: Snackbar De Baron', desc: 'De recensenten van FrikandelTest.nl brachten een onverwachts bezoekje aan Snackbar De Baron, gelegen in hartje Utrecht.'});
	cvids_306.push({vid:56631, thumb: 'http://i.ytimg.com/vi/7lNBN6Mksek/0.jpg', title: 'Cafetaria Succes sluit de deuren', desc: 'Menig Groninger heeft er wel eens kroket gegeten: cafetaria Succes in de stad. Na meer dan 60 jaar sluit deze cafetaria de deuren.'});
	cvids_306.push({vid:56630, thumb: 'http://ts.vimeo.com.s3.amazonaws.com/197/856/19785637_640.jpg', title: 'Cafetaria de Grote Beer, Zwijndrecht', desc: 'De Horeca Ondernemers Adviseur staat beide dames bij in de verhuizing van de zaak en draagt bij tot een continuiteit in de bedrijfsvoering'});
	cvids_306.push({vid:56629, thumb: 'http://www.dik.nl/util/fetchurl?http%3A%2F%2F3.gvt0.com%2FThumbnailServer2%3Fapp%3Dvss%26contentid%3D6ce168afb70e3637%26offsetms%3D60000%26itag%3Dw160%26hl%3Dnl%26sigh%3DKIVFIdl7et50bb04G-omlAzB_Jw', title: 'Vlammetjes!...nieuw in het assortiment bij  \"Het Hoge End ', desc: 'Vlammetjes!...nieuw in het assortiment bij Cafetaria \&quot;Het Hoge End\&quot; Klapstraat 209 in Westervoort.'});
	cvids_306.push({vid:56628, thumb: 'http://i.ytimg.com/vi/Ta-hB4sCPUs/0.jpg', title: 'Waardenberg \& de Jong - Snackbar', desc: 'Clip uit het programma Bandkaai 1996 - HAAL JE TOCH DE POLITIE D\'R BIJ!'});
	cvids_306.push({vid:56220, thumb: 'http://i.ytimg.com/vi/4Tcbiq55eHo/0.jpg', title: 'Bikini Baristas', desc: 'As part of our Big Story, Small Town segment, we talked to a gentleman who has openend up a coffee shop where the waitresses wear bikinis.'});
	cvids_306.push({vid:56101, thumb: 'http://i.ytimg.com/vi/fbMBnvDc-Gg/0.jpg', title: '1, 2 en 3 van Cafetaria Top 100 2008', desc: 'Verslag van de beste drie uit de nieuwe Cafetaria Top 100 van Snackkoerier (www.snackkoerier.nl of www.cafetariatop100.nl).'});
	cvids_306.push({vid:56099, thumb: 'http://i.ytimg.com/vi/sRvG6IqyIEg/0.jpg', title: 'Winnaars Awards Cafetaria Top 100 2008', desc: 'Videoverslag met alle awardwinnaars van de Cafetaria Top 100 van Snackkoerier (www.snackkoerier.nl).'});
	cvids_306.push({vid:56094, thumb: 'http://i.ytimg.com/vi/wPBJnRhP5Xg/0.jpg', title: 'Cafetaria Top-100 van Snackkoerier', desc: 'De uitreiking van de Cafetaria Top-100 van Snackkoerier (www.snackkoerier.nl) vond plaats in oktober 2007.'});
	cvids_306.push({vid:56093, thumb: 'http://i.ytimg.com/vi/6Btr3_pPcqQ/0.jpg', title: 'Sfeerverslag Cafetaria Top 100 2008', desc: 'Sfeerverslag van de Cafetaria Top 100 van Snackkoerier (www.snackkoerier.nl) gehouden op 20 oktober 2008 in Locomotion in Zoetermeer.'});
	cvids_306.push({vid:55967, thumb: 'http://i.ytimg.com/vi/KG5FtZucb5s/0.jpg', title: 'Microondas port\u00e1til. Beanzawave from Heinz.', desc: 'Heinz cria o menor microondas do mundo. E o melhor: Voc\u00ea pode conect\u00e1-lo em seu Laptop atrav\u00e9s de alimenta\u00e7\u00e3o de energia via cabo usb.'});
	cvids_306.push({vid:55966, thumb: 'http://i.ytimg.com/vi/Bg5pCshpKPw/0.jpg', title: 'de Snackbar', desc: 'de Snackbar'});
	cvids_306.push({vid:52231, thumb: 'http://123image.123video.nl/393/393558_t.jpg', title: 'where are my frites ??', desc: ''});
	cvids_306.push({vid:52230, thumb: 'http://ak2.static.dailymotion.com/static/video/627/760/16067726:jpeg_preview_large.jpg?20090720143605', title: 'How to grill the perfect burger over charcoal', desc: 'What\'s better than a thick, juicy burger fresh off a charcoal grill? Elias Iglesias, executive chef of Morton\u2019s, The Steakhouse, shares one of his delicious burger recipes and tips for grilling on a charcoal grill.'});
	cvids_306.push({vid:52229, thumb: 'http://123image.123video.nl/407/407086_t.jpg', title: 'Try Before You Die -Ruben Nicolai vs hamburger new york compleet', desc: ''});
	cvids_306.push({vid:52228, thumb: 'http://ak2.static.dailymotion.com/static/video/758/286/15682857:jpeg_preview_large.jpg?20090519212911', title: 'What do Starbucks and Wal-Mart have in common?', desc: 'Sign the memo at http://stopstarbucks.com and help us reach 50k signatures. Then send this video to your friends and family and post it on your Facebook page. Both corporate giants have long track records of harassing their workers when it comes to joining unions. Harassment and intimidation are illegal under Federal law, and we won\'t stand for it. Tell Howard Schultz, Starbucks\' billionaire owner, to respect the people who work for Starbucks.  In 2005, we took on Wal-Mart for their assault on workers with Wal-Mart: The High Cost of Low Price. Now we are exposing Starbucks\' atrocious labor practices in our newest campaign, Stop Starbucks.  Tell us YOUR Starbucks story at http://stopstarbucks.com.'});
	cvids_306.push({vid:52225, thumb: 'http://123image.123video.nl/562/562592_t.jpg', title: 'Starbucks opent deuren op Utrecht Centraal', desc: ''});
	cvids_306.push({vid:52223, thumb: 'http://i.ytimg.com/vi/CwYxuV2dVzw/1.jpg', title: '171 Starbucks', desc: 'Comedian/Filmmaker Mark Malkoff attempts to visit 171 Starbucks stores in Manhattan in one day. He must make a purchase at every store and consume part of the product.'});
	cvids_306.push({vid:52222, thumb: 'http://10.media.vimeo.com/d1/5/46/41/thumbnail-4641491.jpg', title: 'Kentucky Friend Chicken and the Pope', desc: 'The Ointment\'s Mary Manofsky travels to the Vatican to ask the Pope about his relationship with Kentucky Fried Chicken.'});
	cvids_306.push({vid:52218, thumb: 'http://123image.123video.nl/428/428670_t.jpg', title: 'Hamburgerparfum erg populair', desc: ''});
html+='<div id="thumb_306" style="width:407px;overflow:hidden;height:336px;background-color:#FFFFFF;position:relative;float:left;">';
html+=vidthumbhtml_306(curvid_306);
html+='</div>';
	html +='<div style="height:26px;width:126px;position:absolute;right:5px;">';
		//html +='<img onclick="showmatrix_306(0);" style="position:absolute;left:66px;top:1px;cursor:pointer;margin:0;padding:0;" src="http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/iconmatrix24.png" title="overzicht van alle videos"/>';
		html +='<img id="pgprev_306" onclick="gotopageoffset_306(-1);" style="position:absolute;left:0px;top:1px;cursor:pointer;margin:0;padding:0;" src="http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/iconprev24.png" onmouseover="oMouEv(this,true);" onmouseout="oMouEv(this,false);" title="blader terug"/>';
		//html +='<img onclick="playstop_306();" style="position:absolute;left:5px;top:20px;cursor:pointer;margin:0;padding:0;" src="http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/iconstop24.png" title="stop"/>';
		//html +='<img onclick="playstart_306();" style="position:absolute;left:5px;top:30px;cursor:pointer;margin:0;padding:0;" src="http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/iconplay24.png" title="afspelen"/>';
		html +='<img id="pgnext_306" onclick="gotopageoffset_306(1);" style="position:absolute;left:66px;top:1px;cursor:pointer;margin:0;padding:0;" src="http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/iconnext24.png" onmouseover="oMouEv(this,true);" onmouseout="oMouEv(this,false);"  title="blader verder"/>';
		html +='<div style="position:relative;top:54px; width:124px; margin:0px 0px 0px 0px;height:280px;overflow:hidden;border:1px solid #ddd;background-color:#fff" id="mxsoutline_306">';
			html+='<div id="mxs_306"  style="position:absolute;top:0px;background-color:#ffffff;"></div>';
			html+='<div id="mxs2_306" style="position:absolute;top:0px;background-color:#ffffff;"></div>';	// videolist placeholder
		html +='</div>';
	html +='</div>';
	html+='<div style="height:26px;width:100px;position:absolute;bottom:8px;left:0px;">';
	html+='<a target=_blank href="http://www.dik.nl/"><img style="position:absolute;left:0px;top:3px;height:25px;z-index:5;cursor:pointer;margin:0;padding:0;" border=0 src="http://incdn.s3.amazonaws.com/dikp_v1/img/project/dik/logo.png"></a>';
			//html +='<a target=_blank href="http://www.dik.nl/channel/player/5385/first"><div style="position:absolute;left:70px;top:9px;color:#444;font-size:11px;line-height:10px;cursor:pointer;width:185px;height:20px;overflow:hidden;" >powered by dik.nl</div></a>';
					html +='<img onclick="toggleembed_306();" src="http://www.dik.nl/img/icon_share30.png" style="cursor:pointer;position:absolute;left:384px;top:0px;" title="share or embed" alt="share or embed">';
				html +='<a style="text-decoration:none" target=_blank href="http://www.dik.nl/channel/player/5385/first"><div style="position:absolute;left:70px;top:3px;color:#444;font-size:11px;line-height:10px;cursor:pointer;width:185px;height:22px;overflow:hidden;" ><span style="color:#888;">Je kijkt naar het kanaal</span><br/>Snackkoeriers favoriete video\'s</div></a>';
		html+='</div>';
	
	html+='</div></div>';	// margin and innerflash
	html+='<iframe src="http://www.dik.nl/util/ustat" width="0" height="0" border="no" frameborder="0"  style="border:0; visibility: hidden;"></iframe>';
	wgElm_306.innerHTML=html;
	wgElm_306.style.display = 'block';

	gotopage_306(matrix_curpg);	// 1
		
}

function playnext_306() {
	if (curvid_306 < cvids_306.length -1 ) {
		curvid_306++;
		if (cpvideo_306)
			playstart_306();	// we are playing video
		else {
			var thumbdiv=document.getElementById('thumb_306');
			thumbdiv.innerHTML=vidthumbhtml_306(curvid_306);
		}
	}
}
function playprev_306() {
	if (curvid_306 >0 ) {
		curvid_306--;
		if (cpvideo_306)
			playstart_306();	// we are playing video
		else {
			var thumbdiv=document.getElementById('thumb_306');
			thumbdiv.innerHTML=vidthumbhtml_306(curvid_306);
		}
	}
}

// play video in video window
function playstart_306(vnr) {
	closepopup_306();	// close popup (if open)
	if (vnr==null)
		vnr=curvid_306;
	else
		curvid_306=vnr;	// set the current
	var thumbdiv=document.getElementById('thumb_306');
	thumbdiv.innerHTML='<div></div>';
	thumbdiv.style.background='#FFF url(http://incdn.s3.amazonaws.com/dikp_v1/img/spinner32.gif) no-repeat 173.5px 138px';
	thumbdiv.innerHTML='<iframe name="playerframe" class="playerframe" src="http://www.dik.nl/widget/playvideo/'+cvids_306[vnr].vid+'/407/336/L/W" width="407" height="336" frameborder="0" scrolling="no" allowtransparency="true"></iframe>';
	cpvideo_306=true;
}

// show large thumb video still
function playstop_306(vnr) {
	if (vnr==null)
		vnr=curvid_306;
	else
		curvid_306=vnr;	// set the current
	cpvideo_306=false;
	var thumbdiv=document.getElementById('thumb_306');
	thumbdiv.innerHTML=vidthumbhtml_306(vnr);
}

// big thumbnail / player window
function vidthumbhtml_306(vnr) {
	var html='';
	//th: 407 x 336  it: 407 x 274 t= -16 nrdesclines=2 
html+='<div style="width:407px;height:274px; overflow:hidden; position:absolute;left:0px;top:0px;">';
html+='<img src="'+cvids_306[vnr].thumb+'" style="width:407px;height:305.25px;top:-16px;left:0px;position:relative;">';
html+='</div>';
html+='<div style="width:397px;height:62px;position:absolute;left:0px;bottom:0px;background-color:#BBB;padding:5px;"><div style="overflow:hidden;height:52px;"><div style="white-space:nowrap; margin: 2px 3px; font-size:16px;color:#555555;">'+htmlspecialchars(cvids_306[vnr].title)+'</div><div style="margin: 2px 5px; font-size:13px;line-height:13px;color:#ffffff;overflow:hidden;height:27px;"  title="'+htmlspecialchars(cvids_306[vnr].desc)+'">'+htmlspecialchars(cvids_306[vnr].desc)+'</div><div style="padding: 3px 5px; letter-spacing:1px; background-color: #BBB; color: #333;font-size: 10px; position: absolute; right: 0px; top: -14px; ">'+(vnr+1)+'/'+(cvids_306.length)+'</div></div></div>';
html+='<div style="position: absolute; width:100px;height:100px;top:118px;left:154px;z-index:200;cursor:pointer;cursor:hand;background:url(http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/videoplay100.png) no-repeat;" onClick="playstart_306();"></div>';
	return html;
}

function visspb(vnr,show) {
	el = document.getElementById('spbid'+vnr);
	if (el) {
		el.style.display = show ? 'block':'none';  
	} 
	if (show && !cpvideo_306)
		playstop_306(vnr);
}

// thumbs rechts
function vidthumbhtmlSmall_306(vnr) {
	var html='';
	html='';
				html+='<div style="margin: 0px; float: left; position: relative; width: 124px; height: 92px;">';
				html+='<div style="width:104px;max-height:58px;background:#f6f6f6;margin:13px auto 0px auto;overflow:hidden;position:relative;">';
				html+='<div style="width:104px;height:58px;background:#cccccc;border:0px solid #dedede;overflow:hidden;position:relative;"  onmouseover="visspb('+vnr+',true);" onmouseout="visspb('+vnr+',false);" >';
						html+='<img style="position:absolute;width:104px;height:78px;top:-10px;left:0;cursor: pointer;" onclick="playstart_306('+vnr+')" title="'+htmlspecialchars(cvids_306[vnr].desc)+'" src="'+cvids_306[vnr].thumb+'" />';
						html+='<div id="spbid'+vnr+'" style="display:none; position: absolute; width:20px;height:20px;top:20px;left:40px;z-index:200;cursor:pointer;cursor:hand;background:url(http://incdn.s3.amazonaws.com/dikp_v1/img/widget/chart2/videoplay20.png) no-repeat;" onclick="playstart_306('+vnr+')"></div>';
					html+='</div>';
				html+='</div>';
				html+='<div style="position: absolute; bottom: 0px; left: 10px;padding:0 0 4px 0;width:104px;height:15px;z-index:200;color:#555;font-size:11px;overflow:hidden;white-space: nowrap;cursor: pointer;" >'+htmlspecialchars(cvids_306[vnr].title)+'</div>';
			html+='</div>';
		return html;
}

// cp 1..npages
function paginationhtml_306(cp,npages) {
	if (npages<=1)
		return '';	// empty if no pagination..
	var html='';
	html+='<div class="pages">';
	if (cp>1) {
		// we CAN prev!
		html+= '<span class="pageblock" onclick="gotopage_306('+(cp-1)+');">&#171; Previous</span>';
	}
	else {
		html+= '<span class="pageblock_disabled">&#171; Previous</span>';
	}
	// Available pages - Link
	var lpage = 1;
	var cpageSur = 2;
	var dotted = false;
	for (var lpage=1;lpage<=npages;lpage++) {
		// 1-2...8-9-[10]-11-12....58-59 
		if ( lpage<=2 || (lpage>=cp-4 && lpage<=cp+4) || lpage>=npages-1) {
			dotted = false;	// we need to dot afterwards
			if (lpage == cp )
				html+='<span class="pageblock_curpage"><b>'+lpage+'</b></span>';
			else
				html+='<span class="pageblock" onclick="gotopage_306('+lpage+');">'+lpage+'</span>';
		}
		else {
			// no printing.. buttt maybe we need to dot
			if ( !dotted ) {
				html+='<span class="pageblock_dots">&nbsp;...&nbsp;</span>';
				dotted = true;
			}
		}
	}
		
	// Next page - Link
	if ( cp<npages )
		html+='<span class="pageblock" onclick="gotopage_306('+(cp+1)+');">Next &#187;</span>';
	else
		html+='<span class="pageblock_disabled">Next &#187;</span>';
	html+='</div>';
	return html;
}

function vidplayurl_306(vnr) {
	if (vnr==null)
		vnr=curvid_306;
	return 'http://www.dik.nl/channel/player/5385/'+cvids_306[vnr].vid;
}

// find absolute top loc of object
function vp_offsetTop(obj) {
    curtop = 0;
    if (obj.offsetParent) {
    curtop = obj.offsetTop
    while (obj = obj.offsetParent) {
      curtop += obj.offsetTop
    }
  }
  return curtop;
}

function vp_offsetLeft(obj) {
  curtop = 0;
  if (obj.offsetParent) {
    curtop = obj.offsetLeft;
    while (obj = obj.offsetParent) {
      curtop += obj.offsetLeft;
    }
  }
  return curtop;
}


function closepopup_306() {
  el = document.getElementById('ipopup_306');
  if (el) {
    el.parentNode.removeChild(el);
  } 
}

//
// getPageScroll()
// Returns array with x,y page scroll values.
// Core code from - quirksmode.org
//
function getPageScroll(){

	var yScroll;

	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
	}

	arrayPageScroll = new Array('',yScroll) 
	return arrayPageScroll;
}



//
// getPageSize()
// Returns array with page width, height and window width, height
// Core code from - quirksmode.org
// Edit for Firefox by pHaez
//
function getPageSize(){
	
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}


	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}

//------------------------------------ button handlers --------------------------------------
function stButImg(oBut) {
	if (oBut.id == 'pgnext_306') { 
		if (matrix_curpg>=matrix_npages)
			oBut.src = img2_d.src;
		else
			oBut.src= butnext_mousein ? img2_ov.src : img2_ou.src;
	}
	if (oBut.id == 'pgprev_306') { 
		if (matrix_curpg<=1)
			oBut.src = img1_d.src;
		else
			oBut.src= butprev_mousein ? img1_ov.src : img1_ou.src;
	}
}

function oMouEv(oBut,mouseIn) {
	
	if (oBut.id == 'pgnext_306') 
		butnext_mousein=mouseIn;
	if (oBut.id == 'pgprev_306') 
		butprev_mousein=mouseIn;
	stButImg(oBut);
}

//----------------------------------------- pagination -------------------------------------

function initpage_306() {
	matrix_npages= Math.ceil(cvids_306.length / matrix_itemspp);
}

function gotopage_306(pg) {
		
	if (!matrix_npages)
		initpage_306();
	if (pg<1)
		pg=1;
	if (pg>matrix_npages)
		pg=matrix_npages;
		
	oldpg=matrix_curpg;
	matrix_curpg=pg;
	var mxs=document.getElementById('mxs_306');
	var mxs2=document.getElementById('mxs2_306');
	//if (!mxs)	
	//	alert('mxs_306 niet gevonden');
	var html='';
	for (var i=(matrix_curpg-1)*matrix_itemspp,cv=0;i<cvids_306.length && cv<matrix_itemspp;i++) {
		html+=  vidthumbhtmlSmall_306(i);
		cv++;
	}
	//html+=  '<div style="clear:both;"></div>';
	//if (matrix_npages>1) {
	//	html+=  '<div style="margin:10px 0px">'+paginationhtml_306(matrix_curpg, matrix_npages)+'</div>';
	//}
	if (oldpg<pg) {
		// stop old motions if busy
		if (tween1)	
			tween1.stop(); 
		if (tween2)
			tween2.stop();
		// tween UP
		(tweenflip?mxs2:mxs).innerHTML=html;	// put that in the NEW (to be shifted in) mxs
		// and start the tweens...
		// todo
		tween1 = new Tween((tweenflip?mxs2:mxs).style,'top',Tween.strongEaseOut,278,0      ,1,'px');
		tween1.start();
		tween2 = new Tween((tweenflip?mxs:mxs2).style,'top',Tween.strongEaseOut,0  ,-278 ,1,'px');
		tween2.start();
		tweenflip=!tweenflip;
		//mxs.innerHTML=html;
	}
	else if (oldpg>pg) {
		// tween down
		if (tween1)	
			tween1.stop(); 
		if (tween2)
			tween2.stop();
		(tweenflip?mxs2:mxs).innerHTML=html;	// put that in the NEW (to be shifted in) mxs
		// and start the tweens...
		// todo
		tween1 = new Tween((tweenflip?mxs2:mxs).style,'top',Tween.strongEaseOut,-278,0   ,1,'px');
		tween1.start();
		tween2 = new Tween((tweenflip?mxs:mxs2).style,'top',Tween.strongEaseOut,0   ,278   ,1,'px');
		tween2.start();
		tweenflip=!tweenflip;
	}
	else {
		(tweenflip?mxs:mxs2).innerHTML=html;
	}
	
	
	
	// disable/enable next/prev buttons
	el = document.getElementById('pgnext_306');
	if (el) 
		stButImg(el); // update nextbutton state

	el = document.getElementById('pgprev_306');
	if (el) 
		stButImg(el); // update prevbutton state
}

function gotopageoffset_306(offset) {	// 1 or -1
	if (matrix_npages==0)
		initpage_306();
	if (matrix_curpg+offset<0 || matrix_curpg+offset>matrix_npages) {
		gotopage_306(matrix_curpg);
		return 0;
	}
	gotopage_306(matrix_curpg+offset);
	return 1;
}

function showmatrix_306() {
	// close old one
	closepopup_306();

	matrix_npages= Math.ceil(cvids_306.length / 16);
	
	// open new
	var popup_div = document.createElement('div');
	var title='matrix';
	popup_div.id = "ipopup_306";
	popup_div.style.position = 'absolute';
	popup_div.style.border = 'none';
	var base_width=172*4+25;

	var base_height=100*4+30+10+4;
	if (matrix_npages>1) 
		base_height+=30;
	popup_div.style.width = base_width+'px';
	popup_div.style.height = base_height+'px';
	popup_div.style.fontFamily='Trebuchet MS,Lucida Sans Unicode,Lucida Grande,Lucida Sans,Tahoma,Geneva,Arial,helvetica,sans-serif';
	popup_div.style.zIndex = '10000';

	// CENTER SCREEN
	var arrayPageSize = getPageSize();
	var arrayPageScroll = getPageScroll();
	var popup_top = arrayPageScroll[1] + ((arrayPageSize[3] -base_height) / 2);
	var popup_left = arrayPageScroll[0] +((arrayPageSize[0] - base_width) / 2);
	if (popup_top<0)
		popup_top=0;
	if (popup_left<0)
		popup_left=0;
	popup_div.style.position = 'absolute';
	popup_div.style.top = popup_top + 'px';
	popup_div.style.left = popup_left + 'px';


	
	var vid_html='';
	vid_html+='<div style="padding:0px;position:relative;border:2px #CCC solid;background-color:white;width:'+(base_width-4)+'px;height:'+(base_height-4)+'px;">';
	vid_html+='<br style="display:none;"/><style type="text/css">	\
		.pages {padding:2px 0 2px 8px; margin:0; clear:both;font-size:12px;} \
			.pages span.pageblock {border: 1px solid #888; color:#000; height: 12px; padding: 3px 6px;margin: 0px 4px 0px 0px;cursor: pointer;cursor:hand;}\
			.pages span.pageblock:hover {color:#D10101;text-decoration:underline;}	\
			.pages span.pageblock_disabled {border: 1px solid #888; color: #aaa; height: 12px; padding: 3px 6px;margin: 0px 4px 0px 0px;}\
			.pages span.pageblock_dots {border: 0px solid #888; color: #000; height: 12px; padding: 3px 6px;margin: 0px 4px 0px 0px;}\
			.pages span.pageblock_curpage {border: 1px solid #888; color: #aaa; height: 12px; padding: 3px 6px;margin: 0px 4px 0px 0px;}\
		</style>';
	vid_html+=	'<div onclick="closepopup_306();" style="position:absolute;top:7px;right:8px;cursor:pointer;cursor:hand;background:url(http://www.dik.nl/img/icon_bw_close22.png) no-repeat;width:24px;height:24px;z-index:10000;"></div>';
	vid_html+=	'<div style="position:absolute;top:8px;left:15px;color:#888;font-size:15px;overflow:hidden;width:'+(base_width-50)+'px;">Snackkoeriers favoriete video\'s</div>';
	vid_html+=	'<div style="margin:30px 10px 10px 10px;" id="mxs_306">';
	// for (var i=0,cv=0;i<cvids_306.length && cv<16;i++) { 
	// 		vid_html+=  vidthumbhtmlSmall_306(i);
	// 		cv++;
	// 	}
	// 	vid_html+=  '<div style="clear:both;"></div>';
	// 
	// 	if (matrix_npages>1) {
	// 		vid_html+=  '<div style="margin:10px 0px">'+paginationhtml_306(matrix_curpg, matrix_npages)+'</div>';
	// 	}
	vid_html+=	'</div>';
	vid_html+=  '<div style="clear:both;"></div>';
	vid_html+='</div>';
					
	popup_div.innerHTML=vid_html;
	document.body.appendChild(popup_div);
	gotopage_306(matrix_curpg);
}


function closeembed_306() {
  el = document.getElementById('iembed_306');
  if (el) {
    el.parentNode.removeChild(el);
  } 
}
function toggleembed_306() {
	el = document.getElementById('iembed_306');
	if (el) 
		closeembed_306();
	else
		showembed_306();
}

function showembed_306() {
	// close old one
	closeembed_306();
	// open new
	var popup_div = document.createElement('div');
	var title='embed';
	popup_div.id = "iembed_306";
	popup_div.style.position = 'absolute';
	popup_div.style.border = 'none';
	var base_width=520;

	var base_height=90;
	popup_div.style.width = base_width+'px';
	popup_div.style.height = base_height+'px';
	popup_div.style.fontFamily='Trebuchet MS,Lucida Sans Unicode,Lucida Grande,Lucida Sans,Tahoma,Geneva,Arial,helvetica,sans-serif';
	popup_div.style.zIndex = '10000';
	popup_div.style.position = 'absolute';
	popup_div.style.bottom = '38px';
	popup_div.style.left = '10px';


	
	var vid_html='';
	vid_html+='<div style="width:510px; height:'+(base_height-10).toString()+'px; border:3px solid #BBB;padding:5px; background-color:#fff;color:#000;">';
	vid_html+='<div onclick="closeembed_306();" style="position:absolute;top:7px;right:0px;cursor:pointer;cursor:hand;background:url(http://www.dik.nl/img/icon_bw_close22.png) no-repeat;width:24px;height:24px;z-index:10000;"></div>';
	vid_html+='<div style="font-face:Arial, Helvetica;font-size:10px; margin:10px 0 0 0;">';
	vid_html+='<div style="padding-bottom:3px;"><div style="float:left;width:40px;">URL:</div><input type="text" onclick="this.focus();this.select();" style="border: 0pt none ; background-color: #ccc; width: 440px; font-size: 9px; height: 15px;" value="http://www.dik.nl/channel/player/5385/first"></div>';
	vid_html+='<div style=""><div style="float:left;width:40px;">Embed:</div><textarea rows=2 cols=100 onclick="this.focus();this.select();" style="border: 0pt none ; background-color: #ccc; width: 440px; font-size: 9px; height: 40px;">&lt;div id=&quot;viidoo_solo_92&quot;&gt&lt;/div&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.dik.nl/widget/solojs/5385/92/width:550/height:375/skin:clean&quot;&gt;&lt;/script&gt;</textarea></div>';	
	vid_html+='</div>';

	vid_html+='</div>';	
	popup_div.innerHTML=vid_html;
	
	em = document.getElementById('widget_flash_306');
	if (em) {
    	em.appendChild(popup_div);
	} 
}


// utf8 to string conversions
var escapable = /[\\\"\x00-\x1f\x7f-\uffff]/g,
    meta = {    // table of character substitutions
        '\b': '\\b',
        '\t': '\\t',
        '\n': '\\n',
        '\f': '\\f',
        '\r': '\\r',
        '"' : '\\"',
        '\\': '\\\\'
    };

function utf8quote(string) {
	// If the string contains no control characters, no quote characters, and no
	// backslash characters, then we can safely slap some quotes around it.
	// Otherwise we must also replace the offending characters with safe escape
	// sequences.

    escapable.lastIndex = 0;
    return escapable.test(string) ?
        '"' + string.replace(escapable, function (a) {
            var c = meta[a];
            return typeof c === 'string' ? c :
                '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
        }) + '"' :
        '"' + string + '"';
}




