	var loaded	= new Array();
	var pic		= new Array();

	function thumb_change(code, current){
        if (loaded[code]){
			
            document.getElementById(code).src=(pic[code][current].className != 'error')?pic[code][current].src:pic[code][1].src;
			next = current+1; if (next > 6) next = 1;
			setTimeout("thumb_change('"+code+"', "+next+")",500);
		}
	}

	function thumb_start(code){
        loaded[code]=1;
		pic[code] = Array();
		for(i=1; i<=6; i++){
			fix	= Math.floor(code / 1000)+"/"+Math.floor( code % 1000 / 100)+"/";
			pic[code][i]= new Image();
			pic[code][i].src = "http://tasutaporno.com/sites/default/files/video/thumb/"+fix+code+"_"+i+".jpg"; 
			pic[code][i].onerror = function(){
                this.className = 'error';
				this.src = "http://tasutaporno.com/sites/default/files/video/thumb/default_thumb.gif"; 
			}; 
		}
		thumb_change (code, 2);
	}

	function thumb_finish (code){
		loaded[code]=0;
		fix	= Math.floor(code / 1000)+"/"+Math.floor( code % 1000 / 100)+"/";
		document.getElementById(code).src= "http://tasutaporno.com/sites/default/files/video/thumb/"+fix+code+".jpg";
	}

