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

//Released by Rasmussens Design Actions
//Copyrights to no-one. Feel free to alter or what ever
function stopError(action) {
            return true;
        }
        window.onerror = stopError;
// 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 CSresizeWindow(){
if (navigator.appVersion.indexOf("MSIE 5.5")!=-1){ 
top.window.resizeBy( -1 , -1); 
setTimeout(resetWindow,500) 
}
}
function resetWindow(){
top.window.resizeBy(1 , 1); 
}
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 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;
}

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

