nn = (document.getElementById && navigator.appName == "Netscape") ? 1 : 0;
ns = (document.layers) ? 1 : 0;
op = (!nn && !ns && ( navigator.appName == "Opera" || navigator.userAgent.indexOf('Opera') != -1)) ? 1 : 0;
ie = (!nn && !op && !ns && document.all) ? 1 : 0; 

var scur=1; 
function swapch(id) {
newsrc='';
if (id==scur) return false;
 o=document.getElementById('sim'+scur);
 oc= document.getElementById('sim'+id);
 oc.className="wb";
 o.className="wob";
 scur=id;
 newsrc=document.getElementById('im').src.replace(/_\d\./,'_'+id+'.');
 document.getElementById('im').src=newsrc;
 return true;
}
function swapch2(id) {
newsrc='';
if (id==scur) return false;
 o=document.getElementById('sim'+scur);
 oc= document.getElementById('sim'+id);
 oc.className="wb";
 o.className="wob";
 scur=id;
 newsrc=document.getElementById('im').src.replace(/\d+\./,'0'+id+'.');
 document.getElementById('im').src=newsrc;
 return true;
}
function swap(id,img,cur,old) {
	a=eval(old);
	document.getElementById(a.ln).className="im"; 
	document.getElementById(cur).className="im2";
	a.ln=cur;
	d=document.getElementById(id);
	if (ie) {
		d.style.filter = "blendTrans(duration=1.4) revealTrans(duration=1.0,transition=6)";
		d.filters(0).apply();
		d.filters(1).apply();
		d.src=img;
		d.onload=function() {
			d.filters(0).play();
			d.filters(1).play();
			}
		} else {d.src=img;}
}
