<!-- 
  var targetId;
  var colorViewer; 
  
  function showColorBoard(id,tid)
  {
    position = function(x,y)
    {
        this.x = x;
        this.y = y;
    }

    getPosition = function(oElement)
    {
        var objParent = oElement
        var oPosition = new position(0,0);
        while (objParent.tagName != "BODY")
        {
            oPosition.x += objParent.offsetLeft;
            oPosition.y += objParent.offsetTop;
            objParent = objParent.offsetParent;
        }
        return oPosition;
    } 
    
    var m="colorView";   
    var obj=document.getElementById(id); 
    if(obj)
    {
        targetId=tid; //写入值的ID
        if(colorViewer)
        {
            //
        }
        else
        {
            colorViewer = document.createElement("div");
            colorViewer.id = m;
            colorViewer.style.position = "absolute";
            colorViewer.style.zIndex = "1000";
            colorViewer.style.background = "#33393C";
        }           

        var pos=getPosition(obj);
        
        colorViewer.style.left=pos.x + "px";
        colorViewer.style.top=pos.y + obj.offsetHeight + "px";
        var tmp="<iframe id='colorSelecter' scrolling='no' style='position:absolute;z-index:-1;' src='/Admin/CustomView/selectColor.html' frameborder='0'></iframe>";

        colorViewer.innerHTML=tmp;      
        
        document.body.appendChild(colorViewer);        
    }  
  }    
  function setColor(value)
  {
    if(targetId && targetId!='')
    {
        var obj=document.getElementById(targetId);
        if(obj && value!="" && value.indexOf('#')==0)
        {
            obj.value=value;   
            if(document.all)
            {
                obj.fireEvent("onchange");
            }
            else
            {
                var evt = document.createEvent('HTMLEvents');   
                 evt.initEvent('change',true,true);   
                 obj.dispatchEvent(evt);   
            }       
        } 
        targetId='';
        if(colorViewer)
        {
            document.body.removeChild(colorViewer);
            colorViewer=null;
        }
    }
  }
-->
