function del_fast_dh(obj)
{
_gPar("obj.id=='fast_dh'").removeNode(true);
}
function sh_dh_over_div(s_h)
{
var divs=_gName("dh_over_div");
for(var i=0;i<divs.length;i++)
{
if(divs[i].style.display!=s_h)
{
var p=_gPar("obj.id=='fast_dh'",divs[i]);
var oTop=get_top(divs[i].parentNode);
var oLeft=get_left(divs[i].parentNode);
divs[i].style.display=s_h;
divs[i].style.top=oTop;
divs[i].style.left=oLeft;
divs[i].style.height=divs[i].parentNode.offsetHeight;
}
}
}
function set_dh_tuo_div(downObj)
{
var tuo_div=dh_tuo_div;
var title=downObj.getElementsByTagName("B")[0].innerText;
tuo_div.style.width=downObj.offsetWidth;
tuo_div.style.height=downObj.offsetHeight;
tuo_div.innerHTML="<b>"+title+"</b>";
tuo_div.style.top=get_top(downObj);
tuo_div.style.left=get_left(downObj);	
}
var dh_isDown=false;
var dh_moveObj=null;
var dh_downObj=null;
function dh_tuo_down()
{
dh_downObj=event.srcElement;
if(!dh_downObj)return;
if(dh_downObj.id!="title_td")
{
dh_downObj=dh_downObj.parentNode;
while(dh_downObj.id!="title_td")
{
dh_downObj=dh_downObj.parentNode;
if(!dh_downObj)return;
}	
}
sh_over_div("block");
set_tuo_div(dh_downObj);
dh_isDown=true;
}
var dh_isMove=false;
function dh_tuo_move()
{
if(dh_isDown)
{	
var obj=event.srcElement;
dh_tuo_div.style.display="block";	
obj=_gPar("obj.id=='tb_box'",obj);
dh_downObj=_gPar("obj.id=='tb_box'",dh_downObj);
if(obj&&obj.id&&obj.id=="tb_box"&&obj!=dh_downObj)
{
if(!dh_isMove||dh_isMove.id!="tb_box")
{
dh_isMove=obj;
}
hid_dashed_div(obj,"block");
}
var index_tdMain_x=get_left(_gId("td_main"));
var index_tdMain_y=get_top(_gId("td_main"));
dh_tuo_div.style.top=event.y+10-index_tdMain_y;
dh_tuo_div.style.left=event.x+10-index_tdMain_x;
dh_isMove=true;
}
}
function dh_tuo_up()
{	
if(dh_isMove)
{
var obj=event.srcElement;
obj=_gPar("obj.id=='tb_box'",obj);
if(dh_downObj!=obj&&obj.id=="tb_box")
{
obj.insertAdjacentElement("beforeBegin",dh_downObj);
hid_dashed_div(obj,"none")
}
}
if(dh_isDown||dh_isMove)
{
sh_over_div("none");
dh_isMove=false;
dh_isDown=false;
dh_moveObj=null;
dh_downObj=null;
dh_tuo_div.style.display="none";
}
}
function set_dh_content(title,ifr)
{
htm="<table name='tb_box' onMouseOut=hid_dashed_div(this,'none') id='tb_box' cellpadding='0' cellspacing='0'>";
htm+="<tr><td width='12'>";
htm+="<div class='dashed_div'></div></td>";
htm+="<td><table width='100%'  border='0' cellpadding='0' cellspacing='0' class='border_01'>";
htm+="<tr >";
htm+="<td style='cursor:move' height='25' onMouseDown='dh_tuo_down()' id='title_td' background='../img/main_top_02.gif' width='99%'>&nbsp;";
htm+="<img src='../img/list3.gif'><b>"+title+"</b></td>";
htm+="<td width='12' background='../img/main_top_02.gif'>";
htm+="<IMG style='CURSOR:hand' alt="+lang4("_Close")+" onclick='del_desktop(this)' src='../img/but_del.gif' width=12>";
htm+="</td></tr><tr><td colspan='2' id='c' valign='top' bgcolor='#FFFFFF'>";
htm+="<div id=over_div name=over_div></div>";
htm+=ifr;
htm+="</td></tr></table></td></tr></table>";
if(_gId("fast_dh_div"))
{
_gId("fast_dh_div").insertAdjacentHTML("beforeEnd",htm);
}
}