/* -- Adobe GoLive JavaScript Library */





function newImage(arg) {

	if (document.images) {

		rslt = new Image();

		rslt.src = arg;

		return rslt;

	}

}







function changeImages() {

	changeImagesArray(changeImages.arguments);

}

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

		}

	}

}

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 CSOpenWindowPrompt(action) {

var where = self.location.href

var nw = prompt("Enter a new width:","")

if (nw != null) {

var nh = prompt("Enter a new height:","")

}



var wf = "";	

wf = wf + "width=" + nw;

wf = wf + ",height=" + nh;

wf = wf + ",resizable=" + (action[1] ? "yes" : "no");

wf = wf + ",scrollbars=" + (action[2] ? "yes" : "no");

wf = wf + ",menubar=" + (action[3] ? "yes" : "no");

wf = wf + ",toolbar=" + (action[4] ? "yes" : "no");

wf = wf + ",directories=" + (action[5] ? "yes" : "no");

wf = wf + ",location=" + (action[6] ? "yes" : "no");

wf = wf + ",status=" + (action[7] ? "yes" : "no");		



	if (nw == null || nh == null) { 

	return null

	} else {

	window.open(where,'testwin',wf);

	}

}

function CSvisits(action) {

mycookie = action[8]

cookieExpires = new Date

cookieExpires.setMonth(cookieExpires.getMonth() + 12)

visits = eval(cookieVal(mycookie))

visits++

document.cookie = mycookie+"="+visits+";expires=" + cookieExpires.toGMTString()

                

function cookieVal(cookieName) {

	thisCookie = document.cookie.split("; ")

		for (i=0; i<thisCookie.length; i++) {

			if (cookieName == thisCookie[i].split("=")[0]) {

			return thisCookie[i].split("=")[1]

			}

	}

 return 0

}

	if(visits == 1 && action[1] == true) alert(action[2])

	else

	if(action[5] == true) alert(action[3] + " " + visits)



	if(action[6] == true) {

		if(visits == action[7])

		alert(action[4])

		}

}