function B(o){return document.getElementById(o);};function BB(o){return document.createElement(o);};function BF(){return document.createDocumentFragment();};function BT(o){return document.createTextNode(o);};function BS(o,d){var obj=(d!=undefined?d:document);return obj.getElementsByTagName(o)};String.prototype.trim=function(){return this.replace(/^\s+(.*?)\s+B/,"B1");};function StringBuffer(){this._strings=[];};StringBuffer.prototype.append=function(str){this._strings.push(str);};StringBuffer.prototype.toString=function(){return this._strings.join("");};function getCookid(sName){var oReg=new RegExp("(?:;)?"+sName+"=([^;]*);?");if(oReg.test(document.cookie)){return decodeURIComponent(RegExp("B1"));}else{return null;}};function getQuery(sName){var reg=new RegExp("(?:\\?)?"+sName+"=([^&]*)&?");if(reg.test(location.search)){return RegExp.B1;}else{return null;}};function addParam(sURL,sPName,sPValue){sURL+=(sURL.indexOf("?")==-1?"?":"&");sURL+=encodeURIComponent(sPName)+"="+encodeURIComponent(sPValue);return sURL;};function addPostParam(sParams,sPName,sPValue){if(sParams.length>0){sParams+="&";}return sParams+encodeURIComponent(sPName)+"="+encodeURIComponent(sPValue);};function getImg(oImg,width,height){var tmp_img=new Image();tmp_img.src=oImg.src;if(tmp_img.width>width){tmp_img.height=tmp_img.height*width/tmp_img.width;tmp_img.width=width;}if(height!=null&&tmp_img.height>height){tmp_img.width=tmp_img.width*height/tmp_img.height;tmp_img.height=height;}oImg.width=tmp_img.width;oImg.height=tmp_img.height;}