
function preloadimg(){
	if (preimages > 0){
		for (i=0; i < preimages; i++) {
			var newimgage = new Image();
			newimgage.src = "<?php echo $folderdir;?>/"+preimages[i];
		}
		//document.images.loadstatus.src=("items/spacer.gif");
	}
}
				
function preloadctrl(im){
	if (typeof im=='string'){
	var imo=new Image();
	imo.src=im;
	}
}

if(document.images&&typeof preload_ctrl_images!='undefined'&&preload_ctrl_images){

	var ctrlimgs=[previmg, stopimg, playimg, nextimg]

	for (var i_tem = 0; i_tem < ctrlimgs.length; i_tem++)

	if (ctrlimgs[i_tem])

	preloadctrl(ctrlimgs[i_tem])

}


var iss=[]; //array to cache inter_slide instances
var urlsiteitems="www.damvanhuynh.com/items/";
var preload_ctrl_images=true;
var previmg='http://'+urlsiteitems+'/back.gif';
var stopimg='http://'+urlsiteitems+'/stop.gif';
var playimg='http://'+urlsiteitems+'/play.gif';
var nextimg='http://'+urlsiteitems+'/next.gif';

//settings

var set_counter=1;
var set_controls=1;	//Use for top controls
var set_use_alt=0;	//Use descriptions as the images' alt attributes
var set_use_title=0;	//Use descriptions as the images' title attributes
var set_use_prefix='';	//String prefix for image descriptions display'
var set_width='850';	//Ue to set width of widest image if dimensions vary, may also be set in the call as the 2nd parameter
var set_height='';	//Use to set height of tallest image if dimensions vary, may also be set in the call as the 3rd parameter
var set_auto=0;	//Use to make show completely user operated (no play button, starts in stopped mode)
var set_fade=1;	//Use for no fade-in, fade-out effect for this show
var set_descriptions=0;	//Use for no descriptions displayed for this slide show
var set_pause=0;	//Use for pause onmouseover
var set_image_controls=1;	//Use images for controls instead of the default buttons
var set_button_highlight='#cccccc'	//onmouseover background-color for image buttons (string) (requires image_controls=1) - use color name or hex value with # prefix
var set_random=0	//Set a random slide sequence on each page load
var set_fadecolor='#000'//	Set fading images' background color, defaults to white (string) - use color name or hex value with # prefix
var set_delay=3000;	//Set miliseconds delay between slider for a given show, may also be set in the call as the last parameter
var set_jumpto=0;	//Use for added controls to jump to a particular image by its number
var set_lightbox=0;

var set_border=0;	//Set border width for images (number of pixels)
var set_border_color='black';	//Set border color for images (string) - use color name or hex value with # prefix
var set_border_style='ridge';	//Set border style for for images (string) - requires border_color be set
var set_onmouse="onclick";//onmouseover,onlick 


function inter_slide(){

	if(!document.images||arguments.length==0)

	return;
	
	var imgs=arguments[0];
		
	var width=null, height=null, delay=null;
	if(arguments.length==2)
		delay=arguments[1];
	else if(arguments.length==3||arguments.length==4)

		width=arguments[1], height=arguments[2], delay=arguments[3]? arguments[3] : null;

	this.dom=(document.getElementById) //modern dom browsers
	this.da=document.all

	this.delay=set_delay? set_delay : delay? delay : 3000+iss.length*750;
	this.nextimgidx=0;
	iss[this.issid=iss.length]=this;
	this.imgs=imgs;
	if (set_random)
	this.imgs.sort(function() {return 0.5 - Math.random();})
	this.imgborder=set_border? parseInt(imgs_border) : 0;

	if (!this.dom){
		this.postimgs=new Array() //preload imgs
		for (p=0;p<slider.length;p++){
			this.postimgs[p]=new Image()
			this.post[p].src=this.imgs[p][1];
			

		}
	}

	
	if (this.dom){ //if modern browsers (ie: Firefox, IE5+)

		if(set_fade) this.degree=10; //initial opacity degree (10%)
		
		this.faded=0;
		this.loadimgidx=[];
		this.set_thumbs=set_thumbs;
		this.pausecheck=set_pause;
		this.set_onmouse=set_onmouse;
		this.mouseovercheck=0
		this.set_thumbs_line=set_thumbs_line;
		this.curcanvas="canvas_0";
		this.descriptions=!set_descriptions;
		this.auto=set_auto;
		this.fade=set_fade;
		this.counter=set_counter;
		this.ics=set_image_controls;
		this.jumpto=set_jumpto;
		this.set_controls=set_controls;
		this.ualt=set_use_alt;
		this.set_thumbs_line=set_thumbs_line;
		this.set_lightbox=set_lightbox
		this.utit=set_use_title;
		this.fadecolor=set_fadecolor;
		this.set_use_prefix= set_use_prefix;
		this.imbcolor=set_border_color;
		this.imbstyle=set_border_style;
		this.width=set_width? set_width : width? width : null;
		this.width=this.width? this.width+this.imgborder*2 : null;
		this.height=set_height? set_height : height? height : null;
		this.height=this.height? this.height+this.imgborder*2 : null;
		var thumbs='';
		var shower='';
		var linenum=0;
		

		// make thumbs
		for (var i=0;i<slider.length; i++){
			
			if(this.set_thumbs=='num'){
				
				
				if(i==0){
					shower+='<td width="10" align="center"><img id="icons_'+i+'" name="img" height="2" width="1" src="items/spacer.gif" alt="Marcus Renner Photography" style="border:solid red 1px"></td>';
					thumbs+='<td width="10" align="center"><a href="#" '+this.set_onmouse+'="iss['+this.issid+'].changeimg('+(i) +', \'go\');"   '+(this.set_lightbox? 'rel="lightbox"':'') + ' ><span id=numicons_'+i+' style="color:#666666;">'+(i+1)+'<\/a></span></td>';}
				else {
					shower+='<td width="10" align="center"><img id="icons_'+i+'" name="img" height="2" width="1" src="items/spacer.gif" alt="Marcus Renner Photography" style="border:solid black 1px"></td>';
					thumbs+='<td width="10" align="center"><a href="#" '+this.set_onmouse+'="iss['+this.issid+'].changeimg('+(i) +', \'go\');"  '+(this.set_lightbox? 'rel="lightbox"':'') + ' ><span id=numicons_'+i+' >'+(i+1)+'<\/a></span></td>';}
			
			
			
			}
			if(this.set_thumbs=='image'){
				
				if(this.set_thumbs_line > 0){
					
					if (i==0) thumbs+='<table cellpadding="1" cellspacing="10">';
					if (linenum==0)thumbs+='<tr>';
					
					if (this.set_thumbs_line==linenum) {
						thumbs+='</tr>';
						linenum=0;
					}
					linenum++;
					thumbs+='<td align="center"><a href="#" '+this.set_onmouse+'="iss['+this.issid+'].changeimg('+(i) +', \'go\');"  '+(this.set_lightbox? 'rel="lightbox"':'') + ' ><span id=icons_'+i+'><img src="'+this.imgs[i][1]+'" height="'+set_thumbs_size+'" border="0"><\/a></span></td>';
				}
				else{
					if(i==0){thumbs+='<a href="#" '+this.set_onmouse+'="iss['+this.issid+'].changeimg('+(i) +', \'go\');"   '+(this.set_lightbox? 'rel="lightbox"':'') + ' ><span id=icons_'+i+' style="color:#666666;"><img src="'+this.imgs[i][1]+'" height="'+set_thumbs_size+'" border="0"><\/a></span>';}
					else { thumbs+='<a href="#" '+this.set_onmouse+'="iss['+this.issid+'].changeimg('+(i) +', \'go\');"  '+(this.set_lightbox? 'rel="lightbox"':'') + ' ><span id=icons_'+i+'><img src="'+this.imgs[i][1]+'" height="'+set_thumbs_size+'" border="0"><\/a></span>';}
				}
			}
			if(i==24)thumbs+='<br>';
			if(i<9)thumbs+='&nbsp;';
		}
		
		var ief='';

		if(this.fade && document.body && document.body.style)
			ief=document.body.filters? 'filter:progid:DXImageTransform.Microsoft.alpha(opacity=0);' : typeof document.body.style.opacity=='string'? 'opacity:0;' : 'opacity:0.10;-moz-opacity:0.10;-khtml-opacity:0.10;';

// lightbox	
document.write('<div id="lightbox"> ');
	document.write('<div id="imageContainer">');		
		document.write('<div id="canvas_0" style="'+ief+'"><\/div>');
		document.write('<div id="canvas_1" style="'+ief+'"><\/div>');
		document.write('<div id="hoverNav">');
			document.write('<a href="#" id="prevLink" onclick="iss['+this.issid+'].changeimg(false, \'nav\'); changebutton(prev);"></a>');
			document.write('<a href="#" id="nextLink" onclick="iss['+this.issid+'].changeimg(true, \'nav\');"changebutton(next);"></a>');
		document.write('<\/div>');
	document.write('<\/div>');
document.write('<\/div>');


//control
document.write('<div id="control">');
	document.write('<table align="left" cellpadding="0" cellspacing="0" border="0" width=600>');
	document.write('<tr height=20 valign=bottom>');		

	if (this.set_controls){
			document.write('<td valign="middle" width=70>');
			if(!this.ics && this.set_controls)
				document.write('<input id="prev'+this.issid+'" disabled type="button" value=" << " '+this.set_onmouse+'="iss['+this.issid+'].changeimg(false, \'nav\');">\n'+(!this.auto? '&nbsp;&nbsp;&nbsp;' : ' <input id="gostp'+this.issid+'" type="button" value=" Stop " '+this.set_onmouse+'="iss['+this.issid+'].gostop(this);">\n')+' <input id="next'+this.issid+'" disabled type="button" value=" >> " '+this.set_onmouse+'="iss['+this.issid+'].changeimg(true, \'nav\');">');

			else if(this.ics && this.set_controls){
				var op=document.body.filters? ' style="filter:alpha(opacity=100);"' : ' style="opacity:'+(!this.auto? 0.99 : 0.45)+';"';
				document.write('<table align="left" cellpadding="0" cellspacing="0" width=50 border=0>');
				document.write('<tr valign="middle">');
				document.write('<td align="left" id=previmage><input'+op+' type="image" title="Previous" name="previmage" id="prev'+this.issid+'" src="'+previmg+'" '+this.set_onmouse+'="iss['+this.issid+'].changeimg(false, \'nav\');"><\/td>');
				document.write('<td align="center">'+(!this.auto? '&nbsp;' : '<input title="Stop" type="image" id="gostp'+this.issid+'" src="'+(this.g_fPlayMode? playimg : stopimg)+'" '+this.set_onmouse+'="iss['+this.issid+'].gostop(this);"><\/td>')+'');
				document.write('<td align="right"><input'+op+' type="image" name="nextimage" title="Next" id="next'+this.issid+'" src="'+nextimg+'" onclick="iss['+this.issid+'].changeimg(true, \'nav\');"><\/td>');
				document.write('<\/tr>');	
				document.write('<\/table>');	
			}
			else{
				this.set_controls=1;
			}
			document.write('</td>');

	}
	if(this.counter){
		this.cpad=this.imgs.length.toString().length;
		// '+this.imgs.length+'
		document.write('<td width=100 valign="middle" align="left">Image: <b><span id="thecnt'+this.issid+'"><\/span><\/b> of<span>&nbsp;</span>&nbsp;<b>'+totalrec+'<\/b><\/td>');
	}

	if(this.descriptions){
		document.write('<td valign="middle" align="left">'+this.set_use_prefix+'&nbsp;&nbsp;&nbsp;<span id="imgdsc'+this.issid+'">&nbsp;<\/span></td>\n');

	}
		
	if (totalrec > 0 && set_show_navi==1){   
		var x = 1;
		var y = 1;
		document.write('<form action="'+folder+'.html" method="post"><td valign="middle">');
		document.write('Pages:');
		while (x <= totalrec){  
		 
			if (startrec == y){          		
				document.write('<input class="buttonis" type="submit" name="start" value="'+y+'">');
			}
			else{
				document.write('<input class="button"  type="submit" name="start" value="'+y+'">');
			} 				
				x = x + displayrec;
				y = y + 1;          
		} 
		document.write('</td></form>');	
	}
}
else{
	document.write('<td align="left"><img name="defaultslide'+this.issid+'" src="'+this.postimgs[0].src+'"><\/td>')
}
		document.write('<\/tr>');
	document.write('<\/table>');
document.write('<\/div>');	


//imagenavi
document.write('<div id="navimage">');
	document.write('<table>');
		//document.write('<tr height=\"12\">'+shower+'</tr>');
		document.write('<tr>'+thumbs+'<\/tr>');
	document.write('<\/table>');
document.write('</div>');

	
	
		

	if (this.dom) //if modern browsers such as Firefox, IE5+
		this.startit()
	else{
		this.nextimgidx++
		setInterval("iss["+this.issid+"].rotateimg()", this.delay)
	}
}


inter_slide.prototype.jumper=function(e){
	var key;
	if(typeof e=='object')
	key=e.keyCode? e.keyCode : e.which? e.which : 1;
	if(key&&key!==13)
	return;
	var num=typeof e=='number'? e : parseInt(this.go('goto'+this.issid).value);
	if(num<=this.imgs.length&&num>0){
	this.nextimgidx=num-2;
	this.changeimg(true, 'jump');
	}
}


function unmark (num) {
	for (var i = 0; i < slider.length; i++) {
		if(i==num){
			//document.getElementById('numicons_'+num).style.color = '#666666';  
			//document.getElementById('icons_'+num).style.border='solid red 1px'; 
		}
		else{
			//document.getElementById('icons_'+i).style.border='solid black 1px'; 
			//document.getElementById('numicons_'+i).style.color = '';
		}
	}
}



function changebutton (num) {
	document.getElementById('previmage').style.border='1px solid gray';

}



inter_slide.prototype.fadepic=function(){

	if (this.fade && this.degree<100){

		this.faded=0

		this.degree+=10

	if (this.tempobj.filters && this.tempobj.filters[0]){

		if (typeof this.tempobj.filters[0].opacity=="number") //if IE6+

			this.tempobj.filters[0].opacity=this.degree

		else //else if IE5.5-

			this.tempobj.style.filter="alpha(opacity="+this.degree+")"

	}

	else if (this.tempobj.style.MozOpacity)

		this.tempobj.style.MozOpacity=this.degree/101

	else if (this.tempobj.style.KhtmlOpacity)

		this.tempobj.style.KhtmlOpacity=this.degree/100

	else if (this.tempobj.style.opacity&&!this.tempobj.filters)

		this.tempobj.style.opacity=this.degree/101

	}

	else{

		this.faded=1

		clearInterval(this.fadeclear)

		this.nextcanvas=(this.curcanvas=="canvas_0")? "canvas_0" : "canvas_1"

		this.tempobj=this.go(this.nextcanvas)

		if(this.playing)

		this.changeimg()

	}

}



inter_slide.prototype.populateslide=function(picobj, picidx){

	if(document.getElementsByTagName){
		// changed 0 to 1

		if(picobj.getElementsByTagName('a')[1] && picobj.getElementsByTagName('a')[1].onclick)
			picobj.getElementsByTagName('a')[1].onclick=null;

		if(picobj.getElementsByTagName('img')[1] && picobj.getElementsByTagName('img')[1].onload)
			picobj.getElementsByTagName('img')[1].onload=null;

	}

	picobj.style.backgroundColor=this.fadecolor? this.imgs.fadecolor : this.fadecolor? this.fadecolor : 'black';

	var slideHTML='';

	// slideHTML+='<div id="hoverNav">';
	//slideHTML+='<a href="#" id="prevLink" onclick="iss['+this.issid+'].changeimg(false, \'nav\');"></a>';
	//slideHTML+='<a href="#" id="nextLink" onclick="iss['+this.issid+'].changeimg(true, \'nav\');"></a>';
	//slideHTML+='<\/div>';
	//var slideHTML='<table cellpadding="0" cellspacing="0" width="850px" border="1"><tr>';
	//slideHTML+='<td align="left" valign="middle" style="background:transparent none;">';

	if (this.imgs[picidx][2]) slideHTML+=' <a href="" onclick="" '+(this.lightbox? 'rel="lightbox' : '')+'>'

	slideHTML+='<img id="theimg'+picidx+'_'+this.issid+'" src="'+(this.loadimgidx[picidx]&&typeof this.loadimgidx[picidx].complete=='boolean'&&this.loadimgidx[picidx].complete? this.loadimgidx[picidx].src : this.imgs[picidx][1])+'" alt="'+(this.ualt? imageName[picidx] : 'Slide Show Image')+'" title="'+(this.utit? this.imgs[picidx][2] : '')+'" '+(this.imbcolor&&!this.imgs[picidx].noborder? 'style="border:'+this.imgborder+'px '+(this.imbstyle? this.imbstyle : 'solid')+' '+this.imbcolor+';"' : 'border="'+(this.imgs[picidx].noborder? '0' : this.imgborder)+'"')+(!this.width||!this.height? ' onload="iss['+this.issid+'].imgload(this);"' : '')+'>'

	if (this.imgs[picidx][2]) slideHTML+='<\/a>'

	//slideHTML+='<\/td><\/tr><\/table>'

	picobj.innerHTML=slideHTML;

}



inter_slide.prototype.buttons=function(bool){

	if(this.set_controls)
	return;

	var next=this.go('next'+this.issid), prev=this.go('prev'+this.issid);

	next.disabled=prev.disabled=!bool;
	next.title=bool? 'next' : '';
	prev.title=bool? 'previous' : '';

	if(this.jumpto&&!this.ics)

	this.go('go'+this.issid).disabled=this.go('goto'+this.issid).disabled=!bool;

	if(this.ics){

	if(this.auto){

		var go=this.go('gostp'+this.issid)

		go.title=bool? 'Play' : 'Stop';

		go.src=bool? playimg : stopimg;

	}

	if(prev.filters && prev.parentNode)

		prev.parentNode.style.filter=next.parentNode.style.filter='alpha(opacity='+(bool? 100 : 45)+')';

	else if(prev.style.opacity && !prev.filters)

		prev.style.opacity=next.style.opacity=bool? 0.99 : 0.45;

	}

}



inter_slide.prototype.imgload=function(el){

	if(!el && !this.imgel)

	return;

	var el=el? el : this.imgel;

	if(el.width==0 || el.height==0){

		this.imgel=el;

		var cacheobj=this;

		clearTimeout(this.getdim)

		this.getdim=setTimeout(function(){cacheobj.imgload()}, 300)

		return;

	}

	var m=this.go('imageContainer').style;

	var c0=this.go('canvas_0').style;

	var c1=this.go('canvas_1').style;

	if(!this.width){

		this.width=el.width+this.imgborder*2;

		m.width = c0.width = c1.width = this.width+'px';

	}

	if(!this.height){

		this.height=el.height+this.imgborder*2;

		m.height = c0.height = c1.height = this.height+'px';

	}
}



inter_slide.prototype.changeimg=function(bool,nav){

	if(nav && nav=='go'){
		this.nextimgidx=bool;
		this.populateslide(this.tempobj, this.nextimgidx)
		this.rotateimg();
	}

	else{

		if(this.playing){

			this.buttons(false)

			this.nextimgidx=(this.keeptrack()<this.imgs.length-1)? this.keeptrack()+1 : 0

			this.populateslide(this.tempobj, this.nextimgidx)

			if(bool)

			this.rotateimg()

			else{

				clearTimeout(this.inprocess)

				this.inprocess=setTimeout("iss["+this.issid+"].rotateimg()", this.delay)

			}

		}

		else {

			if(!this.faded){

				if(nav && nav=='nav')

					return;		

			this.nextimgidx=this.keeptrack()+(bool? 1 : -1)
			this.nextimgidx=(this.nextimgidx<this.imgs.length)? this.nextimgidx : this.nextimgidx-this.imgs.length
			this.nextimgidx=(this.nextimgidx>-1)? this.nextimgidx : this.imgs.length+this.nextimgidx

			return;

		}

		if(this.fadeclear)

			clearInterval(this.fadeclear);

		if(bool){

			var loadidx=this.nextimgidx+2

			loadidx=(loadidx<this.imgs.length)? loadidx : loadidx-this.imgs.length;

			loadidx=(loadidx>-1)? loadidx : this.imgs.length+loadidx;

			this.loadimgidx[loadidx]=new Image();

			this.loadimgidx[loadidx].src=this.imgs[loadidx][1];

		}

		else{

			var loadidx=this.nextimgidx-2
			loadidx=(loadidx<this.imgs.length)? loadidx : loadidx-this.imgs.length
			loadidx=(loadidx>-1)? loadidx : this.imgs.length+loadidx
			this.loadimgidx[loadidx]=new Image();
			this.loadimgidx[loadidx].src=this.imgs[loadidx][1];

		}

		if(nav && nav=='jump')

			this.nextimgidx++;

		else

			this.nextimgidx=this.keeptrack()+(bool? 1 : -1)
			this.nextimgidx=(this.nextimgidx<this.imgs.length)? this.nextimgidx : this.nextimgidx-this.imgs.length
			this.nextimgidx=(this.nextimgidx>-1)? this.nextimgidx : this.imgs.length+this.nextimgidx
			this.populateslide(this.tempobj, this.nextimgidx);
			this.rotateimg();
		}		
	}
		unmark(this.nextimgidx);	

}



inter_slide.prototype.go=function(id){

	return this.da? this.da[id] : document.getElementById(id);

}



inter_slide.prototype.rotateimg=function(){

	if(this.dom){

		var cimg=this.go('theimg'+this.nextimgidx+'_'+this.issid)? this.go('theimg'+this.nextimgidx+'_'+this.issid) : null;

		if(cimg && typeof cimg.complete=='boolean' && !cimg.complete){

			var cacheobj=this

			clearTimeout(this.loading)

			this.loading=setTimeout(function(){cacheobj.rotateimg()}, 300)

			return;

		}

		if (this.mouseovercheck==1){

			var cacheobj=this

			clearTimeout(this.mousep)

			this.mousep=setTimeout(function(){cacheobj.rotateimg()}, 100)

			return;

		}

		if(this.fade)

			this.resetit()

		var crossobj=this.tempobj=this.go(this.curcanvas)

		crossobj.style.zIndex++

		var othercanvas=this.curcanvas=="canvas_0"? this.go("canvas_1") : this.go("canvas_0");

		othercanvas.style.zIndex=0;

		if(this.descriptions)

		this.go('imgdsc'+this.issid).innerHTML = this.imgs[this.keeptrack()][2];

		if(this.counter){

		var padit='';

		for (var p=0; p<this.cpad-(this.nextimgidx+1).toString().length; p++)

			padit+='<span style="visibility:hidden;">0</span>';

		this.go('thecnt'+this.issid).innerHTML = padit+(this.keeptrack()<this.imgs.length? this.keeptrack()+1+startrec*30-30 : 1);

		}

		if (this.jumpto)

		this.go('goto'+this.issid).value=this.keeptrack()<this.imgs.length? this.keeptrack()+1 : 1;

		this.jumperidx=this.keeptrack()<this.imgs.length? this.keeptrack()+1 : 1;

		var fadeobj=this

		clearInterval(this.fadeclear)

		this.fadeclear=setInterval(function(){fadeobj.fadepic()},50)

		this.curcanvas=(this.curcanvas=="canvas_0")? "canvas_1" : "canvas_0"

	}

	else{

		var v4imgobj=document.images['defaultslide'+this.issid]

		v4imgobj.src=this.postimgs[this.nextimgidx].src

		this.nextimgidx=(this.nextimgidx<this.imgs.length-1)? this.nextimgidx+1 : 0

	}

}



inter_slide.prototype.resetit=function(){
	this.degree=10
	var crossobj=this.go(this.curcanvas)
	if (crossobj.filters&&crossobj.filters[0]){
	if (typeof crossobj.filters[0].opacity=="number") //if IE6+
	crossobj.filters(0).opacity=this.degree
	else //else if IE5.5-
	crossobj.style.filter="alpha(opacity="+this.degree+")"
	}
	else if (crossobj.style.MozOpacity)
	crossobj.style.MozOpacity=this.degree/101
	else if (crossobj.style.KhtmlOpacity)
	crossobj.style.KhtmlOpacity=this.degree/100
	else if (crossobj.style.opacity&&!crossobj.filters)
	crossobj.style.opacity=this.degree/101
}

inter_slide.prototype.startit=function(){
	this.playing=1
	var crossobj=this.go(this.curcanvas)
	this.populateslide(crossobj, this.nextimgidx)
	if (this.pausecheck){ //if slideshow should pause onmouseover
		var cacheobj=this
		var crossobjcontainer=this.go("imageContainer")
		crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
		crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
	}
	this.rotateimg()
	if(this.auto)
		this.gostop();
	else if(!this.auto)
		this.gostop(this.go('gostp'+this.issid));
	else if(this.ics && document.body.filters){ //kludge for IE5.5 bug
		this.buttons(false);
	}
}

inter_slide.prototype.gostop=function(el){
	if(el) el.value=el.value==' Stop '? ' Play ' : ' Stop ';
	if(this.inprocess&&this.playing){
		clearTimeout(this.inprocess);
		this.nextimgidx-=this.faded;
	}
	this.playing=!this.playing;
	if(this.playing){
		clearInterval(this.fadeclear)
		this.faded=1
		this.changeimg(true);
	}
	else{
		var loadidx=(this.keeptrack()<this.imgs.length-1)? this.keeptrack()+1 : 0
		this.loadimgidx[loadidx]=new Image();
		this.loadimgidx[loadidx].src=this.imgs[loadidx][1];
		this.jumper(this.jumperidx? this.jumperidx : 0)
		this.buttons(true);
	}
}

inter_slide.prototype.keeptrack=function(){
	if(!document.getElementsByTagName)
	return this.nextimgidx;
	var canvases=[this.go('canvas_0'), this.go('canvas_1')]
	if(canvases[0].style.zIndex>canvases[1].style.zIndex&&canvases[0].getElementsByTagName("img")[0])
		return parseInt(canvases[0].getElementsByTagName('img')[0].id.replace(/theimg/, ''))
	else if(canvases[1].getElementsByTagName("img")[1])
		return parseInt(canvases[1].getElementsByTagName('img')[1].id.replace(/theimg/, ''))
	else
		return this.nextimgidx;
}