function LayerElement(){var htmlSpan;try{htmlSpan=document.createElement("div");}catch(e){alert("create div error  "+e.toString());};this.style=htmlSpan.style;this.getHtmlObj=function(){return htmlSpan;};this.createLayer=function(name,left,top,width,height,visible,content){try{htmlSpan.id=name;htmlSpan.UNSELECTABLE="on";htmlSpan.style.position="absolute";htmlSpan.style.overflow="visible";htmlSpan.style.left=left;htmlSpan.style.top=top;if(!isNaN(width)&&width!=null)htmlSpan.style.width=width;if(!isNaN(height)&&height!=null)htmlSpan.style.height=height;htmlSpan.style.display=visible?"block":"none";if(typeof content=="object"){htmlSpan.insertBefore(content,null);}else{htmlSpan.innerHTML=content.toString();};}catch(e){e.description=this.getClassName()+".createLayer()::"+e.description;throw(e);};};this.remove=function(subElement){var tmpObj;try{if(typeof subElement=="object"){htmlSpan.removeChild(subElement);}else{tmpObj=document.createElement("<div></div>");tmpObj.innerHTML=subElement;htmlSpan.removeChild(tmpObj);};}catch(e){e.description=this.getClassName()+".add()::"+e.description;throw(e);};};this.add=function(subElement){var tmpObj;try{if(typeof subElement=="object"){htmlSpan.appendChild(subElement);}else{tmpObj=document.createElement("<div></div>");tmpObj.innerHTML=subElement;htmlSpan.appendChild(tmpObj);};}catch(e){e.description=this.getClassName()+".add()::"+e.description;throw(e);};};this.setInnerHTML=function(html){try{if(html!=null){htmlSpan.innerHTML=html;};}catch(e){e.description=this.getClassName()+".setInnerHTML()::"+e.description;throw(e);};};this.getInnerHTML=function(){return htmlSpan.innerHTML;};this.getLayer=function(){return htmlSpan;};this.getLeft=function(){try{return parseInt(htmlSpan.style.left);}catch(e){e.description=this.getClassName()+".getLeft()::"+e.description;throw(e);};};this.getTop=function(){try{return parseInt(htmlSpan.style.top);}catch(e){e.description=this.getClassName()+".getTop()::"+e.description;throw(e);};};this.getWidth=function(){try{return parseInt(htmlSpan.style.width);}catch(e){e.description=this.getClassName()+".getWidth()::"+e.description;throw(e);};};this.getHeight=function(){try{return parseInt(htmlSpan.style.height);}catch(e){e.description=this.getClassName()+".getHeight()::"+e.description;throw(e);};};this.moveTo=function(left,top){try{htmlSpan.style.left=left+"px";htmlSpan.style.top=top+"px";}catch(e){e.description=this.getClassName()+".moveTo()::"+e.description;throw(e);};};this.resizeTo=function(width,height){try{htmlSpan.style.width=width;htmlSpan.style.height=height;}catch(e){e.description=this.getClassName()+".resizeTo()::"+e.description;throw(e);};};this.show=function(){htmlSpan.style.display="inline";};this.hide=function(){htmlSpan.style.display="none";};this.setIndex=function(p){htmlSpan.style.zIndex=p;};};

