if (window != top) top.location.href = location.href;


var curIdx=1;
var maxIdx=12;
var SlidePlaying=false;
var TimerId = 0;
var media_host="";
var mpath="";
var msz="1";

function StartSlide(s,id,mp,fr) {
	if (SlidePlaying==false) {
		msz=s;
		media_host=mp;
		mpath=fr;
		curIdx=0;
		TimerId=setTimeout("ShowSlide('" +id+ "')", 800);
		SlidePlaying=true;
	}
}
function StopSlide(id,mp) {
	//restore
	clearTimeout(TimerId);
	curIdx=mp;
	document.getElementById(id).src=media_host+mpath+"_"+curIdx+".jpg";
	
	TimerId=0;
	SlidePlaying=false;
	curIdx=1;
}
function ShowSlide(id){
	if (SlidePlaying==true) {
		if (curIdx==13) {
			curIdx=0;
		}
		
		document.getElementById(id).src=media_host+mpath+"_"+curIdx+".jpg";
		TimerId=setTimeout("ShowSlide('"+id+"')", 400);
		curIdx++;
	}
}
