/* -- Adobe GoLive JavaScript Library */

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 */
}

// OpenPopup 2.0 by Nate Baldwin, www.mindpalette.com - copyright 2003 (May 7, 2004)
if (typeof MPStoreOpenWin2 == "undefined") MPStoreOpenWin2 = new Array();
if (typeof MPStoreWinStngs2 == "undefined") {
	MPStoreWinStngs2 = new Object();
	MPStoreWinStngs2.url = "";
	MPStoreWinStngs2.name = "";
	MPStoreWinStngs2.options = "";
	MPStoreWinStngs2.focus = true;
	MPStoreWinStngs2.html = "";
	MPStoreWinStngs2.redirect = "";
	}
function MPOpenPopupWin2(action) {
	MPStoreWinStngs2.url = "";
	MPStoreWinStngs2.name = "";
	MPStoreWinStngs2.options = "";
	MPStoreWinStngs2.focus = true;
	MPStoreWinStngs2.html = "";
	MPStoreWinStngs2.redirect = "";
	var thisURL = (action[1] != "#" && action[1] != "(EmptyReference!)" && action[1] != "(Empty Reference!)") ? action[1] : "";
	var redirect = (action[31] != "#" && action[31] != "(EmptyReference!)" && action[31] != "(Empty Reference!)") ? action[31] : "";
	if (thisURL != "") {
		var urlType = (action[2] == 1) ? "image" : "page";
		MPStoreWinStngs2.focus = action[3];
		var regExpr = /[\w\S?]/;
		var validName = "";
		action[11] = (action[11] == true) ? "yes" : "no";
		var winName = (action[4] != "") ? action[4] : "PopUpWin";
		for (var n=0; n<winName.length; n++) {
			if (regExpr.test(winName.charAt(n))) validName += winName.charAt(n);
			}
		winName = (validName != "") ? validName : "PopUpWin";
		var width = (action[7] > screen.availWidth) ? screen.availWidth : action[7];
		var height = (action[9] > screen.availHeight) ? screen.availHeight : action[9];
		if (action[6] == true || action[8] == true) {
			width = screen.availWidth;
			posX = 0;
			}
		if (action[6] == true || action[10] == true) {
			height = screen.availHeight;
			posY = 0;
			}
		var posX = (action[13] != "") ? action[13] : 0;
		var posY = (action[15] != "") ? action[15] : 0;
		if (action[12] == true && width > 0 && height > 0) {
			posX = Math.round((screen.availWidth - width) / 2);
			posY = Math.round((screen.availHeight - height) / 2);
			} else {
			if (action[14] == 1 && width > 0) posX = (screen.availWidth - width - posX);
				else if (action[14] == 2) posX = Math.round((screen.availWidth - width) / 2);
			if (action[16] == 1 && height > 0) posY = (screen.availHeight - height - posY);
				else if (action[16] == 2) posY = Math.round((screen.availHeight - height) / 2);
			}
		for (i=17; i<=22; i++) {
			action[i] = (action[i] == true) ? "yes" : "no";
			}
		if (action[5] == true && typeof MPStoreOpenWin2[winName] != "undefined") {
			var oldWindow = MPStoreOpenWin2[winName];
			if (oldWindow && typeof oldWindow == "object") if (!oldWindow.closed) oldWindow.close();
			}
		var windowOptions = "";
		if (width > 0) windowOptions += "width=" + width + ",";
		if (height > 0) windowOptions += "height=" + height + ",";
		windowOptions += "resizable=" + action[11];
		windowOptions += ",scrollbars=" + action[17];
		windowOptions += ",menubar=" + action[18];
		windowOptions += ",toolbar=" + action[21];
		windowOptions += ",directories=" + action[19];
		windowOptions += ",location=" + action[22];
		windowOptions += ",status=" + action[20];
		windowOptions += ",left=" + posX;
		windowOptions += ",top=" + posY;
		if (urlType == "image") {
			var font = "Verdana, Arial, Helvetica, sans-serif";
			if (action[28] == 1) font = "Arial, Helvetica, Geneva, Swiss, SunSans-Regular, sans-serif";
				else if (action[28] == 2) font = "Helvetica, Geneva, Arial, SunSans-Regular, sans-serif";
				else if (action[28] == 3) font = "\"Times New Roman\", Times, Georgia, serif";
				else if (action[28] == 4) font = "\"Courier New\", Courier, Monaco, monospace";
			var textColor = (action[27] != "") ? action[27] : "black";
			var linkColor = (action[30] != "") ? action[30] : "#00417d";
			var textSize = (action[29] != "" && action[29] > 5) ? action[29]+"" : "12";
			var backGround = (action[24] != "") ? action[24] : "#ffffff";
			var thisHTML = "";
			thisHTML += '<'+'!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'+"\n\n";
			thisHTML += '<'+'html>'+"\n\n";
			thisHTML += '<'+'head>'+"\n";
			thisHTML += '<'+'meta http-equiv="content-type" content="text/html;charset=iso-8859-1">'+"\n";
			if (action[23] != "") thisHTML += '<'+'title>'+action[23]+'<'+'/title>'+"\n";
			thisHTML += '<'+'style type="text/css" media="screen"><'+'!--'+"\n";
			thisHTML += 'body, div, td  { color: '+textColor+'; font-size: '+textSize+'px; font-family: '+font+'; background-color: '+backGround+'; margin: 0; padding: 0 }'+"\n";
			thisHTML += '.textpad  { margin: 0; padding: 4px 0 }'+"\n";
			if (action[25] == true) {
				thisHTML += 'a { color: '+linkColor+'; font-size: '+textSize+'px; text-decoration: none }'+"\n";
				thisHTML += 'a:link { color: '+linkColor+'; text-decoration: none }'+"\n";
				thisHTML += 'a:visited { color: '+linkColor+'; text-decoration: none }'+"\n";
				thisHTML += 'a:hover { color: '+linkColor+'; text-decoration: underline }'+"\n";
				}
			thisHTML += "--><"+"/style>\n<"+"/head>\n\n";
			thisHTML += '<'+'body bgcolor="'+backGround+'" leftmargin="0" marginheight="40" marginwidth="0" topmargin="0">'+"\n";
			if (action[26] != "") thisHTML += '<'+'div class="textpad" align="center">'+action[26]+'<'+'/div>'+"\n";
			thisHTML += '<'+'div align="center"><'+'img src="'+thisURL+'" alt="" border="0"><'+'/div>'+"\n";
			if (action[25] != "") thisHTML += '<'+'div class="textpad" align="center"><'+'a href="#" onclick="self.close();">Fermer<'+'/a><'+'/div>'+"\n";
			thisHTML += "<"+"/body>\n\n<"+"/html>";
			MPStoreWinStngs2.html = thisHTML;
			MPStoreWinStngs2.type = "image";
			thisURL = "";
			}
		MPStoreWinStngs2.name = winName;
		MPStoreWinStngs2.options = windowOptions;
		MPStoreWinStngs2.url = thisURL;
		MPStoreWinStngs2.redirect = redirect;
		var thisPopup = window.open(thisURL, winName, windowOptions);
		MPStoreOpenWin2[MPStoreWinStngs2.name] = thisPopup;
		setTimeout("MPTriggerDelayWin2()", 400);
		}
	}
function MPTriggerDelayWin2() {
	if (typeof MPStoreOpenWin2[MPStoreWinStngs2.name] == "object") {
		var thisPopup = MPStoreOpenWin2[MPStoreWinStngs2.name];
		if (thisPopup.closed) thisPopup = window.open(MPStoreWinStngs2.url, MPStoreWinStngs2.name, MPStoreWinStngs2.options);
		if (thisPopup && typeof thisPopup == "object") {
			if (MPStoreWinStngs2.type == "image" && MPStoreWinStngs2.html != "") {
				if (!thisPopup.closed) {
					thisPopup.document.open();
					thisPopup.document.write(MPStoreWinStngs2.html);
					thisPopup.document.close();
					}
				}
			}
		if (MPStoreWinStngs2.redirect != "") window.location = MPStoreWinStngs2.redirect;
		MPStoreOpenWin2[MPStoreWinStngs2.name] = thisPopup;
		if (thisPopup && typeof thisPopup == "object") if (!thisPopup.closed && MPStoreWinStngs2.focus) thisPopup.focus();
		MPStoreWinStngs2.url = "";
		MPStoreWinStngs2.name = "";
		MPStoreWinStngs2.options = "";
		MPStoreWinStngs2.focus = true;
		MPStoreWinStngs2.html = "";
		MPStoreWinStngs2.redirect = "";
		}
	}
//-->

// 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];
				}
			}
		}
	}
//-->

// Slideshow Kit 1.5.1 by Nate Baldwin, www.mindpalette.com, April 27, 2004
// Slide Show Folder Action...
function MPImgLinkFolder2(action) {
	var thisGroup = (action[1] != "") ? action[1] : "default";
	if (typeof MP_SSKParam1[thisGroup] != "undefined") {
		var imgDir = (MPValidURLString(action[2])) ? action[2] : "";
		imgDir = MPCheckDirFormat(imgDir);
		var startNum = (action[3] != "") ? parseInt(action[3]) : 1;
		var endNum = (action[4] != "") ? parseInt(action[4]) : 0;
		var imgExt = (action[5] != "") ? MPCheckExtFormat(action[5]) : "jpg";
		var linkImgs = action[6];
		var linkExt = (action[7] != "") ? MPCheckExtFormat(action[7]) : "html";
		var linkDir = (MPValidURLString(action[8])) ? action[8] : "";
		linkDir = MPCheckDirFormat(linkDir);
		if (endNum > 0 && endNum > startNum && imgDir != "") {
			for (i=startNum; i<=endNum; i++) {
				var thisSlide = new Object();
				thisSlide.imgurl = imgDir+i+"."+imgExt;
				thisSlide.linkurl = (linkImgs == true && linkDir != "") ? linkDir+i+"."+linkExt : "";
				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);
				}
			}
		}
	}
//-->

// Close Popup Redirect Action 1.01 by Nate Baldwin, www.mindpalette.com, copyright 2002...
var MP_CPRcounter = 0;
function MPCloseWin2(action) {
	MP_CPRcounter++;
	if (action[1] != "#" && action[1] != "<EmptyReference!)" && action[1] != "(Empty Reference)") self.opener.location = action[1];
	self.close();
	}
function MPFocusWin2() {
	if (MP_CPRcounter == 0) window.focus();
	}
window.onload = MPFocusWin2;

// Close Popup Window Action 1.0.1 by Nate Baldwin, www.mindpalette.com, copyright 2002
var MPClosePopCount1 = 0;
function MPCloseWin1() {
	MPClosePopCount1++;
	self.close();
	}
function MPFocusWin1() {
	if (MPClosePopCount1 == 0) window.focus();
	}
window.onload = MPFocusWin1;
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());
	}
}

// Version 1.1. A Michael Ahgren action.
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()
}

// AdCarousel.action v1.2.7 - July, 2003
// © Copyright 1999 by Walter Blady
// All rights reserved
var ACAdvert = new Object(), ACthisSec = null;
function WBAdCarousel(action) {
	if (ACVersion() && action[13] != "") {
		var adImg = null, count = 0;
		var ACW3C = document.getElementById ? true : false;
		while (action[count+1].indexOf("Reference!") == -1  && action[count+1] != "#" && count <= 11) {
			count += 1;
		}
		if (window.navigator.userAgent.indexOf("MSIE") > 0 || ACW3C) {
			adImg = document.images[action[13]];
		}
		else {
			adImg = parseInt(navigator.appVersion.charAt(0)) > 3 ? ACFindImageObject(action[13],0) : document.images[action[13]];
		}
		if (ACthisSec == null) {
			var thisDate = new Date();
			var ACthisSec = thisDate.getSeconds();
		}
		ACAdvert[action[13]] = (Math.floor(ACthisSec/5) % count) + 1;
		adImg.src = action[ACAdvert[action[13]]];
	}
	return;
}
function ACFindImageObject(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 = ACFindImageObject(baseImage, thisDocument.layers[i]); 
			if (imageObj) {
				break;
			}
		}
	}
	return imageObj;
}
function ACVersion() {
	return (navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 3)
          || (navigator.appName.indexOf("Explorer") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 2);
}
// AdCarouselLinks.action v1.4.2 - July, 2003
// © Copyright 1999 by Walter Blady
// All rights reserved
function WBAdCarouselLinks(action) {
	var url = action[ACAdvert[action[14]]];
	if (ACLVersion() && url.indexOf("Reference!") == -1 && url != "#") {
		var params;
		if (action[13].length < 1) {
			window.location.href = url;
		}
		else {
			if (action[13].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(action[13] + ".window.location");
			}
			params.href = url;
		}
	}
	return;
}
function ACLVersion() {
	return (navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 3)
          || (navigator.appName.indexOf("Explorer") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 2);
}

