/* -- 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 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="0" 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();">Close Window<'+'/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.2 by Nate Baldwin, www.mindpalette.com, August 31, 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 thisIndex = MP_SSKParam1[group].autoscroll.index;
			if (MP_SSKParam1[group].imageopts.stop == true) {
				if (MP_SSKParam1[group].autoscroll.reverse == true) {
					if (thisIndex < 1) {
						MP_SSKParam1[group].autoscroll.run = false;
						if (MP_SSKParam1[group].imageopts.alert == true) alert(MP_SSKParam1[group].imageopts.startalert);
						}
					} else {
					if (thisIndex >= (MP_SSKParam1[group].imagelist.length - 1)) {
						MP_SSKParam1[group].autoscroll.run = false;
						if (MP_SSKParam1[group].imageopts.alert == true) alert(MP_SSKParam1[group].imageopts.endalert);
						}
					}
				}
			}
		if (MP_SSKParam1[group].autoscroll.run == true) {
			var nextIndex = 0;
			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 MPParseCountDivText(text, count, total) {
	var regexp = /\[count\]/g
	text = text.replace(regexp, count);
	var regexp = /\[total\]/g
	text = text.replace(regexp, total);
	return 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 countTxtTmp = (this.imageopts.counttxt != thisCountDiv) ? this.imageopts.counttxt : "";
	if (countTxtTmp == "") countTxtTmp = "[count] of [total]";
	var thisCountTxt = MPParseCountDivText(countTxtTmp, parseInt(nextIndex)+1, 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];
	imageopts.counttxt = action[19];
	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;
				}
			}
		}
	}
//-->

// Slideshow Kit 1.5.1 by Nate Baldwin, www.mindpalette.com, April 27, 2004
// Slide Show Menu Action...
function MPImgSeqMenu1(action) {
	var imgGroup = action[1];
	var visRows = (parseInt(action[2]) > 0) ? action[2] : "1";
	if (typeof MP_SSKParam1[imgGroup] != "undefined") {
		var currentImgName = MP_SSKParam1[imgGroup].imageopts.imgname;
		if (typeof document.images[currentImgName] != "undefined")
			var currentImg = document.images[currentImgName].src;
			else currentImg = "";
		var formHTML = "";
		currentImg = MPGetFileName(currentImg);
		var currentFound = false;
		var thisImgList = MP_SSKParam1[imgGroup].imagelist;
		var thisTotal = thisImgList.length;
		if (thisImgList.length > 0) {
			formHTML += "\n"+'<'+'form name="'+imgGroup+'_form"'+">\n";
			formHTML += '<'+'select name="'+imgGroup+'_menu" size="'+visRows+'" ';
			formHTML += 'onchange="MP_SSKParam1[\''+imgGroup+'\'].MPJump2ImgNum2(this, \''+imgGroup+'\');">'+"\n";
			for (n=0; n<thisImgList.length; n++) {
				var thisImg = MPGetFileName(thisImgList[n].imgurl);
				if (thisImg != "") {
					formHTML += '<'+'option ';
					if (currentImg == thisImg && currentFound == false) {
						formHTML += "selected ";
						currentFound = true;
						}
					var menuText = "";
					if (action[3] == "1") menuText = (n+1)+' of '+thisTotal;
						else if (action[3] == "2") {
						var caption = (thisImgList[n].caption != "") ? thisImgList[n].caption : thisImg;
						menuText = (n+1)+". "+caption;
						} else menuText = (n+1)+". "+thisImg;
					formHTML += 'value="'+n+'">'+menuText+'<'+'/option'+">\n";
					}
				}
			formHTML += '<'+'/select'+'>';
			formHTML += '<'+'/form'+'>';
			}
		document.write(formHTML);
		}
	}
//-->

// SlideShowKit 1.5 by Nate Baldwin, mindpalette.com - June 28, 2006
// Slide Show Trigger Action 1.5.6
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 == "next" || (type == "play" && !reverse)) {
				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 (type == "prev" || (type == "next" && reverse)) {
				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" && !stopScript) {
				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 (!stopScript) {
				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);
					}
				}
			}
		}
	}
//-->


