/* -- Adobe GoLive JavaScript Library */

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 CSCloseWindow() { 
if (self.parent.frames.length != 0) {
	self.parent.close()	
	} else {
	window.close()
	}
}
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 */
}
/* Best Pitch Pop & Slide v1.1.3 */
/* Javascript Action for Adobe GoLive */
/* ©2002 Best Pitch Multi Media (http://www.bestpitch.com) */
/* Developer: Charles Fahey (cfahey@bestpitch.com) */
/* This Build: December 3, 2002 */

function BPpopNslide(action) {
	var bpwp = "";
	bpwp = bpwp + "width=" + action[7];
	bpwp = bpwp + ",height=" + action[8];
	bpwp = bpwp + ",left=" + action[2];
	bpwp = bpwp + ",top=" + action[3];
	bpwp = bpwp + ",resizable=" + (action[9] ? "yes" : "no");
	bpwp = bpwp + ",scrollbars=" + (action[10] ? "yes" : "no");
	bpwp = bpwp + ",menubar=" + (action[11] ? "yes" : "no");
	bpwp = bpwp + ",toolbar=" + (action[12] ? "yes" : "no");
	bpwp = bpwp + ",directories=" + (action[13] ? "yes" : "no");
	bpwp = bpwp + ",location=" + (action[14] ? "yes" : "no");
	bpwp = bpwp + ",status=" + (action[15] ? "yes" : "no");
	bpwin = window.open(action[1],"best_pitch_pop_n_slide",bpwp);
	bpwin.focus()
	
	var hzdist = (action[4] - action[2]);
	var vtdist = (action[5] - action[3]);
	if (hzdist > vtdist) {
		var bphere = action[2];
		var bpthere = action[4];
	}
	else {
		var bphere = action[3];
		var bpthere = action[5];
	}
	var bpendleft = action[4];
	var bpendtop = action[5];
		for(steps = bphere ; steps <= (bpthere - 1) ; steps = steps + action[6]) {
			if (steps >= bpendleft) {
				var moveleft = 0;
			}
			else {
				var moveleft = action[6];
			}
			if (steps >= bpendtop) {
				var movetop = 0;
			}
			else {
				var movetop = action[6];
			}
			bpwin.moveBy(moveleft,movetop)
		}
}
