/* -- Adobe GoLive JavaScript Library */
/* -- Global Functions */
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);
}
CSInit = new Array;
CSExit = new Array;
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 */
}
/* -- Action Functions */
function CSFixFct() {
	var d = document; var w = window;
	if (d.cs.csFix.w != w.innerWidth || d.cs.csFix.h != w.innerHeight) {
		d.location = d.location; }
}
function CSNSFix(action) { 
	var d = document; var w = window;
	if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
		if (typeof d.cs == 'undefined') { 
			d.cs = new Object;
			d.cs.csFix = new Object; 
		} else if (CSIsFrame (w) == true) CSFixFct();
		d.cs.csFix.w = w.innerWidth;
		d.cs.csFix.h = w.innerHeight; 
		window.onresize = CSFixFct;
	  }
}
function CSIsFrame (window) {
	var rootWindow = window.parent;
	if (rootWindow == 'undefined') return false;
	for (i = 0; i < rootWindow.frames.length; i++)
		if (window == rootWindow.frames[i]) return true;
	return false;
}
// StyleDirect.action v2.0 - June, 2005
// © Copyright 1999 by Walter Blady
// All rights reserved
var SDisNav4 = navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion.charAt(0)) <= 4;
function WBStyleDirect(action) {
	if (SDVersion()) {
		if (action[1] == 0) {
			if (SDisNav4 && navigator.appName.indexOf("OmniWeb") == -1) window.onresize = SDControl;
			var compat = false;
			var uAgent = window.navigator.userAgent;
			var bappName = window.navigator.appName;
			var appVers = window.navigator.appVersion;
			var line = "";
			var cookieSheet = SDGetCookie("SDCookie");
			if (cookieSheet != "") {
				cookieSheet = cookieSheet.substr(cookieSheet.indexOf("=") + 1, cookieSheet.length);
			}
			if ((bappName.indexOf("Netscape") > -1) && !(bappName.indexOf("WebTV") > -1)) {
				if (navigator.platform.indexOf("Mac") != -1) {
					for (var i = 3; i < 6; i++) {
						if (action[i].indexOf("Reference!") == -1 && action[i] != "#" && action[i] != cookieSheet) {
							line += '<link rel="stylesheet" href="' + action[i] + '" media="screen">\n';
						}
					}
					if (action[2].indexOf("Reference!") == -1 && action[2] != "#" && action[2] != cookieSheet) {
						line += '<link rel="stylesheet" href="' + action[2] + '" media="screen">\n';
					}
					SDdefaultStyleSheet = action[2];
					compat = true;
				}
				else if (navigator.platform.indexOf("Win") != -1) {
					for (var i = 7; i < 10; i++) {
						if (action[i].indexOf("Reference!") == -1 && action[i] != "#" && action[i] != cookieSheet) {
							line += '<link rel="alternate stylesheet" href="' + action[i] + '" media="screen">\n';
						}
					}
					if (action[6].indexOf("Reference!") == -1 && action[6] != "#" && action[6] != cookieSheet) {
						line += '<link rel="stylesheet" href="' + action[6] + '" media="screen">\n';
					}
					SDdefaultStyleSheet = action[6];
					compat = true;
				}
			}
			else if ((bappName.indexOf("Explorer") > -1) && !(bappName.indexOf("WebTV") > -1)) {
				if (navigator.platform.indexOf("Mac") != -1) {
					for (var i = 11; i < 14; i++) {
						if (action[i].indexOf("Reference!") == -1 && action[i] != "#" && action[i] != cookieSheet) {
							line += '<link rel="stylesheet" type="text/css" href="' + action[i] + '" media="screen">\n';
						}
					}
					if (action[10].indexOf("Reference!") == -1 && action[10] != "#" && action[10] != cookieSheet) {
						line += '<link rel="stylesheet" type="text/css" href="' + action[10] + '" media="screen">\n';
					}
					SDdefaultStyleSheet = action[10];
					compat = true;
				}
				else if (navigator.platform.indexOf("Win") != -1) {
					for (var i = 15; i < 18; i++) {
						if (action[i].indexOf("Reference!") == -1 && action[i] != "#") {
							line += '<link rel="stylesheet" href="' + action[i] + '" media="screen">\n';
						}
					}
					if (action[14].indexOf("Reference!") == -1 && action[14] != "#") {
						line += '<link rel="stylesheet" href="' + action[14] + '" media="screen">\n';
					}
					SDdefaultStyleSheet = action[14];
					compat = true;
				}
			}
			else if (bappName.indexOf("WebTV") != -1) {
				for (var i = 19; i < 22; i++) {
					if (action[i].indexOf("Reference!") == -1 && action[i] != "#" && action[i] != cookieSheet) {
						line += '<link rel="stylesheet" href="' + action[i] + '" media="screen">\n';
					}
				}
				if (action[18].indexOf("Reference!") == -1 && action[18] != "#" && action[18] != cookieSheet) { 
					line += '<link rel="stylesheet" href="' + action[18] + '" media="screen">';
				}
				SDdefaultStyleSheet = action[18];
				compat = true;
			}
			if (cookieSheet != null) {
				line += '<link rel="stylesheet" type="text/css" href="' + cookieSheet + '" media="screen">';
			}
			document.writeln(line);
			var t = setTimeout("SDSetStyle()", 300);
		}
		else if (action[1] == 1) {
			var styleSheet = "";
			if (action[22] == 1) {
				styleSheet = SDdefaultStyleSheet;
			}
			else if (action[22] == 2 && action[23].indexOf("Reference!") == -1 && action[23] != "#") {
				styleSheet = action[23];
			}
			SDNewCSS(styleSheet);
		}
		return;
	}
}
function SDSetStyle() {
	var cookieCrumbs = SDGetCookie("SDCookie");
	if (cookieCrumbs != "") {
		cookieCrumbs = cookieCrumbs.substr(cookieCrumbs.indexOf("=") + 1, cookieCrumbs.length);
		SDNewCSS(cookieCrumbs);
	}
	return;
}
function SDNewCSS(name) {
	var CSS;
	for (var i = 0; (CSS = document.getElementsByTagName("link")[i]); i++) {
		if (CSS.getAttribute("rel").indexOf("stylesheet") != -1 && CSS.getAttribute("href").indexOf(name) != -1) {
			CSS.disabled = false;
		}
		else {
			CSS.disabled = true;
		}
	}
	if (SDGetCookie("SDCookie").indexOf(name) == -1) {
		SDCookieObject = new SDCookie(document, "SDCookie", 365, "/", "", 0);
		SDCookieObject.storeCookie(name);
	}
	return;
}
new SDCookie();
SDCookie.prototype.storeCookie = SDStoreCookie;
function SDCookie(document, name, hours, path, domain, secure) {
	this.$document = document;
	this.$name = name;
	if (hours) this.$expires = new Date(new Date().getTime() + hours*86400000);
	else this.$expires = null;
	if (path) this.$path = path; else this.$path = null;
	if (domain) this.$domain = domain; else this.$domain = null;
	if (secure) this.$secure = secure; else this.$secure = false;
	return;
}
function SDStoreCookie(value) {
	if (value == null) value = "";
	for (var prop in this) {
		if (prop.charAt(0) == "$" || (typeof this[prop]) == "function") {
			continue;
		}
		if (value != "") value += "&";
		value += prop + ":" + escape(this[prop]);
	}
	var cookie = this.$name + "=" + value;
	if (this.$expires) cookie += "; expires=" + this.$expires.toGMTString();
	if (this.$path) cookie += "; path=" + this.$path;
	if (this.$domain) cookie += "; domain=" + this.$domain;
	if (this.$secure) cookie += "; secure=" + secure;
	this.$document.cookie = cookie;
	return;
}
function SDGetCookie(cookieTarget) {
	var cookieCrumbs = unescape(document.cookie);
	var cookieArray = cookieCrumbs.split("; ");
	cookieCrumbs = "";
	for (var i = 0; i < cookieArray.length; i++) {
		if (cookieArray[i].indexOf(cookieTarget) != -1) {
			cookieCrumbs = cookieArray[i];
			break;
		}
	}
	return cookieCrumbs;
}
function SDControl() {
	window.location.reload();
	return;
}
function SDVersion() {
	return (parseInt(navigator.appVersion.charAt(0)) >= 4)
          || (navigator.appName.indexOf("WebTV") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 2);
}
function CSOpenFullWindow(action) {
	var wf = "";	
	if(action[12]) {
		wf = wf + "width=" + screen.availWidth;
		wf = wf + ",height=" + screen.availHeight;
	} else {
		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");	
	if(action[12]) {
		wf = wf + ",left=0";
		wf = wf + ",top=0";
	} else {
		if(action[13]) {
			wf = wf + ",left=" + action[13];
		}
		if(action[14]) {
			wf = wf + ",top=" + action[14];
		}
	}
	window.open(action[1],action[2],wf);
}
/* EOF */
