/* force caching of mouseovers */
try {
  document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

Function.prototype.bg = function(ms){
	this.PID = setInterval(this,ms);
	return this;
}
Function.prototype.kill = function(){
	clearInterval(this.PID)
}
String.prototype.onReady = function(func, divId){
	var str = this;
	return function(){
		try{
			eval("var res=("+str+")");
			if(res){
				arguments.callee.kill();
				func(res, divId)
			}
		}catch(e){
		}
	}.bg(10)
}


function feed_onload(jsObj, div){
	
	var ul = document.createElement('ul')
	for (var i=0;i<jsObj.length-1; i++) {
		var post = jsObj[i];
		var li = document.createElement('li')
		var a = document.createElement('a')
		a.setAttribute('href', "javascript:nbaVideo(escape('"+post.v+"'),escape('blank'));")
		a.appendChild(document.createTextNode(post.d))
		li.appendChild(a)
		ul.appendChild(li)
	
	
	}
	document.getElementById(div).appendChild(ul);
	delete jsObj;
}


