/* -- 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, st) {
	var s=si.toUpperCase();
	var myID=id.toUpperCase()+":";
	var id1=s.indexOf(myID,st);
	if (id1==-1) return "";
	var ch=s.charAt(id1-1);
	if (ch!=" " && ch!="\t" && ch!="\n" && ch!=";" && ch!="{")
		return CSGetStyleAttrValue (si, id, id1+1);
	var start=id1+myID.length;
	ch=s.charAt(start);
	while(ch==" " || ch=="\t" || ch=="\n") {start++; ch=s.charAt(start);}
	s=s.substring(start,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",0);
		if (style.top=="") style.top=CSGetStyleAttrValue(si,"top",0);
		if (style.width=="") style.width=CSGetStyleAttrValue(si,"width",0);
		if (style.height=="") style.height=CSGetStyleAttrValue(si,"height",0);
		if (style.visibility=="") style.visibility=CSGetStyleAttrValue(si,"visibility",0);
		if (style.zIndex=="") style.zIndex=CSGetStyleAttrValue(si,"z-index",0);
	}
}
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 CSSetImageURL(action) {
	var img=CSGetImage(action[1]);
	if (img) img.src=action[2];
}

function CSOpenWindow(action) {
	var wf = "";	
	wf = wf + "width=" + action[3];
	wf = wf + ",height=" + action[4];
	wf = wf + ",resizable=" + (action[5] ? "yes" : "no");
	wf = wf + ",scrollbars=" + (action[6] ? "yes" : "no");
	wf = wf + ",menubar=" + (action[7] ? "yes" : "no");
	wf = wf + ",toolbar=" + (action[8] ? "yes" : "no");
	wf = wf + ",directories=" + (action[9] ? "yes" : "no");
	wf = wf + ",location=" + (action[10] ? "yes" : "no");
	wf = wf + ",status=" + (action[11] ? "yes" : "no");		
	window.open(action[1],action[2],wf);
}

function CSFieldValidate(action) { 
var form = action[1];
var elem = action[2];
var theEntry  = document.forms[form].elements[elem].value
var theFormElem = document.forms[form].elements[elem]
var badEntry = ""

	function theAlert () { 
	alert(action[6]);
	theFormElem.select();
	theFormElem.focus();
	}  	

	function isEmpty() { 
		if (theEntry == "") { 
		theAlert()
		} 	
	}

	function isNumber() { 
			if (theEntry == "") { 
			theAlert()
			} 		
		for (i=0; i<theEntry.length; i++) {  
			if (theEntry.charAt(i) < "0" || theEntry.charAt(i) > "9") {  
				badEntry = "notnumber"
				} 
			}  		
		if (badEntry == "notnumber") {
		theAlert()	
		}	
	} 
		
	function isAlpha() { 
			if (theEntry == "") { 
			theAlert()
			} 		
		for (i=0; i<theEntry.length; i++) {  
			if (theEntry.charAt(i) >= "0" && theEntry.charAt(i) <= "9") {  
				badEntry = "notalpha"
				} 
			}  		
		if (badEntry == "notalpha") {
		theAlert()	
		}	
	} 
				
	function requiredChars() {
	numofChars = theEntry.length
		if (numofChars != action[4]) {
			theAlert()
		} 
	}	

	function exactString() {
		if (theEntry != action[5]) {
			theAlert()
		} 
	}	
	
	function validEmail() {
		invalidChars = " /:,;"		
		if (theEntry == "") { 
			badEntry = "badEmail"
			}
		for (i=0; i < 5; i++)  {
			badChar = invalidChars.charAt(i)
				if (theEntry.indexOf(badChar,0) > -1) {
				badEntry = "badEmail"
				}
		}	
	atsignLoc = theEntry.indexOf("@",1)
		if (atsignLoc == -1) {
			badEntry = "badEmail"
		}		
		if (theEntry.indexOf("@",atsignLoc+1) > -1) {
		badEntry = "badEmail"
		}
	dotLoc = theEntry.indexOf(".",atsignLoc)
		if (dotLoc == -1) {
		badEntry = "badEmail"
		}
		if (dotLoc+3 > theEntry.length) {
		badEntry = "badEmail"
		}
		if (badEntry == "badEmail") {
		theAlert()
		}
	}

	function validCC() { 
	var theNumber = new Array(theEntry.length);
	var i = 0
	var total = 0
		for (i = 0; i < theEntry.length; ++i) {
		theNumber[i] = parseInt(theEntry.charAt(i))
		}
		for (i = theNumber.length -2; i >= 0; i-=2) {  
		theNumber[i] *= 2;							 
		if (theNumber[i] > 9) theNumber[i]-=9;			 
		}										 
		for (i = 0; i < theNumber.length; ++i) {
		total += theNumber[i];						 
		}	
		isinteger = total/10
		if(parseInt(isinteger)!=isinteger) {
		theAlert()
		}
	}
	
var type=action[3];
if(type==0) isEmpty()
else if(type==1) isNumber()
else if(type==2) isAlpha()
else if(type==3) requiredChars()
else if(type==4) exactString()
else if(type==5) validEmail()
else if(type==6) validCC()
}

		

// The ScrollArea 1.1 action by Michael Ahgren 2004

var timerID=null;
var tempAction=new Array()
var accMove=new Array()
var setUpIsDone=false
var sLayer=null
var cLayer=null
var sLayerTop=null
var cLayerHeight=null
var cLayerWidth=null
var sLayerLeft=null
var sLayerHeight=null
var uMax=0
var dMax=0
var lMax=0
var rMax=0
elem=new Array()
currentLayer=null


window.onload = NN6fix;

function NN6fix(){
	if (navigator.appName=="Netscape"&& document.getElementById){
	elem=document.getElementsByTagName("div")
		for(var i=0;i<elem.length;i++){
			if(elem[i].parentNode.id==""){
				data="rect(0px,"+elem[i].offsetWidth+"px,"+elem[i].offsetHeight+"px,0px)"
				elem[i].style.clip = data
		}
	}
}
}

function initScrolling (action) {
	if (action[9]){
		clearInterval(timerID)
	}else{
		tempAction=action
		if (currentLayer==null || currentLayer!=action[2]){
		setUp(tempAction)
	}
	
	timerID = setInterval('scrollText(tempAction)',action[3]);
	}
}

function scrollText (action) {
for (var i=5;i<=8;i++){
if (action[i]){
x=i+""
switch (x){
case "5":
if (accMove[5]<uMax){
	if(document.layers){
	sLayer.top-=action[4] 
	}
	if (document.all){
	sLayer.style.pixelTop-=action[4] 
	}
	if (document.getElementById&&!document.all){
	sLayer.style.top=parseInt(sLayer.style.top)-action[4]+"px"
	} 
accMove[5]+=action[4]
accMove[6]-=action[4]
}
break
case "6":
if (accMove[6]<dMax){
if(document.layers){
	sLayer.top+=action[4] 
	}
	if (document.all){
	sLayer.style.pixelTop+=action[4] 
	}
	if (document.getElementById&&!document.all){
	sLayer.style.top=parseInt(sLayer.style.top)+action[4]+"px"
	} 
accMove[6]+=action[4]
accMove[5]-=action[4]
}
break
case "7":
if (accMove[7]<lMax){
if(document.layers){
	sLayer.left-=action[4] 
	}
	if (document.all){
	sLayer.style.pixelLeft-=action[4] 
	}
	if (document.getElementById&&!document.all){
	sLayer.style.left=parseInt(sLayer.style.left)-action[4]+"px"
	} 
accMove[7]+=action[4]
accMove[8]-=action[4]
}
break
case "8":
if (accMove[8]<rMax){
if(document.layers){
	sLayer.left+=action[4] 
	}
	if (document.all){
	sLayer.style.pixelLeft+=action[4] 
	}
	if (document.getElementById&&!document.all){
	sLayer.style.left=parseInt(sLayer.style.left)+action[4]+"px"
	} 
accMove[8]+=action[4]
accMove[7]-=action[4]
}
break
}
}
}
}
function setUp(action){
	currentLayer=action[2]
		if (document.layers){
		sLayer=eval("document."+action[1]+".document."+action[2])
		cLayer=eval("document."+action[1])
		sLayerTop=sLayer.top
		cLayerHeight=cLayer.clip.height
		cLayerWidth=cLayer.clip.width
		sLayerLeft=sLayer.left
		sLayerHeight=sLayer.clip.height
		sLayerWidth=sLayer.clip.width
	}
	if(document.all){
	currentLayer=action[2]
		sLayer=eval("document.all."+action[2])
		cLayer=eval("document.all."+action[1])
		sLayerTop=eval(sLayer.offsetTop)
		cLayerHeight=cLayer.clientHeight
		cLayerWidth=cLayer.clientWidth
		sLayerLeft=sLayer.offsetLeft
		sLayerHeight=sLayer.clientHeight
		sLayerWidth=sLayer.clientWidth
		sLayer.style.pixelTop=sLayer.offsetTop
		sLayer.style.pixelLeft=sLayer.offsetLeft
	}
	if(document.getElementById && !document.all){
	currentLayer=action[2]
		sLayer=document.getElementById(action[2]) 
		cLayer=document.getElementById(action[1]) 
	if(navigator.userAgent.indexOf("Netscape6/6.0")!=-1 ){			
				sLayerTop=sLayer.offsetTop-sLayer.parentNode.offsetTop
				sLayerLeft=sLayer.offsetLeft-sLayer.parentNode.offsetLeft
			}else{
				sLayerTop=sLayer.offsetTop
				sLayerLeft=sLayer.offsetLeft
				cLayer.style.overflow=""
			}
		cLayerHeight=parseInt(cLayer.offsetHeight) 
		cLayerWidth=parseInt(cLayer.offsetWidth) 
		sLayerHeight=parseInt(sLayer.offsetHeight) 
		sLayerWidth=parseInt(sLayer.offsetWidth)
			if (!sLayer.style.top&&!sLayer.firstTime){
				sLayer.style.top=sLayerTop+"px"
				sLayer.style.left=sLayerLeft+"px"
				sLayer.firstTime=true
			}
	}
if(navigator.userAgent.indexOf("Opera")!=-1 && parseInt(navigator.userAgent.substr(navigator.userAgent.indexOf("Opera")+6,1))<7){
currentLayer=action[2]
	sLayer=document.getElementById(action[2]) 
	cLayer=document.getElementById(action[1]) 
	sLayerTop=sLayer.offsetTop
	sLayerLeft=sLayer.offsetLeft
	sLayerHeight=sLayer.style.pixelHeight
	sLayerWidth=sLayer.style.pixelWidth
	cLayerHeight=cLayer.style.pixelHeight
	cLayerWidth=cLayer.style.pixelWidth	
}
	uMax=(sLayerHeight-cLayerHeight+sLayerTop)
	dMax=-1*sLayerTop
	lMax=(sLayerWidth-cLayerWidth+sLayerLeft)
	rMax=-1*sLayerLeft
	if (uMax<0){
		uMax=0
	}
	if (dMax<0){
		dMax=0
	}
	if(lMax<0){
		lMax=0
	}
	if(rMax<0){
		rMax=0
	}
	for (var i=5;i<=9;i++){
	accMove[i]=0
	}	
}
//
//-->

// 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];
				}
			}
		}
	}
//-->

// 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);
					}
				}
			}
		}
	}
//-->

// SlideShowKit 1.5.1 by Nate Baldwin, www.mindpalette.com, April 27, 2004
// Slide Show Detail List...
function MPImgDetailList2(action) {
	var thisGroup = action[1];
	if (thisGroup == "") thisGroup = "default";
	if (MP_SSKParam1[thisGroup] != "undefined") {
		if (MPValidURLString(action[2])) {
			var thisSlide = new Object();
			thisSlide.imgurl = action[2];
			thisSlide.linkurl = (MPValidURLString(action[3])) ? action[3] : "";
			thisSlide.caption = action[4];
			thisSlide.descript = action[5];
			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);
		}
	}
//-->

// Slideshow Kit 1.5.1 by Nate Baldwin, www.mindpalette.com, July 14, 2004
// Slide Show DIV Action...
function MPSSKWriteDiv2(action) {
	var id = action[1];
	var content = action[2];
	var html = "";
	if (id != "") {
		html = '<'+'div id="'+id+'">'+content+'<'+'/div>'
		}
	if (html != "") document.write(html);
	}
//-->



function CSResizeWindow(action) { 
	if(navigator.appVersion.charAt(0) >=4) { window.resizeTo (action[1],action[2]) }
}
function CSCloseWindow() { 
if (self.parent.frames.length != 0) {
	self.parent.close()	
	} else {
	window.close()
	}
}
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 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);
	}
}