/* -- 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, st) {
	var s=si.toUpperCase();
	var myID=id.toUpperCase()+":";
	var id1=s.indexOf(myID,st);
	if (id1==-1) return "";
	var ch=s.charAt(id1-1);
	if (ch!=" " && ch!="\t" && ch!="\n" && ch!=";" && ch!="{")
		return CSGetStyleAttrValue (si, id, id1+1);
	var start=id1+myID.length;
	ch=s.charAt(start);
	while(ch==" " || ch=="\t" || ch=="\n") {start++; ch=s.charAt(start);}
	s=s.substring(start,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",0);
		if (style.top=="") style.top=CSGetStyleAttrValue(si,"top",0);
		if (style.width=="") style.width=CSGetStyleAttrValue(si,"width",0);
		if (style.height=="") style.height=CSGetStyleAttrValue(si,"height",0);
		if (style.visibility=="") style.visibility=CSGetStyleAttrValue(si,"visibility",0);
		if (style.zIndex=="") style.zIndex=CSGetStyleAttrValue(si,"z-index",0);
	}
}
function CSSetStyleVis(s,v) {
	if (CSIsW3CDOM){CSIDOM();document.getElementById(s).style.visibility=(v==0)?"hidden":"visible";}
	else if(IsIE())CSIEStyl(s).visibility=(v==0)?"hidden":"visible";
	else CSNSStyl(s).visibility=(v==0)?'hide':'show';
}
function CSGetStyleVis(s) {
	if (CSIsW3CDOM) {CSIDOM();return(document.getElementById(s).style.visibility=="hidden")?0:1;}
	else if(IsIE())return(CSIEStyl(s).visibility=="hidden")?0:1;
	else return(CSNSStyl(s).visibility=='hide')?0:1;
}
function CSSetStylePos(s,d,p) {
	if (CSIsW3CDOM)d==0?document.getElementById(s).style.left=p+"px":document.getElementById(s).style.top=p+"px";
	else if(IsIE())(d==0)?CSIEStyl(s).posLeft=p:CSIEStyl(s).posTop=p;
	else (d==0)?CSNSStyl(s).left=p:CSNSStyl(s).top=p;
}
function CSGetStylePos(s,d) {
	if (CSIsW3CDOM){CSIDOM();return parseInt((d==0)?document.getElementById(s).style.left:document.getElementById(s).style.top);}
	else if (IsIE()) {CSIEWinInit();return(d==0)?CSIEStyl(s).posLeft:CSIEStyl(s).posTop;}
	else {return (d==0)?CSNSStyl(s).left:CSNSStyl(s).top;}
}
CSIEWInit=false;
function CSIEWinInit() { if(CSIEWInit==true) return; else CSIEWInit=true; if (IsIE()&&CSBVers==4) { var i=0; var lyr=document.all.tags("div")[i++]; while(lyr) {lyr.style.posLeft=lyr.offsetLeft; lyr.style.posTop=lyr.offsetTop; lyr=document.all.tags("div")[i++];}}}
CSLoopIsRunning = false; CSFctArray = new Array; CSTimeoutID = null;
function CSLoop() {	
	CSLoopIsRunning = false;
	for (i=0;i<CSFctArray.length;i++) {
		var curFct = CSFctArray[i];
		if (curFct)	{
			if (curFct.DoFunction(curFct)) { CSLoopIsRunning = true; curFct.counter++; }
			else CSFctArray[i] = 0;
		}
	}
	if (CSLoopIsRunning) CSTimeoutID = setTimeout("CSLoop()", 1);
}
function CSStartFunction(fct,data) {
	if (!CSLoopIsRunning) { CSFctArray = 0; CSFctArray = new Array; }
	var fctInfo = new Object;
	fctInfo.DoFunction = fct; fctInfo.counter = 0; fctInfo.data = data;
	CSFctArray[CSFctArray.length] = fctInfo; 
	if (!CSLoopIsRunning) CSLoop();
}
function CSStopFunction(sceneName) {
	var i;
	for (i=0;i<CSFctArray.length;i++) {
		var curFct = CSFctArray[i];
		if (curFct){ if (curFct.data.name == sceneName){ CSFctArray[i] = 0; return; } }
	}
}
function CSStopComplete() {
	if (CSTimeoutID == null) return;
	clearTimeout (CSTimeoutID); CSLoopIsRunning = false; CSTimeoutID = null;
}
function CSMoveLoop(fInf) {
	var ticks = 60 * (((new Date()).getTime()) - fInf.data.startTime)/1000;
	var f = ticks/fInf.data.ticks;
	if (f < 1) { CSSetStylePos(fInf.data.layer,0,fInf.data.start[0] * (1-f) + fInf.data.end[0] * f);
		CSSetStylePos(fInf.data.layer,1,fInf.data.start[1] * (1-f) + fInf.data.end[1] * f); return true; }
	else { CSSetStylePos(fInf.data.layer,0,fInf.data.end[0]);
		CSSetStylePos(fInf.data.layer,1,fInf.data.end[1]); }
	return false;
}
function CSSlideObj (layer,start,end,ticks,startTime) {
	this.layer=layer;this.start=start;this.end=end;this.ticks=ticks;this.startTime=startTime;
}
function CSSlideLayer(l,pos,anim,ticks) {
	var x = pos[0]; var y = pos[1];

	if (l == '') return;
	if (ticks < 0) ticks = 0;
	if (!anim) { CSSetStylePos(l,0,x); CSSetStylePos(l,1,y); }
	else {  var fctData = new CSSlideObj(l,new Array(CSGetStylePos(l,0),CSGetStylePos(l,1)),new Array(x,y),ticks,(new Date()).getTime()); CSStartFunction(CSMoveLoop,fctData); }
}
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 */
}

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

// OUT utility Javascript library 1.4.5
// Script copyright 1999-2002 OUT Media Design GmbH. All rights reserved.
// in case of missing NN 6 Fix
var CSIsW3CDOM=CSIsW3CDOM; // declare
if(!CSIsW3CDOM){CSIsW3CDOM=false;} // define
function OUTFindFrame(n,w){var f=null,cf=null,i=0;if(n==''||n=="_self"||n=="_blank"){f=window;}else if(n=="_top"){f=top;}else if(n=="_parent"){f=parent;}else {cf=w?w.frames:top.frames;f=cf[n];while(!f && i<cf.length){f=OUTFindFrame(n,cf[i]);i++;}}return f;}
function OUTFindElement(n,ly,cmp){var d=document;if(cmp)n=OUTfindComponentElementName(n,ly);if(CSIsW3CDOM){CSInitImgID();return d.getElementById(n);} d=ly?(ly.document?ly.document:ly):d;var e=d[n];if(!e && d.layers){for(var i=0;i<d.layers.length;i++){e=OUTFindElement(n,d.layers[i]); if(e)return e;}}return e;}
function OUTfindComponentElementName(n,ly){var o='';var d=document;d=ly?(ly.d?ly.d:ly):(d.all?d.all:d);if(CSIsW3CDOM){d=document.getElementsByTagName("*");for(var i=0; i<d.length; i++){o=d[i].name; if(o && o.indexOf("Cmp")==0 && o.substr(13)==n)return o;}}else {for(o in d){if(o && o.indexOf("Cmp")==0 && o.substr(13)==n)return o;}if(!IsIE()&& d.layers){for(var i=0;i<d.layers.length;i++){o=OUTfindComponentElementName(n,d.layers[i]);if(o)return o;}}}return null;}

// OUT URL utility Javascript library 1.1.3
// Script copyright 1999-2003 OUT Media Design GmbH. All rights reserved.
function OUTgetValuesFromURL(n){var u=window.location.search;var a=new Array();if(u!=""){u=u.substring(u.indexOf('?')+1, u.length);u=u.split('&');for(var i=0;i<u.length;i++){var p=u[i].split('=');if(p[0]==n){p[1]=unescape(p[1]);a[a.length]=p;}}}return a;}
function OUTcheckValueFromURL(n){var a=OUTgetValuesFromURL(n),v=arguments;for(var j=1;j<v.length;j++){for(var i in a){if(a[i]&&a[i][1]==v[j])return true;}}return false;}
function OUTabsoluteURL(u,b){if(u.indexOf("://")<0){if(u.indexOf('/')==0){var h=0,i=b.indexOf("://");if(i<0)return u;i+=3;h=b.substr(i).indexOf('/');if(h>0)b=b.substring(0,i+h);}else{var up=0;while(u.indexOf('../')==0){u=u.substring(3,u.length);up++;}while(up){b=b.substring(0,b.lastIndexOf('/'));up--;}b=b.substring(0,b.lastIndexOf('/')+1);}u=b+u;}return u;}
function OUTrelativeURL(u,b){if(u[0]!='/'){if(u.indexOf('://')>0){u=u.substr(u.indexOf('://')+3);u=u.substr(u.indexOf('/'));}else return u;}if(b[0]!='/'){if(b.indexOf('://')>0){b=b.substr(b.indexOf('://')+3);b=b.substr(b.indexOf('/'));}else return u;}u=u.split('/');b=b.split('/');var i=0,up=0;while(u[i]==b[i])i++;up=i-b.length+1;u=u.slice(i).join('/');if(up>0)u="../"+u;while(up<0){u="../"+u;up++;}return u;}

// OUT Load Frameset Action 1.3.1
// Script copyright 1999-2003, OUT Media Design GmbH. All rights reserved.

function OUTloadFrameset(action) {
	if (!parent.frames[action[2]] && !OUTcheckValueFromURL("OUTnoFrameset","undefined","","y","true","yes",true)) {
		var URLparams = window.location.search;
		var wl = window.location.href;
		if (URLparams!="") URLparams = "&"+URLparams.substring(1,URLparams.length);
		var nURL = action[1]; nURL += nURL.indexOf('?')>0?'&':'?';
		window.location.replace(nURL+action[2]+"="+(action[3]?wl.substring(0,wl.indexOf('?')>0?wl.indexOf('?'):wl.length):window.location.pathname)+URLparams+window.location.hash);
		return true;
	}
	return false;
}
// 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()
}

var gCSIEDragObject = null;
var gDragX,gDragY;
function CSSetupDrag (layerName) {
	this.x = 0; this.y = 0;
	if (IsIE()) {
		this.canDrag=true; 
		this.layerObj=document.all.tags("div")[layerName];
		this.layerObj.dragObj = this;
		document.ondragstart = CSIEStartDrag;
		document.onmousedown = CSIEMouseDown;
		document.onmouseup = CSIEStopDrag;
	} else {
		if (CSBVers>=5)
			{
			this.layerObj=document.getElementById(layerName);
			this.layerObj.addEventListener("mousedown", CSNS6StartDrag, true);
			this.layerObj.addEventListener("mouseup", CSNS6StopDrag, true);
			}
		else
			{
			this.layer=CSNSStyl(layerName);this.onmousemove=null; 
			this.layer.document.theLayer=this;
			this.layer.document.captureEvents(Event.MOUSEDOWN);
			this.layer.document.onmousedown=CSNSStartDrag; 
			this.layer.document.onmouseup=CSNSStopDrag;
			}
	}
}
function CSNS6StartDrag (ev) {
	CSIDOM();
	ev.currentTarget.addEventListener("mousemove", CSNS6DoDrag, true);
	gDragX=ev.clientX;
	gDragY=ev.clientY;
	ev.preventDefault();
}
function CSNS6DoDrag (ev) {
	var style=ev.currentTarget.style;
	style.left = parseInt(style.left)+(ev.clientX-gDragX)+"px";
	style.top = parseInt(style.top)+(ev.clientY-gDragY)+"px";
	gDragX=ev.clientX;
	gDragY=ev.clientY;
}
function CSNS6StopDrag (ev) {	
	ev.target.removeEventListener("mousedown", CSNS6StartDrag, true);
	ev.target.removeEventListener("mouseup", CSNS6StopDrag, true);
	ev.currentTarget.removeEventListener("mousemove", CSNS6DoDrag, true);
	ev.preventDefault();
}
function CSNSStartDrag (ev) {
	var clickInMe = false;
	if (ev.target != this) {
		for (var i=0;i<this.images.length;i++) {
			if (this.images[i] == ev.target) { clickInMe = true; break;}
			}
		}
	else clickInMe = true;	
	if (clickInMe)
		{
		this.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP); 
		this.onmousemove=CSNSDoDrag;
		this.theLayer.x= ev.pageX;
		this.theLayer.y= ev.pageY;
		this.routeEvent(ev);
		return false;
		}
   this.onmousemove=null;this.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);
	this.routeEvent(ev);
   return true; 
}
function CSNSStopDrag (ev) {
   this.onmousemove=null;this.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);return false; 
}
function CSNSDoDrag (ev) {
	this.theLayer.layer.moveBy(ev.pageX-this.theLayer.x, ev.pageY-this.theLayer.y); 
	this.theLayer.x = ev.pageX; 
	this.theLayer.y = ev.pageY;
	this.routeEvent(ev);
}
function CSIEStartDrag () {
	if(gCSIEDragObject != null && (gCSIEDragObject.tagName==event.srcElement.tagName))
		event.returnValue=false;  
}
function CSIEStopDrag () { gCSIEDragObject=null; document.onmousemove=null; }
function CSIEMouseDown () {
	if(event.button==1) {
		dragLayer = event.srcElement;
		while (dragLayer!=null) 
			{
			if ((dragLayer.dragObj == null) && (dragLayer.tagName == "DIV"))
				break;
			if (dragLayer.dragObj != null)
				break;
			dragLayer=dragLayer.parentElement;
			}
			
		if (dragLayer == null) return;
		if (dragLayer.dragObj!=null && dragLayer.dragObj.canDrag) {
			gCSIEDragObject = dragLayer;
			gCSIEDragObject.dragObj.x=event.clientX;
			gCSIEDragObject.dragObj.y=event.clientY;
			document.onmousemove = CSIEMouseMove;
		}
	}
}
function CSIEMouseMove () {
	gCSIEDragObject.dragObj.layerObj.style.pixelLeft+=(event.clientX-gCSIEDragObject.dragObj.x);
	gCSIEDragObject.dragObj.layerObj.style.pixelTop+=(event.clientY-gCSIEDragObject.dragObj.y);
	gCSIEDragObject.dragObj.x=event.clientX;
	gCSIEDragObject.dragObj.y=event.clientY;
	event.returnValue = false;
	event.cancelBubble = true;
}
var gDragArray = new Array();
function CSDrag(action) { gDragArray[gDragArray.length] = new CSSetupDrag(action[1]); }

function CSShowHide(action) {
	if (action[1] == '') return;
	var type=action[2];
	if(type==0) CSSetStyleVis(action[1],0);
	else if(type==1) CSSetStyleVis(action[1],1);
	else if(type==2) { 
		if (CSGetStyleVis(action[1]) == 0) CSSetStyleVis(action[1],1);
		else CSSetStyleVis(action[1],0);
	}
}

// OUT Lock MenuMachine Library v1.1.2
// Script copyright 2002, OUT Media Design GmbH. All rights reserved.

function OUTinitLckMenuMachine(action,url) {
	var m=null, r=null;
	for (var i=0; !m && i<bbMenu.length; i++) {
		if (bbMenu[i].name == action[5])
			m = OUTlckMMGetMenu(bbMenu[i],url);
	}
	if (m) {
		r = m.r;
		m.OUTlckD = action[1];
		m.OUTlckH  = action[2];
		m.OUTlckDl = action[3]-1;
		m.OUTlckHl = action[4]-1;

		m.OUTbgcolor = m.bgcolor;
		m.OUTbgOverColor = m.bgOverColor;
		m.OUTfc = m.fc;
		m.OUTfoc = m.foc;
		m.OUTimgUrl = m.imgUrl;
		m.OUToverUrl = m.overUrl;
		
		action[7] = action[7].charAt(1)=='#'?action[7]:'#'+action[7];
		action[9] = action[9].charAt(1)=='#'?action[9]:'#'+action[9];
		m.bgOverColor =  action[6]?action[7]:m.bgOverColor;
		m.foc = action[8]?action[9]:m.foc;
		
		if (action[10])
			m.overUrl = action[11];
		else {
			if(m.imgUrl && action[12]==1)
				m.overUrl = OUTlckInsertExt(m.imgUrl,action[13]);
			if(m.overUrl && action[12]==2)
				m.overUrl = OUTlckInsertExt(m.overUrl,action[13]);
		}
		
		m.bgcolor = m.bgOverColor;
		m.fc = m.foc;
		m.imgUrl = m.overUrl;
		
		if (r.OUTlckMM) {
			var o = r.OUTlckMM;
			o.bgcolor = o.OUTbgcolor;
			o.bgOverColor = o.OUTbgOverColor;
			o.fc = o.OUTfc;
			o.foc = o.OUTfoc;
			o.imgUrl = o.OUTimgUrl;
			o.overUrl = o.OUToverUrl;
		}
		r.OUTlckMM = m;
		if (!r.mreset2) {
			r.mreset2 = m.r.mreset;
			r.mreset = OUTlckMMmreset;
		}
		r.mreset();
	}
}

function OUTlckMMGetMenu(m,u)
{
	var c = null;
	if (m.url && OUTlckMMCheckURL(m.url,u)) return m;
	for (var i=0; !c && m.c.length>i; i++) {
		c = OUTlckMMGetMenu(m.c[i],u);
	}
	return c;
}


function OUTlckMMCheckURL(a,b)
{
	return OUTabsoluteURL(a, window.location.href) == OUTabsoluteURL(b, window.location.href);
}

function OUTlckInsertExt(u,e)
{
	var p=u.split('.'),i=p.length-1;
	i=i>0?i-1:0; p[i]=p[i]+e;
	return p.join('.');
}

function OUTlckMMmreset()
{
	this.mreset2();
	if (this.OUTlckMM.OUTlckD) {
		var m = this.OUTlckMM; l = m.OUTlckDl;
		while (l>=0 && m.lvl>l) { m = m.par; }
		m.display(1,1);
	}
	if (this.OUTlckMM.OUTlckH) {
		var m = this.OUTlckMM, l = m.OUTlckHl;
		while (l>=0 && m.lvl>l) { m = m.par; }
		m.hilite(1,1);
	}
}

// OUT Lock MenuMachine Action v1.1
// Script copyright 2002, OUT Media Design GmbH. All rights reserved.

function OUTlckMenuMachine(action) {
	OUTinitLckMenuMachine(action,document.location.href);
}
// OUT Adjust Frame Sources 1.2.2
// Script copyright 1999 - 2002, OUT Media Design GmbH. All rights reserved.
// Must be called by the Frameset's OnLoad Handler

function OUTadjFrameSrcs() {
	var URLparams=window.location.search;
	if (URLparams!="") {
		URLparams=URLparams.substring(URLparams.indexOf('?')+1, URLparams.length);
		URLparams=URLparams.split('&');
        for (var i=0; i<URLparams.length; i++) {
            var p=URLparams[i].split('=');
            if (p[0]&&window.frames[p[0]]) {
                var newURLparams="?";
                for (var j=0;j<URLparams.length; j++) newURLparams+=(j!=i)?URLparams[j]+((j<URLparams.length-1)?"&":""):"";
                window.frames[p[0]].location.replace(p[1]+(newURLparams.length>1 ? newURLparams : "")+window.location.hash);
             }
         }
	}
	return true;
}
function CSActionGroup (action) {
	for(var i=1;i<action.length;i++) { CSAction(new Array(action[i])); }
}

function CSMoveTo(action) { CSSlideLayer(action[1],action[2],action[3],action[4]); }

function CSCallAction(action)
{
	CSAction(new Array(action[1]));
}

// OUT Open Image Window Action v1.4.2.1 (disables IEImageToolBar)
// Script copyright 1999-2004 OUT Media Design GmbH. All rights reserved.
function OUToiwCompensateChrome ()
{
	var w=this.OUToiwW, h=this.OUToiwH, ua=this.ua;
	/* Internet Explorer */
	if (ua.isIE) {
		if (!ua.isMac) {
			var bw=document.body.clientWidth, bh=document.body.clientHeight;
			if(ua.vers>=4 && (bw!=w || bh!=h)) this.resizeTo(2*w-bw,2*h-bh);
		}
	}
	
	/* Netscape (i.e. all others) */
	if (ua.isNN) {
		if (ua.vers>=4) {
			if (ua.vers<5) this.setResizable(true);
			this.resizeTo(w+this.outerWidth-this.innerWidth,h+this.outerHeight-this.innerHeight);
			if (ua.vers<5 && this.OUToiwResizable)
				this.setResizable(this.OUToiwResizable);
		}
	}
}
function OUToiwResizeWin()
{
	if (this.OUToiwFitToImg && document.images) {
		this.OUToiwW=document.images[0].width+2*this.OUToiwOffset;
		this.OUToiwH=document.images[0].height+2*this.OUToiwOffset;
	}
	this.OUToiwCompensateChrome();
	this.focus(); /* this to make scollbars in mozilla disappear */
}
function OUToiwUA()
{
	var ua = new Object();
	ua.vers = parseInt(window.navigator.appVersion.substring(0,1));
	ua.isMac = window.navigator.userAgent.indexOf("Mac") >= 0;
	ua.isNN = window.navigator.appName.indexOf("Netscape")>=0;
	ua.isIE = window.navigator.appName.indexOf("Explorer")>=0;
	return ua;
}
function OUTOpenImageWindow(action) {
	var imgWinW = action[3];
	var imgWinH = action[4];
	var bgImg = action[16] ? ' BACKGROUND="'+action[15]+'" ' : '';
	var ua=OUToiwUA();
	var wOffset = (ua.vers<4 && ua.isNN) ? 9 : action[14];
	imgWinW += 2*wOffset;
	imgWinH += 2*wOffset;
	
	var wf = "";	
	wf = wf + "width=" + imgWinW;
	wf = wf + ",height=" + imgWinH;
	wf = wf + ",resizable=" + (action[5] ? "no" : "yes");
	wf = wf + ",scrollbars=" + (action[6] ? "no" : "yes");
	wf = wf + ",menubar=" + (action[7] ? "no" : "yes");
	wf = wf + ",toolbar=" + (action[8] ? "no" : "yes");
	wf = wf + ",directories=" + (action[9] ? "no" : "yes");
	wf = wf + ",location=" + (action[10] ? "no" : "yes");
	wf = wf + ",status=" + (action[11] ? "no" : "yes");
	
	var newImgWin = window.open("",action[2],wf);
	newImgWin.document.writeln('<HTML><HEAD>');
	newImgWin.document.writeln('<TITLE>'+action[13]+'</TITLE>');
	newImgWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
	newImgWin.document.writeln('<SCRIPT><!--');
	
	newImgWin.document.writeln(OUToiwCompensateChrome.toString());
	newImgWin.document.writeln(OUToiwResizeWin.toString());
	newImgWin.document.writeln(OUToiwUA.toString());
	newImgWin.document.writeln("window.OUToiwW = "+imgWinW+";");
	newImgWin.document.writeln("window.OUToiwH = "+imgWinH+";");
	newImgWin.document.writeln("window.OUToiwOffset = "+wOffset+";");
	newImgWin.document.writeln("window.ua = OUToiwUA();");
	newImgWin.document.writeln("window.OUToiwResizable = "+!action[5]+";");
	newImgWin.document.writeln("window.OUToiwFitToImg = "+action[17]+";");
	newImgWin.document.writeln("window.OUToiwCompensateChrome = OUToiwCompensateChrome;");
	newImgWin.document.writeln("window.OUToiwResizeWin = OUToiwResizeWin;");
	newImgWin.document.writeln('//--></'+'SCRIPT'+'>');
	newImgWin.document.writeln('</HEAD>');
	newImgWin.document.writeln('<BODY BGCOLOR="#'+action[12]+'"'+bgImg+' MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" TOPMARGIN="0">');
	newImgWin.document.write('<TABLE BORDER="0" CELLPADDING="'+action[14]+'" CELLSPACING="0" WIDTH="100%" HEIGHT="100%"><TR><TD VALIGN="middle" ALIGN="center"><IMG SRC="'+action[1]+'"');
	newImgWin.document.write(' ONLOAD="window.OUToiwResizeWin();"');
	newImgWin.document.writeln('></TD></TR></TABLE>');
	newImgWin.document.writeln('</BODY></HTML>');
	newImgWin.document.close();
	// do window positioning here
	if (action[19] && newImgWin.moveTo) {
		var imgWinX=action[20];
		var imgWinY=action[21];
		var availW = screen.width;
		var availH = screen.height;
		var parWinX = ua.isIE?window.screenLeft?window.screenLeft:0:window.screenX;
		var parWinY = ua.isIE?window.screenTop?window.screenTop:0:window.screenY;
		imgWinW=ua.isIE?newImgWin.document.body.clientWidth:newImgWin.outerWidth;
		imgWinH=ua.isIE?newImgWin.document.body.clientHeight:newImgWin.outerHeight;
		if (action[19]==2 && screen.availWidth) {
			availW = screen.availWidth;
			availH = screen.availHeight;
		}
		if (action[19]==3) {
			availW = ua.isIE ? document.body.offsetWidth : window.outerWidth;
			availH = ua.isIE ? document.body.offsetHeight : window.outerHeight;
		}
		if (action[19]==4) {
			availW = ua.isIE ? document.body.clientWidth : window.innerWidth;
			availH = ua.isIE ? document.body.clientHeight : window.innerHeight;
		}
		// calculate the window left position here
		if (action[22]==1) {
			imgWinX+=0;
		}
		if (action[22]==2) {
			imgWinX+=(availW-imgWinW)/2;
		}
		if (action[22]==3) {
			imgWinX+=availW-imgWinW;
		}
		// calculate the window top position here
		if (action[23]==1) {
			imgWinY+=0;
		}
		if (action[23]==2) {
			imgWinY+=(availH-imgWinH)/2;
		}
		if (action[23]==3) {
			imgWinY+=availH-imgWinH;
		}
		newImgWin.moveTo(imgWinX+(action[19]<3?0:parWinX),imgWinY+(action[19]<3?0:parWinY));
	}
	if(action[18] && ua.vers>=4 && !(ua.isMac && ua.isIE && ua.vers<5)) newImgWin.focus();
}


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

//copyleft Milan January 2001

function ouvPos (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");
	fen=window.open(action[1],action[2],wf);
fen.moveTo(action[12],action[13])
}
function CSCloseWindow() { 
if (self.parent.frames.length != 0) {
	self.parent.close()	
	} else {
	window.close()
	}
}
/* 
Fix Layer Position 1.0
A component of MenuMachine 2.1
Copyright 2006 Big Bang Software Pty Ltd
*/
/*begin FixLayerPosition*/
function __bbFLP(el,s,amt)
	{
	if(typeof(__bbElCache[el])=="undefined"){__bbElCache[el]=__bbgID(el);}
	var d=document,e=__bbElCache[el],mvAmt=0,sOf=__bbGST(),targetPos=e.origPos+sOf;
	if(e.currentPos!=targetPos){if(s){var diff=e.currentPos-targetPos;mvAmt=(Math.abs(diff)<amt)?-diff:((diff>0)?-amt:amt);mvAmt=(Math.abs(diff)>(amt*4))?mvAmt+mvAmt:mvAmt;var mtp=(e.currentPos+=mvAmt)+_bbBr.px;_bbBr.op?e.style.pixelTop=mtp:e.style.top=mtp;e.currentPos+=mvAmt;}
	else{var mtp=targetPos+_bbBr.px;_bbBr.op?e.style.pixelTop=mtp:e.style.top=mtp;e.currentPos=targetPos;}}
	};
function bbFixLayer(action)
	{
	var n=action[1],sm=action[2],spd=action[3],tks,px;
	if(!sm){tks=10;px=100;}
	else{if(!spd)spd="m";switch(spd){case "f":tks=10;px=20;break;case "m":tks=20;px=4;break;case "s":tks=30;px=2;break;}}
	var d=document,ua=navigator.userAgent.toLowerCase();function o(n){return (ua.indexOf("opera "+n)>-1||ua.indexOf("opera/"+n)>-1)&&window.opera?1:0};
	_bbBr.op5=o(5);_bbBr.op6=o(6);_bbBr.op=(_bbBr.op5||_bbBr.op6||window.opera)?1:0;
	_bbBr.ie=(ua.indexOf('msie')!=-1&&!_bbBr.op)?1:0;_bbBr.dt=(ua.indexOf("mac")==-1&&((d.doctype&&d.doctype.name&&d.doctype.name.indexOf("http:\/\/")>-1)||(d.compatMode&&(d.compatMode!="BackCompat"&&d.compatMode!="QuirksMode"))))?1:0;
	_bbBr.px=_bbBr.op?"":"px";var el=__bbgID(n);if(!el)return;el.origPos=__bbyP(el);el.currentPos=el.origPos-__bbGST();setInterval("__bbFLP('"+n+"',"+sm+","+px+");",tks);
	};
function __bbyP(o){var c=0;if (o.offsetParent){while (o.offsetParent){c+=o.offsetTop;o=o.offsetParent;}}else if(o.y){c+=o.y;} return c;};
function __bbGST(){return _bbBr.ie?(_bbBr.dt?document.documentElement.scrollTop:document.body.scrollTop):window.pageYOffset;};
function __bbgID(i){if(document.getElementById){return document.getElementById(i);}else if(document.all){return document.all[i];}else{return false;}};
var __bbElCache=[],_bbBr={};
/*end FixLayerPosition*/


