/* -- 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) {
	var s=si.toUpperCase();
	var myID=id.toUpperCase()+":";
	var id1=s.indexOf(myID);
	if (id1==-1) return "";
	s=s.substring(id1+myID.length+1,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");
		if (style.top=="") style.top=CSGetStyleAttrValue(si,"top");
		if (style.width=="") style.width=CSGetStyleAttrValue(si,"width");
		if (style.height=="") style.height=CSGetStyleAttrValue(si,"height");
		if (style.visibility=="") style.visibility=CSGetStyleAttrValue(si,"visibility");
		if (style.zIndex=="") style.zIndex=CSGetStyleAttrValue(si,"z-index");
	}
}
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
}

// Version 1.1. A Michael Ahgren action.
function CSRemoveIEbox(){
if (document.images&&navigator.userAgent.indexOf("MSIE")!=-1){
	for(i=0;i<document.links.length;i++){
		target=eval("document.links[i]")
		target.onfocus=blurHandler
		}
	}
}

function blurHandler(){
obj=window.event.srcElement
if(obj.tagName == "A"||obj.tagName=="AREA") obj.blur()
}

function CSCloseWindow() { 
if (self.parent.frames.length != 0) {
	self.parent.close()	
	} else {
	window.close()
	}
}

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

function CSSlideNewWindow(action) {
var wh = ""
if (action[7] || action[8] || action[9] == true) wh=action[4]-125
else wh = action[4]
var wf = "";	
wf = wf + "width=" + action[3];
wf = wf + ",height=" + wh;
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(navigator.appVersion.charAt(0) >=4) {
var sw=screen.width-20;
var sh=screen.height;
var newwidth=action[3]; 
var newheight=action[4];
var positionleft=(sw-newwidth)/2;
var positiontop=""
if (action[7] || action[8] || action[9] == true) positiontop=(sh-newheight)/3;
positiontop=(sh-newheight)/2.5;
}
newwindow=window.open(action[1],action[2],wf); 
newwindow.focus()	
if(navigator.appVersion.charAt(0) >=4) {
	for(width1 = 1 ; width1 < positionleft ; width1 = width1 + 10)
	newwindow.moveTo(width1,positiontop)
	}
}

function CSHistoryGo(action) { history.go(action[1]); }

function CSSetImageURL(action) {
	var img=CSGetImage(action[1]);
	if (img) img.src=action[2];
}

// Auto Image Window Action 1.4.1 by Nate Baldwin, www.mindpalette.com, 12/2/03
function MPImageWindow(action) {
	for (i=10; i<17; i++) action[i] = (action[i] == false) ? "no" : "yes";
	if (action[7] > screen.availWidth) action[7] = screen.availWidth;
	if (action[8] > screen.availHeight) action[8] = screen.availHeight;
	var posX = 0;
	var posY = 0;
	if (action[9] == true) {
		posX = Math.round((screen.availWidth/2)-(action[7]/2));
		posY = Math.round((screen.availHeight/2)-(action[8]/2));
		} else {
		posX = action[17];
		posY = action[18];
		}
		
	var ImageURL = action[1];
	
	var newString = "";
	if (ImageURL.indexOf(".") >= 0) {
		var testArray = ImageURL.split(".");
		for (i=0; i<testArray.length; i++) {
			newString += "^";
			newString += testArray[i];
			}
		ImageURL = newString.substr(1);
		}
	
	var queryString = "*MPImage="+ImageURL+"*MPImageX="+action[2]+"*MPImageY="+action[3]+"*MPTitle="+action[4]+"*";
	var queryString = escape(queryString);
	var queryString = "?"+queryString;
	action[5] += queryString;
	var windowOptions = "";
	windowOptions += "width=" + action[7];
	windowOptions += ",height=" + action[8];
	windowOptions += ",resizable=" + action[16];
	windowOptions += ",scrollbars=" + action[10];
	windowOptions += ",menubar=" + action[11];
	windowOptions += ",toolbar=" + action[14];
	windowOptions += ",directories=" + action[12];
	windowOptions += ",location=" + action[15];
	windowOptions += ",status=" + action[13];
	windowOptions += ",left=" + posX;
	windowOptions += ",top=" + posY;
	window.open(action[5], action[6], windowOptions);
	}
//-->

// OpenPopUpLite 2.0.1 action by Nate Baldwin, www.mindpalette.com, copyright 2004
if (typeof MPStoreOpenWin2 == "undefined") MPStoreOpenWin2 = new Array();
function MPOpenPopupLite(action) {
	var posX = 0;
	var posY = 0;
	if (action[4] == true) {
		posX = Math.round((screen.availWidth/2)-(action[2]/2));
		posY = Math.round((screen.availHeight/2)-(action[3]/2));
		} else {
		posX = action[12];
		posY = action[13];
		}
	if (action[16] == true) {
		posX = 0;
		posY = 0;
		action[2] = screen.availWidth;
		action[3] = screen.availHeight;
		}
	for (i=5; i<12; i++) {
		action[i] == true ? action[i] = "yes" : action[i] = "no";
		}
	var windowOptions = "";
	windowOptions += "width=" + action[2];
	windowOptions += ",height=" + action[3];
	windowOptions += ",resizable=" + action[11];
	windowOptions += ",scrollbars=" + action[5];
	windowOptions += ",menubar=" + action[6];
	windowOptions += ",toolbar=" + action[9];
	windowOptions += ",directories=" + action[7];
	windowOptions += ",location=" + action[10];
	windowOptions += ",status=" + action[8];
	windowOptions += ",left=" + posX;
	windowOptions += ",top=" + posY;
	var thisPopup = window.open(action[15], action[1], windowOptions);
	MPStoreOpenWin2[action[1]] = thisPopup;
	if (action[14] != "" && action[14] != "#" && action[14] != "(EmptyReference!)" && action[14] != "(Empty Reference!)")
		window.location = action[14];
	}
//-->

// Detect Image Action 1.4 by Nate Baldwin, www.mindpalette.com, 2/9/03
function MPDetectImg() {
	var MPData = unescape(location.search);
	var MPImage = "";
	var MPImageX = "";
	var MPImageY = "";
	if (MPData != "") {
		var trimString = MPData.substring(1);
		if (trimString != "") {
			var allPairs = trimString.split("*");
			for (i=0; i<allPairs.length; i++) {
				var thisPair = allPairs[i];
				var splitPair = thisPair.split("=");
				if (splitPair[0] == "MPImage") MPImage = splitPair[1];
				if (splitPair[0] == "MPImageX") MPImageX = splitPair[1];
				if (splitPair[0] == "MPImageY") MPImageY = splitPair[1];
				}
			}
			if (MPImage != "" && MPImage != "#") {
			
				var newString = "";
				if (MPImage.indexOf("^") >= 0) {
					var testArray = MPImage.split("^");
					for (i=0; i<testArray.length; i++) {
						newString += ".";
						newString += testArray[i];
						}
					MPImage = newString.substr(1);
					}

				document.write("<img src=\""+MPImage+"\" alt=\"\"");
				}
			if (MPImageX != "" && MPImageY != "" && MPImageX != 0 && MPImageY != 0) document.write(" width=\""+MPImageX+"\" height=\""+MPImageY+"\"");
			if (MPImage != "" && MPImage != "#") document.write(" border=\"0\">");
		}
	window.focus();
	}
// Detect Title Action 1.4 by Nate Baldwin, www.mindpalette.com, 2/9/03
function MPDetectTitle() {
	var MPData2 = unescape(location.search);
	var MPTitle = "";
	if (MPData2 != "") {
		var trimString2 = MPData2.substring(1);
		if (trimString2 != "") {
			var allPairs2 = trimString2.split("*");
			for (i=0; i<allPairs2.length; i++) {
				var thisPair = allPairs2[i];
				var splitPair = thisPair.split("=");
				if (splitPair[0] == "MPTitle") MPTitle = splitPair[1];
				}
				if (MPTitle != "" && MPTitle != "#") document.write("<title>"+MPTitle+"</title>");
					else document.write("<title>Popup Window</title>");
		}
	}
	window.focus();
	}
function CSGoBack1() { history.back() }

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 CSResizeWindow(action) { 
	if(navigator.appVersion.charAt(0) >=4) { window.resizeTo (action[1],action[2]) }
}