/* -- Adobe GoLive JavaScript Library */

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 */
}

// The BannerAction. A Michael Ahgren action.
// Version 1.0
var objArray=new Array()
var instArray=new Array()
var currInst=0
var started=0
var mWin
function instObj(action){
this.posX=action[24]
this.posY=action[25]
this.popX=action[22]
this.popY=action[23]
this.banW=action[27]
this.banH=action[28]
this.centre=action[26]
this.name=action[29]
this.conRot=action[30]
this.objArray=new Array()
this.currBan=0
this.rotInt=action[21]
this.action=action
}
function SCInitBan(action){
instArray[currInst]=new instObj(action)
var j=0
for(i=1;i<20;i+=2){
if(action[i]!="#")
instArray[currInst].objArray[j]=new bannerObj(action[i],action[i+1])
j++
}
instArray[currInst].currBan=rndNum(instArray[currInst].objArray.length)
writeBan(instArray[currInst].currBan)
banTimer(instArray[currInst].rotInt);
currInst++
}
function rndNum(max){
var theRnd=Math.floor(Math.random()*max)
return theRnd
}
function banTimer(rotInt){
var intID=setInterval(displBan,rotInt*1000)
}
function displBan(){
if(instArray[started].conRot){
instArray[started].currBan++
if(instArray[started].currBan==instArray[started].objArray.length)instArray[started].currBan=0;

eval('document.'+instArray[started].name+'.src="'+instArray[started].objArray[instArray[started].currBan].imgSrc+'"')
}
started==instArray.length-1?started=0:started++
}
function SCMakeWin(inst){
if(instArray[inst].centre){
instArray[inst].posX=((screen.availWidth/2)-(instArray[inst].popX/2))
instArray[inst].posY=((screen.availHeight/2)-(instArray[inst].popY/2))
}
if(instArray[inst].objArray[instArray[inst].currBan].bannerUrl!="#"){
if(mWin&&!mWin.closed){
mWin.location=instArray[inst].objArray[currBan].bannerUrl
mWin.focus()
}else{
mWin=window.open(instArray[inst].objArray[instArray[inst].currBan].bannerUrl,instArray[inst].currBan,"height="+instArray[inst].popY+",width="+instArray[inst].popX+" toolbar=1,menubar=1,directories=1,scrollbars=1,resizable=1,status=1,toolbar=1,copyhistory=1,location=1,left="+instArray[inst].posX+",top="+instArray[inst].posY);
}
}
}
function bannerObj(imgSrc,theURL){
this.imgSrc=imgSrc
this.bannerUrl=theURL
}
function writeBan(currBan){
document.write('<a href="javascript:SCMakeWin('+currInst+')"><img src="'+instArray[currInst].objArray[currBan].imgSrc+'" alt="" name="'+instArray[currInst].name+'" height="'+instArray[currInst].banH+'" width="'+instArray[currInst].banW+'" border="0"></a>')
}
// End BannerAction
// WBShrinkWrapper.action v1.4.1 - January, 2004
// © Copyright 2002 by Walter Blady
// All rights reserved
var SWisWin = navigator.platform.indexOf("Win") > -1, SWwinHeightComp;
var SWisNav4 = navigator.appName.indexOf("Netscape") > -1 && parseInt(navigator.appVersion.charAt(0)) == 4;
var SWisIE4 = navigator.appVersion.indexOf("MSIE 4") > -1;
var SWisIE = window.navigator.userAgent.indexOf("MSIE") > -1;
var SWisOmniWeb = window.navigator.userAgent.indexOf("OmniWeb") > -1;
var SWisSafari = window.navigator.userAgent.indexOf("Safari") > -1;
var SWisOpera = window.navigator.userAgent.indexOf("Opera") > -1;
var SWW3C = document.getElementById ? true : false;
var SWNewWind = new Array(), SWsetDelay = 0, SWwindowObj, SWimageObj, SWprotectImageObj, SWwatermarkObj, SWleft, SWtop;
var SWscreenWidth, SWscreenHeight, SWwinWidth = 0, SWwinHeight = 0, SWparams, SWwindowNam, SWaction;
function WBShrinkWrapper(action) {
	if (SWVersion() && action[4].indexOf("Reference!") == -1 && action[4] != "#") {
		SWwinHeightComp = (SWisWin && SWisIE)|| SWisSafari || SWisOmniWeb || SWisOpera ? action[8] : 0;
		SWaction = action;
		SWwindowObj = "newWindowObject";
		SWwindowNam = (action[2].length > 0 ? action[2] : "SWnewWindowName");
		var windowTite = (action[3].length > 0 ? action[3] : "Shrink Wrapper");
		SWparams = "";
		SWscreenWidth = screen.width, SWscreenHeight = screen.height;
		if (action[5] > 0) SWwinWidth = action[5];
		if (action[6] > 0) SWwinHeight = action[6];
		SWSetCoord(SWaction, SWwinWidth, SWwinHeight + SWwinHeightComp, SWscreenWidth, SWscreenHeight);
		SWparams += "width=" + SWwinWidth;
		SWparams += ",height=" + SWwinHeight;
		SWparams += ",toolbar=0,location=0,directories=0,status=0,menubar=0,favorites=0,scrollbars=0";
		SWparams += ",resizable=" + (SWisNav4 || action[7] ? "1" : "0");
		SWparams += (SWisIE) ? ",top=" + SWtop + ",left=" + SWleft : ",screenY=" + SWtop + ",screenX=" + SWleft;
		SWimageObj = "imageObject", SWprotectImageObj = "protectImage", SWwatermarkObj = "watermark";
		var htmlContent = '<html><head>';
		htmlContent += '<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">';
		htmlContent += '<title>' + windowTite + '</title>';
		htmlContent += '<style type="text/css" media="screen"><!--';
		htmlContent += '#layer1 { position: absolute; z-index: 0; top: 0px; left: 0px; width: 100px; height: 100px; visibility: visible; display: block }';
		if (action[13].indexOf("Reference!") == -1 && action[13] != "#") {
			htmlContent += '#layer2 { position: absolute; z-index: 1; top: 0px; left: 0px; width: 100px; height: 100px; visibility: visible; display: block }';
		}
		if (action[14].indexOf("Reference!") == -1 && action[14] != "#") {
			htmlContent += '#layer3 { position: absolute; z-index: 2; top: 0px; left: 0px; width: 100px; height: 100px; visibility: visible; display: block }';
		}
		if (action[12].indexOf("Reference!") == -1 && action[12] != "#") {
			htmlContent += '#layer4 { position: absolute; z-index: 3; top: 10px; left: 10px; width: 68px; height: 16px; visibility: visible; display: block }';
		}
		htmlContent += '--></' + 'style>';
		htmlContent += '<script language="Javascript">function SWCloseWindow() { self.window.close(); return;}</' + 'script>';
		if (action[1] == 1) {
			htmlContent += '</head><body bgcolor="#ffffff">';
			htmlContent += '<div id="layer1"><img src="' + action[4] + '" name="' + SWimageObj + '"></div>';
			if (action[13].indexOf("Reference!") == -1 && action[13] != "#") {
				htmlContent += '<div id="layer2"><img src="' + action[13] + '" name="' + SWprotectImageObj + '"></div>';
			}
			if (action[14].indexOf("Reference!") == -1 && action[14] != "#") {
				htmlContent += '<div id="layer3"><img src="' + action[14] + '" name="' + SWwatermarkObj + '"></div>';
			}
			if (action[12].indexOf("Reference!") == -1 && action[12] != "#") {
				htmlContent += '<div id="layer4"><a href="Javascript:void(SWCloseWindow())"><img src="' + action[12] + '" alt="" width="68" height="16" border="0"></div></a>';
			}
		}
		else if (action[1] == 0) {
			htmlContent += '</head><body bgcolor="#ffffff" background="' + action[4] + '">';
			if (action[14].indexOf("Reference!") == -1 && action[14] != "#") {
				htmlContent += '<div id="layer3"><img src="' + action[14] + '" name="' + SWwatermarkObj + '" border="0"></div>';
			}
			if (action[12].indexOf("Reference!") == -1 && action[12] != "#") {
				htmlContent += '<div id="layer4"><a href="Javascript:void(SWCloseWindow())"><img src="' + action[12] + '" alt="" width="68" height="16" border="0"></div></a>';
			}
		}
		htmlContent += '</body></html>';
		SWNewWind[SWwindowObj] = window.open("", SWwindowNam, SWparams);
		SWNewWind[SWwindowObj].document.write(htmlContent);
		SWNewWind[SWwindowObj].document.close();
		if (action[1] == 0 && (SWW3C || SWisIE4)) {
			SWNewWind[SWwindowObj].moveTo(SWleft, SWtop);
			SWResizePage(SWwinWidth, SWwinHeight + SWwinHeightComp);
		}
		if (action[1] == 1) {
			if (SWisIE || SWW3C) {
				SWsetDelay = setInterval('if (SWNewWind[SWwindowObj].document.images[0].width >= 100) { SWGetImageObject() }', 50);
			}
			else {
				SWsetDelay = setInterval('if (SWNewWind[SWwindowObj].document.layer1.document.images[0].width >= 100) { SWGetImageObject() }', 50);
			}
		}
		else if (action[1] == 0 && action[14].indexOf("Reference!") == -1 && action[14] != "#") {
			if (SWisIE || SWW3C) {
				SWsetDelay = setInterval('if (SWNewWind[SWwindowObj].document.images[0].width >= 100) { SWCenterWatermark() }', 50);
			}
			else {
				SWsetDelay = setInterval('if (SWNewWind[SWwindowObj].document.layer1.document.images[0].width >= 100) { SWCenterWatermark() }', 50);
			}
		}
	}
	SWNewWind[SWwindowObj].focus();
	return;
}
function SWResizePage(width, height) {
	if (SWisIE) {
		SWNewWind[SWwindowObj].resizeTo(width, height);
	}
	else {
		var temp = SWNewWind[SWwindowObj].innerWidth;
		SWNewWind[SWwindowObj].innerWidth = temp-1;
		if (SWNewWind[SWwindowObj].innerWidth == temp-1) {
			SWNewWind[SWwindowObj].innerWidth = width;
			SWNewWind[SWwindowObj].innerHeight = height;
		}
		else {
			SWNewWind[SWwindowObj].resizeTo(width, height);
		}
	}
	return;
}
function SWSetCoord(action, width, height, screenWidth, screenHeight) {
	if (action[9] == 0) {
		SWleft = (screenWidth - width)/2;
		SWtop = (screenHeight - height)/2;
	}
	else if (action[9] == 1) {
		SWleft = 0;
		SWtop = 0;
	}
	else if (action[9] == 2) {
		SWleft = 0;
		SWtop = screenHeight - height - 12;
	}
	else if (action[9] == 3) {
		SWleft = screenWidth - width - 12;
		SWtop = 0;
	}
	else if (action[9] == 4) {
		SWleft = screenWidth - width - 12;
		SWtop = screenHeight - height - 12;
	}
	else if (action[9] == 5) {
		SWleft = width+action[11]>screenWidth ? action[11]-(width+action[10]-screenWidth)-12 : action[11];
		SWtop = height+action[10]>screenHeight ? action[10]-(height+action[10]-screenHeight)-12 : action[10];
	}
	return;
}
function SWGetImageObject() {
	clearInterval(SWsetDelay);
	if (SWisIE || SWW3C) {
		var imgObj = SWNewWind[SWwindowObj].document.images[SWimageObj];
		var protectImgObj = SWNewWind[SWwindowObj].document.images[SWprotectImageObj];
		var watermarkObj = SWNewWind[SWwindowObj].document.images[SWwatermarkObj];
	}
	else {
		var imgObj = SWFindImageObject(SWNewWind[SWwindowObj], SWimageObj, "layer1");
		var protectImgObj = SWFindImageObject(SWNewWind[SWwindowObj], SWprotectImageObj, "layer2");
		var watermarkObj = SWFindImageObject(SWNewWind[SWwindowObj], SWwatermarkObj, "layer3");
	}
	SWSetCoord(SWaction, imgObj.width, imgObj.height + SWwinHeightComp, SWscreenWidth, SWscreenHeight);
	SWNewWind[SWwindowObj].moveTo(SWleft, SWtop);
	SWResizePage(imgObj.width, imgObj.height + SWwinHeightComp);
	SWNewWind[SWwindowObj].moveTo(SWleft, SWtop);
	SWwinWidth = imgObj.width;
	SWwinHeight = imgObj.height;
	if (protectImgObj) { 
		protectImgObj.width = imgObj.width;
		protectImgObj.height = imgObj.height;
	}
	if (watermarkObj) {
		SWSetCenter(watermarkObj, imgObj.width, imgObj.height);
	}
	return;
}
function SWCenterWatermark() {
	clearInterval(SWsetDelay);
	if (SWisIE || SWW3C) {
		var watermarkObj = SWNewWind[SWwindowObj].document.images[SWwatermarkObj];
	}
	else {
		var watermarkObj = SWFindImageObject(SWNewWind[SWwindowObj], SWwatermarkObj, "layer3");
	}
	SWSetCenter(watermarkObj, SWwinWidth, SWwinHeight + SWwinHeightComp);
	return;
}
function SWSetCenter(watermarkImage, imageWidth, imageHeight) { 
	var obj = SWGetObject("layer3");
	watermarkImage.width = watermarkImage.width > imageWidth ? imageWidth : watermarkImage.width;
	watermarkImage.height = watermarkImage.height > imageHeight ? imageHeight : watermarkImage.height;
	var widthOffset = imageWidth - watermarkImage.width > 0 ? (imageWidth - watermarkImage.width) / 2 : 0;
	var heighthOffset = (imageHeight - watermarkImage.height) / 2;
	if (obj) SWScrollTo(obj, widthOffset, heighthOffset);
	return;
}
function SWScrollTo(obj, x, y) {
	if (SWW3C) {
		obj.style.left = x + "px";
		obj.style.top = y + "px";
	}
	else if (SWisIE4) {
		obj.style.pixelLeft = x;
		obj.style.pixelTop = y;
	}
	else {
		obj.moveTo(x, y);
	}
	return;
}
function SWFindImageObject(newWindow, imgObj, thisLayer) {
	if (newWindow.document[thisLayer] != null) {
		var imgObj = newWindow.document[thisLayer].document[imgObj];
	}
	return imgObj;
}
function SWGetObject(objName) {
	var params;
	if (SWW3C) {
		params = eval('SWNewWind[SWwindowObj].document.getElementById("' + objName + '")');
	}
	else if (SWisIE4) {
		params = eval("SWNewWind[SWwindowObj].document.all." + objName);
	}
	else {
		params = SWFindLayerObject(objName, 0);
	}
	return params;
}
function SWFindLayerObject(layer, thisLayer) {
	if (thisLayer) {
		var thisDocument = thisLayer.document;
	}
	else {
		var thisDocument = SWNewWind[SWwindowObj].document;
	}
	var layerObj = thisDocument[layer];
	if (layerObj) {
		return layerObj;
	}
	else {
		for (var i = 0; i < thisDocument.layers.length; i++) {
			layerObj = SWFindLayerObject(layer, thisDocument.layers[i]); 
			if (layerObj) {
				break;
			}
		}
	}
	return layerObj;
}
function SWVersion() {
	return (navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 4)
          || (navigator.appName.indexOf("Explorer") >= 0 && parseInt(navigator.appVersion.charAt(0)) >= 4);
}
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;
}

//Released by Rasmussens Design Actions
//Copyrights to no-one. Feel free to alter or what ever
function stopError(action) {
            return true;
        }
        window.onerror = stopError;

