/**
 * - Originally by Sean M. Burke from interglacial.com
 * - ver.JavaScript by schadenfreude schf.uc.org
 * - modified by okjungsoo from egloos.com
 */
var DOMCreator={graft:function(parent,node,doc){doc=(doc||parent.ownerDocument||document);var element;if(node==undefined){throw this.complaining("Can't graft an undefined value");}else if(node.constructor==String){element=doc.createTextNode(node);}else if(node.length==0){element=doc.createElement("span");element.setAttribute("class","fromEmptyLOL");}else{for(var i=0;i<node.length;i++){if(i==0&&node[i].constructor==String){var snared=node[i].match(/^([a-z][a-z0-9]*)\.([^\s\.]+)$/i);if(snared){element=this.createDOM(node[i],(i+1==node.length?null:node[i+1]),snared,doc);element.className=snared[2];continue;}snared=node[i].match(/^([a-z][a-z0-9]*)$/i);if(snared){element=this.createDOM(node[i],(i+1==node.length?null:node[i+1]),snared,doc);continue;}element=doc.createElement("span");element.setAttribute("class","namelessFromLOL");}if(node[i]==undefined){throw this.complaining("Can't graft an undefined value in a list!");}else if(node[i].constructor==String||node[i].constructor==Array){this.graft(element,node[i],doc);}else if(node[i].constructor==Number){this.graft(element,node[i].toString(),doc);}else if(node[i].constructor==Object){for(var propertyName in node[i]){this.setHashProperty(element,propertyName,node[i][propertyName]);}}else{throw this.complaining("Object "+node[i]+" is inscrutable as an graft arglet.");}}}parent.appendChild(element);return element;},complaining:function(string){return new Error(string);},addEvent:function(element,eventName,observer){if(element.attachEvent){element.attachEvent('on'+eventName,observer);}else{element.addEventListener(eventName,observer,false);}},setHashProperty:function(element,propertyName,propertyValue){if(typeof propertyValue=='function'){this.addEvent(element,propertyName,propertyValue);}else{if(propertyName=='style'&&BrowserInfo.isIE){element.style.setAttribute('cssText',propertyValue);}else if(propertyName=='class'||propertyName=='className'){element.className=propertyValue;}else{element.setAttribute(propertyName,propertyValue);}}},createDOM:function(node,nextNode,snared,doc){if(nextNode!=null&&this.isInputCheked(node,nextNode)){return doc.createElement('<'+snared[1]+' checked>');}else{return doc.createElement(snared[1]);}},isInputCheked:function(node,nextNode){if(BrowserInfo.isIE&&node=="input"&&nextNode.constructor==Object&&nextNode.checked){return true;}return false;}};