Function.prototype.Inherits=function(parent)
{this.prototype=new parent();this.prototype.constructor=this;};function createElementWithName(){}
(function(){try{var el=document.createElement('<div name="foo">');if('DIV'!=el.tagName||'foo'!=el.name){throw'create element error';}
createElementWithName=function(tag,name){return document.createElement('<'+tag+' name="'+name+'"></'+tag+'>');};}catch(e){createElementWithName=function(tag,name){var el=document.createElement(tag);el.name=name;el.setAttribute("name",name);return el;};}})();if(typeof(document.createNamedElement)=='undefined'){document.createNamedElement=createElementWithName;}