/* -- 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");
	}
}
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 CSSetStyleVis(s,v) {
	if (CSIsW3CDOM){CSIDOM();document.getElementById(s).style.visibility=(v==0)?"hidden":"visible";}
	else if(IsIE())CSIEStyl(s).visibility=(v==0)?"hidden":"visible";
	else CSNSStyl(s).visibility=(v==0)?'hide':'show';
}
function CSGetStyleVis(s) {
	if (CSIsW3CDOM) {CSIDOM();return(document.getElementById(s).style.visibility=="hidden")?0:1;}
	else if(IsIE())return(CSIEStyl(s).visibility=="hidden")?0:1;
	else return(CSNSStyl(s).visibility=='hide')?0:1;
}
function CSGetLayerClip (el) {
	CSIDOM();
	if (el.isIE) return (new CSRect(0,0,el.offsetWidth,el.offsetHeight));
	else if (CSBVers>=5) return (new CSRect(0,0,parseInt(el.style.width),parseInt(el.style.height)));
	else return (new CSRect(el.clip.left,el.clip.top,el.clip.width,el.clip.height));
}
function CSSetLayerClip (el,clipRect) {
    var l,t,r,b;
    l=clipRect.left; t=clipRect.top; r=l+clipRect.width; b=t+clipRect.height;
    if(el.isIE) { el.style.clip = "rect("+ t + " " + r + " " + b + " " + l + ")"; }
    else if (CSBVers>=5) el.style.clip = "rect("+ t + "px, " + r + "px, " + b + "px, " + l + "px)";
    else { el.clip.left=l; el.clip.top=t; el.clip.width=clipRect.width; el.clip.height=clipRect.height; }
	CSSetStyleVis(el.layer);
}
function CSRect (left,top,width,height) {
this.left=left; this.top=top; this.width=width; this.height=height;
}
function CSCreateTransElement (layer, steps) {
	var el;
	if (IsIE()) el=document.all.tags("div")[layer];
	else if (CSBVers>=5) el=document.getElementById(layer);
	else el=CSNSStyl(layer);
	if (el==null) return null;
	if (el.locked && (el.locked == true)) return null;
	el.isIE=IsIE();
	el.clipRect=CSGetLayerClip(el);
	if (el.clipRect==null) return null;
	el.maxValue=steps;
	if (el.maxValue<=0) el.maxValue=30;
	el.modus=""; el.layer=layer;
	el.width=el.clipRect.width; el.height=el.clipRect.height;
	el.locked = true;
	return el;
}
function CSDisposeTransElement (el) { el.locked = false; }
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;
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
mustInitImg = true;
function initImgID() {var 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) {
	var 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];}
		}
	}
}

function changeImages() {
	changeImagesArray(changeImages.arguments);
}

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 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++];}}}
function CSSetStyleDepth(s,depth) {
	if (CSIsW3CDOM)document.getElementById(s).style.zIndex=depth;
	else if (IsIE())CSIEStyl(s).zIndex=depth;
	else CSNSStyl(s).zIndex=depth;
}
function CSGetStyleDepth(s) {
	if (CSIsW3CDOM){CSIDOM();return document.getElementById(s).style.zIndex;}
	else if (IsIE())return (CSIEStyl(s).zIndex);
	else return (CSNSStyl(s).zIndex);
}
CSSeqArray = new Array;
function CSSeqActionFct(seq,loopCount,continueLoop) {
	if ((seq.loop < 2) || ((loopCount % 2) != 0)) {
		for (var i=0;i<seq.actionCount;i++) {
			if (seq.actions[3*i + 1] <= seq.frame) {
				if ((loopCount > 1) && (seq.actions[3*i + 1] < seq.start)) continue;
				if (seq.actions[3*i + 2] < loopCount) {
					seq.actions[3*i + 2] = loopCount; CSLoopIsRunning = true;
					CSAction(new Array(seq.actions[3*i + 0])); continueLoop = true;
				}
			} else { continueLoop = true; break; }
		}
	} else {
		for (var i=seq.actionCount-1;i>=0;i--) {
			if (seq.actions[3*i + 1] > seq.frame) {
				if (seq.actions[3*i + 1] > seq.end) continue;
				if (seq.actions[3*i + 2] < loopCount) {
					seq.actions[3*i + 2] = loopCount; CSLoopIsRunning = true;
					CSAction(new Array(seq.actions[3*i + 0])); continueLoop = true;
				}
			} else { continueLoop = true; break; }
		}
	}
	return continueLoop;
}		
function CSSeqFunction(fctInfo)
{
	var seq = fctInfo.data; var oldFrame = seq.frame;
	var newTicks = (new Date()).getTime();
	seq.frame = Math.round((seq.fps * (newTicks - seq.startTicks)/1000.0) - 0.5);
	var continueLoop  = false; var loopCount = 1;
	
	if (seq.loop > 0) {
		continueLoop = true;
		if (seq.loop == 1) {
			var iv = (seq.end - seq.start);
			var f = Math.round(((seq.frame - seq.start) / iv) - 0.5);
			if (f < 0) f = 0;
			loopCount = f+1;
			seq.frame = seq.start + ((seq.frame - seq.start) % (seq.end - seq.start));
		} else {
			var iv = (seq.end - seq.start);
			var f = Math.round(((seq.frame - seq.start) / iv) - 0.5);
			if (f < 0) f = 0;
			loopCount = f+1;
			f = (seq.frame - seq.start) % (2 * iv);
			if (f > iv) f = 2*iv - f;
			seq.frame = seq.start + f;
		}
	}
	continueLoop = CSSeqActionFct(seq,loopCount,continueLoop);
	for (var i=0;i<seq.tracks.length;i++) {
		var track = seq.tracks[i]; var frameCount = 0; var lastCount = 0; var partCount = 0;
		var partIdx = track.parts.ticks.length;
		for (var k=0;k<track.parts.ticks.length;k++) {
			frameCount += track.parts.ticks[k];
			if (frameCount > seq.frame) { partIdx = k; partCount = seq.frame - lastCount; break; }
			lastCount = frameCount;
		}
		if (partIdx < track.parts.ticks.length) {
			var type=track.parts.moveType[partIdx];
			if(type==1) CSSetLinearPos (track, partIdx, partCount);
			else if(type==2) CSSetCurvePos (track, partIdx, partCount);
			else if(type==3) if (oldFrame != seq.frame) CSSetRandomPos (track, partIdx, partCount);
							 else { x = CSGetStylePos(track.layer,0); y = CSGetStylePos(track.layer,1); }
			CSSetStyleVis(track.layer,track.parts.visibilities[partIdx]);
			CSSetStyleDepth(track.layer,track.parts.depths[partIdx]);
			continueLoop = true;
		} else {
			var partIdx = track.parts.moveType.length-1;
			var posArray = track.parts.positions;
			var x = posArray[partIdx * 6 + 0]; var y = posArray[partIdx * 6 + 1];
			CSSetStylePos(track.layer,0,x); CSSetStylePos(track.layer,1,y);
			CSSetStyleVis(track.layer,track.parts.visibilities[partIdx]);
			CSSetStyleDepth(track.layer,track.parts.depths[partIdx]);
		}
	}
	return continueLoop;
}
function CSSetLinearPos (track, partIdx, partCount) {
	var curTicks = track.parts.ticks[partIdx];
	var pIdx1 = partIdx * 6; var pIdx2 = (partIdx+1) * 6;
	var posArray = track.parts.positions;
	var x = posArray[pIdx1 + 0]; var y = posArray[pIdx1 + 1];
	var x1,x2,y1,y2;
	var factor = partCount/curTicks;
	x1 = x; y1 = y;
	x2 = posArray[pIdx2 + 0]; y2 = posArray[pIdx2 + 1];
	x = x1 * (1-factor) + x2 * factor; y = y1 * (1-factor) + y2 * factor;
	CSSetStylePos(track.layer,0,x); CSSetStylePos(track.layer,1,y);
}
function CSSetCurvePos (track, partIdx, partCount) {
	var curTicks = track.parts.ticks[partIdx];
	var pIdx1 = partIdx * 6; var pIdx2 = (partIdx+1) * 6;
	var posArray = track.parts.positions;
	var x = posArray[pIdx1 + 0]; var y = posArray[pIdx1 + 1];
	var x1,x2,x3,x4,y1,y2,y3,y4;
	var factor = partCount/curTicks;
	var t = factor; var u = t * t; var v = u * t;
	var val1 = 3*(u-t) - v + 1; var val2 = 3*(v+t - 2*u); var val3 = 3*(u-v); var val4 = v;
	x1 = x; y1 = y; x2 = posArray[pIdx1 + 2]; y2 = posArray[pIdx1 + 3];
	x3 = posArray[pIdx1 + 4]; y3 = posArray[pIdx1 + 5];
	x4 = posArray[pIdx2 + 0]; y4 = posArray[pIdx2 + 1];
	x = x1 * val1 + x2 * val2 + x3 * val3 + x4 * val4;
	y = y1 * val1 + y2 * val2 + y3 * val3 + y4 * val4;
	CSSetStylePos(track.layer,0,x); CSSetStylePos(track.layer,1,y);
}
function CSSetRandomPos (track, partIdx, partCount) {
	var curTicks = track.parts.ticks[partIdx];
	var pIdx1 = partIdx * 6; var pIdx2 = (partIdx+1) * 6;
	var posArray = track.parts.positions;
	var x = posArray[pIdx1 + 0]; var y = posArray[pIdx1 + 1];
	var x1,x2,y1,y2;
	var factor = partCount/curTicks;
	x1 = x; y1 = y;
	x2 = posArray[pIdx2 + 0]; y2 = posArray[pIdx2 + 1];
	var factorx = Math.random(); var factory = Math.random();
	x = x1 * (1-factorx) + x2 * factorx; y = y1 * (1-factory) + y2 * factory;
	CSSetStylePos(track.layer,0,x); CSSetStylePos(track.layer,1,y);
}
function CSStartSeq(name) {
	var seq = CSGetScene(name); var date = new Date()
	seq.startTicks = date.getTime()
	for (var i=0;i<seq.actionCount;i++) seq.actions[3*i+2] = 0;
	CSStartFunction(CSSeqFunction,seq);
}
function CSSceneObj (name,fps,loop,start,end,frame,sTicks,numAct,acts,tracks) {
	this.name=name;this.fps=fps;this.loop=loop;this.start=start;this.end=end;
	this.frame=frame;this.startTicks=sTicks;this.actionCount=numAct;
	this.actions=acts;this.tracks=tracks;
}
function CSTrackObj (name,partIdx,partCount,parts) {
	this.layer=name;this.partIdx=partIdx;this.partCount=partCount;this.parts=parts;
}
function CSPartObj (ticks,pos,depths,vis,moveType) {
	this.ticks=ticks;this.positions=pos;this.depths=depths;this.visibilities=vis;
	this.moveType=moveType;
}
function CSGetScene (name) {
	for (i=0;i<CSSeqArray.length;i++) { var seq = CSSeqArray[i]; if (seq.name==name) return seq; }
	return 0;
}

function CSAutoStartScene(action) { CSStartSeq (action[1]); }


// AdGoRound.action v1.4 - May, 2004
// © Copyright 1999 by Walter Blady
// All rights reserved
var AGRExposure = 0, AGRAction = null, AGRObjectArray = new Array(), AGRad;
var AGRW3C = document.getElementById ? true : false;
function WBAdGoRound(action) {
	if (AGRVersion()) {
		AGRAction = action;
		for (var i = 1; i < 26; i=i+5) {
			var j = i-((i-1)*5);
			if (action[i+1] != "" && action[i+2] > 0) {
				adObject = new Object();
				adObject.adGroup = action[i];
				adObject.placeholder = null;
				adObject.numberOfAds = action[i+2];
				adObject.exposure = action[i+3];
				adObject.random = action[i+4];
				adObject.adPointer = 1;
				adObject.display = AGRDisplay;
				if (adObject.random) {
					adObject.adPointer = (Math.floor((Math.random() * 10000)) % adObject.numberOfAds) + 1;
				}
				if (window.navigator.userAgent.indexOf("MSIE") > 0 || AGRW3C) {
					adObject.placeholder = document.images[action[i+1]];
				}
				else {
					adObject.placeholder = parseInt(navigator.appVersion.charAt(0)) > 3 ? AGRFindImageObject(action[i+1],0) : document.images[action[i+1]];
				}
				if (!adObject.running) {
					adObject.running = true;
					adObject.display();
				}
			}
		}
	}
	if (action[26] > 0) var limit = setTimeout("AGRVisitorLimit()", action[26]*1000*60);
	return;
}
function AGRDisplay() {
	if (this.adPointer > this.numberOfAds) {
		this.adPointer = 1;
	}
	this.ad = eval("AGRAd" + (this.adGroup + 1) + "_" + this.adPointer);
	if (this.ad != null) {
		this.placeholder.src = eval("this.ad()");
		if (AGRExposure > 0) {
			this.exposure = AGRExposure;
		}
	}
	var t = setTimeout("AGRNextAd" + this.adGroup + "()", this.exposure*1000);
	this.adPointer++;
	AGRObjectArray[this.adGroup+1] = this;
	return;
}
function AGRNextAd0() {
	AGRObjectArray[1].display();
	return;
}
function AGRNextAd1() {
	AGRObjectArray[2].display();
	return;
}
function AGRNextAd2() {
	AGRObjectArray[3].display();
	return;
}
function AGRNextAd3() {
	AGRObjectArray[4].display();
	return;
}
function AGRNextAd4(action) {
	AGRObjectArray[5].display();
	return;
}
function AGRNextAd5(action) {
	AGRObjectArray[6].display();
	return;
}
function AGRNextAd6() {
	AGRObjectArray[7].display();
	return;
}
function AGRNextAd7() {
	AGRObjectArray[8].display();
	return;
}
function AGRNextAd8(action) {
	AGRObjectArray[9].display();
	return;
}
function AGRNextAd9(action) {
	AGRObjectArray[10].display();
	return;
}
function AGRFindImageObject(baseImage, thisLayer) {
	if (thisLayer) {
		var thisDocument = thisLayer.document;
	}
	else {
		var thisDocument = document;
	}
	var imageObj = thisDocument[baseImage];
	if (imageObj) {
		return imageObj;
	}
	else {
		for (var i = 0; i < thisDocument.layers.length; i++) {
			imageObj = SACFindImageObject(baseImage, thisDocument.layers[i]); 
			if (imageObj) {
				break;
			}
		}
	}
	return imageObj;
}
function AGRVisitorLimit() {
	var url = AGRAction[27];
	if (url.indexOf("Reference!") == -1 && url != "#") {
		var params;
		if (AGRAction[28].length < 1) {
			window.location.href = url;
		}
		else {
			if (AGRAction[28].toLowerCase().indexOf("blank") != -1) {
				var ACNewWindow = window.open(url,"newWindow", "toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,personalbar=yes,scrollbars=yes,favorites=yes,resizable=yes");
				return;
			}
			else {
				params = eval(AGRAction[28] + ".window.location");
			}
			params.href = url;
		}
	}
	return;
}
function AGRVersion() {
	return (navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 3)
          || (navigator.appName.indexOf("Explorer") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 2);
}
// AdGoRoundLinks.action v1.4.2 - April, 2003
// © Copyright 1999 by Walter Blady
// All rights reserved
var AGRW3C = document.getElementById ? true : false;
function WBAdGoRoundLinks(action) {
	if (AGRVersion()) {
		var adlink = eval("AGRAdURL" + (action[1] + 1));
		if (adlink != "") {
			var params;
			if (action[2] == "") {
				window.location.href = adlink;
			}
			else {
				if (action[2].toLowerCase().indexOf("blank") != -1) {
					var params = "";
					var top = "";
					var left = "";
					if (action[14] == 1) {						
						top = action[5] <= screen.availHeight ? action[15] : screen.availHeight;
						left = action[4] <= screen.availWidth ? action[16] : screen.availWidth;
					}
					else if (action[14] == 2) {
						top = action[5] <= screen.availHeight ? (Math.round(screen.availHeight-action[5])/2) : action[15];
						left = action[4] <= screen.availWidth ? (Math.round(screen.availWidth-action[4])/2) : action[16];
					}
					var newWidth = "";
					var newHeight = "";
					if (action[3] == 1) {
						newWidth = (action[4] <= screen.availWidth) ? action[4] : screen.availWidth;
						newHeight = (action[5] <= screen.availHeight) ? action[5] : screen.availHeight;
					}
					else if (action[3] == 2) {
						newWidth = (action[4]*screen.availWidth/100 <= screen.availWidth) ? Math.round(action[i+5]*screen.availWidth/100) : screen.availWidth;
						newHeight = (action[5]*screen.availWidth/100 <= screen.availHeight) ? Math.round(action[i+6]*screen.availWidth/100) : screen.availHeight;
					}
					else if (action[3] == 3) {
						newWidth = screen.availWidth;
						newHeight = screen.availHeight;
					}
					params += "width=" + newWidth;
					params += ",height=" + newHeight;
					params += ",toolbar=" + (action[6] ? "1" : "0");
					params += ",location=" + (action[7] ? "1" : "0");
					params += ",directories=" + (action[8] ? "1" : "0");
					params += ",status=" + (action[9] ? "1" : "0");
					params += ",menubar=" + (action[10] ? "1" : "0");
					params += ",favorites=" + (action[11] ? "1" : "0");
					params += ",scrollbars=" + (action[12] ? "1" : "0");
					params += ",resizable=" + (action[13] ? "1" : "0");
					params += (AGRW3C) ? ",top=" + top + ",left=" + left : ",screenY=" + top + ",screenX=" + left;
					var AGRLNewWindow = window.open(adlink,"SACNewWindow", params);
					return;
				}
				else {
					params = eval(action[2] + ".window.location");
					params.href = adlink;
				}
			}
		}
	}
	return;
}
function AGRLVersion() {
	return (navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 3)
          || (navigator.appName.indexOf("Explorer") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 2);
}
// CSS Write Pro Action 3.1 for Adobe GoLive
// Copyright 2003 Scotland Software
// <http://www.scotlandsoftware.com/>
function isMSIE() {
	if ((navigator.appName.indexOf("Explorer") != -1) && (navigator.userAgent.indexOf("iCab") == -1) && (navigator.userAgent.indexOf("Opera") == -1) && (navigator.userAgent.indexOf("OmniWeb") == -1) && (parseInt(navigator.appVersion) >= 3)) {
		return true; }
	else {return false;}
}
function isNS() {
	if ((navigator.appName.indexOf("Netscape") != -1) && (navigator.userAgent.indexOf("iCab") == -1) && (navigator.userAgent.indexOf("Opera") == -1) && (navigator.userAgent.indexOf("OmniWeb") == -1) && (parseInt(navigator.appVersion) >= 4)) {
		return true; }
	else {return false;}
}
function isOpera() {
	if (((navigator.appName.indexOf("Opera") != -1) || (navigator.userAgent.indexOf("Opera") != -1)) && (navigator.userAgent.indexOf("iCab") == -1) && (navigator.userAgent.indexOf("OmniWeb") == -1) && (parseInt(navigator.appVersion) >= 4)) {
		return true; }
	else {return false;}
}
function isIcab() {
	if (((navigator.appName.indexOf("iCab") != -1) || (navigator.userAgent.indexOf("iCab") != -1)) && (navigator.userAgent.indexOf("Opera") == -1) && (navigator.userAgent.indexOf("OmniWeb") == -1) && (parseInt(navigator.appVersion) >= 4)) {
		return true; }
	else {return false;}
}
function isOmniweb() {
	if (((navigator.appName.indexOf("OmniWeb") != -1) || (navigator.userAgent.indexOf("OmniWeb") != -1)) && (navigator.userAgent.indexOf("Opera") == -1) && (navigator.userAgent.indexOf("iCab") == -1) && (parseInt(navigator.appVersion) >= 4)) {
		return true; }
	else {return false;}
}
function isSafari() {
	if (((navigator.userAgent.indexOf("Safari") != -1)) && (navigator.userAgent.indexOf("Opera") == -1) && (navigator.userAgent.indexOf("iCab") == -1) && (parseInt(navigator.appVersion) >= 4)) {
		return true; }
	else {return false;}
}
function isPC() {
	if ((navigator.userAgent.indexOf("Win") != -1) || (navigator.platform.indexOf("Win") != -1)) {
		return true; }
	else {return false;}
}
function isMac() {
	if ((navigator.appVersion.indexOf("Macintosh") != -1) || (navigator.platform.indexOf("Mac") != -1)) {
		return true; }
	else {return false;}
}
function doCSSWritePro(action) {
theStr="";
	if (isNS()) {
		if (isMac()) {
			theStr=action[1]; // Netscape 4 Mac
			if (parseInt(navigator.appVersion) >= 5) {
				theStr=action[2]; // Netscape 5 Mac
			}
			if (navigator.userAgent.indexOf("Netscape6") != -1) {
				theStr=action[3]; // Netscape 6 Mac
			}
			if (navigator.userAgent.indexOf("Netscape/7.0") != -1) {
				theStr=action[4]; // Netscape 7 Mac
			}
		}
		else if (isPC()) {
			theStr=action[5]; // Netscape 4 Win
			if (parseInt(navigator.appVersion) >= 5) {
				theStr=action[6]; // Netscape 5 Win
			}
			if (navigator.userAgent.indexOf("Netscape6") != -1) {
				theStr=action[7]; // Netscape 6 Win
			}
			if (navigator.userAgent.indexOf("Netscape/7.0") != -1) {
				theStr=action[8]; // Netscape 7 Win
			}
		}
	}
	if (isMSIE()) {
		if (isMac()) {
			theStr=action[9]; // Explorer 3 Mac
			if (parseInt(navigator.appVersion) >= 4) {
				theStr=action[10]; // Explorer 4 Mac
			}
			if ((navigator.userAgent.indexOf("MSIE 5") != -1) || (parseInt(navigator.appVersion) >= 5)) {
				theStr=action[11]; // Explorer 5+ Mac
			}
		}
		else if (isPC()) {
			theStr=action[12]; // Explorer 3 Win
			if (parseInt(navigator.appVersion) >= 4) {
				theStr=action[13]; // Explorer 4 Win
			}
			if ((navigator.userAgent.indexOf("MSIE 5") != -1) || (parseInt(navigator.appVersion) >= 5)) {
				theStr=action[14]; // Explorer 5 Win
			}
			if ((navigator.userAgent.indexOf("MSIE 6") != -1) || (parseInt(navigator.appVersion) >= 6)) {
				theStr=action[15]; // Explorer 6+ Win
			}
		}
	}
	if (isOpera()) {
		if (isMac()) {
			theStr=action[16]; // Opera Mac
		}
		else if (isPC()) {
			theStr=action[17]; // Opera Win
		}	
	}
	if (isIcab()) {
		if (isMac()) {
			theStr=action[18]; // iCab Mac
		}
	}
	if (isOmniweb()) {
		if (isMac()) {
			theStr=action[19]; // OmniWeb Mac (OS X)
		}
	}
	if (isSafari()) {
		if (isMac()) {
			theStr=action[20]; // Safari Mac (OS X)
		}
	}
	if (action[21]==true) {
		if (isNS()!=true && isMSIE()!=true && isOpera()!=true && isIcab()!=true && isOmniweb()!=true && isSafari()!=true && parseInt(navigator.appVersion)>=4) {
			theStr=action[22]; // Other
		}
	}
	// Write stylesheet reference
	if ((theStr!="") && (theStr!="(Empty Reference!)") && (theStr!="(EmptyReference!)")) {
		document.write("<LINK REL=\"stylesheet\" HREF=\""+theStr+"\" TYPE=\"text/css\">");
	}
} // end function
CSImages=new Array();
function CSPreloadImage(action) {
	if (document.images) { CSImages[CSImages.length]=new Image(); CSImages[CSImages.length-1].src=action[1]; }
}

function CSVisitorCookie(action) 
{
resultat = "visitor"
cookiename = action[1]
goUrl = action[2]
var arg = cookiename + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
	   if (document.cookie.substring(i, j) == arg)
     return CSVisitorGetCookie (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  VisitorSetCookie(cookiename)
  return null; 
}
function CSVisitorGetCookie (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1) 
    endstr = document.cookie.length;
  valeur=unescape(document.cookie.substring(offset, endstr))
  if (valeur==resultat)
  VisitorGotoLink(goUrl)
  else
  VisitorSetCookie(cookiename)
}


function VisitorGotoLink(goUrl) {
location = goUrl
}



function VisitorSetCookie(cookiename) 
{
var value="visitor"
var jours=500*24
path="/"
domain=null
var expdate = new Date ();
expdate.setTime (expdate.getTime() + (jours * 60 * 60 * 1000));
SetCookie(cookiename,value,expdate)
}

function SetCookie (cookiename, value) {
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = cookiename + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
}

function CSPlayScene(action) { CSStartSeq (action[1]); }

// Slideshow Kit 1.5.1 by Nate Baldwin, www.mindpalette.com, April 27, 2004
// Slide Show Options Action...
function MPGetFileName(startString) {
	thisString = startString+"";
	if (thisString.lastIndexOf('/') != -1) {
		var nameStart = thisString.lastIndexOf('/') + 1;
		var nameEnd = thisString.length;
		var thisFile = thisString.substring(nameStart, nameEnd);
		} else var thisFile = thisString;
	return thisFile;
	}
function MPValidURLString(testString) {
	var validString = true;
	if (testString == "") validString = false;
		else if (testString == "#") validString = false;
		else if (testString == "(EmptyReference!)") validString = false;
		else if (testString == "(Empty Reference!)") validString = false;
	if (validString == true) return true;
		else return false;
	}
function MPCheckExtFormat(thisString) {
	if (thisString.charAt(0) == ".") thisString = thisString.substring(1);
	return thisString;
	}
function MPCheckDirFormat(thisString) {
	if (thisString != "") {
		if (thisString.charAt(thisString.length - 1) == "/") thisString = thisString.substring(0, thisString.length - 1);
		var dirArray = thisString.split("/");
		var lastIndex = dirArray.length - 1;
		thisString = "";
		for (n=0; n<dirArray.length; n++) {
			var addThisBlock = true;
			if (n == lastIndex) {
				var testArray = dirArray[lastIndex].split(".");
				if (testArray.length > 1) addThisBlock = false;
				}
			if (addThisBlock == true) thisString += dirArray[n]+"/";
			}
		if (thisString.charAt(thisString.length - 1) != "/") thisString += "/";
		}
	return thisString;
	}
function MPJump2ImgNum2(menu, group) {
	var imgNum = menu.options[menu.selectedIndex].value;
	if (imgNum != "") {
		var imgSrc = this.imagelist[imgNum].imgurl;
		document.images[this.imageopts.imgname].src = imgSrc;
		if (this.imageopts.nextaltsrc != "" && this.imageopts.nextimgsrc != "" && this.imageopts.nextimg != "") {
			if (imgNum == (this.imagelist.length - 1))
				document.images[this.imageopts.nextimg].src = this.imageopts.nextaltsrc;
				else document.images[this.imageopts.nextimg].src = this.imageopts.nextimgsrc;
			}
		if (this.imageopts.prevaltsrc != "" && this.imageopts.previmgsrc != "" && this.imageopts.previmg != "") {
			if (imgNum == 0)
				document.images[this.imageopts.previmg].src = this.imageopts.prevaltsrc;
				else document.images[this.imageopts.previmg].src = this.imageopts.previmgsrc;
			}
		this.MPUpdateCaptDescDivs(imgNum);
		this.MPSetToggle("pause");
		this.autoscroll.run = false;
		if (typeof this.autoscroll.timer == "number") {
			clearTimeout(this.autoscroll.timer);
			this.autoscroll.timer = false;
			}
		}
	}
function MPUpdateImgMenu(newIndex) {
	var thisForm = this.imagegroup+"_form";
	var thisMenu = this.imagegroup+"_menu";
	if (typeof document.forms[thisForm] != "undefined") {
		if (typeof document.forms[thisForm].elements[thisMenu].options[newIndex] != "undefined") {
			for (m=0; m<document.forms[thisForm].elements[thisMenu].length; m++) {
				if (m == (newIndex)) document.forms[thisForm].elements[thisMenu].options[m].selected = true;
					else document.forms[thisForm].elements[thisMenu].options[m].selected = false;
				}
			}
		}
	}
function MPSetToggle(type) {
	if (this.imageopts.playbtn != "" && this.imageopts.playsrc != "" && this.imageopts.pausesrc != "") {
		if (type == "play") document.images[this.imageopts.playbtn].src = this.imageopts.pausesrc;
			else document.images[this.imageopts.playbtn].src = this.imageopts.playsrc;
		}
	}
function MPAutoScrollImgSeq1(group) {
	if (typeof MP_SSKParam1[group] != "undefined") {
		if (MP_SSKParam1[group].autoscroll.run == true) {
			var nextIndex = 0;
			var thisIndex = MP_SSKParam1[group].autoscroll.index;
			if (MP_SSKParam1[group].autoscroll.stall == true)
				nextIndex = thisIndex;
				else {
				if (MP_SSKParam1[group].autoscroll.reverse == false) {
					if (thisIndex < (MP_SSKParam1[group].imagelist.length - 1))
						nextIndex = (MP_SSKParam1[group].autoscroll.index + 1);
					} else {
					if (MP_SSKParam1[group].autoscroll.index > 0) nextIndex = thisIndex - 1;
						else nextIndex = (MP_SSKParam1[group].imagelist.length - 1);
					}
				}
			if (MP_SSKParam1[group].imagelist[nextIndex][0] != "")
				document.images[MP_SSKParam1[group].imageopts.imgname].src = MP_SSKParam1[group].imagelist[nextIndex].imgurl;
			var timer = setTimeout("this.MPAutoScrollImgSeq1('"+group+"')", MP_SSKParam1[group].autoscroll.delay);
			MP_SSKParam1[group].autoscroll.index = nextIndex;
			MP_SSKParam1[group].autoscroll.timer = timer;
			if (MP_SSKParam1[group].autoscroll.stall == false) {
				MP_SSKParam1[group].MPUpdateImgMenu(nextIndex);
				MP_SSKParam1[group].MPUpdateCaptDescDivs(nextIndex);
				}
			MP_SSKParam1[group].autoscroll.stall = false;
			} else {
			if (typeof MP_SSKParam1[group].autoscroll.timer == "number") {
				clearTimeout(MP_SSKParam1[group].autoscroll.timer);
				MP_SSKParam1[group].autoscroll.timer = false;
				}
			MP_SSKParam1[group].MPSetToggle("pause");
			MP_SSKParam1[group].autoscroll.run = false;
			}
		}
	}
function MPDivTextWrite2(div, text) {
	if (document.layers) {
		if (typeof eval("document."+div+".document") != "undefined") {
			with (eval("document."+div+".document")) {
				open();
				write("<"+"HTML"+"><"+"HEAD"+"><"+"/HEAD"+"><"+"BODY"+">"+text+"<"+"/BODY"+"><"+"/HTML"+">");
				close();
				}
			}
		} else if (document.all && typeof document.all[div] != "undefined") {
		document.all[div].innerHTML = text;
		} else if (document.getElementById && !document.all && typeof document.getElementById(div) != "undefined") {
		document.getElementById(div).innerHTML = text;
		}
	}
function MPUpdateCaptDescDivs(nextIndex) {
	var thisCaptDiv = this.imageopts.captdiv;
	if (thisCaptDiv == "#") thisCaptDiv = "";
	var thisCaptTxt = this.imagelist[nextIndex].caption;
	if (thisCaptDiv != "" && thisCaptTxt != "") MPDivTextWrite2(thisCaptDiv, thisCaptTxt);
	var thisDescDiv = this.imageopts.descdiv;
	var thisDescTxt = this.imagelist[nextIndex].descript;
	if (thisDescDiv != "" && thisDescTxt != "") MPDivTextWrite2(thisDescDiv, thisDescTxt);
	var thisCountDiv = this.imageopts.countdiv;
	if (thisCountDiv == "#") thisCountDiv = "";
	var thisCountTxt = (parseInt(nextIndex)+1)+" of "+this.imagelist.length;
	if (thisCountDiv != "" && thisCountTxt != " of ") MPDivTextWrite2(thisCountDiv, thisCountTxt);
	}
if (typeof MP_SSKParam1 == "undefined") var MP_SSKParam1 = new Array();
if (typeof MPImageSeqPreldArray1 == "undefined") var MPImageSeqPreldArray1 = new Array();
function MPSequence2Options(action) {
	var group = (action[1] != "") ? action[1] : "default";
	var imageopts = new Object();
	imageopts.stop = action[2];
	imageopts.alert = action[3];
	imageopts.startalert = (action[4] != "") ? action[4] : "beginning of slideshow";
	imageopts.endalert = (action[5] != "") ? action[5] : "end of slideshow";
	imageopts.nextimg = action[6];
	imageopts.nextaltsrc = (MPValidURLString(action[7])) ? action[7] : "";
	imageopts.previmg = action[8];
	imageopts.prevaltsrc = (MPValidURLString(action[9])) ? action[9] : "";
	imageopts.imgname = action[10];
	imageopts.nextimgsrc = (MPValidURLString(action[11])) ? action[11] : "";
	imageopts.previmgsrc = (MPValidURLString(action[12])) ? action[12] : "";
	imageopts.playbtn = action[13];
	imageopts.playsrc = (MPValidURLString(action[14])) ? action[14] : "";
	imageopts.pausesrc = (MPValidURLString(action[15])) ? action[15] : "";
	imageopts.captdiv = action[16];
	imageopts.descdiv = action[17];
	imageopts.countdiv = action[18];
	var autoscroll = new Object();
	autoscroll.run = false;
	autoscroll.index = 0;
	autoscroll.delay = 3000;
	autoscroll.reverse = false;
	autoscroll.timer = false;
	autoscroll.stall = false;
	var slideshow = new Object();
	slideshow.imagegroup = group;
	slideshow.imagelist = new Array();
	slideshow.imageopts = imageopts;
	slideshow.autoscroll = autoscroll;
	slideshow.MPJump2ImgNum2 = MPJump2ImgNum2;
	slideshow.MPAutoScrollImgSeq1 = MPAutoScrollImgSeq1;
	slideshow.MPUpdateImgMenu = MPUpdateImgMenu;
	slideshow.MPSetToggle = MPSetToggle;
	slideshow.MPUpdateCaptDescDivs = MPUpdateCaptDescDivs;
	MP_SSKParam1[group] = slideshow;
	var preldArray = new Array();
	var MPImageSeqPreldCount1 = MPImageSeqPreldArray1.length;
	if (action[7] != "") preldArray[preldArray.length] = action[7];
	if (action[9] != "") preldArray[preldArray.length] = action[9];
	if (action[11] != "") preldArray[preldArray.length] = action[11];
	if (action[12] != "") preldArray[preldArray.length] = action[12];
	if (action[14] != "") preldArray[preldArray.length] = action[14];
	if (action[15] != "") preldArray[preldArray.length] = action[15];
	if (preldArray.length > 0) {
		MPImageSeqPreldArray1[MPImageSeqPreldCount1] = new Array();
		for (i=0; i<preldArray.length; i++) {
			if (preldArray[i] != "") {
				MPImageSeqPreldArray1[MPImageSeqPreldCount1][i] = new Image();
				MPImageSeqPreldArray1[MPImageSeqPreldCount1][i].src = preldArray[i];
				}
			}
		}
	}
//-->

// SlideShowKit 1.5.1 by Nate Baldwin, www.mindpalette.com, April 27, 2004
// Slide Show List Action...
function MPLoadImgLst2(action) {
	var thisGroup = action[1];
	if (thisGroup == "") thisGroup = "default";
	if (MP_SSKParam1[thisGroup] != "undefined") {
		for (i=2; i<=21; i++) {
			if (MPValidURLString(action[i])) {
				var thisSlide = new Object();
				thisSlide.imgurl = action[i];
				thisSlide.linkurl = "";
				thisSlide.caption = "";
				thisSlide.descript = "";
				MP_SSKParam1[thisGroup].imagelist[MP_SSKParam1[thisGroup].imagelist.length] = thisSlide;
				}
			}
		}
	}
//-->

// SlideShowKit 1.5.1 by Nate Baldwin, www.mindpalette.com, April 27, 2004
// Slide Show Preload Action...
if (typeof MPImageSeqPreldArray1 == "undefined") var MPImageSeqPreldArray1 = new Array();
function MPImgSeqPrld2(action) {
	var group = (action[1] != "") ? action[1] : "default";
	var limit = action[2];
	var max = (action[3] > 0) ? action[3] : 10;
	MPImageSeqPreldCount1 = MPImageSeqPreldArray1.length;
	if (limit == false || max > MP_SSKParam1[group].imagelist.length) max = MP_SSKParam1[group].imagelist.length;
	MPImageSeqPreldArray1[MPImageSeqPreldCount1] = new Array();
	for (i=0; i<max; i++) {
		if (MP_SSKParam1[group].imagelist[i].imgurl != "") {
			MPImageSeqPreldArray1[MPImageSeqPreldCount1][i] = new Image();
			MPImageSeqPreldArray1[MPImageSeqPreldCount1][i].src = MP_SSKParam1[group].imagelist[i].imgurl;
			}
		}
	}
//-->

// SlideShowKit 1.5.2 by Nate Baldwin, mindpalette.com - August 30, 2004
// Slide Show Trigger Action...
function MPTriggerImageSeq(action) {
	var group = (action[1] != "") ? action[1] : "default";
	var type = (action[2] == 1 || action[2] == "1") ? "next" : "prev";
	var type = "";
	if (action[2] == "1") type = "prev";
		else if (action[2] == "2") type = "play";
		else if (action[2] == "3") type = "pause";
		else if (action[2] == "4") type = "toggle";
		else if (action[2] == "5") type = "start";
		else if (action[2] == "6") type = "end";
		else type = "next";
	var delay = (parseInt(action[3]) > 0) ? parseInt(action[3]) : 3000;
	var reverse = action[4];
	if (typeof MP_SSKParam1[group] != "undefined") {
		if (type == "toggle") {
			if (MP_SSKParam1[group].autoscroll.run == false) type = "play";
				else type = "pause";
			}
		MP_SSKParam1[group].MPSetToggle(type);
		MP_SSKParam1[group].autoscroll.run = false;
		if (typeof MP_SSKParam1[group].autoscroll.timer == "number") {
			clearTimeout(MP_SSKParam1[group].autoscroll.timer);
			MP_SSKParam1[group].autoscroll.timer = false;
			}
		if (type != "pause") {
			var nextIndex = (type == "end") ? (MP_SSKParam1[group].imagelist.length - 1) : 0;
			var thisIndex = -1;
			var imageList = MP_SSKParam1[group].imagelist;
			var img = MP_SSKParam1[group].imageopts.imgname;
			var stopScript = false;
			var currentImage = document.images[img].src;
			currentImage = MPGetFileName(currentImage);
			for (n=0; n<imageList.length; n++) {
				if (imageList[n] != "") {
					var testImage = MPGetFileName(imageList[n].imgurl);
					if (testImage == currentImage) {
						thisIndex = n;
						break;
						}
					}
				}
			if (type == "prev" || type == "next") {
				if (type == "next") {
					if (thisIndex >= (imageList.length - 1))
						nextIndex = 0;
						else if (typeof imageList[thisIndex + 1] == "undefined")
						nextIndex = 0;
						else if (imageList[thisIndex + 1].imgurl == "")
						nextIndex = 0;
						else nextIndex = thisIndex + 1;
					if (nextIndex == 0) {
						if (MP_SSKParam1[group].imageopts.stop == true) {
							if (thisIndex == (imageList.length - 1)) stopScript = true;
							nextIndex = (thisIndex >= 0) ? thisIndex : 0;
							}
						if (MP_SSKParam1[group].imageopts.alert == true && thisIndex == (imageList.length - 1))
							alert(MP_SSKParam1[group].imageopts.endalert);
						}
					} else {
					if ((thisIndex - 1) < 0)
						nextIndex = imageList.length - 1;
						else nextIndex = thisIndex - 1;
					if (nextIndex == (imageList.length - 1)) {
						if (MP_SSKParam1[group].imageopts.stop == true) {
							stopScript = true;
							nextIndex = (thisIndex >= 0) ? thisIndex : 0;
							}
						if (MP_SSKParam1[group].imageopts.alert == true) alert(MP_SSKParam1[group].imageopts.startalert);
						}
					}
				}
			}
		var options = MP_SSKParam1[group].imageopts;
		if (type == "play") {
			MP_SSKParam1[group].autoscroll.run = true;
			var startIndex = (thisIndex > 0) ? thisIndex : 0;
			MP_SSKParam1[group].autoscroll.index = startIndex;
			MP_SSKParam1[group].autoscroll.delay = delay;
			MP_SSKParam1[group].autoscroll.reverse = reverse;
			MP_SSKParam1[group].autoscroll.stall = action[5];
			if (options.playbtn != "" && options.playsrc != "" && options.pausesrc != "")
				document.images[options.playbtn].src = options.pausesrc;
			MPAutoScrollImgSeq1(group);
			} else {
			if (options.nextimg != "" && options.nextaltsrc != "" && options.nextimgsrc != "") {
				var fixImage = MP_SSKParam1[group].imageopts.nextimg;
				if (nextIndex == (imageList.length-1))
					document.images[fixImage].src = options.nextaltsrc;
					else document.images[fixImage].src = options.nextimgsrc;
				}
			if (options.previmg != "" && options.prevaltsrc != "" && options.previmgsrc != "") {
				var fixImage = MP_SSKParam1[group].imageopts.previmg;
				if (nextIndex == 0)
					document.images[fixImage].src = options.prevaltsrc;
					else document.images[fixImage].src = options.previmgsrc;
				}
			if (stopScript == false) {
				document.images[img].src = imageList[nextIndex].imgurl;
				MP_SSKParam1[group].MPUpdateImgMenu(nextIndex);
				MP_SSKParam1[group].MPUpdateCaptDescDivs(nextIndex);
				}
			}
		}
	}
//-->

function CSStartWipe (action)
{
	var el=CSCreateTransElement (action[1], action[2]);
	if (el==null) return;
	var dir=action[3];
	if (dir=="_inLeft") {el.steps=el.clipRect.width/el.maxValue; el.modus="in";}
	else if (dir=="_inRight") {el.steps=el.clipRect.width/el.maxValue; el.modus="in";}
	else if (dir=="_outLeft") {el.steps=el.clipRect.width/el.maxValue; el.modus="out";}
	else if (dir=="_outRight") {el.steps=el.clipRect.width/el.maxValue; el.modus="out";}
	else if (dir=="_inTop") {el.steps=el.clipRect.height/el.maxValue; el.modus="in";}
	else if (dir=="_inBottom") {el.steps=el.clipRect.height/el.maxValue; el.modus="in";}
	else if (dir=="_outTop") {el.steps=el.clipRect.height/el.maxValue; el.modus="out";}
	else if (dir=="_outBottom") {el.steps=el.clipRect.height/el.maxValue; el.modus="out";}
	else if (dir=="_inCenter") {el.HSteps=el.clipRect.width/el.maxValue; el.VSteps=el.clipRect.height/el.maxValue; el.modus="in";}
	else if (dir=="_outCenter") {el.HSteps=el.clipRect.width/el.maxValue; el.VSteps=el.clipRect.height/el.maxValue; el.modus="out";}
	if (el.modus=="") return;
	el.currentValue=0;
	el.glDir=action[3];
	CSStartFunction(CSDoWipe,el);
}
function CSDoWipe (info)
{
	var el = info.data;
	if (el==null) return false;
	if (el.currentValue==el.maxValue) { CSFinishWipe(el); return false; }
	var r = new CSRect(el.clipRect.left,el.clipRect.top,el.clipRect.width,el.clipRect.height);
	var dir=el.glDir;
	if (dir=="_inLeft") {r.left=r.width-el.currentValue*el.steps;}
	else if (dir=="_inTop") {r.top=r.height-el.currentValue*el.steps;}
	else if (dir=="_inRight") {r.width=el.currentValue*el.steps;}
	else if (dir=="_inBottom") {r.height=el.currentValue*el.steps;}
	else if (dir=="_outLeft") {r.width=r.width-el.currentValue*el.steps;}
	else if (dir=="_outTop") {r.height=r.height-el.currentValue*el.steps;}
	else if (dir=="_outRight") {r.left=el.currentValue*el.steps;}
	else if (dir=="_outBottom") {r.top=el.currentValue*el.steps;}
	else if (dir=="_inCenter") {r=CSCenterRectIn(el,r);}
	else if (dir=="_outCenter") {r=CSCenterRectOut(el,r);}
	CSSetLayerClip(el,r);
	el.currentValue+=1;
	return true;
}
function CSFinishWipe (el)
{
	if (el.modus=="in") CSSetLayerClip(el,el.clipRect);
	else { 
		el.clipRect=new CSRect(0,0,el.width,el.height); 
		CSSetLayerClip(el,el.clipRect); 
		CSSetStyleVis(el.layer,0);
	}
	CSDisposeTransElement(el);
}
function CSCenterRectIn(el,r)
{
	var hValue= el.currentValue*el.HSteps/2;
	var vValue= el.currentValue*el.VSteps/2;
	r.left=Math.round(r.left+r.width/2-hValue); 
	r.top=Math.round(r.top+r.height/2-vValue); 
	r.width=Math.round(hValue*2);
	r.height=Math.round(vValue*2);
	return r;
}
function CSCenterRectOut(el,r)
{
	var hValue= el.currentValue*el.HSteps/2;
	var vValue= el.currentValue*el.VSteps/2;
	r.left+=Math.round(hValue); 
	r.top+=Math.round(vValue); 
	r.width-=Math.round(hValue*2);
	r.height-=Math.round(vValue*2);
	return r;
}

function CSShowHide(action) {
	if (action[1] == '') return;
	var type=action[2];
	if(type==0) CSSetStyleVis(action[1],0);
	else if(type==1) CSSetStyleVis(action[1],1);
	else if(type==2) { 
		if (CSGetStyleVis(action[1]) == 0) CSSetStyleVis(action[1],1);
		else CSSetStyleVis(action[1],0);
	}
}

function CSSlideNewWindow(action) {
var wh = ""
if (action[7] || action[8] || action[9] == true) wh=action[4]-125
else wh = action[4]

var wf = "";	
wf = wf + "width=" + action[3];
wf = wf + ",height=" + wh;
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");		

if(navigator.appVersion.charAt(0) >=4) {
var sw=screen.width-20;
var sh=screen.height;
var newwidth=action[3]; 
var newheight=action[4];
var positionleft=(sw-newwidth)/2;
var positiontop=""
if (action[7] || action[8] || action[9] == true) positiontop=(sh-newheight)/3;
else positiontop=(sh-newheight)/2.5;
}
newwindow=window.open(action[1],action[2],wf); 
newwindow.focus()	
if(navigator.appVersion.charAt(0) >=4) {
	for(width1 = 1 ; width1 < positionleft ; width1 = width1 + 10)
	newwindow.moveTo(width1,positiontop)
	}
}

function CSprintdocument(action){
if (navigator.appName .indexOf("Microsoft") != -1 && navigator.platform.indexOf("Mac") != -1 || navigator.appVersion.indexOf("3.0") != -1) {
alert("Please use your browser\'s print command to print this document.");
	} else {
	(action[1] != "") ? (parent.frames[action[1]].print()) : (parent.print());
	}
}

//Tell A Friend ver. 1.0
//All rights reserved rasmussens design http://www.rasmussens.dk
function RDtaf(action){
var TAF;
if(action[1]==true){TAF=' '+action[2]+'';}
else TAF="";
TAF += ' <a href="mailto:?subject='+action[6]+'';
if(action[9]==true){TAF += ' '+document.title+' ';}
TAF += '&body='+action[7]+' '+window.location+' ';
TAF += '\"onMouseOver="window.status=\''+action[8]+'\'; return true;"';
TAF += 'TITLE="'+action[8]+'"';
TAF += '">'+action[3]+'<\/a>';
if(action[4]==true){TAF +=' '+action[5]+''};
document.write(TAF);
} 
//-->

