var htmlBuilder ={construct :function(){var elements =('a,abbr,acronym,address,applet,area,b,base,basefont,bdo,big,blockquote,br,button,caption,center,cite,'+'code,col,colgroup,dd,del,dir,div,dfn,dl,dt,em,fieldset,font,form,frame,frameset,h1,h2,h3,h4,h5,h6,hr,'+'i,iframe,img,input,ins,isindex,kbd,label,legend,li,link,map,menu,meta,noframes,noscript,object,ol,'+'optgroup,option,p,param,pre,q,s,samp,script,select,small,span,strike,strong,style,sub,sup,table,tbody,'+'td,textarea,tfoot,th,thead,title,tr,tt,u,ul,var,xmp').split(',');var object ={},i =0,element;while(element =elements[i++])object[element]=htmlBuilder.createElementMethod(element);return object;},createElementMethod :function(tagName){return function(){var element =document.createElement(tagName);for(var i =0;i <arguments.length;i++){if(typeof(arguments[i])=='string'){var string =document.createTextNode(arguments[i]);element.appendChild(string);}else if(typeof(arguments[i])=='object'){if(typeof(arguments[i].nodeName)!='undefined'){element.appendChild(arguments[i]);}else {for(var j =0;j <arguments[i].length;j++){var flag =arguments[i][j].indexOf('=');var attributeName =arguments[i][j].slice(0,flag);var attributeValue =arguments[i][j].slice(flag+1,arguments[i][j].length);var isIE =navigator.userAgent.match(/MSIE/);if(!isIE)element.setAttribute(attributeName,attributeValue);else htmlBuilder.ieSetAttribute(element,attributeName,attributeValue);}}}}return element;}},ieSetAttribute :function(element,attributeName,attributeValue){if(attributeName =='style')element.style.cssText =attributeValue;else if(attributeName =='for')element.htmlFor =attributeValue;else if(attributeName.match(/^on/))element[attributeName]=new Function(attributeValue);else element.setAttribute(attributeName,attributeValue);}}
