/* -- Adobe GoLive JavaScript Library */

CSAg = window.navigator.userAgent; CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10);
CSIsW3CDOM = ((document.getElementById) && !(IsIE()&&CSBVers<6)) ? true : false;
function IsIE() { return CSAg.indexOf("MSIE") > 0;}
function CSIEStyl(s) { return document.all.tags("div")[s].style; }
function CSNSStyl(s) { if (CSIsW3CDOM) return document.getElementById(s).style; else return CSFindElement(s,0);  }
CSIImg=false;
function CSInitImgID() {if (!CSIImg && document.images) { for (var i=0; i<document.images.length; i++) { if (!document.images[i].id) document.images[i].id=document.images[i].name; } CSIImg = true;}}
function CSFindElement(n,ly) { if (CSBVers<4) return document[n];
	if (CSIsW3CDOM) {CSInitImgID();return(document.getElementById(n));}
	var curDoc = ly?ly.document:document; var elem = curDoc[n];
	if (!elem) {for (var i=0;i<curDoc.layers.length;i++) {elem=CSFindElement(n,curDoc.layers[i]); if (elem) return elem; }}
	return elem;
}
function CSGetImage(n) {if(document.images) {return ((!IsIE()&&CSBVers<5)?CSFindElement(n,0):document.images[n]);} else {return null;}}
CSDInit=false;
function CSIDOM() { if (CSDInit)return; CSDInit=true; if(document.getElementsByTagName) {var n = document.getElementsByTagName('DIV'); for (var i=0;i<n.length;i++) {CSICSS2Prop(n[i].id);}}}
function CSICSS2Prop(id) { var n = document.getElementsByTagName('STYLE');for (var i=0;i<n.length;i++) { var cn = n[i].childNodes; for (var j=0;j<cn.length;j++) { CSSetCSS2Props(CSFetchStyle(cn[j].data, id),id); }}}
function CSFetchStyle(sc, id) {
	var s=sc; while(s.indexOf("#")!=-1) { s=s.substring(s.indexOf("#")+1,sc.length); if (s.substring(0,s.indexOf("{")).toUpperCase().indexOf(id.toUpperCase())!=-1) return(s.substring(s.indexOf("{")+1,s.indexOf("}")));}
	return "";
}
function CSGetStyleAttrValue (si, id) {
	var s=si.toUpperCase();
	var myID=id.toUpperCase()+":";
	var id1=s.indexOf(myID);
	if (id1==-1) return "";
	s=s.substring(id1+myID.length+1,si.length);
	var id2=s.indexOf(";");
	return ((id2==-1)?s:s.substring(0,id2));
}
function CSSetCSS2Props(si, id) {
	var el=document.getElementById(id);
	if (el==null) return;
	var style=document.getElementById(id).style;
	if (style) {
		if (style.left=="") style.left=CSGetStyleAttrValue(si,"left");
		if (style.top=="") style.top=CSGetStyleAttrValue(si,"top");
		if (style.width=="") style.width=CSGetStyleAttrValue(si,"width");
		if (style.height=="") style.height=CSGetStyleAttrValue(si,"height");
		if (style.visibility=="") style.visibility=CSGetStyleAttrValue(si,"visibility");
		if (style.zIndex=="") style.zIndex=CSGetStyleAttrValue(si,"z-index");
	}
}
function CSSetStylePos(s,d,p) {
	if (CSIsW3CDOM)d==0?document.getElementById(s).style.left=p+"px":document.getElementById(s).style.top=p+"px";
	else if(IsIE())(d==0)?CSIEStyl(s).posLeft=p:CSIEStyl(s).posTop=p;
	else (d==0)?CSNSStyl(s).left=p:CSNSStyl(s).top=p;
}
function CSGetStylePos(s,d) {
	if (CSIsW3CDOM){CSIDOM();return parseInt((d==0)?document.getElementById(s).style.left:document.getElementById(s).style.top);}
	else if (IsIE()) {CSIEWinInit();return(d==0)?CSIEStyl(s).posLeft:CSIEStyl(s).posTop;}
	else {return (d==0)?CSNSStyl(s).left:CSNSStyl(s).top;}
}
CSIEWInit=false;
function CSIEWinInit() { if(CSIEWInit==true) return; else CSIEWInit=true; if (IsIE()&&(CSAg.indexOf("Win")!=-1)&&CSBVers==4) { var i=0; var lyr=document.all.tags("div")[i++]; while(lyr) {lyr.style.posLeft=lyr.offsetLeft; lyr.style.posTop=lyr.offsetTop; lyr=document.all.tags("div")[i++];}}}
CSLoopIsRunning = false; CSFctArray = new Array; CSTimeoutID = null;
function CSLoop() {	
	CSLoopIsRunning = false;
	for (i=0;i<CSFctArray.length;i++) {
		var curFct = CSFctArray[i];
		if (curFct)	{
			if (curFct.DoFunction(curFct)) { CSLoopIsRunning = true; curFct.counter++; }
			else CSFctArray[i] = 0;
		}
	}
	if (CSLoopIsRunning) CSTimeoutID = setTimeout("CSLoop()", 1);
}
function CSStartFunction(fct,data) {
	if (!CSLoopIsRunning) { CSFctArray = 0; CSFctArray = new Array; }
	var fctInfo = new Object;
	fctInfo.DoFunction = fct; fctInfo.counter = 0; fctInfo.data = data;
	CSFctArray[CSFctArray.length] = fctInfo; 
	if (!CSLoopIsRunning) CSLoop();
}
function CSStopFunction(sceneName) {
	var i;
	for (i=0;i<CSFctArray.length;i++) {
		var curFct = CSFctArray[i];
		if (curFct){ if (curFct.data.name == sceneName){ CSFctArray[i] = 0; return; } }
	}
}
function CSStopComplete() {
	if (CSTimeoutID == null) return;
	clearTimeout (CSTimeoutID); CSLoopIsRunning = false; CSTimeoutID = null;
}
function CSMoveLoop(fInf) {
	var ticks = 60 * (((new Date()).getTime()) - fInf.data.startTime)/1000;
	var f = ticks/fInf.data.ticks;
	if (f < 1) { CSSetStylePos(fInf.data.layer,0,fInf.data.start[0] * (1-f) + fInf.data.end[0] * f);
		CSSetStylePos(fInf.data.layer,1,fInf.data.start[1] * (1-f) + fInf.data.end[1] * f); return true; }
	else { CSSetStylePos(fInf.data.layer,0,fInf.data.end[0]);
		CSSetStylePos(fInf.data.layer,1,fInf.data.end[1]); }
	return false;
}
function CSSlideObj (layer,start,end,ticks,startTime) {
	this.layer=layer;this.start=start;this.end=end;this.ticks=ticks;this.startTime=startTime;
}
function CSSlideLayer(l,pos,anim,ticks) {
	var x = pos[0]; var y = pos[1];
	if (l == '') return;
	if (!anim) { CSSetStylePos(l,0,x); CSSetStylePos(l,1,y); }
	else {  var fctData = new CSSlideObj(l,new Array(CSGetStylePos(l,0),CSGetStylePos(l,1)),new Array(x,y),ticks,(new Date()).getTime()); CSStartFunction(CSMoveLoop,fctData); }
}
userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
mustInitImg = true;
function initImgID() {di = document.images; if (mustInitImg && di) { for (var i=0; i<di.length; i++) { if (!di[i].id) di[i].id=di[i].name; } mustInitImg = false;}}

function findElement(n,ly) {
	d = document;
	if (browserVers < 4)		return d[n];
	if ((browserVers >= 6) && (d.getElementById)) {initImgID; return(d.getElementById(n))}; 
	var cd = ly ? ly.document : d;
	var elem = cd[n];
	if (!elem) {
		for (var i=0;i<cd.layers.length;i++) {
			elem = findElement(n,cd.layers[i]);
			if (elem) return elem;
		}
	}
	return elem;
}

function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document; var img;
		for (i=0;i<array.length;i+=2) {
			img = null; var n = array[i];
			if (d.images) {
				if (d.layers) {img = findElement(n,0);}
				else {img = d.images[n];}
			}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (!img && d.getElementsByName) {
				var elms = d.getElementsByName(n);
				if (elms) {
					for (j=0;j<elms.length;j++) {
						if (elms[j].src) {img = elms[j]; break;}
					}
				}
			}
			if (img) {img.src = array[i+1];}
		}
	}
}

CSInit = new Array;
function CSScriptInit() {
if(typeof(skipPage) != "undefined") { if(skipPage) return; }
idxArray = new Array;
for(var i=0;i<CSInit.length;i++)
	idxArray[i] = i;
CSAction2(CSInit, idxArray);
}
CSStopExecution=false;
function CSAction(array) {return CSAction2(CSAct, array);}
function CSAction2(fct, array) { 
	var result;
	for (var i=0;i<array.length;i++) {
		if(CSStopExecution) return false; 
		var aa = fct[array[i]];
		if (aa == null) return false;
		var ta = new Array;
		for(var j=1;j<aa.length;j++) {
			if((aa[j]!=null)&&(typeof(aa[j])=="object")&&(aa[j].length==2)){
				if(aa[j][0]=="VAR"){ta[j]=CSStateArray[aa[j][1]];}
				else{if(aa[j][0]=="ACT"){ta[j]=CSAction(new Array(new String(aa[j][1])));}
				else ta[j]=aa[j];}
			} else ta[j]=aa[j];
		}			
		result=aa[0](ta);
	}
	return result;
}
CSAct = new Object;
CSIm=new Object();
function CSIShow(n,i) {
	if (document.images) {
		if (CSIm[n]) {
			var img=CSGetImage(n);
			if (img&&typeof(CSIm[n][i].src)!="undefined") {img.src=CSIm[n][i].src;}
			if(i!=0) self.status=CSIm[n][3]; else self.status=" ";
			return true;
		}
	}
	return false;
}
function CSILoad(action) {
	im=action[1];
	if (document.images) {
		CSIm[im]=new Object();
		for (var i=2;i<5;i++) {
			if (action[i]!='') {CSIm[im][i-2]=new Image(); CSIm[im][i-2].src=action[i];}
			else CSIm[im][i-2]=0;
		}
		CSIm[im][3] = action[5];
	}
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	d = document;
	if (d.images) {
		var img;
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			img = null;
			if (d.layers) {img = findElement(changeImages.arguments[i],0);}
			else {img = d.images[changeImages.arguments[i]];}
			if (img) {img.src = changeImages.arguments[i+1];}
		}
	}
}

function toggleImages() {
	for (var i=0; i<toggleImages.arguments.length; i+=2) {
		if (selected == toggleImages.arguments[i])
			changeImagesArray(toggleImages.arguments[i+1]);
	}
}

function CSClickReturn () {
	var bAgent = window.navigator.userAgent; 
	var bAppName = window.navigator.appName;
	if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
		return true; // dont follow link
	else return false; // dont follow link
}
function CSButtonReturn () { return !CSClickReturn(); }

function CSCloseWindow() { 
if (self.parent.frames.length != 0) {
	self.parent.close()	
	} else {
	window.close()
	}
}


function CSRemoveIEbox() {
	if (document.images && navigator.userAgent.indexOf("MSIE") != -1) {
		for(i=0;i<document.links.length;i++) {
			target = eval("document.links[i]")
			target.onfocus = blurHandler;
		}
	}
}

function blurHandler() {
	obj = window.event.srcElement;
	if (obj.tagName == "A" || obj.tagName == "AREA") obj.blur();
}


function CSMoveTo(action) { CSSlideLayer(action[1],action[2],action[3],action[4]); }

function CSSetImageURL(action) {
	var img=CSGetImage(action[1]);
	if (img) img.src=action[2];
}


function VSSetStyleSize(s,d,p) {
	if (CSIsW3CDOM) d == 0   ? document.getElementById(s).style.width = p+"px" : document.getElementById(s).style.height = p+"px";
	else if(IsIE()) (d == 0) ? document.all(s).style.width =  p+'px' : document.all(s).style.height = p+'px';
	else (d == 0)            ? CSNSStyl(s).width = p : CSNSStyl(s).height = p;
}

function VSSetStyleClip(s,t,r,b,l) {
	if (CSIsW3CDOM) document.getElementById(s).style.clip = "rect("+t+"px "+r+"px "+b+"px "+l+"px)";
	else if(IsIE()) document.all(s).style.clip = "rect("+t+"px "+r+"px "+b+"px "+l+"px)";
	else {
		CSNSStyl(s).clip.top    = t;
		CSNSStyl(s).clip.right  = r;
		CSNSStyl(s).clip.bottom = b;
		CSNSStyl(s).clip.left   = l;
	}
}

function VSGetStyleSize(s,d) {
	if (CSIsW3CDOM) return parseInt((d == 0) ? parseInt(document.getElementById(s).offsetWidth) : parseInt(document.getElementById(s).offsetHeight));
	else if (IsIE()) return(d == 0) ? document.all(s).offsetWidth : document.all(s).offsetHeight;
	else return (d == 0) ? CSNSStyl(s).clip.right : CSNSStyl(s).clip.bottom;
}

var wEl;
var clickDrag=false;
var doScroll;
function VSScDown(ev){
	if((document.layers&&ev.which!=1)||(document.all&&event.button!=1))return true;
	if(IsIE()){
		wEl=window.event.srcElement.parentElement.id;
	}else{
		if(CSBVers>=5){
			wEl=ev.target.parentNode.id;
		}else{
			wEl=ev.target.name;
		}
	}
	if(wEl==gScUp){
		if(CSIsW3CDOM)ev.preventDefault();
		return VSScrollUp();
	}
	if(wEl==gScDown){
		if(CSIsW3CDOM)ev.preventDefault();
		return VSScrollDown();
	}
	/*if (wEl == gScRulerV) {
		if (CSIsW3CDOM) ev.preventDefault();
	}*/
	if(wEl==gScDragV){
		if(CSIsW3CDOM)ev.preventDefault();
		VSScGetMouse(ev);
		sMouseY=mouseY;
		sScDragVT=CSGetStylePos(gScDragV,1);
		clickDrag=true;
	}
}
function VSScMove(ev){
	if((clickDrag==true)&&(wEl==gScDragV)&&(gScVDelta>0)){
		VSScGetMouse(ev);
		mDelta=sMouseY-mouseY;
		nScDragVT=sScDragVT-mDelta;
		if(nScDragVT<=gScDragVT)nScDragVT=gScDragVT;
		if(nScDragVT>=gScDragVDelta)nScDragVT=gScDragVDelta;
		CSSetStylePos(gScDragV,1,nScDragVT);
		nScContentT=parseInt(gScContentT-(((nScDragVT-gScDragVT)/(gScDragVDelta-gScDragVT))*gScVDelta));
		CSSetStylePos(gScContent,1,nScContentT);
	}
	if(IsIE())return false;
}
function VSScUp(ev){
	if(doScroll)clearTimeout(doScroll);
	clickDrag=false;
}
function VSScrollUp(){
	cScContentT=CSGetStylePos(gScContent,1);
	cScDragVT=CSGetStylePos(gScDragV,1);
	if(cScContentT<=0){
		nScContentT=parseInt(cScContentT+gScVSteps);
		if(nScContentT>0)nScContentT=0;
		CSSetStylePos(gScContent,1,nScContentT);
		nScDragVT=parseInt(gScDragVT+((gScDragVDelta-gScDragVT)*(-cScContentT/gScVDelta)));
		if(nScDragVT<gScDragVT)nScDragVT=gScDragVT;
		CSSetStylePos(gScDragV,1,nScDragVT);
		doScroll=setTimeout("VSScrollUp()",gScSpeed);
	}
	if(IsIE())return false;
}
function VSScrollDown(){
	cScContentT=CSGetStylePos(gScContent,1);
	cScDragVT=CSGetStylePos(gScDragV,1);
	if(cScContentT>(gScContainerH-gScContentH)){
		nScContentT=parseInt(cScContentT-gScVSteps);
		if(-nScContentT>=gScVDelta)nScContentT=-gScVDelta;
		CSSetStylePos(gScContent,1,nScContentT);
		nScDragVT=parseInt(gScDragVT+((gScDragVDelta-gScDragVH)*(-cScContentT/gScVDelta)));
		if(nScDragVT>=gScDragVDelta)nScDragVT=gScDragVDelta;
		CSSetStylePos(gScDragV,1,nScDragVT);
		doScroll=setTimeout("VSScrollDown()",gScSpeed);
	}
	if(IsIE()) return false;
}
function VSScGetMouse(ev){
	if (IsIE()) {
		mouseY=event.clientY+document.body.scrollTop;
		mouseX=event.clientX+document.body.scrollLeft;
	} else {
		mouseY=ev.pageY;
		mouseX=ev.pageX;
	}
}
function reloadPage(){
	location.reload();
}
function VSScrollBox(action){
	if(action[1]!=""){
		gScContainer=action[1];
		gScContainerT=CSGetStylePos(gScContainer,1);
		gScContainerL=CSGetStylePos(gScContainer,0);
		gScContainerW=VSGetStyleSize(gScContainer,0);
		gScContainerH=VSGetStyleSize(gScContainer,1);
	}
	if(action[2]!=""){
		gScContent=action[2];
		gScContentT=CSGetStylePos(gScContent,1);
		gScContentL=CSGetStylePos(gScContent,0);
		gScContentW=VSGetStyleSize(gScContent,0);
		gScContentH=VSGetStyleSize(gScContent,1);
	}
	if(action[3]!=""){
		gScUp=action[3];
		gScUpT=CSGetStylePos(gScUp,1);
		gScUpL=CSGetStylePos(gScUp,0);
		gScUpW=VSGetStyleSize(gScUp,0);
		gScUpH=VSGetStyleSize(gScUp,1);
	}
	if(action[4]!=""){
		gScRulerV=action[4];
		gScRulerVT=CSGetStylePos(gScRulerV,1);
		gScRulerVL=CSGetStylePos(gScRulerV,0);
		gScRulerVW=VSGetStyleSize(gScRulerV,0);
		gScRulerVH=VSGetStyleSize(gScRulerV,1);
	}
	if(action[5]!=""){
		gScDragV=action[5];
		gScDragVT=CSGetStylePos(gScDragV,1);
		gScDragVL=CSGetStylePos(gScDragV,0);
		gScDragVW=VSGetStyleSize(gScDragV,0);
		gScDragVH=VSGetStyleSize(gScDragV,1);
	}
	if(action[6]!=""){
		gScDown=action[6];
		gScDownT=CSGetStylePos(gScDown,1);
		gScDownL=CSGetStylePos(gScDown,0);
		gScDownW=VSGetStyleSize(gScDown,0);
		gScDownH=VSGetStyleSize(gScDown,1);
	}
	gScVSteps=(action[7]!="")?action[7]:5;
	gScSpeed=(action[8]!="")?action[8]:25;
	gScVDelta=gScContentH-gScContainerH;
	gScDragVDelta=gScRulerVH-gScDragVH+gScDragVT;
	/*if(!CSIsW3CDOM && !IsIE()){
		document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
		window.onresize = reloadPage;
	}*/
	document.onmousedown=VSScDown;
	document.onmousemove=VSScMove;
	document.onmouseup=VSScUp;
}


function VSOpenWindow(action) {
	var wf = "";
	if (action[15]) {
		wf += "width="   + screen.availWidth - action[3];
		wf += ",height=" + screen.availHeight - action[4];
	} else {
		if (action[3] != 0) wf += "width="   + action[3];
		if (action[4] != 0) wf += ",height=" + action[4];
	}
	if (action[16] && !action[15]) {
		sl = parseInt((screen.availWidth  - action[3])/2);
		st = parseInt((screen.availHeight - action[4])/2 - 24);
		wf += ",left="    + sl;
		wf += ",screenX=" + sl;
		wf += ",top="     + st;
		wf += ",screenY=" + st;
	} else {
		wf += ",left="    + action[5];
		wf += ",screenX=" + action[5];
		wf += ",top="     + action[6];
		wf += ",screenY=" + action[6];
	}
	wf += ",resizable="   + (action[7] ? "yes" : "no");
	if (action[17]) {
		if ((navigator.userAgent.indexOf("Mozilla/") == 0) && navigator.userAgent.indexOf("Gecko/") != -1) {
			wf += ",scrollbars=" + (action[8] ? "yes" : "no");
		} else {
			wf += ",scrollbars=" + "no";
		}
	} else {
		wf += ",scrollbars=" + (action[8] ? "yes" : "no");
	}
	wf += ",menubar="     + (action[9]  ? "yes" : "no");
	wf += ",toolbar="     + (action[10] ? "yes" : "no");
	wf += ",directories=" + (action[11] ? "yes" : "no");
	wf += ",location="    + (action[12] ? "yes" : "no");
	wf += ",status="      + (action[13] ? "yes" : "no");
	wf += ",dependent="   + (action[14] ? "yes" : "no");
	
	newWin = window.open(action[1],action[2],wf);
	newWin.focus();
}


function CSOpenWindow(action) {
	var wf = "";	
	wf = wf + "width=" + action[3];
	wf = wf + ",height=" + action[4];
	wf = wf + ",resizable=" + (action[5] ? "yes" : "no");
	wf = wf + ",scrollbars=" + (action[6] ? "yes" : "no");
	wf = wf + ",menubar=" + (action[7] ? "yes" : "no");
	wf = wf + ",toolbar=" + (action[8] ? "yes" : "no");
	wf = wf + ",directories=" + (action[9] ? "yes" : "no");
	wf = wf + ",location=" + (action[10] ? "yes" : "no");
	wf = wf + ",status=" + (action[11] ? "yes" : "no");		
	window.open(action[1],action[2],wf);
}

function CSActionGroup (action) {
	for(var i=1;i<action.length;i++) { CSAction(new Array(action[i])); }
}

CSImages=new Array();
function CSPreloadImage(action) {
	if (document.images) { CSImages[CSImages.length]=new Image(); CSImages[CSImages.length-1].src=action[1]; }
}

VSSSci  = 1; // current slideshow img
SSpla = false; // palindrome active false

function VSSSClick(SSnm,SSmx,SSdir,SSlp,SSpl,SSci,SScof,SScon,SSsnum){
	var SSimg = null;
	if (document.images) {
		if (!IsIE() && CSBVers < 5) VSimg = CSFindElement(SSnm,0);
		else SSimg = document.images[SSnm];
		SSimgsrc  = SSimg.src;
		SSimgsrcl = SSimgsrc.length;
		SSimgsrcc = SSimgsrcl-6;
		SSimgdir  = SSimgsrc.substring(0,SSimgsrcc);
		SSimgnum  = SSimgsrc.substring(SSimgsrcc,SSimgsrcc+2);
		SSimgsuf  = SSimgsrc.substring(SSimgsrcc+2,SSimgsrcl);
		if (SSimgsuf==".jpg"||SSimgsuf==".JPG"||SSimgsuf==".gif"||SSimgsuf==".GIF") {
		} else {
			alert("Image extension must be .jpg or .gif (case sensitive). Images must be numbered 01, 02 ...");
		}
		VSSSSlideDo(SSmx,SSimgsuf,SSimgdir,SSimgnum,SSnm,SSdir,SSlp,SSpl,SSci,SScof,SScon,SSsnum);
	}
}

function VSSSSlideDo(SSmx,SSimgsuf,SSimgdir,SSimgnum,SSnm,SSdir,SSlp,SSpl,SSci,SScof,SScon,SSsnum) {
	VSSSci = parseFloat(SSimgnum);
	if ((SSdir == false) && (SSsnum == "")) {
		if (SSlp && SSpl) {
			if (!SSpla && VSSSci < SSmx) {
				VSSSci ++;
			} else if (!SSpla && VSSSci == SSmx) {
				SSpla = true; VSSSci --;
			} else if (SSpla && VSSSci == 1) {
				SSpla = false; VSSSci ++;
			} else {
				VSSSci --; 
			}
		} else if (SSlp && !SSpl) {
			if (VSSSci < SSmx) VSSSci ++;
			else VSSSci = 1;
		} else {
			if (VSSSci < SSmx) VSSSci ++;
		}
	} else if  ((SSdir == true) && (SSsnum == "")){
		if (SSlp && SSpl) {
			if (!SSpla && VSSSci < SSmx) {
				VSSSci ++;
			} else if (!SSpla && VSSSci == SSmx) {
				SSpla = true; VSSSci --;
			} else if (SSpla && VSSSci == 1) {
				SSpla = false; VSSSci ++;
			} else {
				VSSSci --; 
			}
		} else if (SSlp && !SSpl) {
			if (VSSSci > 1) VSSSci --;
			else VSSSci = SSmx;
		} else {
			if (VSSSci > 1) VSSSci --;
		}
	} else {
		VSSSci = SSsnum;
	}
	if (VSSSci < 10) VSsnum = "0" + VSSSci;
	else VSsnum = VSSSci;
	VSsource = SSimgdir+VSsnum+SSimgsuf;
	var VSimg = null;
	if (document.images) {
		if (!IsIE() && CSBVers < 5) VSimg = CSFindElement(SSnm,0);
		else VSimg = document.images[SSnm];
		if (VSimg) VSimg.src = VSsource;
	}
	VSSSstatimgchg(SSmx,SSci,SScof,SScon,VSSSci);
}

function VSSSstatimgchg(SSmx,SSci,SScof,SScon,VSSSci) {
	for (i=1;i<=SSmx;i++) {
		changeImages(SSci+i,SScof);
	}
	changeImages(SSci+VSSSci,SScon);
}

function VSSlideShowDlx(action) {
	var VSSSnm        = action[1]; // name of slideshow image
	var VSSSmx        = action[2]; // maximum number of images
	var VSSSrwdImgOff = action[3]; // rewind image off
	var VSSSrwdImgOn  = action[4]; // rewind image on
	var VSSSfwdImgOff = action[5]; // foreward image off
	var VSSSfwdImgOn  = action[6]; // foreward image on
	var VSSScurImgOff = action[7]; // status image off
	var VSSScurImgOn  = action[8]; // status image on
	var VSSSlp        = action[9]; // loop
	var VSSSpl        = action[10]; // palindrome

	var VSSSrwdImgNam = VSSSnm+"_rwd"; // name of the rewind image
	var VSSSfwdImgNam = VSSSnm+"_fwd"; // name of the foreward image
	var VSSScurImgNam = VSSSnm+"_cur"; // name of the status image

	var VSSScrtl        = "<nobr>";
	VSSScrtl += "<a onclick=\"VSSSClick('"+VSSSnm+"',"+VSSSmx+",true,"+VSSSlp+","+VSSSpl+",'"+VSSScurImgNam+"','"+VSSScurImgOff+"','"+VSSScurImgOn+"','');return false;\" ";
	if (VSSSrwdImgOn != "") VSSScrtl += "onmouseover=\"changeImages('"+VSSSrwdImgNam+"','"+VSSSrwdImgOn+"');return true\" onmouseout=\"changeImages('"+VSSSrwdImgNam+"','"+VSSSrwdImgOff+"');return true\" ";
	VSSScrtl += "href=\"#\"><img src=\""+VSSSrwdImgOff+"\" alt=\""+VSSSrwdImgNam+"\" name=\""+VSSSrwdImgNam+"\" border=\"0\"><\/a>";
	for (i=1;i<=VSSSmx;i++) {
		if (i==1) VSSScrtl += "<a href=\"#\" onclick=\"VSSSClick('"+VSSSnm+"',"+VSSSmx+",false,"+VSSSlp+","+VSSSpl+",'"+VSSScurImgNam+"','"+VSSScurImgOff+"','"+VSSScurImgOn+"',"+i+");return false;\"><img src=\""+VSSScurImgOn+"\" alt=\""+VSSScurImgNam+i+"\" name=\""+VSSScurImgNam+i+"\" border=\"0\"><\/a>";
		else      VSSScrtl += "<a href=\"#\" onclick=\"VSSSClick('"+VSSSnm+"',"+VSSSmx+",false,"+VSSSlp+","+VSSSpl+",'"+VSSScurImgNam+"','"+VSSScurImgOff+"','"+VSSScurImgOn+"',"+i+");return false;\"><img src=\""+VSSScurImgOff+"\" alt=\""+VSSScurImgNam+i+"\" name=\""+VSSScurImgNam+i+"\" border=\"0\"><\/a>";
	}
	VSSScrtl += "<a onclick=\"VSSSClick('"+VSSSnm+"',"+VSSSmx+",false,"+VSSSlp+","+VSSSpl+",'"+VSSScurImgNam+"','"+VSSScurImgOff+"','"+VSSScurImgOn+"','');return false;\" ";
	if (VSSSfwdImgOn != "") VSSScrtl += "onmouseover=\"changeImages('"+VSSSfwdImgNam+"','"+VSSSfwdImgOn+"');return true\" onmouseout=\"changeImages('"+VSSSfwdImgNam+"','"+VSSSfwdImgOff+"');return true\" ";
	VSSScrtl += "href=\"#\"><img src=\""+VSSSfwdImgOff+"\" alt=\""+VSSSfwdImgNam+"\" name=\""+VSSSfwdImgNam+"\" border=\"0\"><\/a>";
	VSSScrtl += "<\/nobr>";

	document.write(VSSScrtl);
}


gActLinkImg = new Array("","","");

function VSLinkImageReset() {
	if (gActLinkImg[0] != "") {
		changeImages(gActLinkImg[0],gActLinkImg[2]);
	}
	gActLinkImg[0] = "";
	gActLinkImg[1] = "";
	gActLinkImg[2] = "";
}

function VSLinkImageClick(action) {
	if ((action[1] != gActLinkImg[0]) && (gActLinkImg[0] != "")) {
		changeImages(gActLinkImg[0],gActLinkImg[2]);
	}
	changeImages(action[1],action[2]);
	gActLinkImg[0] = action[1];
	gActLinkImg[1] = action[2];
	gActLinkImg[2] = action[3];
}

function VSLinkImageOverOut(action) {
	if (action[1] != gActLinkImg[0]) {
		changeImages(action[1],action[2]);
	}
}





