//start of layerapi.js window.onload=checkobjs windowobjs=[] function addWindowObj(txt) { index=windowobjs.length index++ windowobjs[index]=txt; } function imageroll(i,s) { document.images[i].src=s; } // img - image, src - new source, div - first div (optional), pdiv - parent div (optional) function doRoll(img,src,div,pdiv) { if (bw.ie) { document.images[img].src=src; } else { div=(!div)?'':'document.'+div+'.'; pdiv=(!pdiv)?'':'document.'+pdiv+'.'; dom=eval(pdiv+div+'document.images.'+img); dom.src=src; } } // img - image, ind - preload index, div - first div (optional), pdiv - parent div (optional) function preRoll(img,ind,div,pdiv,tdiv) { if (bw.ie) { document.images[img].src=preload[ind].src; } else { div=(!div)?'':'document.'+div+'.'; pdiv=(!pdiv)?'':'document.'+pdiv+'.'; tdiv=(!tdiv)?'':'document.'+tdiv+'.'; dom=eval(tdiv+pdiv+div+'document.images.'+img); dom.src=preload[ind].src; } } preload=new Array() function addPreload() { for (i=0;i=5)?1:0; /* Netscape 6 (Mozilla) */ this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.ie6 || this.ie7)?1:0; /* Only IE or Navigator */ this.ie=(this.ie4 || this.ie5 || this.ns6 || this.ie6 || this.ie7)?1:0; /* Allows single test on bw.ie */ this.nav=(this.ns4)?1:0; /* Allows single test on bw.nav */ return this } function objLayer(id,nest,dnest) { nest=(!nest)?'':'document.'+nest+'.'; dnest=(!dnest)?'':'document.'+dnest+'.'; /* object pointer */ this.obj=bw.dom?document.getElementById(id):bw.ie4?document.all[id]:bw.ns4?eval(dnest+nest+'document.'+id):0 /* style reference */ this.css=bw.dom?document.getElementById(id).style:bw.ie4?document.all[id].style:bw.ns4?eval(dnest+nest+'document.'+id):0 if (bw.ie4 || bw.ie5 || bw.ie6 || bw.ie7) {this.x=this.css.pixelLeft; this.y=this.css.pixelTop; this.h=this.obj.scrollHeight; this.w=this.obj.scrollWidth} if (bw.ns6) {this.x=this.css.left; this.y=this.css.top; this.w=this.css.width; this.h=this.css.height;} if (bw.ns4) {this.x=this.css.left; this.y=this.css.top; this.h=this.obj.document.height; this.w=this.obj.document.width} /* mac variant */ if (bw.mac && (bw.ie4 || bw.ie5)) {this.h=this.obj.clientHeight; this.w=this.obj.clientWidth} if (bw.opera) {this.h=this.obj.clientHeight; this.w=this.obj.clientWidth} temp=id.split("_"); this.objname=temp[0]+"obj"; return this; } //this creates objects out of layers named with specific keywords //object names are made AFTER trailing variables are removed from layer name function checkobjs() { if (bw.ie4 || bw.ie5 || bw.ie6 || bw.ie7) { for (i=0;i0) { for (j=0;j0) { for (k=0;k#maincontent {position:absolute;left:'+lpos+'px;top:'+ypos+'px;width:760px;height:402px;}') } function updateSize() { if (bw.ie) {w=document.all.sizer.clientWidth;h=document.all.sizer.clientHeight} if (bw.ns4) {w=window.innerWidth;h = window.innerHeight;} lpos=Math.max(0,(w-760)/2); ypos=Math.max(0,(h-402)/2); if (bw.ie) {document.all.maincontent.style.pixelLeft=lpos;document.all.maincontent.style.pixelTop=ypos;} if (bw.ns4) {document.maincontent.left=lpos;document.thepage.top=ypos;} } function handleResize() { if ((window.innerWidth!=lastWidth) || (window.innerHeight!=lastHeight)) { lastWidth=window.innerWidth; lastHeight=window.innerHeight; updateSize() } } if (bw.ie) {window.onresize=updateSize} if (bw.ns4) {window.onresize=handleResize} //start of drop_sub.js var menu1obj=null; // this line seems to ignore the test if (document.location.href.indexOf("homepage")!=-1) { pathextra=""; } else { pathextra=""; } discOn=new Image(); discOn.src=pathextra + "/contents/images/nav/g_blue_disc_on.gif" discOff=new Image(); discOff.src=pathextra + "/contents/images/nav/g_blue_disc_off.gif" function rolldiscOn(n) { if (bw.ie) { document.images["disc"+n].src=discOn.src; } else { document.layers["maincontent"].document.layers["menu1"].document.images["disc"+n].src=discOn.src; } } function rolldiscOff(n) { if (bw.ie) { document.images["disc"+n].src=discOff.src; } else { document.layers["maincontent"].document.layers["menu1"].document.images["disc"+n].src=discOff.src; } } function setupObjs() { maincontentobj=new objLayer("maincontent"); menu1obj=new objLayer("menu1","maincontent") //ART 6-16-2005 URL with "index.html" also means home page if ((document.location.href.indexOf("homepage")!=-1) || (document.location.href.indexOf("index.html")!=-1)) { menu1obj.moveTo(270,58) } else { menu1obj.moveTo(165,0) } menu1obj.show() } function animate(n) { switch (n){ case 1 : if (menu1obj) {menu1obj.subdropdown(82,0,'menu1obj')} break; case 2 : if (menu1obj) {menu1obj.subdropdown(25,0,'menu1obj')} break; } } function closeup() { if (menu1obj) {menu1obj.subdropdown(58,0,'menu1obj')} } function closeup2() { if (menu1obj) {menu1obj.subdropdown(0,0,'menu1obj')} } function obj_subdropdown(n,d,l) {//animate a layer through a given distance at a given speed this.timerdelay=d this.endpoint=n; this.label=l this.subdoanimate() } function obj_subdoanimate() { if (this.y>this.endpoint) { amt=Math.floor(((this.y-this.endpoint)/10)*-1) if (amt>-1) {amt=-1} } else if (this.ydest) { amt=Math.floor(((this.y-dest)/10)*-1) if (amt>-1) {amt=-1} } else if (this.y