﻿/* -- 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 CSIEPNGFix(action) 
   {
   var bAgent	= window.navigator.userAgent;
   var bAppName	= window.navigator.appName;
   var bAppVers = window.navigator.appVersion;

   var isIE     = (bAppName.indexOf("Explorer") >= 0);
   var isWin    = (bAgent.indexOf("Win") >= 0); 
    
   if (isIE && isWin)
	   {
       var vers = 0;
       var idx1 = bAppVers.indexOf ("MSIE");
 
       if (idx1 != -1)
          {
          idx1 += 4;
          var idx2 =  bAppVers.indexOf(";", idx1)
          if (idx2 != -1)
              {
              vers = bAppVers.substring(idx1, idx2);
              }
          else
              {
              vers = bAppVers.substring(idx1);
		      }
          }
	   
	   if (vers >= 5.5)
	       {	   	   
	       for(var i=0; i<document.images.length; i++)
	          {
	    	  var img = document.images[i];
		      var imgName = img.src.toUpperCase();
		      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
		         {
			     var imgID = (img.id) ? "id='" + img.id + "' " : "";
			     var imgClass = (img.className) ? "class='" + img.className + "' " : "";
			     var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
			     var imgStyle = "display:inline-block;" + img.style.cssText;
			     if (img.align == "left") imgStyle = "float:left;" + imgStyle;
			     if (img.align == "right") imgStyle = "float:right;" + imgStyle;
			     if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
			     var strNewHTML = "<span " + imgID + imgClass + imgTitle
			     + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
		         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
			     + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>";
			     img.outerHTML = strNewHTML;
			     i = i-1;
		         }
	          }
	       }
        }
     }

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document; var img;
		for (var i=0; i<array.length; i+=2) {
			img = null; var n = array[i];
			if (d.images) {img = d.images[n];}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (img) {img.src = array[i+1];}
		}
	}
}

function changeImages() {
	changeImagesArray(changeImages.arguments);
}
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 */
}
// WBCyberGallery.action v2.4.2 - June, 2008
// © Copyright 2003 by Walter Blady
// All rights reserved
var CGisNav4 = navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion.charAt(0)) == 4;
var CGisIE4 = navigator.appVersion.indexOf("MSIE 4") >= 0;
var CGisIE = window.navigator.userAgent.indexOf("MSIE") >= 0;
var CGisNN = window.navigator.userAgent.indexOf("Netscape") >= 0 || window.navigator.userAgent.indexOf("Navigator") >= 0;
var CGisOpera = window.navigator.userAgent.indexOf("Opera") >= 0;
var CGisW3C = document.getElementById ? true : false;
var CGisWin = navigator.platform.indexOf("Win") > -1;
var CGisMac = navigator.platform.indexOf("Mac") > -1;
var CGisMacIE = CGisMac && CGisIE;
var CGisMacNN = CGisMac && CGisNN && parseInt(navigator.appVersion.charAt(0)) < 8;
var CGisWinIE = CGisWin && navigator.appName.indexOf("Explorer") > -1;
var CGisWinIE7 = CGisWin && navigator.appVersion.indexOf("MSIE 7") >= 0;
var CGsetLoadDelay = 0, CGsetShowDelay = 0, CGleft, CGtop, CGaction, CGboxb, CGboxm,CGboxw, CGimgm;
var CGslideTimer = 0, CGslideIndex = 0, CGtimer = 0, CGtotalSlides = 0,CGhid, CGvis, CGcaptions, CGNNfixH, CGNNfixW;
var CGpause = false, CGadvance = true, CGslideCounted = false, CGloop, CGholdLoop, CGendOfLoop = false, CGdirection;
function WBCyberGallery(action) {
	if (CGVersion()) { 
		CGaction = action;
		CGloop = false;
		var path = CGaction[17] == "" ? "" : CGaction[17] + ".";
		var path2 = CGaction[17] == "" ? "" : CGaction[17];
		CGboxb = eval(path + "CGboxb");
		CGboxm = eval(path + "CGboxm");
		CGboxw = eval(path + "CGboxw");
		CGboxc = eval(path + "CGboxc");
		CGSdelay = eval(path + "CGSdelay");
		CGimgm = CGboxm.lastChild;
		CGboxm.path = path;
		CGboxm.path2 = path2;
		CGboxm.win = CGaction[19];
		CGboxm.url = CGaction[18];
		CGboxm.cap = CGcaptions != null;
		CGvis = (CGisW3C || CGisIE4) ? "visible" : "show";
		CGhid = (CGisW3C || CGisIE4) ? "hidden" : "hide";
		if (CGisIE && !CGisMacIE && !CGisWinIE7) {
			CGboxm.style.filter = "progid:DXImageTransform.Microsoft.Alpha(enebled=true)";
		}
		if (action[1] < 6) {
			CGboxm.sou = action[5];
			CGboxm.pos = action[6];
			CGboxm.ali = action[7];
			CGboxm.cid = action[8];
			CGboxm.off = action[9];
			CGboxm.wpos = action[10];
			CGboxm.pro = action[13];
			CGboxm.mar = action[14];
			if (action[15] > 0) CGboxb.opa = action[15];
			CGboxw.opa2 = action[16] > 0 ? action[16] : CGboxw.opa;
			if (action[1] > 0 && !CGslideCounted) {
				CGslideCounted = true;
				for (var i = 1; eval("CGImages_" + i + "()") != ""; i++) { }
				CGtotalSlides = i-1;
			}
			if (CGboxm.autoClose) {
				var p = eval(CGboxm.path + "document.body");
				if (CGboxm.path != "") p.onmouseup = CGHideAll;
				document.body.onmouseup = CGHideAll;
			}
			else if (action[1] == 0) {
				if (CGboxb) CGboxb = null;
			}
		}
		if (action[1] == 0 && action[4].indexOf("Reference!") == -1 && action[4] != "#") {
			var img = action[4];
			CGboxm.showHide(CGhid);
			if (CGboxc) CGboxc.showHide(CGhid);
			if (CGboxm.pos > 0 && CGboxm.cid != "" && !CGisNav4) {
				var caption = "";
				if (CGboxm.sou == 1) {
					caption = CGGetImageObj("", CGboxm.cid).alt;
				}
				else if (CGboxm.sou == 2 && CGboxm.cap) {
					caption = eval("CGCaption_" + CGboxm.cid + "()");
				}
				else if (CGboxm.sou == 3 && CGboxm.cap) {
					caption = eval("CGCaption_notice"+ "()");
				}
				if (CGboxc) {
					CGboxc.innerHTML = "";
					CGboxc.innerHTML = caption;
				}
			}
			CGimgn = new Image();
			CGimgn.src = img;
			CGimgm.src = CGimgn.src;
			if (CGboxb) {
				CGboxb.doOpacity(CGboxb.opa);
				CGboxb.showHide(CGvis);
				if (CGboxb.isImage && !CGimgn.complete) CGboxb.style.backgroundImage = "url(" + CGboxb.bimage + ")";
			}
			CGsetLoadDelay = setInterval('if (CGimgn.complete) { CGFinishUp() }', CGSdelay);
		}
		else {
			if (CGboxm.autoClose) {
				var p = eval(CGboxm.path + "document.body");
				if (CGboxm.path != "") p.onmouseup = null;
				document.body.onmouseup = null;
			}
			if (CGboxb) {
				CGboxb.doOpacity(CGboxb.opa);
				CGboxb.showHide(CGvis);
			}
			if (action[1] == 1 || action[1] == 2) {
				clearInterval(CGslideTimer);
				clearInterval(CGsetLoadDelay);
				CGpause = false;
				CGtimer = action[2]*1000;
				if (action[1] == 1) {
					CGslideIndex = 0;
				}
				CGadvance = true;
				CGloop = action[3];
				CGholdLoop = CGloop;
				CGendOfLoop = false;
				CGDoSlides();
				if (!CGendOfLoop) CGslideTimer = setInterval("CGDoSlides()", CGtimer);
			}
			else if (action[1] == 3) {
				clearInterval(CGslideTimer);
				clearInterval(CGsetLoadDelay);
				CGpause = false;
				CGtimer = action[2]*1000;
				CGadvance = false;
				CGloop = action[3];
				CGholdLoop = CGloop;
				CGendOfLoop = false;
				CGDoSlides();
				if (!CGendOfLoop) CGslideTimer = setInterval("CGDoSlides()", CGtimer);
			}
			else if (action[1] == 4 || action[1] == 5) {
				clearInterval(CGslideTimer);
				clearInterval(CGsetLoadDelay);
				CGadvance = action[1] == 4 ? true : false;
				CGloop = true;
				CGDoSlides();
			}
			else if (action[1] == 6 && CGboxm.pro != null) {
				if (!CGpause) {
					CGdirection = CGadvance;
					clearInterval(CGslideTimer);
				}
				else {
					CGadvance = CGdirection;
					CGloop = CGholdLoop;
					if (CGboxb) CGboxb.showHide(CGvis);
					if (!CGendOfLoop) CGslideTimer = setInterval("CGDoSlides()", CGtimer);
				}
				CGpause = CGpause ? 0 : 1;
			}
			else if (action[1] == 7 && CGboxm.pro != null) {
				clearInterval(CGslideTimer);
				clearInterval(CGsetLoadDelay);
				CGpause = false;
				CGHideAll();
			}
		}
	}
	return;
}
function CGDoSlides() {
	CGslideIndex += CGadvance ? 1 : -1;
	if (CGslideIndex > CGtotalSlides) {
		CGslideIndex = CGloop ? 1 : CGslideIndex + -1;
		if (!CGloop) {
			clearInterval(CGslideTimer);
			clearInterval(CGsetLoadDelay);
			CGendOfLoop = true;
			return;
		}
	}
	if (CGslideIndex < 1) {
		CGslideIndex = CGloop ? CGtotalSlides : CGslideIndex + 1;
		if (!CGloop) {
			clearInterval(CGslideTimer);
			clearInterval(CGsetLoadDelay);
			CGendOfLoop = true;
			return;
		}
	}
	var img = eval("CGImages_" + CGslideIndex + "()");
	if (CGboxm.url.indexOf("Reference") > -1 || CGboxm.url == "#") CGboxm.url = CGurl;
	CGboxm.showHide(CGhid);
	if (CGboxw) CGboxw.showHide(CGhid);
	if (CGboxc) CGboxc.showHide(CGhid);
	if (CGboxm.pos > 0 && !CGisNav4) {
		var caption = "";
		if (CGboxm.sou == 1) {
			caption = CGGetImageObj("", CGcap) ? CGGetImageObj("", CGcap).alt : "";
		}
		else if (CGboxm.sou == 2 && CGboxm.cap) {
			caption = eval("CGCaption_" + CGcap + "()");
		}
		else if (CGboxm.sou == 3 && CGboxm.cap) {
			caption = eval("CGCaption_notice"+ "()");
		}
		if (CGboxc) {
			CGboxc.innerHTML = "";
			CGboxc.innerHTML = caption;
		}
	}
	CGimgn = new Image();
	CGimgn.src = img;
	CGimgm.src = CGimgn.src;
	if (CGboxb && CGboxb.isImage && !CGimgn.complete) CGboxb.style.backgroundImage = "url(" + CGboxb.bimage + ")";
	CGsetLoadDelay = setInterval('if (CGimgn.complete) { CGFinishUp() }', CGSdelay);
	return;
}
function CGFinishUp() {
	clearInterval(CGsetLoadDelay);
	if (CGboxb) CGboxb.style.backgroundImage = !CGisOpera && !CGisIE ? null : "url('')";
	CGboxm.setSize(CGimgm.width, CGimgm.height);
	if (CGboxm.wpos > 0) {
		var top, left;
		if (CGboxm.wpos == 1) {
			var p = CGaction[17] == "" ? eval("parent") : eval("parent." + CGaction[17]);
			var st = p.document.body.scrollTop > 0 ? p.document.body.scrollTop : p.document.documentElement.scrollTop; 
			var sl = p.document.body.scrollLeft > 0 ? p.document.body.scrollLeft : p.document.documentElement.scrollLeft;
			if (CGisMacIE) var st = p.document.body.scrollTop, sl = p.document.body.scrollLeft;
			if (p.innerHeight) {
				left = ((p.innerWidth - CGimgm.width) / 2) + sl;
				top = ((p.innerHeight - CGimgm.height) / 2) + st;
			}
			else {
				left = ((p.document.body.clientWidth - CGimgm.width) / 2) + sl;
				var dech = p.document.documentElement.clientHeight, dbch = p.document.body.clientHeight;
				top = dech > 0 ? ((dech - CGimgm.height) / 2) + st : ((dbch - CGimgm.height) / 2) + st;
			}
		}
		else if (CGboxm.wpos == 2) {
			left = CGaction[11];
			top = CGaction[12];
		}
		CGboxm.scrollTo(left, top);
	}
	if (CGboxw && CGboxm.pro) {
		CGboxw.setSize(CGimgm.width, CGimgm.height);
		var opac = CGboxm.mar ? CGboxw.opa2 : 0;
		if (CGboxw.doOpacity) CGboxw.doOpacity(opac);
	}
	if (!CGisNav4 && CGboxc && CGboxm.pos > 0) {
		var offset = parseInt(CGboxm.off), fixpad = CGisWinIE ? 0 : CGboxc.pad * 2;
		if (!CGisMacIE) {
			CGboxc.style.width = CGboxc.fixedWidth == 0 ? parseInt(CGboxm.style.width) - fixpad + "px" : CGboxc.fixedWidth - fixpad + "px";
		}
		else {
			CGboxc.style.width = CGboxc.fixedWidth == 0 ? parseInt(CGboxm.style.width) + CGboxc.wid*2 + "px" : CGboxc.fixedWidth + CGboxc.wid*2 + "px";
		}
		if (CGboxc) {
			CGboxc.style.textAlign = CGboxm.ali;
			for (var i in CGboxc) {
				if (i == "offsetHeight") {
					CGboxcHeight = CGboxc[i];
				}
			}
		}
		if (CGboxc.fixedWidth == 0) {
			var x = -CGboxc.wid -CGboxc.mar;
		}
		else {
			var y = parseInt(CGboxm.style.width);
			var x = CGboxc.fixedWidth <= y ? (y - CGboxc.fixedWidth)/2 - CGboxc.wid - CGboxc.mar : (-(CGboxc.fixedWidth - y)/2) - CGboxc.wid - CGboxc.mar;
		}
		if (CGboxm.pos == 1) {
			var left = x;
			var top = 0 - CGboxcHeight - offset;
		}
		if (CGboxm.pos == 2) {
			var left = x;
			var top = CGimgm.height + offset;
		}
		if (CGboxm.pos == 3) {
			var left = x;
			var top = offset;
		}
		if (CGboxm.pos == 4) {
			var left = x;
			var top = CGimgm.height - CGboxcHeight - offset;
		}
		if (CGboxm.pos == 5) {
			var left = x;
			var top = (CGimgm.height - CGboxcHeight) / 2;
		}
		CGboxc.scrollTo(left, top);
	}
	CGsetShowDelay = setInterval('CGShowAll()', CGSdelay);
	return;
}
function CGShowAll() {
	clearInterval(CGsetShowDelay);
	if (CGboxm.transMode == 2 || CGboxm.transMode == 3) {
		clearInterval(CGboxm.CGtransInt);
		CGboxm.CGfadeIn = true;
		CGboxm.CGtransSta = 0;
		CGboxm.CGtransEnd = !CGisMacNN ? 100 : 99;
		CGboxm.CGtransVal = CGboxm.CGtransSta;
		CGDoOpacity(CGboxm.CGtransVal);
	}
	if (CGboxb) {
		var p = CGboxm.path == "" ? eval("parent") : eval("parent." + CGaction[17]);
		var desh = p.document.documentElement.scrollHeight, dbsh = p.document.body.scrollHeight;
		var desw = p.document.documentElement.scrollWidth, dbsw = p.document.body.scrollWidth;
		var dech = p.document.documentElement.clientHeight;
		CGboxb.style.height = desh >= dbsh ? desh + "px" : dbsh + "px";
		if (dech > desh) CGboxb.style.height = dech + "px";
		CGboxb.style.width = desw > dbsw ? desw + "px" : dbsw + "px";
		CGboxb.showHide(CGvis);
	}		
	if (CGboxm) CGboxm.showHide(CGvis);
	if (CGboxc && CGboxm.pos > 0) CGboxc.showHide(CGvis);
	if (CGboxw && CGboxm.pro) CGboxw.showHide(CGvis);
	if (CGboxm.transMode == 2 || CGboxm.transMode == 3) {
		CGboxm.CGtransInt = setInterval("CGTransition()", CGboxm.transSpeed);
	}
	return;
}
function CGHideAll() {
	if (CGboxm.transMode == 1 || CGboxm.transMode == 3) {
		clearInterval(CGboxm.CGtransInt);
		CGboxm.CGfadeIn = false;
		CGboxm.CGtransSta = 100;
		CGboxm.CGtransEnd = 0;
		CGboxm.CGtransVal = CGboxm.CGtransSta;
		CGboxm.CGtransInt = setInterval("CGTransition()", CGboxm.transSpeed);
	}
	else {
		if (CGboxm) {
			CGboxm.showHide(CGhid);
			if (CGboxm.autoClose) {
				this.onmouseup = null;
			}
		}
		if (CGboxw) {
			CGboxw.showHide(CGhid);
			if (CGboxw.doOpacity) CGboxw.doOpacity(null);
		}
		if (CGboxc) CGboxc.showHide(CGhid);
		if (CGboxb) {
			CGboxb.showHide(CGhid);
			CGboxb.doOpacity(null);
			CGboxb.style.width = "auto";
			CGboxb.style.height = "auto";
		}
	}
	return;
}
function CGGetImageObj(frameName, imgObjName) {
	var path = frameName.length > 0 ? frameName + "." : "";
	if (CGisW3C || CGisIE) {
		var baseImage = eval(path + "document.images." + imgObjName);
	}
	else {
		baseImage = parseInt(navigator.appVersion.charAt(0)) > 3 ? CGFindImgElement(imgObjName, 0, path) : eval(path + "document.images[imgObjName]");
	}
	return baseImage;
}
function CGFindImgElement(baseImage, thisLayer, path) {
	if (path.length != "") {
		var thisDocument = thisLayer ? thisLayer.document : eval(path + "document");
	}
	else {
		var thisDocument = thisLayer ? thisLayer.document : document;
	}
	var imageObj = thisDocument[baseImage];
	if (imageObj) {
		return imageObj;
	}
	else {
		for (var i = 0; i < thisDocument.layers.length; i++) {
			imageObj = CGFindImgElement(baseImage, thisDocument.layers[i], path);
			if (imageObj) {
				break;
			}
		}
	}
	return imageObj;
}
function CGTransition() {
	if(CGboxm.CGfadeIn) {
		CGboxm.CGtransVal += CGboxm.transTics;
	}
	else {
		CGboxm.CGtransVal -= CGboxm.transTics;
	}
	var doFade = CGboxm.CGfadeIn ? CGboxm.CGtransVal <= CGboxm.CGtransEnd : CGboxm.CGtransVal >= CGboxm.CGtransEnd;
	if (doFade) {
		CGDoOpacity(CGboxm.CGtransVal);
	}
	else {
		clearInterval(CGboxm.CGtransInt);
		if (!CGboxm.CGfadeIn) {
			if (CGboxm) {
				CGboxm.showHide(CGhid);
				if (CGboxm.autoClose) {
					this.onmouseup = null;
					document.body.onmouseup = null;
				}
			}
			if (CGboxw) {
				CGboxw.showHide(CGhid);
				if (CGboxw.doOpacity) CGboxw.doOpacity(null);
			}
			if (CGboxc) CGboxc.showHide(CGhid);
			if (CGboxb) {
				CGboxb.showHide(CGhid);
				CGboxb.doOpacity(null);
				CGboxb.style.width = "auto";
				CGboxb.style.height = "auto";
			}
			CGDoOpacity(100);
		}
	}
	return;
}
function CGDoOpacity(transVal) {
	if (CGboxm.style.MozOpacity != null) {
		CGboxm.style.MozOpacity = transVal/100;
	}
	else if (CGisIE && !CGisMacIE && !CGisWinIE7) {
		CGboxm.filters.item("DXImageTransform.Microsoft.Alpha").opacity = transVal;
	}
	else {
		CGboxm.style.opacity = transVal/100;
	}
	return;
}
function CGVersion() {
	return true;
}
//
//-->

// WBCyberGallerySetup.action v2.4.2 - June, 2008
// © Copyright 2003 by Walter Blady
// All rights reserved
var CGisNav4 = navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion.charAt(0)) == 4;
var CGisIE4 = navigator.appVersion.indexOf("MSIE 4") >= 0;
var CGisIE = window.navigator.userAgent.indexOf("MSIE") >= 0;
var CGisNN = window.navigator.userAgent.indexOf("Netscape") >= 0 || window.navigator.userAgent.indexOf("Navigator") >= 0;
var CGisOpera = window.navigator.userAgent.indexOf("Opera") >= 0;
var CGisW3C = document.getElementById ? true : false;
var CGisWin = navigator.platform.indexOf("Win") > -1;
var CGisMac = navigator.platform.indexOf("Mac") > -1;
var CGisMacIE = CGisMac && CGisIE;
var CGisMacNN = CGisMac && CGisNN && parseInt(navigator.appVersion.charAt(0)) < 8;
var CGisWinIE = CGisWin && navigator.appName.indexOf("Explorer") > -1;
var CGisWinIE7 = CGisWin && navigator.appVersion.indexOf("MSIE 7") >= 0;
var CGimgm = null, CGboxm = null, CGboxb = null, CGboxw = null, CGboxc = null, CGimgn, CGvis, CGhid;
var CGboxmLeft = 0, CGboxmTop = 0, CGboxcHeight = 0, CGSnameTag = "", CGSaction, CGSdelay, CGNNfixW, CGNNfixH;
var CGvis = (CGisW3C || CGisIE4) ? "visible" : "show";
var CGhid = (CGisW3C || CGisIE4) ? "hidden" : "hide";
document.writeln('<head>');
document.writeln('<style type="text/css" media="screen"><!--');
document.writeln('#CGbackgroundLayer { height: auto; width: auto; left: 0px; top: 0px; position: absolute; z-index: 100; visibility: hidden; }');
document.writeln('#CGimageLayer { left: 290px; top: 164px; z-index: 101; position: absolute; visibility: hidden; }');
document.writeln('#CGwatermarkLayer { left: 0; top: 0; z-index: 102; position: absolute; visibility: hidden; }');
document.writeln('#CGcaptionLayer { height: auto; left: 0; top: 0px; z-index: 102; position: absolute; visibility: hidden; }');
document.writeln('--></style>');
document.writeln('</head><body>');
document.writeln('<DIV id="CGbackgroundLayer"></div>');
document.writeln('<DIV id="CGimageLayer"><div id="CGwatermarkLayer"></div> <div id="CGcaptionLayer"></div> <img id="CGpix" src="#" alt="" name="CGpix" border="0" /></div></body>');
function WBCyberGallerySetup(action) {
	if (CGSVersion()) { 
		CGSaction =  action;
		CGSsetDelay = setInterval("CGSFinishUp()", 200);
	}
	CGSdelay = 100;
	return;
}
function CGSFinishUp() {
	clearInterval(CGSsetDelay);
	window.onscroll = CGScrollSet;
	window.onresize = CGScrollSet;
	if (CGSaction[1] && !CGisMacIE) {
		CGboxb = document.getElementById("CGbackgroundLayer");
		CGboxb.doOpacity = CGSOpacity;
		CGboxb.opa = CGSaction[2];
		CGboxb.showHide = CGSShowHide;
		CGboxb.style.backgroundColor = "#" + CGSaction[3];
		CGboxb.bimage = CGSaction[4];
		CGboxb.isImage = CGboxb.bimage.indexOf("Reference") == -1 && CGboxb.bimage != "#";
		CGboxb.style.backgroundRepeat = "no-repeat";
		CGboxb.style.backgroundPosition = "center";
	}
	CGboxm = document.getElementById("CGimageLayer");
	CGboxm.setSize = CGSSetBoxSize;
	CGboxm.scrollTo = CGSScrollTo;
	CGboxm.showHide = CGSShowHide;
	CGboxm.onmousedown = CGSDoHREF;
	CGboxm.autoClose = CGSaction[8];
	CGboxm.transMode = CGSaction[29];
	CGboxm.transTics = CGSaction[30];
	CGboxm.transSpeed = CGSaction[31];
	CGboxm.style.border = CGSaction[7] + " #" + CGSaction[5] + " " + CGSaction[6] + "px";
	CGimgm = CGboxm.lastChild;
	CGboxw = document.getElementById("CGwatermarkLayer");
	if (!CGisMacIE) {
		CGboxw.isImage = CGSaction[9].indexOf("Reference") == -1 && CGSaction[9] != "#";
		if (CGboxw.isImage) {
			CGboxw.doOpacity = CGSOpacity;
			CGboxw.style.backgroundImage = "url(" + CGSaction[9] + ")";
			CGboxw.style.backgroundRepeat = "no-repeat";
			CGboxw.style.backgroundPosition = "center";
		}
	}
	CGboxw.setSize = CGSSetBoxSize;
	CGboxw.scrollTo = CGSScrollTo;
	CGboxw.showHide = CGSShowHide;
	CGboxw.opa = CGSaction[10];
	CGboxw.scrollTo(0, 0);
	CGboxc = document.getElementById("CGcaptionLayer");
	CGboxc.scrollTo = CGSScrollTo;
	CGboxc.showHide = CGSShowHide;
	if (CGSaction[11] != 0) {
		CGboxc.style.fontFamily = CGSaction[11] == 1 ? CGSaction[32] : CGSaction[11];
	}
	CGboxc.style.fontSize = CGSaction[12];
	CGboxc.style.lineHeight = CGSaction[13];
	CGboxc.style.fontWeight = CGSaction[14];
	CGboxc.style.fontStyle = CGSaction[15];
	CGboxc.style.color = "#" + CGSaction[16];
	CGboxc.style.textIndent = CGSaction[17];
	CGboxc.style.wordSpacing = CGSaction[18];
	CGboxc.style.letterSpacing = CGSaction[19];
	CGboxc.style.margin = CGSaction[20];
	CGboxc.mar = parseInt(CGSaction[20]);
	CGboxc.style.padding = CGSaction[21];
	CGboxc.pad = parseInt(CGSaction[21]);
	CGboxc.fixedWidth = CGSaction[22];
	CGboxc.style.border = CGSaction[25] + " #" + CGSaction[23] + " " + CGSaction[24] + "px";
	CGboxc.wid = parseInt(CGSaction[24]);
	if (CGSaction[26] == 0) {
		CGboxc.style.backgroundColor = null;
	}
	else if (CGSaction[26] == 1) {
		CGboxc.style.backgroundColor = "#" + CGSaction[27]
	}
	else if (CGSaction[26] == 2 && !CGisMacIE) {
		CGboxc.style.backgroundImage = "url(" + CGSaction[28] + ")";
		CGboxc.style.backgroundRepeat = "no-repeat";
		CGboxc.style.backgroundPosition = "center";
	}
	return;
}
function CGSGetImageObj(frameName, imgObjName) {
	var path = frameName.length > 0 ? frameName + "." : "";
	if (CGisW3C || CGisIE) {
		var baseImage = eval(path + "document.images." + imgObjName);
	}
	else {
		baseImage = parseInt(navigator.appVersion.charAt(0)) > 3 ? CGSFindImgElement(imgObjName, 0, path) : eval(path + "document.images[imgObjName]");
	}
	return baseImage;
}
function CGSFindImgElement(baseImage, thisLayer, path) {
	if (path.length != "") {
		var thisDocument = thisLayer ? thisLayer.document : eval(path + "document");
	}
	else {
		var thisDocument = thisLayer ? thisLayer.document : document;
	}
	var imageObj = thisDocument[baseImage];
	if (imageObj) {
		return imageObj;
	}
	else {
		for (var i = 0; i < thisDocument.layers.length; i++) {
			imageObj = CGSFindImgElement(baseImage, thisDocument.layers[i], path);
			if (imageObj) {
				break;
			}
		}
	}
	return imageObj;
}
function CGSGetBoxObj(frameName, imgName) {
	var path = frameName.length > 0 ? frameName + "." : "";
	if (CGisW3C) {
		var layerObj = eval(path + 'document.getElementById("' + imgName + '")');
	}
	else if (CGisIE4) {
		var layerObj = eval(path + "document.all." + imgName);
	}
	else {
		var layerObj = CGSFindLayerObject(path, imgName, 0);
	}
	return layerObj;
}
function CGSFindLayerObject(path, layer, thisLayer) {
	if (thisLayer) {
		var thisDocument = eval(path + "thisLayer.document");
	}
	else {
		var thisDocument = eval(path + "document");
	}
	var layerObj = thisDocument[layer];
	if (layerObj) {
		return layerObj;
	}
	else {
		for (var i = 0; i < thisDocument.layers.length; i++) {
			layerObj = CGSFindLayerObject("", layer, thisDocument.layers[i]);
			if (layerObj) {
				break;
			}
		}
	}
	return layerObj;
}
function CGSOpacity(opa) {
	if (CGisIE && !CGisMacIE) {
		if (!CGisWinIE7 || (CGisWinIE7 && this.id != "CGimageLayer")) {
			this.style.filter = "progid:DXImageTransform.Microsoft.Alpha(enebled=true)";
		}
	}
	if (this.style.MozOpacity != null) {
		this.style.MozOpacity = opa != null ? opa/100 : null;
	}
	else if (CGisIE && !CGisMacIE) {
		if (!CGisWinIE7 || (CGisWinIE7 && this.id != "CGimageLayer")) {
			this.filters.item("DXImageTransform.Microsoft.Alpha").opacity = opa != null ? opa : 0;
		}
	}
	else {
		this.style.opacity = opa != null ? opa/100 : 0;
	}
	return;
}
function CGSSetBoxSize(w, h) {
	if (CGisW3C || CGisIE4) {
		this.style.width = w + "px";
		this.style.height = h + "px";
	}
	else {
		this.width = w;
		this.height = h;
	}
	return;
}
function CGSScrollTo(x, y) {
	if (CGisW3C) {
		this.style.left = x + "px";
		this.style.top = y + "px";
	}
	else if (CGisIE4) {
		this.style.pixelLeft = x;
		this.style.pixelTop = y;
	}
	else {
		this.moveTo(x, y);
	}
	return;
}
function CGSShowHide(state) {
	if (CGisW3C || CGisIE4) {
		this.style.visibility = state;
	}
	else if (CGisNav4) {
		this.visibility = state;
	}
	return;
}
function CGSDoHREF() {
	if (this.url && this.url.indexOf("Reference") == -1 && this.url != "#" && this.url != "") {
		if (this.win == 0) {
			var w = eval(this.path + "window.location");
			w.href = this.url;
		}
		else {	
			CGNewWind = window.open(this.url, "");
		}
	}
	return;
}
function CGScrollSet() {
	if (CGboxb && CGboxb.style.visibility == "visible") {
		var desh = this.document.documentElement.scrollHeight, dbsh = this.document.body.scrollHeight;
		var desw = this.document.documentElement.scrollWidth, dbsw = this.document.body.scrollWidth;
		CGboxb.style.height = dbsh > 0 ? dbsh + "px" : desh + "px";
		CGboxb.style.width = desw > dbsw ? desw + "px" : dbsw + "px";
	}
	return;
}
function CGQuickReturn() {
	clearInterval(CGboxm.CGtransInt);
	clearInterval(CGsetLoadDelay);
	clearInterval(CGslideTimer);
	clearInterval(CGsetLoadDelay);
	if (CGboxm) {
		CGboxm.showHide(CGhid);
		if (CGboxm.autoClose) {
			this.onmouseup = null;
		}
	}
	if (CGboxw) {
		CGboxw.showHide(CGhid);
		if (CGboxw.doOpacity) CGboxw.doOpacity(null);
	}
	if (CGboxc) CGboxc.showHide(CGhid);
	if (CGboxb) {
		CGboxb.showHide(CGhid);
		CGboxb.doOpacity(null);
	}
	if (CGboxm.autoClose) {
		var p = eval(CGboxm.path + "document.body");
		if (CGboxm.path != "") p.onmouseup = null;
		document.body.onmouseup = null;
	}
	return;
}
function CGSVersion() {
	return true;
}
//
//-->



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);
	}
}
SSnumimg=1; SSsens2=-1;SSsens3=-1
function CSSlideShow(action) 
{
SSmax=action[2]
SSimgNom=action[1]
SSloop=action[4]
SSsens=action[3] 
SSpalin=action[5]
var SSimg = null;
	if (document.images) {
		if (!IsIE()&&CSBVers<5) SSimg = CSFindElement(SSimgNom,0);
		else SSimg = document.images[SSimgNom];
SSstr=SSimg.src
SSn=SSstr.length
SSp=SSn-6
SSpstr=SSstr.substring(0,SSp)
SSnimg=SSstr.substring(SSp,SSp+2)
SSformat=SSstr.substring(SSp+2,SSn)
if (SSformat==".jpg" || SSformat==".JPG" || SSformat==".gif" || SSformat==".GIF")
{}
else
{
 alert("Image extension must be .jpg or .gif (case sensitive). Images must be numbered 01, 02 ...")
}
slide(SSmax,SSformat,SSpstr,SSnimg,SSimgNom,SSloop,SSpalin)
}
}
function slide(SSmax,SSformat,SSpstr,SSnimg,SSimgNom,SSloop,SSpalin)
{
if (SSsens2==true) {SSsens=true}
if (SSsens2==false) {SSsens=false}
if (SSsens==true) 
{
SSsuite=SSnumimg-1
	if (SSnumimg>SSmax)SSsuite=SSmax
	if (SSnumimg<=1 & SSloop==true & SSpalin!=true) { SSsuite=SSmax }
	if (SSnumimg<=1 & SSloop==true & SSpalin==true) { 
		if (SSsens2==-1 & SSsens3==-1) {SSsuite=SSmax;SSsens3=1} else { SSsuite=SSnumimg+1; SSsens2=false }}
	if (SSnumimg<=1 & SSloop!=true & SSpalin!=true) {
		if  (SSsens2==-1 & SSsens3==-1) { SSsuite=SSmax;SSsens3=1 } else {SSsuite=SSnumimg; SSfini()}}
}
else
{
SSmax=SSmax-1
SSsuite=SSnumimg+1
	if (SSnumimg>SSmax & SSloop==true & SSpalin!=true) { SSsuite=1}
	if (SSnumimg>SSmax & SSloop==true & SSpalin==true) {SSsuite=SSnumimg-1; SSsens2=true }
	if (SSnumimg>SSmax & SSloop!=true &  SSpalin!=true) { SSsuite=SSnumimg;SSfini() }
	if (SSnumimg<1) SSsuite=1
}
SSnumimg=SSsuite
if (SSsuite<10) {
	SSaller="0"+SSsuite
	}
	else SSaller=SSsuite
SSsource=SSpstr+SSaller+SSformat
var SSimg = null;
	if (document.images) {
		if (!IsIE()&&CSBVers<5) SSimg = CSFindElement(SSimgNom,0);
		else SSimg = document.images[SSimgNom];
		if (SSimg) SSimg.src = SSsource;
	}
}
function SSfini() {
}

function DJSS(image,max,speed,loop,rev){
	this.image = image;
	this.max = max;
	this.speed = speed;
	this.loop = loop;
	this.rev = rev;
	this.paused = 1;
	this.id = null;
	var timg = null;
	if (document.images) {
		if (!IsIE()&&CSBVers<5)
			timg = CSFindElement(image,0);
		else
			timg = document.images[image];
		var str=timg.src;
		var n=str.length;
		var p=n-7;
		this.pre=str.substring(0,p);
		this.ext=str.substring(p+3,n);
		var tstr=str.substring(p,p+3);
		if (tstr.substring(0,1)=="0") {
			if (tstr.substring(1,2)=="0") {
				this.num=Number(tstr.substring(2,3));
			} else {
				this.num=Number(tstr.substring(1,3));
			}
		} else {
			this.num=Number(tstr);
		}
	}
}
var DJSSvars = new Array();

function DJSSstart(action) {
	DJSSvars[action[1]] = new DJSS(action[1],action[2],action[3]*1000,action[4],action[5]);
	if(action[6]) {	
		var temp = "DJSSplay('" + action[1] + "')";
		DJSSvars[action[1]].id = setTimeout(temp,action[3]*1000);
		DJSSvars[action[1]].paused = 0;
	}
}

function DJSSshow(image) {
	var temp = "";
	var timg = null;
	if (DJSSvars[image].num < 10) {
		temp = "00" + DJSSvars[image].num;
	} else if (DJSSvars[image].num < 100) {
		temp = "0"+DJSSvars[image].num;
	} else {
		temp = DJSSvars[image].num;
	}
	temp = DJSSvars[image].pre + temp + DJSSvars[image].ext;
	if (document.images) {
		if (!IsIE()&&CSBVers<5)
			timg = CSFindElement(image,0);
		else
			 timg = document.images[image];
		if (timg)
			 timg.src = temp;
	}
}

function DJSSplay(image) {
	if(DJSSvars[image].rev) {
		if(--DJSSvars[image].num < 1) {
			if(DJSSvars[image].loop) {
				DJSSvars[image].num =  DJSSvars[image].max;
			} else {
				DJSSvars[image].num++;
				return;
			}
		}
	} else {
		if(++DJSSvars[image].num > DJSSvars[image].max) {
			if(DJSSvars[image].loop) {
				DJSSvars[image].num = 1;
			} else {
				DJSSvars[image].num--;
				return;
			}
		}
	}
	DJSSshow(image);
	temp = "DJSSplay('" + image + "')";
	DJSSvars[image].id = setTimeout(temp,DJSSvars[image].speed);
	DJSSvars[image].paused = 0;
}
//
function ImageStepperNext (action) {
	var img = CSGetImage(action[1]);
	if (img) {
		var maxidx = action[2];
		var name = img.src;
		var pos = name.lastIndexOf('/');
		var pre = name.substr(0, pos+1);
		name = name.substr(pos+1, name.length-pos+1);
		var hit = name.match(/(\D*)(\d+)(\D+)/);
		if (hit) {
			var idx = parseInt(hit[2])+1;
			if (idx > maxidx)	idx=1;
			img.src = pre+hit[1]+idx+hit[3];
		}
	}
}
//
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);}
function CSRandomImg(action) { 
	var img = CSGetImage(action[1]);
	if (img) 
		{
		var v1 =  Math.floor(Math.random() * 10);
		var whichone = v1-(Math.floor(v1/3)*3);
		img.src = action[whichone+2];
		}
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document; var img;
		for (var i=0; i<array.length; i+=2) {
			img = null; var n = array[i];
			if (d.images) {img = d.images[n];}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (img) {img.src = array[i+1];}
		}
	}
}

function changeImages() {
	changeImagesArray(changeImages.arguments);
}
//
//
