function DOMManipII(){var v,div;this.isIE=/*@cc_on!@*/false;if(this.isIE){v=parseFloat((new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})")).exec(navigator.userAgent)[1]);this.ancientIE=(v<6);this.legacyIE=(v<7)}else{this.ancientIE=this.legacyIE=false}if(document.getElementById&&document.createElement){this.isSupported=true;div=document.createElement("div");document.body.appendChild(div);div.innerHTML='<div style="opacity:.5;"></div>';this.useFilter=(div.firstChild.style.opacity!=="0.5")}else{this.isSupported=false}this.dommanipVersion=2.1}DOMManipII.prototype.emptyElement=function(a){while(a.firstChild){a.removeChild(a.firstChild)}};DOMManipII.prototype.appendE=DOMManipII.prototype.appendElement=function(h,k,b,f,j){var g,c,a=false;if(h&&k){a=document.createElement(k);if(a){if(b&&!document.getElementById(b)){a.id=b}if(f&&typeof f=="object"){try{for(c in f){if(f.hasOwnProperty(c)){a[c]=f[c]}}}catch(d){g=["id","title","href","type","name","value","defaultChecked","selected","htmlFor","action","method","enctype","className","onclick"];for(c=0;c<g.length;c++){if(f[g[c]]){a[g[c]]=f[g[c]]}}}}if(j){h.insertBefore(a,j)}else{h.appendChild(a)}}}return a};DOMManipII.prototype.appendElementBefore=function(c,b,d,a){return(c&&c.parentNode&&b)?this.appendE(c.parentNode,b,d,a,c):false};DOMManipII.prototype.appendText=function(a,b){return(a&&b)?a.appendChild(document.createTextNode(b)):false};DOMManipII.prototype.appendLText=function(d,f,e){var c,a,b;if(!d||!f){return false}if(f.split){a=f.split("\n")}if(a&&a.length>1){b=(!a[0].length)||(this.appendText(d,a[0]));for(c=1;b&&c<a.length;c++){this.appendE(d,"br");if(a[c].length){b=this.appendText(d,a[c])}}}else{b=this.appendText(d,f)}return b};DOMManipII.prototype.appendDiv=function(b,c,a){return this.appendE(b,"div",c,a)};DOMManipII.prototype.appendSpan=function(b,c,a){return this.appendE(b,"span",c,a)};DOMManipII.prototype.appendLink=function(e,b,a,f){var g,d,c;if(b&&typeof b=="object"){g=b.id}else{b={href:b};g=false}d=this.appendE(e,"a",g,b);if(d&&a){if(f){c=this.appendSpan(d)}else{c=d}this.appendText(c,a)}return d};DOMManipII.prototype.appendLabel=function(b,d,c){var a=this.appendE(b,"label",false,{htmlFor:d});if(a){this.appendLText(a,c)}return a};DOMManipII.prototype.appendInputText=function(c,d,b){var a={type:"text",name:d};if(b){a.value=b}return this.appendE(c,"input",d,a)};DOMManipII.prototype.appendTextArea=function(e,g,c,d,f){var b,a={name:g};if(!isNaN(d)&&d>0){a.rows=Math.floor(d)}if(!isNaN(f)&&f>0){a.cols=Math.floor(f)}b=this.appendE(e,"textarea",g,a);if(b&&c){this.appendText(b,c)}return b};DOMManipII.prototype.appendCheckbox=function(c,d,b){var a={type:"checkbox",name:d};if(b){a.defaultChecked=true;a.checked=true}return this.appendE(c,"input",d,a)};DOMManipII.prototype.appendRadio=function(d,b,c){var a,e=b+"_"+c;if(this.isIE){a=this.appendE(d,'<input type="radio" name="'+b+'" value="'+c+'">',e)}else{a=this.appendE(d,"input",e,{type:"radio",name:b,value:c})}return a};DOMManipII.prototype.appendSelect=function(b,c){var a=document.createElement("select");a.name=a.id=c;b.appendChild(a);return a};DOMManipII.prototype.appendOption=function(c,b,d){var a=this.appendE(c,"option",false,{value:b});if(a){this.appendText(a,d)}return a};DOMManipII.prototype.appendButton=function(e,f,g,b){var a=(f=="submit"||f=="reset");var d=a?f:"button";var c=document.createElement(a?"input":"button");if(e&&c){if(a||!this.isIE){c.type=d}c.name=c.id=g;if(typeof b=="string"){if(a){c.value=b}else{this.appendText(c,b)}}e.appendChild(c)}return c};DOMManipII.prototype.setOpacity=function(c,a,d){var b=this.ele(c);if(!b){return false}if(isNaN(a)||a>100){a=100}else{if(a<0){a=0}}if(this.useFilter){if(!d){b.style.zoom=1}b.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+a+")"}else{b.style.opacity=a/100}return true};DOMManipII.prototype.isDOM=function(a){return(a&&typeof a=="object"&&a.nodeType)};DOMManipII.prototype.ele=function(a){if(typeof a=="string"&&document.getElementById){return document.getElementById(a)}else{return(this.isDOM(a))?a:false}};