$=function(s){return(typeof s=='object')?s:document.getElementById(s);}
var FP=function(id){
	this.id=this.getId(id);
	this.opac=100;
	this.maxnum;
	this.li=this.getTag("li",this.id);
	this.bPic=document.createElement("div");
	this.txtBg=document.createElement("div");
	this.txt=document.createElement("div");
	this.sPic=document.createElement("div");
	this.playIcon=document.createElement("div");
	}
FP.prototype.getId=function(id){return $(id)}
FP.prototype.getTag=function(tag,obj){
	if(obj==null)
	{
		return document.getElementsByTagName(tag);
	}
	else
	{
		return obj.getElementsByTagName(tag);
	}
}
FP.prototype.init=function(){
	if(this.id==null)
	return;
	var _this=this;
	this.id.appendChild(this.bPic);
	this.id.appendChild(this.txtBg);
	this.id.appendChild(this.txt);
	this.id.appendChild(this.sPic);
	this.id.appendChild(this.playIcon);
	this.bPic.className="fp_bpic";
	this.txtBg.className="fp_txt_bg";
	this.txt.className="fp_txt";
	this.sPic.className="fp_spic";
	this.playIcon.className="fp_play_icon";
	for(var i=0;i<this.li.length;i++){
		var span=document.createElement("span");
		span.innerHTML=this.li[i].innerHTML;
		span.onmouseover=(function(n){
			return function()
			{_this.Focus(n)}
		})(i);
		this.sPic.appendChild(span);
		}
		this.maxmun= 5;
		this.Focus(0);
	}
FP.prototype.Focus=function(index){
	this.bPic.innerHTML=this.li[index].innerHTML;
	this.txt.innerHTML="<a href="+this.getTag("a",this.li[index])[0].href+">"+this.getTag("img",this.li[index])[0].alt+"</a>";
	if(this.li[index].className=="video"){
		this.playIcon.getElementsByTagName("a")[0].href=this.getTag("a",this.li[index])[0].href;
		this.playIcon.style.display="block";
	}else{
		this.playIcon.style.display="none";
	}
	for(var i=0;i<this.li.length;i++){
		this.sPic.childNodes[i].className="b1";
	}
	this.sPic.childNodes[index].className="b2";
}
