var e = new Array(10), bn = new Array(false,false);
tpc = new Image(130,105);

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

for (var i=0,x=80,k;i<e.length;i++) {
if (i==4) x = 60;
if (i==8) x = 30;
k = zero((i+4));
e[i] = new Array(new Image(x,30),new Image(x,30),false);
e[i][0].src="../img/legal_story_"+ k +".gif";
e[i][1].src="../img/legal_story_over_"+ k +".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/legale/story/trailer/300k.html?'+epi,'love','width=350,height=380,resizable');
	popup.focus();
}

function themesong(bandwidth) {
if (bandwidth==56)
void(window.open("http://tvcity.tvb.com/drama/legale/song/index_56k.html","","width=300,height=345"));
else
void(window.open("http://tvcity.tvb.com/drama/legale/song/index_300k.html","","width=350,height=380"));
}

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();";
