/* -- Adobe GoLive JavaScript Library */

CSAg = window.navigator.userAgent;
CSIsIE = CSAg.indexOf("MSIE")>0?true:false;
function IsIE(){return CSIsIE;}
function CSGetBVers(){var v=parseFloat(navigator.appVersion);if(CSIsIE&&(v>=4)){v=parseFloat(CSAg.substring(CSAg.indexOf('MSIE ')+5));}return v;}
CSBVers = CSGetBVers();
CSIsW3CDOM = ((document.getElementById) && !(IsIE()&&CSBVers<7)) ? true : false;
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){re=new RegExp("#"+id+"\\s*\\{([^}]*)\\}","i");s=re.exec(sc);if(s&&s.length>1)return s[1];return "";}
function CSGetStyleAttrValue(si,id){re=new RegExp(id+"\\s*:\\s*([^;]*)\\s*;?","i");s=re.exec(si);if(s&&s.length>1)return s[1];return "";}
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");if(style.top=="")style.top=CSGetStyleAttrValue(si,"top");if(style.width=="")style.width=CSGetStyleAttrValue(si,"width");if(style.height=="")style.height=CSGetStyleAttrValue(si,"height");if(style.visibility=="")style.visibility=CSGetStyleAttrValue(si,"visibility");if(style.zIndex=="")style.zIndex=CSGetStyleAttrValue(si,"z-index");}}
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()&&(CSAg.indexOf("Win")!=-1)&&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;
CSIm=new Object();
function CSIShow(n,i) {
	if (document.images) {
		if (CSIm[n]) {
			var img=CSGetImage(n);
			if (img&&typeof(CSIm[n][i].src)!="undefined") {img.src=CSIm[n][i].src;}
			if(i!=0) self.status=CSIm[n][3]; else self.status=" ";
			return true;
		}
	}
	return false;
}
function CSILoad(action) {
	im=action[1];
	if (document.images) {
		CSIm[im]=new Object();
		for (var i=2;i<5;i++) {
			if (action[i]!='') {CSIm[im][i-2]=new Image(); CSIm[im][i-2].src=action[i];}
			else CSIm[im][i-2]=0;
		}
		CSIm[im][3] = action[5];
	}
}

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 CSButtonReturn () { return !CSClickReturn(); }

// OUT Get Name From Path Action v1.1.1
// Script copyright 2001-2004, OUT Media Design GmbH. All rights reserved.
function OUTgetNameFromPath(a){
	var p=window.location.pathname,n='';
	if (a[1])p=p.substring(p.indexOf(a[1])+a[1].length,p.length);
	p=p.substring(p.charAt(0)=='/'?1:0,p.lastIndexOf('.')>0?p.lastIndexOf('.'):p.length);
	p=p.split('/');
	if(!a[4]||a[4]&&a[5]==p[p.length-1])p.length-=1;
	if(p.length){
		if(a[2]==1)n=p[0];
		if(a[2]==2)n=p[p.length-1];
		if(a[2]==3){for(var i=0;i<p.length;i++){n+=p[i];if(i<p.length-1)n+=a[3];}}
	}
	return n;
}
//
//-->

// OUT Concat Strings Action 1.0
// Script copyright 2001, OUT Media Design GmbH. All rights reserved.

function OUTconcatStr(action) { return action[1]+action[2]; }
// 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 Call Action in Frame Action 1.0.1
// Script copyright 2000, OUT Media Design GmbH. All rights reserved.


function OUTcallActionInFrame(action)
{
	var actFrame = OUTFindFrame(action[2]);
	if (actFrame && actFrame.CSAction) actFrame.CSAction(new Array(action[1]));
}
// OUT Call Action OnScroll Action Library 1.0
// Script copyright 2001, OUT Media Design GmbH. All rights reserved.

var OUTactsOnScroll = new Array();
function OUTcallActionOnScroll(action)
{
	for(var i=1;i<action.length;i++) { OUTactsOnScroll[OUTactsOnScroll.length]=action[i]; }
	window.onscroll=OUTexecScrollActions;
	if (!IsIE()) {window.captureScrollEvent=OUTcaptureScrollEvent;window.OUTlastScrollX=0;window.OUTlastScrollY=0;setInterval(window.captureScrollEvent,10);}      
}

function OUTexecScrollActions() {
	for (var i=0;i<OUTactsOnScroll.length;i++) CSAction(new Array(OUTactsOnScroll[i]));
}

function OUTcaptureScrollEvent() {
	if (this.OUTlastScrollX!=window.pageXOffset||this.OUTlastScrollY!=window.pageYOffset) {
		this.onscroll();
	}
	this.OUTlastScrollX = window.pageXOffset;
	this.OUTlastScrollY = window.pageYOffset;
}


// OUT Move To Relative Position Library v 1.2.5
// Script copyright 2000, OUT Media Design GmbH. All rights reserved.

var CSIsW3CDOM = CSIsW3CDOM; // declare variable in case the NN6 Fix isn't installed
if(!CSIsW3CDOM) { CSIsW3CDOM = false; } // define in case the NN6 Fix isn't installed

function OUTcalcLyrRelPos(action)
{
	var x,y,w,h,ww,wh,lx,ly,xs,ys;
 	if (CSIsW3CDOM) {
 		CSIDOM();
		var lyr=document.getElementById(action[1]);
		x=parseInt(lyr.style.left); y=parseInt(lyr.style.top); w=parseInt(lyr.style.width); h=parseInt(lyr.style.height);
		xs=window.pageXOffset;ys=window.pageYOffset;
		ww=window.innerWidth; wh=window.innerHeight;
 	} else if (IsIE()) {
		var lyr=document.all.tags("div")[action[1]];
		x=lyr.offsetLeft; y=lyr.offsetTop; w=lyr.offsetWidth; h=lyr.offsetHeight;
		xs=document.body.scrollLeft;ys=document.body.scrollTop;
		ww=document.body.clientWidth; wh=document.body.clientHeight;
	} else {
		var lyr=CSNSStyl(action[1]);
		x=lyr.x; y=lyr.y; w=lyr.clip.width; h=lyr.clip.height;
		xs=window.pageXOffset;ys=window.pageYOffset;
		ww=window.innerWidth; wh=window.innerHeight;
	}
	var newX=x;
	var newY=y;
	lx = 0; ly = 0;
	if (action[2]==2) lx=Math.floor(w/2);
	if (action[2]==3) lx=w;
	if (action[3]==2) ly=Math.floor(h/2);
	if (action[3]==3) ly=h;
	if (action[2]) lx-=action[4];
	if (action[3]) ly-=action[5];
	if (action[6]==1) newX=action[8];
	if (action[6]==2) newX=ww/2;
	if (action[6]==3) newX=ww;
	if (action[7]==1) newY=action[9];
	if (action[7]==2) newY=wh/2;
	if (action[7]==3) newY=wh;
	if (action[6]) newX = OUTsnapPosToGrid(newX+xs,action[11],action[13],action[8]+xs-(action[10]?action[4]:0),ww+xs-action[8]-(action[10]?action[4]:0));
	if (action[7]) newY = OUTsnapPosToGrid(newY+ys,action[12],action[14],action[9]+ys-(action[10]?action[5]:0),wh+ys-action[9]-(action[10]?action[5]:0));
	return Array(newX-lx,newY-ly);
}

function OUTrelPosMod(x,y){return x-y*Math.floor(x/y);}

function OUTsnapPosToGrid(pos,grid,offset,min,max)
{
	pos = (min<max)?(pos>min?(pos<max?pos:max):min):pos;
	if (!grid) return pos;
	var newPos  = Math.floor((pos-offset)/grid)*grid;
	newPos += Math.round(OUTrelPosMod(pos-offset,grid)/grid)==1 ? grid : 0;
	newPos += offset;
	newPos = newPos >= min ? newPos : newPos+grid;
	newPos = newPos <= max ? newPos : newPos-grid;
	return newPos;
}
// OUT Move To Relative Position Action v 1.0
// Script copyright 2000, OUT Media Design GmbH. All rights reserved.

function OUTmoveToRelPos(action)
{
	CSSlideLayer(action[1],OUTcalcLyrRelPos(action),action[15],action[16]);
}
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 Lock Rollover Action Script Library 1.3.7
// Script copyright 1999 - 2002 OUT Media Design GmbH. All rights reserved.

var OUTlckTimeout=new Array();
var OUTlckIm=new Object();
function OUTdoLckBtnIm(a,cmp){
	var n=cmp?OUTfindComponentElementName(a[1]):a[1];
	var g=OUTlckGrpName(a[2]);
	var img=null;
	OUTlckTimeout[n]=OUTlckTimeout[n]?clearTimeout(OUTlckTimeout[n]):0;
	if(n!="" && !CSIm[n]){//in case the CSIm object is not available, defer locking
		OUTlckTimeout[n]=setTimeout("OUTdoLckBtnIm(new Array('','"+a[1]+"','"+a[2]+"',"+a[3]+"),"+cmp+")",500);
		return false;
	}
	if(document.images){
		if(!OUTlckIm[g]){//create group if not available
			eval("OUTlckIm."+g +"=new Object()");
			OUTlckIm[g].name='';OUTlckIm[g].main='';OUTlckIm[g].over='';
		}else if(OUTlckIm[g].name!=n){
			var lckd=OUTlckIm[g].name;
			if(CSIm[lckd]){//restore last locked image
				img =(!IsIE())?OUTFindElement(lckd,0):document[lckd];
				if(img){
					img.src=OUTlckIm[g].main;
					CSIm[lckd][0].src=OUTlckIm[g].main;
					CSIm[lckd][1].src=OUTlckIm[g].over;
				}
			}
		}
		if(CSIm[n] && OUTlckIm[g].name!=n){//lock image
			//save new locked image
			OUTlckIm[g].main=CSIm[n][0].src;
			OUTlckIm[g].over=CSIm[n][1].src;
			//replace main & over with click image
			CSIm[n][0].src=CSIm[n][2].src;
			if(a[3]!=true) CSIm[n][1].src=CSIm[n][2].src;
		}
		OUTlckIm[g].name=n; // change name here to allow unlock
		//display image
		CSIShow(n,2);
		return true;
	}
	return false;
}

function OUTlckGrpName(g){return g?"group_"+g:"group_all";}


// OUT Lock Rollover Action v1.4
// Script copyright 1999-2002, OUT Media Design GmbH. All rights reserved.

function OUTlckBtnIm(action) {
	return OUTdoLckBtnIm(action,false);
}
function CSStopAll(action) { CSStopComplete (); }

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

// 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.2
// Script copyright 1999-2004, OUT Media Design GmbH. All rights reserved.

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

// OUT Adjust Frame Sources 1.3.1
// Script copyright 1999-2004, OUT Media Design GmbH. All rights reserved.
// Must be called by the Frameset's OnLoad Handler

function OUTadjFrameSrcs() {
	var u=window.location.search;
	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]&&window.frames[p[0]]) {
                var newu="?";
                for (var j=0;j<u.length; j++) newu+=(j!=i)?u[j]+((j<u.length-1)?"&":""):"";
                window.frames[p[0]].location.replace(p[1]+(newu.length>1?newu:"")+window.location.hash);
             }
         }
	}
	return true;
}
//
//-->

// OUT Open Image Window Action v1.5.0
// Script copyright 1999-2004 OUT Media Design GmbH. All rights reserved.
function OUToiwCompensateChrome ()
{
	var w=this.OUToiwW, h=this.OUToiwH, ua=this.ua;
	if(this.resizeTo){
		/* If innerWidth is defined (Netscape), this is the most reliably measurement */
		if(this.innerWidth!=window.undefined){
			if(ua.vers<5) this.setResizable(true);
			if(this.OUToiwFitToImg) this.resizeTo(w,h);
			var cw=this.outerWidth-this.innerWidth, ch=this.outerHeight-this.innerHeight;
			cw=cw>0?cw:0;ch=ch>0?ch:0; //in case inner* values are larger than outer*
			w+=cw,h+=ch;
			this.resizeTo(w+20,h+20);//make initial larger to get rid of scroll bars
			this.resizeTo(w,h);
			if(ua.vers<5 && this.OUToiwResizable) this.setResizable(this.OUToiwResizable);
			this.OUToiwCCW=w;this.OUToiwCCH=h;
			return;
		}
		/* If body.clientWidth is defined (IE4+) */
		if(document.body && document.body.clientWidth!=window.undefined){
			if(this.OUToiwFitToImg) this.resizeTo(w,h);
			var bw=document.body.clientWidth, bh=document.body.clientHeight;
			w=2*w-bw;h=2*h-bh;
			if(ua.vers>=4 && (bw!=w || bh!=h)) this.resizeTo(w,h);
			this.OUToiwCCW=w;this.OUToiwCCH=h;
			return;
		}
		/* If documentElement.clientWidth is defined (W3C / IE6 in compatibility mode) */
		if(document.documentElement && document.documentElement.clientWidth!=window.undefined){
			if(this.OUToiwFitToImg) this.resizeTo(w,h);
			var bw=document.body.clientWidth, bh=document.body.clientHeight;
			w=2*w-bw;h=2*h-bh;
			if(bw!=w || bh!=h) this.resizeTo(w,h);
			this.OUToiwCCW=w;this.OUToiwCCH=h;
			return;
		}
		/* in case nothing else fits */
		this.resizeTo(w,h);
	}
	this.OUToiwCCW=w;this.OUToiwCCH=h;
	return;
}
function OUToiwPositionWin()
{
	if(this.OUToiwPos && this.moveTo){
		var x=this.OUToiwX, y=this.OUToiwY, ua=this.ua, pos=this.OUToiwPos, p=window.opener;
		var availW=screen.width, availH=screen.height;
		var parWinX=ua.isIE?p.screenLeft?p.screenLeft:0:p.screenX;
		var parWinY=ua.isIE?p.screenTop?p.screenTop:0:p.screenY;
		var w=this.OUToiwCCW, h=this.OUToiwCCH;
		if(pos==2 && screen.availWidth){
			availW=screen.availWidth;
			availH=screen.availHeight;
			if(ua.isMac) y+=screen.height-screen.availHeight;
		}
		if(pos==3){
			availW=ua.isIE?p.document.body.offsetWidth:p.outerWidth;
			availH=ua.isIE?p.document.body.offsetHeight:p.outerHeight;
		}
		if(pos==4){
			availW=ua.isIE?p.document.body.clientWidth:p.innerWidth;
			availH=ua.isIE?p.document.body.clientHeight:p.innerHeight;
		}
		// calculate the window left position here
		if(this.OUToiwPosAlignX==2){x+=(availW-w)/2;}
		if(this.OUToiwPosAlignX==3){x+=availW-w;}
		// calculate the window top position here
		if(this.OUToiwPosAlignY==2){y+=(availH-h)/2;}
		if(this.OUToiwPosAlignY==3){y+=availH-h;}
		x+=pos<3?0:parWinX;y+=pos<3?0:parWinY;
		this.moveTo(x,y);
	}
}
function OUToiwInitWin(ok)
{
	if(this.OUToiwFitToImg && document.images){
		this.OUToiwW=document.images["oiwImg"].width+2*this.OUToiwOffset;
		this.OUToiwH=document.images["oiwImg"].height+2*this.OUToiwOffset;
	}
	if (ok){
		this.OUToiwCompensateChrome();
		this.OUToiwPositionWin();
	}
}
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.userAgent.indexOf("MSIE")>=0;
	return ua;
}
function OUTOpenImageWindow(a){
	var w=a[3];
	var h=a[4];
	var bgImg=a[15]!="#"&&a[15]!="#none"?' background="'+a[15]+'" ':'';
	var ua=OUToiwUA();
	var wOffset=a[14];
	w+=2*wOffset;h+=2*wOffset;
	
	var wf="";	
	wf=wf + "width=" + w;
	wf=wf + ",height=" + h;
	wf=wf + ",resizable=" + (a[5]?"yes":"no");
	wf=wf + ",scrollbars=" + (a[6]?"yes":"no");
	wf=wf + ",menubar=" + (a[7]?"yes":"no");
	wf=wf + ",toolbar=" + (a[8]?"yes":"no");
	wf=wf + ",directories=" + (a[9]?"yes":"no");
	wf=wf + ",location=" + (a[10]?"yes":"no");
	wf=wf + ",status=" + (a[11]?"yes":"no");
	
	var newImgWin=window.open("",a[2],wf);
	newImgWin.document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">');
	newImgWin.document.writeln('<html><head>');
	if(!a[24]) newImgWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
	newImgWin.document.writeln('<title>'+a[13]+'</title>');
	newImgWin.document.writeln('<script type="text/javascript"><!--');
	newImgWin.document.writeln(OUToiwCompensateChrome.toString());
	newImgWin.document.writeln(OUToiwInitWin.toString());
	newImgWin.document.writeln(OUToiwPositionWin.toString());
	newImgWin.document.writeln(OUToiwUA.toString());
	newImgWin.document.writeln("window.OUToiwW="+w+";");
	newImgWin.document.writeln("window.OUToiwH="+h+";");
	newImgWin.document.writeln("window.OUToiwOffset="+wOffset+";");
	newImgWin.document.writeln("window.ua=OUToiwUA();");
	newImgWin.document.writeln("window.OUToiwResizable="+a[5]+";");
	newImgWin.document.writeln("window.OUToiwFitToImg="+a[17]+";");
	newImgWin.document.writeln("window.OUToiwPos="+a[18]+";");
	newImgWin.document.writeln("window.OUToiwX="+a[19]+";");
	newImgWin.document.writeln("window.OUToiwY="+a[20]+";");
	newImgWin.document.writeln("window.OUToiwPosAlignX="+a[21]+";");
	newImgWin.document.writeln("window.OUToiwPosAlignY="+a[22]+";");
	newImgWin.document.writeln("window.OUToiwCompensateChrome=OUToiwCompensateChrome;");
	newImgWin.document.writeln("window.OUToiwInitWin=OUToiwInitWin;");
	newImgWin.document.writeln("window.OUToiwPositionWin=OUToiwPositionWin;");
	newImgWin.document.writeln('//--></'+'script'+'>');
	if(a[25]!="#")newImgWin.document.writeln('<link href="'+a[25]+'" rel="stylesheet" type="text/css" media="screen">');
	newImgWin.document.writeln('</head>');
	newImgWin.document.writeln('<body bgcolor="#'+a[12]+'"'+bgImg+' marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">');
	newImgWin.document.write('<table border="0" cellpadding="'+a[14]+'" cellspacing="0" width="100%" height="100%"><tr><td valign="middle" align="center">');
	if(a[23]) newImgWin.document.writeln('<a href="javascript:window.close();" onfocus="if(this.blur)this.blur();">');
	newImgWin.document.write('<img border="0" name="oiwImg" src="'+a[1]+'" onload="window.OUToiwInitWin('+!(ua.isNN&&ua.vers<5)+');">');
	if(a[23]) newImgWin.document.writeln('</a>');
	newImgWin.document.writeln('</td></tr></table>');
	if(a[26]!="") newImgWin.document.writeln('<div id="imagecaption"><p>'+a[26]+'</p></div>');
	newImgWin.document.writeln('</body></html>');
	newImgWin.document.close();
	
	if(ua.isNN&&ua.vers<5){newImgWin.OUToiwCompensateChrome();newImgWin.OUToiwPositionWin();}
	if(a[17] && ua.vers>=4 && !(ua.isMac && ua.isIE && ua.vers<5)) newImgWin.focus();
}



