/*
 this code is copyright 2003 Joshua Long 
 */
 var b,ie4,ie5,nn,opera,ie,dom,nn6;b=navigator.userAgent.toLowerCase();ie4=(document.all&&!document.getElementById)?true:false;ie5=(document.all&&document.getElementById)?true:false;nn=(document.layers)?true:false;opera=(b.indexOf("opera")!=-1)?true:false;ie=(ie4||ie5)?true:false;dom=(document.getElementById&&!document.all)?true:false;nn6=(dom&&!opera)?true:false;function getObjNN4(obj,name){var x=obj.layers;var thereturn;for(var i=0;i<x.length;i++){if(x[i].id==name)thereturn=x[i];else if(x[i].layers.length)var tmp=getObjNN4(x[i],name);if(tmp)thereturn=tmp;}return thereturn;}function layRef(layerArg,obref){if(obref==null){if(dom)return document.getElementById(layerArg).style;if(ie)return document.all[layerArg].style;if(nn)return getObjNN4(document,layerArg);}else{if(dom)return document.getElementById(layerArg);if(ie)return document.all[layerArg];if(nn)return getObjNN4(document,layerArg);}return true;}function cssObject(lid){var styledLayer=new layRef(lid);var layer=new layRef(lid,1);var id=lid;layer.events=[];this.registerEvent=function(x,typ){var compte=layer.events.length;layer.events[compte]=new Object;layer.events[compte].type=typ.toLowerCase();layer.events[compte].method=x;};if(nn)layer.captureEvents(Event.CLICK|Event.MOUSEOUT|Event.MOUSEOVER);layer.runEvents=function(evtPassed,ty){for(var i=0;i<layer.events.length;i++){if(layer.events[i].type.indexOf(ty.toLowerCase())!=-1)layer.events[i].method(evtPassed);}};layer.onclick=function(ev){layer.runEvents(ev,"click");};layer.onmousedown=function(ev){layer.runEvents(ev,"down");};layer.onmouseup=function(ev){layer.runEvents(ev,"up");};layer.onmouseover=function(ev){layer.runEvents(ev,"over");};layer.onmouseout=function(ev){layer.runEvents(ev,"out");};this.get=function(prop,val){switch(prop.toLowerCase()){case "left":return this.getLeft();break;case "top":return this.getTop();break;case "width":return this.getWidth();break;case "height":return this.getHeight();break;case "visibility":return this.getVisibility();break;case "clip":return this.getClip(val);break;case "color":return this.getBgColor();break;case "image":return this.getBgImage();break;case "id":return this.getId();break;case "zIndex":return this.getZIndex();break;case "text":return this.getContents();break;}return true;};this.css=function(prop,val){switch(prop.toLowerCase()){case "left":this.setLeft(val);break;case "top":this.setTop(val);break;case "width":this.setWidth(val);break;case "height":this.setHeight(val);break;case "visibility":this.setVisibility(val);break;case "clip":this.setClip(val);break;case "color":this.setBgColor(val);break;case "image":this.setBgImage(val);break;case "zIndex":this.setZIndex(val);break;case "text":this.setContents(val);break;}return true;};this.set=this.css;this.style=new layRef(lid);this.getId=function(){return id;};this.getLayer=function(getNormal){return(getNormal!=null)?layer:styledLayer;};this.getZIndex=function(){return parseInt(this.getLayer().zIndex);};this.getBgColor=function(){return(nn)?this.getLayer().bgColor:this.getLayer().backgroundColor;};this.getBgImage=function(){return imgSrc=(nn)?this.getLayer().background.src:this.getLayer().backgroundImage;};this.getClip=function(lequel){var leclip=this.getLayer().clip;var lay=this.getLayer();if(!nn)var news=leclip.split(" ");var to=(!nn)?parseInt(news[0].split("(")[1]):lay.clip.top;var ri=(!nn)?parseInt(news[1]):lay.clip.right;var bo=(!nn)?parseInt(news[2]):lay.clip.bottom;var le=(!nn)?parseInt(news[3]):lay.clip.left;switch(lequel.toLowerCase()){case "l":return le;case "t":return to;case "b":return bo;case "r":return ri;}return true;};this.getContentHeight=function(){var lay=this.getLayer(true);return(!nn)?lay.offsetHeight:parseInt(lay.document.height);};this.getContents=function(){var lay=this.getLayer(true);if(!nn)return lay.innerHTML;};this.getContentWidth=function(){var lay=this.getLayer(true);return(!nn)?lay.offsetWidth:parseInt(lay.document.width);};this.getHeight=function(){var cw=false;if(!isNaN(this.getClip("t"))&&!isNaN(this.getClip("b")))cw=true;if(!cw)return(nn)?this.getClip("b"):(this.getLayer().height==""||this.getLayer().height==null||this.getLayer().height=="undefined")?parseInt(this.getContentHeight()):parseInt(this.getLayer().height);else return(parseInt(this.getClip("b"))-parseInt(this.getClip("t")));};this.getWidth=function(){var cw=false;if(!isNaN(this.getClip("r"))&&!isNaN(this.getClip("l")))cw=true;if(!cw)return(nn)?this.getClip("r"):(this.getLayer().width==""||this.getLayer().width==null||this.getLayer().width=="undefined")?parseInt(this.getContentWidth()):parseInt(this.getLayer().width);else return(parseInt(this.getClip("r"))-parseInt(this.getClip("l")));};this.getLeft=function(){return parseInt(this.getLayer().left);};this.getTop=function(){return parseInt(this.getLayer().top);};this.getVisibility=function(){var v=this.getLayer().visibility.toLowerCase();return v.toLowerCase();};this.setHeight=function(x){(nn)?this.setClip("auto "+parseInt(x)+" auto auto"):this.getLayer().height=parseInt(x);return true;};this.setVisibility=function(x){var lay=this.getLayer();var v=x.toLowerCase();lay.visibility=(v=="show"||v=="visible"||v=="v"||v=="s")?"visible":"hidden";return true;};this.setWidth=function(x){(nn)?this.setClip("auto auto auto "+parseInt(x)):this.getLayer().width=parseInt(x);return true;};this.setTop=function(x){this.getLayer().top=x;return true;};this.setLeft=function(x){this.getLayer().left=x;return true;};this.setBgImage=function(x){var lay=this.getLayer();(nn)?lay.background.src=x:lay.backgroundImage="url("+x+")";return true;};this.setZIndex=function(x){var lay=this.getLayer();lay.zIndex=x;return true;};this.setBgColor=function(x){var lay=this.getLayer();(nn)?lay.bgColor=x:lay.backgroundColor=x;return true;};this.setContents=function(x){var lay=this.getLayer(true);if(nn){lay.document.open();lay.document.write(x);lay.document.close();}else lay.innerHTML=x;return true;};this.setClip=function(x){var clips=x.split(" ");var top,bottom,left,right;var lay=this.getLayer();top=clips[0];bottom=clips[1];left=clips[2];right=clips[3];if(nn){lay.clip.bottom=(bottom=="auto")?lay.clip.bottom:parseInt(bottom);lay.clip.left=(left=="auto")?lay.clip.left:parseInt(left);lay.clip.right=(right=="auto")?lay.clip.right:parseInt(right);lay.clip.top=(top=="auto")?lay.clip.top:parseInt(top);}else{var domC="";domC+=(top=="auto")?"auto ":top+" ";domC+=(right=="auto")?"auto ":right+" ";domC+=(bottom=="auto")?"auto ":bottom+" ";domC+=(left=="auto")?"auto ":left;lay.clip="rect("+domC+")";}return true;};}function cssit(lid){if(typeof document.cssArray=="undefined"||document.cssArray==null)document.cssArray=[];document.cssArray[document.cssArray.length]=new cssObject(lid);return document.cssArray[document.cssArray.length-1];}