//solo.js for channel 23415 / widget 2325 / WxH: 425x369 / skin: clean / vid: 0 / autoplay: N / matrix: Y 
// 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
// 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.yubby.com/',	// 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();
var isIE = /MSIE ((5\.5)|[6])/.test(navigator.userAgent) && navigator.platform == "Win32";

var cvids_2325= new Array();	// channelvideo's
var curvid_2325=0;			// first video
var cpvideo_2325=false;		// false=thumb, true=video

// in IE, you need to declare these before the vp_createwg is called, otherwise they do not exist in the onclick context
var matrix_curpg=1;
var matrix_npages=1;


var butnext_mousein=false;
var butprev_mousein=false;
var butplay_mousein=false;
var butstop_mousein=false;
var butmatrix_mousein=false;

var imgNext_ov = new Image;
var imgNext_ou = new Image;
var imgNext_d  = new Image;
imgNext_ov.src="http://www.yubby.com//img/widget/solo/iconnext24ov.png";
imgNext_ou.src="http://www.yubby.com//img/widget/solo/iconnext24.png";
imgNext_d.src ="http://www.yubby.com//img/widget/solo/iconnext24d.png";

var imgPrev_ov = new Image;
var imgPrev_ou = new Image;
var imgPrev_d  = new Image;
imgPrev_ov.src="http://www.yubby.com//img/widget/solo/iconprev24ov.png";
imgPrev_ou.src="http://www.yubby.com//img/widget/solo/iconprev24.png";
imgPrev_d.src ="http://www.yubby.com//img/widget/solo/iconprev24d.png";

var imgPlay_ov = new Image;
var imgPlay_ou = new Image;
var imgPlay_d  = new Image;
imgPlay_ov.src="http://www.yubby.com//img/widget/solo/iconplay24ov.png";
imgPlay_ou.src="http://www.yubby.com//img/widget/solo/iconplay24.png";
imgPlay_d.src ="http://www.yubby.com//img/widget/solo/iconplay24d.png";

var imgStop_ov = new Image;
var imgStop_ou = new Image;
var imgStop_d  = new Image;
imgStop_ov.src="http://www.yubby.com//img/widget/solo/iconstop24ov.png";
imgStop_ou.src="http://www.yubby.com//img/widget/solo/iconstop24.png";
imgStop_d.src ="http://www.yubby.com//img/widget/solo/iconstop24d.png";

var imgMatrix_ov = new Image;
var imgMatrix_ou = new Image;
var imgMatrix_d  = new Image;
imgMatrix_ov.src="http://www.yubby.com//img/widget/solo/iconmatrix24ov.png";
imgMatrix_ou.src="http://www.yubby.com//img/widget/solo/iconmatrix24.png";
imgMatrix_d.src ="http://www.yubby.com//img/widget/solo/iconmatrix24d.png";

var wgElm_2325 = document.getElementById('viidoo_solo_2325');
if (wgElm_2325) {
	vp_createwg();
}

pgstats.addcollect('chid','23415');
pgstats.addcollect('hit','embed');
pgstats.addcollect('widget','solo');
pgstats.xPageHit();

function vp_createwg() {
	// silly IE needs BR
	var html='<br style="display:none;"/><style type="text/css">	\
				.v69resetstyle	{ -moz-box-sizing: content-box !important; } \
				</style>';
	html+='<div id="widget_flash_2325" class="widget_flash v69resetstyle" style="width: 425px;height:369px;overflow:hidden; border: 1px solid #DDDDDD;font-family:Trebuchet MS,Lucida Sans Unicode,Lucida Grande,Lucida Sans,Tahoma,Geneva,Arial,helvetica,sans-serif">';

	cvids_2325.push({vid:104008, thumb: 'http://ts.vimeo.com.s3.amazonaws.com/567/162/56716299_640.jpg', title: 'Vincent Everts pakt de eerste Ipad uit!', desc: 'Vincent Everts pakt de eerste IPad uit  (Bald opinions) '});
	cvids_2325.push({vid:104188, thumb: 'http://i.ytimg.com/vi/pT4EbM7dCMs/0.jpg', title: 'A 2.5 Year-Old Has A First Encounter with An iPad', desc: 'A fascinating UI experiment. My daughter likes playing with my iPhone, but this was her very first encounter with an iPad. As you\'ll see, she took right to it... although she too wonders why it doesn\'t have a camera! More critical comment on her user-interface test here: http://laughingsquid.com/a-2-5-year-old-uses-an-ipad-for-the-first-time/\n\nPS: The spelling apps she uses in the video are FirstWords Animals and FirstWords Vehicles. They\'re great... except for the fact that the splash screen UI is non-intuitive for her. ;-)'});
	cvids_2325.push({vid:103868, thumb: 'http://i.ytimg.com/vi/6Mq2WBXVxyc/0.jpg', title: 'ipad unboxing party part 2: screen opnames', desc: 'new york times, browsen, emailen, gamen, google maps. Werkt allemaal flitsend'});
	cvids_2325.push({vid:103578, thumb: 'http://ats.vimeo.com/558/962/55896285_640.jpg', title: 'PCMag: Apple iPad video review', desc: 'PCMag\'s Tim Gideon takes an in-depth look at Apple\'s first tablet, the iPad, prior to the April 3rd launch. Check out iWork, Maps, iBooks, and other apps and read the full review at www.pcmag.com'});
	cvids_2325.push({vid:103892, thumb: 'http://i.ytimg.com/vi/xej_h-mwzNw/0.jpg', title: 'Ipad Autoweek studie van Sanoma', desc: 'Joris van Heukelom liet tijdens MCA (mobile convention conference) de ipad autoweek studie zien. Een mooi beeld van wat de toekomst van een magazine kan worden. Erg cool.'});
	cvids_2325.push({vid:103753, thumb: 'http://i.ytimg.com/vi/2Q4umyOmwb4/0.jpg', title: 'The ipad up close', desc: 'Macworld editorial director Jason Snell takes a close look at the new Apple ipad. The device is set to go on sale on April 3, 2010.'});
	cvids_2325.push({vid:103749, thumb: 'http://ts.vimeo.com.s3.amazonaws.com/561/512/56151210_640.jpg', title: 'USA TODAY Apple iPad Review by Jefferson Graham | Talking Tech', desc: 'techlive.usatoday.com\nUSA TODAY\'s Jefferson Graham reviews the new Apple iPad on the Talking Tech web video show. Video by David Medill. Produced by Jefferson Graham.\n\nShot and edited by David Medill'});
	cvids_2325.push({vid:103748, thumb: 'http://i.ytimg.com/vi/CMmzWqzfyUY/0.jpg', title: 'Apple ipad (16GB) Tablet Review - CNET Review Apr 2010', desc: 'The good: In an act of aggressive tech convergence, Apple has consolidated your Netbook, e-reader, gaming device, photo frame, and ipod into an elegant, affordable supergadget. Features such as Bluetooth, 802.11n Wi-Fi, movie rentals, 10 hours of battery life, optional 3G wireless, and the most-celebrated App Store on the planet have us pretty worked up. The bad: The ipad\'s large size is as much a hindrance as it is an advantage. As a jack-of-all-trades and a master of few, the ipad can\'t entirely mimic many of the specialized products it seeks to replace. The ipad\'s limited multitasking capabilities and lack of integrated video camera, Flash support, and HD video output already have us pining for next year\'s model. The bottom line: The Apple ipad is the first affordable tablet computer worth owning, but it won\'t (yet) replace your laptop.'});
	cvids_2325.push({vid:103869, thumb: 'http://i.ytimg.com/vi/ZgDJ8fr2ykQ/0.jpg', title: 'Ipad veiling goede doel: @michielslegt krijgt zijn IPAD', desc: 'Hij bood \u20ac2200 voor het goede doel om de 1e ipad in nederland te hebben. Michiel is de eigenaar van Smulweb 2.7 miljoen bezoekers tijdens de paasdagen.'});
	cvids_2325.push({vid:103763, thumb: 'http://i.ytimg.com/vi/4-iEMW_5Ols/0.jpg', title: 'Apple iPad hits stores in the US', desc: 'Lines formed outside the Apple store in New York with customers eager to purchase the product, which is one of the most hotly anticipated devices since the iPhone was launched in 2007.'});
	cvids_2325.push({vid:103757, thumb: 'http://s1.mcstatic.com/thumb/4392032/13629313/4/catalog_item5/0/1/ipad_apps_mail.jpg', title: 'IPad Apps - Mail', desc: 'http://www.ipad-apps.tv - Basic review of Apples Mail App for the Apple iPad.  Join the iPad App discussion at ipad-apps.tv'});
	cvids_2325.push({vid:103754, thumb: 'http://a.images.blip.tv/Vincente-IpadAutoweekStudieVanSanoma187-286.jpg', title: 'Ipad Autoweek studie van Sanoma', desc: 'Joris van Heukelom liet tijdens MCA (mobile convention conference) de ipad autoweek studie zien. Een mooi beeld van wat de toekomst van een magazine kan worden. Erg cool.'});
	cvids_2325.push({vid:103759, thumb: 'http://1.gvt0.com/ThumbnailServer2?app=vss\&contentid=ee85bce5bd3cf0b9\&offsetms=29280\&itag=w160\&hl=en\&sigh=__Puspc1mBSDren32UnXgFW6ugY6w=', title: 'iPad keyboard Dock Review', desc: 'Senior Editor Donald Bell shows off some of the unique functions of the Apple iPad keyboard dock.5min.com'});
	cvids_2325.push({vid:103762, thumb: 'http://ts.vimeo.com.s3.amazonaws.com/563/854/56385487_640.jpg', title: 'ABC iPad Commercial', desc: '\"Next week? That\'s like the worst thing you can say to an early adopter\" - Phil from Modern Family'});
	cvids_2325.push({vid:103756, thumb: 'http://ak2.static.dailymotion.com/static/video/574/204/20402475:jpeg_preview_large.jpg?20100328233526', title: 'Ipad \"Stop Hatin\'\" Commercial', desc: 'Apple releases a new commercial responding to all of the complaints about the new iPad.'});
	cvids_2325.push({vid:103758, thumb: 'http://s.mnstat.com/3853-large.jpg', title: 'Hitler responds to the iPad', desc: 'Hitler from Der Untergang responds to Apple\'s iPad.'});
	cvids_2325.push({vid:91255, thumb: 'http://a.images.blip.tv/Vincente-AppleIPadReviewIsDitHetIetsWatJeMoetHebben476.jpg', title: 'Apple iPad review: is dit het iets wat je moet hebben?', desc: 'Natuurlijk heb ik gisteren gekeken naar de aankondiging van de iPad tijdens de Apple Keynote. Wat wordt er over geschreven? Het is uiteenlopend. Zo zegt Gizmodo dat dit de netbooks en ebooks gaat doen vergeten, maar ze hebben ook 8 redenen waarom de iPad sucks. Ik vind het een mooi apparaat, maar niet echt een must have. Het zal wel redelijk verkopen bij liefhebbers van technologie en gadgets (zoals ik), maar er is volgens mij geen miljoenen publiek voor in Nederland. Die naam - iPad - is trouwens niet zo handig gekozen...daarover in de laatste minuut van mijn review meer.'});
	cvids_2325.push({vid:91223, thumb: 'http://ak2.static.dailymotion.com/static/video/567/871/20178765:jpeg_preview_large.jpg?20100128093004', title: 'iPad: Steve Jobs presents Apple\'s new tablet', desc: 'Apple\'s CEO Steve Jobs gives a live demonstration of the iPad.'});
	cvids_2325.push({vid:93272, thumb: 'http://i.ytimg.com/vi/Jyo96P-SQiM/0.jpg', title: 'Stephen Colbert Pulls Out iPad at the Grammys', desc: 'Stephen Colbert Pulls Out ipad at the Grammy'});
	cvids_2325.push({vid:93271, thumb: 'http://i.ytimg.com/vi/BE47BMe83W8/0.jpg', title: 'Apple iPad hands-on', desc: 'Straight after the unveiling of the ipad on Wednesday, Chris Nuttall got a hands on with the new device backstage with an Apple demonstrator.'});
	cvids_2325.push({vid:91227, thumb: 'http://cdn-thumbs.viddler.com/thumbnail_2_51b063e8.jpg', title: 'ipad', desc: ''});
	cvids_2325.push({vid:92642, thumb: 'http://ll-images.veoh.com/image.out?imageId=media-v19739505M5thM8HZ1264796594.jpg', title: 'APPLE IPAD HANDS ON! AMAZING!!', desc: 'http://tinyurl.com/freeipads , CLICK HERE FOR YOUR FREE IPAD! this video gives a great view of the ipad that is out now!'});
	cvids_2325.push({vid:91226, thumb: 'http://i.ytimg.com/vi/lsjU0K8QPhs/0.jpg', title: 'Ipad Apple from 2007 SO FUNNY Mad Tv - IPad', desc: 'The new Apple IPad '});
	cvids_2325.push({vid:92641, thumb: 'http://ak2.static.dailymotion.com/static/video/939/812/20218939:jpeg_preview_large.jpg?20100129233913', title: 'Apple fighting for iPad trademark: TechVi Now', desc: 'Apple\'s iPad is not even out yet and so far it is the center of a trademark controversy, a feud with Adobe over Flash, and Netflix is putting it on the back burner. In non-Apple news, Microsoft and Amazon pulled in some big bucks last quarter. Find out more on TechVi Now.  Show Notes: 0:07 \u2014 Apple and Fujitsu inevitably caught up in iPad trademark dispute, Engadget 0:33 \u2014 Microsoft gets a Windows 7 boost, CNET News 0:55 \u2014 Adobe calls out Apple iPad, Adobe Flash Platform Blog 1:17 \u2014 The iPad shown to have Flash on Apple video, 9 to 5 Mac 1:27 \u2014 Amazon.com announces Q4 results, BusinessWire 1:38 \u2014 3 million Amazon Kindles sold, apparently, TechCrunch 1:50 \u2014 Netflix CEO says iPad not a priority, Ars TechnicaApple\'s iPad is not even out yet and so far it is the center of a trademark controversy, a feud with Adobe over Flash, and Netflix is putting it on the back burner. In non-Apple news, Microsoft and Amazon pulled in some big bucks last quarter. Find out more on TechVi Now.  Show Notes: 0:07 \u2014 Apple and Fujitsu inevitably caught up in iPad trademark dispute, Engadget 0:33 \u2014 Microsoft gets a Windows 7 boost, CNET News 0:55 \u2014 Adobe calls out Apple iPad, Adobe Flash Platform Blog 1:17 \u2014 The iPad shown to have Flash on Apple video, 9 to 5 Mac 1:27 \u2014 Amazon.com announces Q4 results, BusinessWire 1:38 \u2014 3 million Amazon Kindles sold, apparently, TechCrunch 1:50 \u2014 Netflix CEO says iPad not a priority, Ars Technica  Distributed by Tubemogul.'});
	cvids_2325.push({vid:91225, thumb: 'http://a.images.blip.tv/Shellypalmer-IsApplesIPadAsRevolutionaryAsSteveJobsSaysMediaBytesWi630-281.jpg', title: ' Is Apple\'s iPad as Revolutionary as Steve Jobs Says?: MediaBytes with Shelly Palmer January 28, 2010', desc: 'Apple\'s iPad unveiled.* How do you type on the iPad?* Kindle or iPad?Read more at ShellyPalmer.com\n'});
	cvids_2325.push({vid:91224, thumb: 'http://i.ytimg.com/vi/RP_9o7c9fz4/0.jpg', title: 'iPad Unveiled by Steve Jobs [iPad Touch Tablet]', desc: 'Apple CEO Steve Jobs debuts the much-anticipated Apple tablet. Jobs shows the in\'s and out\'s of the new \"iPad\", starting at 9.'});
	cvids_2325.push({vid:91230, thumb: 'http://ll-images.veoh.com/image.out?imageId=media-v19729157RSEg6dda1264636893.jpg', title: 'Scratch Proof your Apple iPad', desc: 'http://www.ZAGG.com - Pre Order the #1 Best Selling Screen Protector for your Apple iPad.'});
	cvids_2325.push({vid:91231, thumb: 'http://i.ytimg.com/vi/VM6QM8sfAmg/0.jpg', title: 'High Hopes for Apple\'s iPad', desc: 'Apple CEO Steve Jobs has unveiled a new cutting-edge device, the iPad, which has a 10-inch-monitor, provides internet access, and will compete in the growing e-book market. John Blackstone reports.'});
	cvids_2325.push({vid:91232, thumb: 'http://i.ytimg.com/vi/smqslH0qw5U/0.jpg', title: 'Apple iPad', desc: '3d rendering I did of a fake apple product called an Apple iPad'});
	cvids_2325.push({vid:91268, thumb: 'http://ak2.static.dailymotion.com/static/video/489/381/20183984:jpeg_preview_large.jpg?20100128023952', title: 'IGN Daily Fix, 1-27: The Apple iPad, PS3 Hacked, \& Jace Hall', desc: 'See more IGN videos at http://video.ign.com - The iPad is here! Plus, the PS3 get\'s hacked, and Jace Hall stops by.'});
	cvids_2325.push({vid:91233, thumb: 'http://i.ytimg.com/vi/Et7EhT2oxDo/0.jpg', title: 'iPad Launch Overview', desc: 'A extensive overview of the iPad, Apple\'s new Tablet/Ebook reader Subscribe to my channel, follow my blog: www.technobuffalo.com follow the twitter: twitter.com'});
	cvids_2325.push({vid:91234, thumb: 'http://i.ytimg.com/vi/7tXxOAK-iv4/0.jpg', title: 'Apple iPad Hands-on Video!', desc: 'Here is peek at the iPad in all it\'s glory. Check out the high quality video playback, web surfing, photo gallery and more! Be sure to mozy over to www.SlidetoPlay.com for more!'});
	cvids_2325.push({vid:91298, thumb: 'http://a.images.blip.tv/Vincente-ReviewIpadV2483-506.jpg', title: 'Review Ipad (v2)', desc: 'Vincent_review Ipad'});
	cvids_2325.push({vid:92639, thumb: 'http://a.images.blip.tv/Topgold-FirstLookAtTheIPad780-430.jpg', title: 'First Look at the iPad', desc: '\nOn first look, I think I\'ll wait for the second edition of the iPad.\n'});
	cvids_2325.push({vid:92640, thumb: 'http://i.ytimg.com/vi/7CYzapWrcTE/0.jpg', title: 'Apple iPad Keynote Part 9/9', desc: 'Keynot video of Apple\'s CEO, Steve Jobs presenting the new ipad. Part 9 of 9. FEEL FREE TO ASK ANY QUESTIONS YOU MAY HAVE AND PLEASE RATE, COMMENT AND SUBSCRIBE.'});
html+='<div class="v69resetstyle" id="thumb_2325" style="width:425px;height:343px;background-color:#FFFFFF;position:relative;">';
html+=vidthumbhtml_2325(curvid_2325);
html+='</div>';
	html +='<div class="v69resetstyle" style="height:26px;width:425px;position:relative;background-color:#FFFFFF;">';
	html +='<div class="v69resetstyle" style="position:absolute;left:35px;top:3px;color:#444;font-size:11px;line-height:10px;cursor:pointer;width:185px;height:20px;overflow:hidden;" onclick="location.href=vidplayurl_2325();"><span style="color:#888;">You are watching channel</span><br/>Apple iPad review</div>';
	html +='<img style="position:absolute;left:281px;top:0px;height:25px;z-index:5;cursor:pointer;margin:0;padding:0;" src="http://incdn.s3.amazonaws.com/yubbyp_v1/img/project/yubby/logo.png" onclick="location.href=vidplayurl_2325();">';
		html +='<img onclick="showmatrix_2325(0);" style="position:absolute;left:5px;top:1px;cursor:pointer;margin:0;padding:0;" src="http://www.yubby.com//img/widget/solo/iconmatrix24.png" title="popup an overview with all videos"  	id="pgmatrix_2325" 	onmouseover="oMouEv(this,true);" onmouseout="oMouEv(this,false);"/>';
		html +='<img onclick="playprev_2325();" style="position:absolute;left:349px;top:1px;cursor:pointer;margin:0;padding:0;" src="http://www.yubby.com//img/widget/solo/iconprev24.png" title="go to the previous video in the channel"  		id="pgprev_2325" 	onmouseover="oMouEv(this,true);" onmouseout="oMouEv(this,false);" />';
	//html +='<img onclick="playstop_2325();" style="position:absolute;left:349px;top:1px;cursor:pointer;margin:0;padding:0;" src="http://www.yubby.com//img/widget/solo/iconstop24.png" title="stop"  													id="pgstop_2325"	onmouseover="oMouEv(this,true);" onmouseout="oMouEv(this,false);" />';
	//html +='<img onclick="playstart_2325();" style="position:absolute;left:373px;top:1px;cursor:pointer;margin:0;padding:0;" src="http://www.yubby.com//img/widget/solo/iconplay24.png" title="play"  									id="pgplay_2325"	onmouseover="oMouEv(this,true);" onmouseout="oMouEv(this,false);" />';
	// start is now a toggle
	html +='<img onclick="playstartstop_2325();" style="position:absolute;left:373px;top:1px;cursor:pointer;margin:0;padding:0;" src="http://www.yubby.com//img/widget/solo/iconplay24.png" title="play"  									id="pgplay_2325"	onmouseover="oMouEv(this,true);" onmouseout="oMouEv(this,false);" />';
	html +='<img onclick="playnext_2325();" style="position:absolute;left:397px;top:1px;cursor:pointer;margin:0;padding:0;" src="http://www.yubby.com//img/widget/solo/iconnext24.png" title="go to the next video in the channel"  	id="pgnext_2325"	onmouseover="oMouEv(this,true);" onmouseout="oMouEv(this,false);" />';
	html +='</div>';
	html+='</div>';
	html+='<iframe src="http://www.yubby.com/util/ustat" width="0" height="0" border="no" frameborder="0"  style="border:0; visibility: hidden;"></iframe>';
	wgElm_2325.innerHTML=html;
	wgElm_2325.style.display = 'block';
		updAllButState(); 
}

function playnext_2325() {
	if (curvid_2325 < cvids_2325.length -1 ) {
		curvid_2325++;
		if (cpvideo_2325)
			playstart_2325();	// we are playing video
		else {
			var thumbdiv=document.getElementById('thumb_2325');
			thumbdiv.innerHTML=vidthumbhtml_2325(curvid_2325);
		}
	}
	updAllButState();
}
function playprev_2325() {
	if (curvid_2325 >0 ) {
		curvid_2325--;
		if (cpvideo_2325)
			playstart_2325();	// we are playing video
		else {
			var thumbdiv=document.getElementById('thumb_2325');
			thumbdiv.innerHTML=vidthumbhtml_2325(curvid_2325);
		}
	}
	updAllButState();
}

function playstart_2325(vnr) {
	closepopup_2325();	// close popup (if open)
	if (vnr==null)
		vnr=curvid_2325;
	else
		curvid_2325=vnr;	// set the current
	var thumbdiv=document.getElementById('thumb_2325');
	thumbdiv.style.background='#FFF url(http://incdn.s3.amazonaws.com/yubbyp_v1/img/spinner32.gif) no-repeat 182.5px 141.5px';
	thumbdiv.innerHTML='<iframe name="playerframe" class="playerframe" src="http://www.yubby.com/widget/playvideo/'+cvids_2325[vnr].vid+'/425/343/L/W" width="425" height="343" frameborder="0" scrolling="no" allowtransparency="true"></iframe>';
	cpvideo_2325=true;
	updAllButState();
}

function playstop_2325() {
	cpvideo_2325=false;
	var thumbdiv=document.getElementById('thumb_2325');
	thumbdiv.style.background='#FFF';
	thumbdiv.innerHTML=vidthumbhtml_2325(curvid_2325);
	updAllButState();
}

function playstartstop_2325() {
	if (cpvideo_2325) 
		playstop_2325();
	else
		playstart_2325();
}

function vidthumbhtml_2325(vnr) {
	var html='';
	html+='<div class="v69resetstyle" style="width:415px;height:259px; overflow:hidden; position:absolute;left:5px;top:5px;">';
html+='<img src="'+cvids_2325[vnr].thumb+'" style="width:415px;height:311px;top:-26px;position:relative;">';
html+='</div>';
html+='<div class="v69resetstyle" style="width:405px;height:69px;position:absolute;left:5px;top:264px;background-color:#AAA;padding:5px;"><div class="v69resetstyle" style="overflow:hidden;height:73px;width:405px;"><div class="v69resetstyle" style="margin: 2px 3px; white-space: nowrap; font-size:15px;line-height:15px;color:#555555;">'+htmlspecialchars(cvids_2325[vnr].title)+'</div><div class="v69resetstyle" style="margin: 2px 5px; font-size:13px;line-height:13px;color:#ffffff;overflow:hidden;height:40px;"  title="'+htmlspecialchars(cvids_2325[vnr].desc)+'">'+htmlspecialchars(cvids_2325[vnr].desc)+'</div><div class="v69resetstyle" style="padding: 3px 5px; letter-spacing:1px; background-color: #aaa; color: white; position: absolute; right: 0px; top: -14px; font-size: 10px;">'+(vnr+1)+'/'+(cvids_2325.length)+'</div></div></div>';
html+='<div class="v69resetstyle" style="position: absolute; width:72px;height:72px;top:135.5px;left:176.5px;z-index:200;cursor:pointer;cursor:hand;background:url(http://www.yubby.com/img/media_play72.png) no-repeat;" onClick="playstart_2325();"></div>';
	return html;
}

function vidthumbhtmlSmall_2325(vnr) {
	var html='';
	html='';
	html+='<div class="v69resetstyle" style="margin: 5px; float: left; position: relative; width: 162px; height: 90px;">';
		html+='<div  class="v69resetstyle" style="width:160px;max-height:122px;background:#f6f6f6;margin:0 auto 6px auto;overflow:hidden;position:relative;">';
			html+='<div  class="v69resetstyle" style="width:156px;height:86px;background:#cccccc;border:2px solid #dedede;overflow:hidden;position:relative;">';
				html+='<img style="position:absolute;width:160px;height:119px;top:-20px;left:0;cursor: pointer;" onclick="playstart_2325('+vnr+')" title="'+htmlspecialchars(cvids_2325[vnr].desc)+'" src="'+cvids_2325[vnr].thumb+'" />';
				html+='<div class="v69resetstyle" style="position: absolute; width:24px;height:24px;top:28px;left:68px;z-index:200;cursor:pointer;cursor:hand;background:url(http://incdn.s3.amazonaws.com/yubbyp_v1/img/media_play24.png) no-repeat;" onclick="playstart_2325('+vnr+')"></div>';
				html+='<div class="v69resetstyle" style="position: absolute; bottom: 0px; left: 0px;width:156px;height:15px;z-index:200;background-color:#dedede;color:#000000;font-size:11px;overflow:hidden;white-space: nowrap;padding:2px 5px 2px 3px;filter: alpha(opacity=80);filter: progid:DXImageTransform.Microsoft.Alpha(opacity=80);-moz-opacity: 0.80; opacity: 0.80;cursor: pointer;" onclick="playVideo_773417(15893)" >'+htmlspecialchars(cvids_2325[vnr].title)+'</div>';
			html+='</div>';
		html+='</div>';
	html+='</div>';
	return html;
}

// cp 1..npages
function paginationhtml_2325(cp,npages) {
	if (npages<=1)
		return '';	// empty if no pagination..
	var html='';
	html+='<div class="pages v69resetstyle">';
	if (cp>1) {
		// we CAN prev!
		html+= '<span class="pageblock" onclick="gotopage_2325('+(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_2325('+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_2325('+(cp+1)+');">Next &#187;</span>';
	else
		html+='<span class="pageblock_disabled">Next &#187;</span>';
	html+='</div>';
	return html;
}

function vidplayurl_2325(vnr) {
	if (vnr==null)
		vnr=curvid_2325;
	return 'http://www.yubby.com/channel/player/23415/'+cvids_2325[vnr].vid;
}

//------------------------------------ button handlers --------------------------------------
function stButImg(oBut) {
	if (oBut.id == 'pgnext_2325') { 
		if (curvid_2325 >= cvids_2325.length -1 ) 
			oBut.src = imgNext_d.src;
		else
			oBut.src= butnext_mousein ? imgNext_ov.src : imgNext_ou.src;
	}
	if (oBut.id == 'pgprev_2325') { 
		if (curvid_2325==0 ) 
			oBut.src = imgPrev_d.src;
		else
			oBut.src= butprev_mousein ? imgPrev_ov.src : imgPrev_ou.src;
	}
	if (oBut.id == 'pgplay_2325') { 
		if (cpvideo_2325) 	// we are currently playing
			oBut.src = butplay_mousein ? imgStop_ov.src : imgStop_ou.src;
		else
			oBut.src= butplay_mousein ? imgPlay_ov.src : imgPlay_ou.src;
	}
	// if (oBut.id == 'pgstop_2325') { 
	// 	if (!cpvideo_2325 ) 	// currently NOT playing
	// 		oBut.src = imgStop_ov.src;
	// 	else
	// 		oBut.src= butstop_mousein ? imgStop_ov.src : imgStop_ou.src;
	// }
	if (oBut.id == 'pgmatrix_2325') { 
		oBut.src= butmatrix_mousein ? imgMatrix_ov.src : imgMatrix_ou.src;
	}
}

function oMouEv(oBut,mouseIn) {
	
	if (oBut.id == 'pgnext_2325') 
		butnext_mousein=mouseIn;
	if (oBut.id == 'pgprev_2325') 
		butprev_mousein=mouseIn;
	if (oBut.id == 'pgplay_2325') 
		butplay_mousein=mouseIn;
	// if (oBut.id == 'pgstop_2325') 
	// 	butstop_mousein=mouseIn;
	if (oBut.id == 'pgmatrix_2325') 
		butmatrix_mousein=mouseIn;
	stButImg(oBut);
}

function updAllButState() {
	el = document.getElementById('pgnext_2325');
	if (el) 
		stButImg(el); // update nextbutton state

	el = document.getElementById('pgprev_2325');
	if (el) 
		stButImg(el); // update prevbutton state
		
	el = document.getElementById('pgplay_2325');
	if (el) 
		stButImg(el); // update prevbutton state
		
	// el = document.getElementById('pgstop_2325');
	// if (el) 
	// 	stButImg(el); // update prevbutton state

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

//------------------------------------ other stuff -------------
// 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_2325() {
  el = document.getElementById('ipopup_2325');
  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;
}

function gotopage_2325(pg) {
	if (pg<1)
		pg=1;
	if (matrix_npages<1)
		matrix_npages=1;
	if (pg>matrix_npages) 
		pg=matrix_npages;
		
	matrix_curpg=pg;
	var mxs=document.getElementById('mxs_2325');
	var html='';
	for (var i=(matrix_curpg-1)*16,cv=0;i<cvids_2325.length && cv<16;i++) {
		html+=  vidthumbhtmlSmall_2325(i);
		cv++;
	}
	html+=  '<div class="v69resetstyle" style="clear:both;"></div>';
	if (matrix_npages>1) {
		html+=  '<div  class="v69resetstyle" style="margin:10px 0px">'+paginationhtml_2325(matrix_curpg, matrix_npages)+'</div>';
	}

	mxs.innerHTML=html;
}

function showmatrix_2325() {
	// close old one
	closepopup_2325();

	matrix_npages= Math.ceil(cvids_2325.length / 16);
	
	// open new
	var popup_div = document.createElement('div');
	var title='matrix';
	popup_div.id = "ipopup_2325";
	popup_div.style.position = 'absolute';
	popup_div.style.border = 'none';
	popup_div.className = "v69resetstyle";

	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 class="v69resetstyle" 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 class="v69resetstyle" onclick="closepopup_2325();" style="position:absolute;top:7px;right:8px;cursor:pointer;cursor:hand;background:url(http://www.yubby.com/img/icon_bw_close22.png) no-repeat;width:24px;height:24px;z-index:10000;"></div>';
	vid_html+=	'<div class="v69resetstyle" style="position:absolute;top:8px;left:15px;color:#888;font-size:15px;overflow:hidden;width:'+(base_width-50)+'px;">Apple iPad review</div>';
	vid_html+=	'<div class="v69resetstyle" style="margin:30px 10px 10px 10px;" id="mxs_2325">';
	// for (var i=0,cv=0;i<cvids_2325.length && cv<16;i++) { 
	// 		vid_html+=  vidthumbhtmlSmall_2325(i);
	// 		cv++;
	// 	}
	// 	vid_html+=  '<div style="clear:both;"></div>';
	// 
	// 	if (matrix_npages>1) {
	// 		vid_html+=  '<div style="margin:10px 0px">'+paginationhtml_2325(matrix_curpg, matrix_npages)+'</div>';
	// 	}
	vid_html+=	'</div>';
	vid_html+=  '<div class="v69resetstyle" style="clear:both;"></div>';
	vid_html+='</div>';
					
	popup_div.innerHTML=vid_html;
	document.body.appendChild(popup_div);
	gotopage_2325(matrix_curpg);
}

// 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 + '"';
}




