function crertdiv(_parent,_element,_id,_css){//创建层
var newObj = document.createElement(_element);
if(_id && _id!="")newObj.id=_id;
if(_css && _css!=""){
newObj.setAttribute("style",_css);
newObj.style.cssText = _css;
}
if(_parent && _parent!=""){
var theObj=getobj(_parent);
var parent = theObj.parentNode;
if(parent.lastChild == theObj){
theObj.appendChild(newObj);
}
else{
theObj.insertBefore(newObj, theObj.nextSibling);
}
}
else document.body.appendChild(newObj);
}
function getobj(o){//获取对象
return document.getElementById(o)
}
var swtemp=0,objtemp;
function showdiv(inputid,inputlist){//显示层
if (swtemp==1){getobj(objtemp+"mydiv").style.display="none";}
var text_list=inputlist.split(",")
if (!getobj(inputid+"mydiv")){//若尚未创建就建之
var divcss="font-size:12px;color:#00f;position:absolute;left:"+(getobj(inputid).offsetLeft+0)+"px;top:"+(getobj(inputid).offsetTop+25)+"px;border:1px solid red"
getobj(inputid+"mydiv").innerHTML +="<style type='text/css'>#"+inputid+"mydiv ul {padding:0px;margin:0;}#"+inputid+"mydiv ul li{list-style-type:none;padding:5px;margin:0;float:left;CURSOR: pointer;}</style>"