function setCssProperty(){this.w3c=document.getElementById;if(!this.w3c){return false}return this}setCssProperty.prototype={init:function(){CP.mainid=document.getElementById("maincol");if(!CP.mainid){return false}CP.maindivs=CP.mainid.getElementsByTagName("div");if(win&&ie){CP.setPageTitle()}for(var i=0,f=CP.maindivs.length;i<f;i++){CP.setImg12ctxt1c(i);CP.setDl1c2c(i);CP.setTableStyle(i);CP.setBtnCol(i);CP.setThumbPos(i)}CP.bnrid=document.getElementById("bnrcol");if(!CP.bnrid){return false}CP.bnrdivs=CP.bnrid.getElementsByTagName("div");for(var i=0,f=CP.bnrdivs.length;i<f;i++){CP.setBtnBnr(i)}},setImg12ctxt1c:function(i){if(CP.getClsName(CP.maindivs[i])=="img12c-txt1c"){divs=CP.maindivs[i].getElementsByTagName("div");if(divs.length<13){return}lcol=divs[3];rcol=divs[9];maxh=Math.max(lcol.offsetHeight,rcol.offsetHeight);if(ie){lcol.style.height=rcol.style.height=maxh+"px"}else{lcol.style.minHeight=rcol.style.minHeight=(maxh+1)+"px"}}},setDl1c2c:function(i){if(CP.getClsName(CP.maindivs[i]).indexOf("dl1c-2c")>-1){dl=CP.maindivs[i].getElementsByTagName("dl");dlarry=CP.getClsName(dl[0]).split(" ");w=mh=0;if(win&&ie){cn=document.childNodes[0];mw=(!(ie5win||ie55win))?((cn.text.indexOf("dtd")<0)?0:-17):((cn.text.indexOf("dtd")<0)?0:0);mh=(!(ie5win||ie55win))?((cn.text.indexOf("dtd")<0)?0:-6):((cn.text.indexOf("dtd")<0)?0:0)}for(var s=0;s<dlarry.length;s++){if(dlarry[s].indexOf("dtw")>-1){var stw=dlarry[s].substring(3);dts=dl[0].getElementsByTagName("dt");dds=dl[0].getElementsByTagName("dd");dts[0].setAttribute(CP.getClsAttr(),"first");dds[0].setAttribute(CP.getClsAttr(),"first");for(var g=0,f=dts.length;g<f;g++){dts[g].style.width=((gecko&&!opera||(opera&&vers>8))?(new Number(stw)-17):(new Number(stw)+mw))+"px";if(ie5win){dds[g].style.marginLeft=(stw-3)+"px"}else{dds[g].style.width=new Number(573-stw)+"px"}if(ie||opera){maxh=Math.max(dts[g].offsetHeight,dds[g].offsetHeight);dts[g].style.height=dds[g].style.height=(maxh+mh)+"px"}}}}CP.maindivs[i].style.visibility="visible"}},setTableStyle:function(i){if(CP.getClsName(CP.maindivs[i]).match(/table[\d]/ig)){thed=CP.maindivs[i].getElementsByTagName("thead");tbdy=CP.maindivs[i].getElementsByTagName("tbody");fth=tbdy[0].getElementsByTagName("th");if(!fth[0]){fth=tbdy[0].getElementsByTagName("td")}ftr=tbdy[0].getElementsByTagName("tr");ftd=ftr[0].getElementsByTagName("td");clsname=(!thed.length)?"nothead":"first";fth[0].setAttribute(CP.getClsAttr(),clsname);for(var s=0,f=ftd.length;s<f;s++){ftd[s].setAttribute(CP.getClsAttr(),clsname)}}},setBtnCol:function(i){if(CP.getClsName(CP.maindivs[i]).indexOf("txt3btnc")>-1){div=CP.maindivs[i].getElementsByTagName("div");as=CP.maindivs[i].getElementsByTagName("a");divarry=CP.getClsName(div[0]).split(" ");for(var s=0,f=divarry.length;s<f;s++){if(divarry[s].indexOf("btnw")>-1){var stw=divarry[s].substring(4);if(win&&ie){cn=document.childNodes[0];aw=(!(ie5win||ie55win))?((cn.text.indexOf("dtd")<0)?"100%":(stw/12-2+"em")):((cn.text.indexOf("dtd")<0)?"100%":"100%");as[0].style.width=aw}div[0].style.width=stw/12+"em";return}}}},setThumbPos:function(i){if(CP.getClsName(CP.maindivs[i])=="thumbnail1c"){imgs=CP.maindivs[i].getElementsByTagName("img");imgs[0].style.left=Math.floor((179-imgs[0].getAttribute("width"))/2)+"px";imgs[0].style.top=Math.floor((179-imgs[0].getAttribute("height"))/2)+"px"}},setPageTitle:function(){CP.pt=document.getElementById("pagetitle");if(!CP.pt){return false}clrarry=CP.getClsName(CP.pt).split(" ");color=(clrarry.length>1)?clrarry[1]:clrarry[0];dirlength=pth.split("/").length;switch(dirlength){case 2:rpath="common";break;case 3:rpath="../common";break;case 4:rpath="../../common";break;case 5:rpath="../../../common";break;case 6:rpath="../../../../common";break;case 7:rpath="../../../../../common"}CP.pt.style.backgroundImage="url("+rpath+"/img/pagetitle/bg-pagetitle-"+color+".gif)"},setBtnBnr:function(i){if(CP.getClsName(CP.bnrdivs[i])=="btn-bnr"){ps=CP.bnrdivs[i].getElementsByTagName("p");var domainName="http://"+dname;ps[0].style.backgroundImage="url("+rpath+"/img/bnr/"+CP.getClsName(ps[0])+")";if(!ie){as=CP.bnrdivs[i].getElementsByTagName("a");as[0].setAttribute(CP.getClsAttr(),"notie")}}},setali:function(k,btn){btnco=(btn=="on")?"on":"off";lis[k].setAttribute(CP.getClsAttr(),btnco)},getClsName:function(d){return new String(d.getAttribute(CP.getClsAttr())).toLowerCase()},getClsAttr:function(){return(ie)?"className":"class"}};var CP=new setCssProperty();window.addOnload(CP.init);
