var drama = 2, bn = new Array(false,false),
e = new Array(80,80,80,80,60,60,60,60,30,30),
tpc = new Image(130,105);

var angela = true;

function zero(z) {
if (z<10) return "0"+z;
else return z;
}

for (var i=0,x;i<e.length;i++) {
x = e[i];
e[i] = new Array(new Image(x,30),new Image(x,30),false);
x = zero(i+4);
e[i][0].src="../img/story_"+ x +".gif";
e[i][1].src="../img/story_over_"+ x +".gif";
}

function faceoff(obj,srx) {
if (faceoff.arguments.length>1) {
	if (obj) {
		if (document.all) {
			obj.filters.blendTrans.Stop();
			obj.filters.blendTrans.Apply();
			obj.src=srx.src;
			obj.filters.blendTrans.Play();
		}
		else
			obj.src=srx.src;
	}
}
}

epi = location.pathname.substring(location.pathname.lastIndexOf('/')+1,location.pathname.lastIndexOf('.'));
function trailer(){
	popup = window.open('http://tvcity.tvb.com/drama/scavengers_paradise/story/trailer/300k.html?epi='+epi+'&300','trailer','width=350,height=380,resizable');

	popup.focus();
}

function play(epi,rate){
	popup = window.open('trailer/300k.html?epi='+epi+'&'+rate,'player','width=350,height=380,resizable');
	popup.focus();
}

function playclips(clip,title){
	popup = window.open('../clips/300k.html?clip='+clip+'&'+title,'player','width=350,height=380,resizable');
	popup.focus();
}

function themesong(bandwidth) {
	song = window.open("http://tvcity.tvb.com/drama/scavengers_paradise/song/trailer/300k.html?"+ bandwidth,"song","width=350,height=380");
	song.focus();
}

function band(obj,srx) {
if (bn[0]==false&&bn[1]==false)
faceoff(e[7][2],e[7][0]);
else faceoff(e[7][2],e[7][1]);
faceoff(e[obj][2],e[obj][srx]);
}


function load() {
faceoff(document.images.topic,tpc);
for (var i=0;i<e.length;i++)
e[i][2] = document.images["m"+ i];

}

ICN_onLoad = "load();";

function hover(biolayer,e){
	if (document.layers){
		document[biolayer].top=e.pageY+16;
		document[biolayer].visibility='show';
	}
	else if (document.getElementById){
//		document.getElementById(biolayer).style.left = event.x;
		document.getElementById(biolayer).style.top = event.y + document.body.scrollTop;
		document.getElementById(biolayer).style.visibility = 'visible';
	}
}
function hout(biolayer){
	if (document.layers){
		document[biolayer].visibility='hide';
	}
	else if (document.getElementById){
		document.getElementById(biolayer).style.visibility = 'hidden';
	}
}
