﻿/* -- Adobe GoLive JavaScript Library */

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	changeImagesArray(changeImages.arguments);
}
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 CSGotoLink(action) {
	if (action[2].length) {
		var hasFrame=false;
		for(i=0;i<parent.frames.length;i++) { if (parent.frames[i].name==action[2]) { hasFrame=true; break;}}
		if (hasFrame==true)
			parent.frames[action[2]].location = action[1];
		else
			window.open (action[1],action[2],"");
	}
	else location = action[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 frameP(action) {
		if(parent.frames.length==0) {
			var fileName=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length);
			window.location.href=action[1]+"?"+action[2]+"="+fileName;
		} else {
			if(top.location.search!="") {
				var sFrame=top.location.search.substring(1,top.location.search.indexOf("="));

				if(name==sFrame) {
					var sName=top.location.search.substring(top.location.search.indexOf("=")+1,top.location.search.length);
					var fileName=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length);
					if(fileName!=sName) {
						location=sName;
					}
				}
			}
		}
	}
function CSPakRemote(action) { 
	if (TRversion()) {
		if (action[2].length < 1) {
			opener.location.href=action[1];
		}
		else {
			opener.parent.frames[action[2]].location.href=action[1];
		}
	}
	return;
}

function TRversion() {
	return (navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 3)
          || (navigator.appName.indexOf("Explorer") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 3);
}
// ShowOff.action 1.2 - October 2002
// &#169; Copyright 2001 by Walter Blady
// All rights reserved
var SOisNav4 = navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion.charAt(0)) == 4;
var SOisIE4 = navigator.appVersion.indexOf("MSIE 4") >= 0;
var SOW3C = document.getElementById ? true : false;
var SOScope = "", SOStyle = "", SOClose = "", SOPrevBox = "";
var SOmouseTrapTimer = 0, SOaction, SOvis, SOhid, SOtrapDelay;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
	if (!SOisNav4) {
		SOScope = SOW3C ? 'getElementById("' : "all.";
		SOClose = SOW3C ? '")' : "";
		SOStyle = ".style";
	}
}
function WBShowOff(action) { 
	if (SOVersion() && action[3].length > 0) {
		SOaction = action;
		SOtrapDelay = action[6];
		clearTimeout(SOmouseTrapTimer);
		if (action[5] == 1 && action[4].length > 0) {
			var boxDivObj = SOGetDivObj(action[4]);
			if (boxDivObj.onmouseover == null) {
				boxDivObj.onmouseover = SOMouseTrapTimerQuit;
				boxDivObj.onmouseout = SOMouseTrap;
			}
		}
		var boxObj = SOGetObject(action[3]);
		if ( action[5] == 1) {
			var boxDivObj = SOGetDivObj(action[3]);
			if (boxDivObj.onmouseover == null) {
				boxDivObj.onmouseover = SOMouseTrapTimerQuit;
				boxDivObj.onmouseout = SOMouseTrap;
			}
		}
		SOvis = (SOW3C || SOisIE4) ? "visible" : "show";
		SOhid = (SOW3C || SOisIE4) ? "hidden" : "hide";
		if ((action[1] == 1 || action[1] == 2) && action[2].length > 0) {
			var obj = SOGetObject(action[2]);
			obj.visibility = SOhid;
		}
		if (SOPrevBox != "") {
			SOPrevBox.visibility = SOhid;
		}
		boxObj.visibility = SOvis;
		SOPrevBox = boxObj;
	}
	else {
		if (SOPrevBox) {
			SOMouseTrap()
		}
	}
	return;
}
function SOMouseTrap() {
	SOmouseTrapTimer = setTimeout("SOMouseTrapp()", SOtrapDelay);
	return;
}
function SOMouseTrapp() {
	var showOne = false;
	SOPrevBox.visibility = SOhid;
	if (SOaction[1] == 2 && SOaction[2].length > 0) {
		var boxObj = SOGetObject(SOaction[2]);
		boxObj.visibility = SOvis;
	}	
	return;
}
function SOMouseTrapTimerQuit() {
	clearTimeout(SOmouseTrapTimer);
	return;
}
function SOGetObject(obj) {
	var params = eval("document." + SOScope + obj + SOClose + SOStyle);
	return params;
}
function SOGetDivObj(obj) {
	var params = eval("document." + SOScope + obj + SOClose);
	return params;
}
function SOVersion() {
	return (navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 4)
          || (navigator.appName.indexOf("Explorer") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 4);
}
//
function CSPAKtrg2frames(action) { 
	parent.frames[action[1]].location.href = action[2]
	parent.frames[action[3]].location.href = action[4]
 }
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];}
		}
	}
}
