function YoYoDic(){
 this.First;
 this.Last;
 this.Count = 0;
 //增加方法
 this.Add = function(skey,scontent)
 {
  if(!this.Exists(skey))
  {
   var Cnode = new YNode(skey,scontent);
   if (this.Count == 0)
   {
    this.First = this.Last = Cnode;
    this.First.next = this.Last;
   }
   else
   {
    Cnode.next = this.First;
    this.First = Cnode;
   }
   this.Count++;
  }
 };
 //判断存在
 this.Exists = function(skey)
 {
  var isex = false;
  var temp = this.First;
  for(var i=1;i <= this.Count;i++)
  {
   if(temp.key == skey)
   {
    isex = true;
    break;
   }
   else
   {
    temp = temp.next;
   }
  }
  return isex;
 };
 //通过关键字或索引返回内容
 this.Item = function(skey)
 {
  var scontent = '';
  var temp = this.First;
  if(String(skey).match(/^[0-9]\d*$/)==null)
  {
   for(var i=1;i <= this.Count;i++)
   {
    if(temp.key == skey)
    {
     scontent = temp.content;
     break;
    }
    else
    {
     temp = temp.next;
    }
   }
  }
  else
  {
   var index = parseInt(skey);
   for(var i = (this.Count-1);i >= 0 ;i--)
   {
    if(i == index)
    {
     scontent = temp.content;
     break;
    }
    else
    {
     temp = temp.next;
    }
  }
  }
  return scontent;
 };
 //通过索引返回关键字
 this.Key = function(index)
 {
  var skey = '';
  var temp = this.First;
  for(var i = (this.Count-1);i >= 0 ;i--)
  {
   if(i == index)
   {
    skey = temp.key;
    break;
   }
   else
   {
    temp = temp.next;
   }
  }
  return skey;
 };
 //改写关键字方法
 this.ChangeKey = function(okey,nkey)
 {
  var temp = this.First;
  for(var i=1;i <= this.Count;i++)
  {
   if(temp.key == skey)
   {
    temp.key  = skey;
    break;
   }
   else
   {
    temp = temp.next;
   }
  }
 };
 //删除元素
 this.Delete = function(skey)
 {
  if(this.First.key == skey)
  {
   this.First = this.First.next;
   this.Count--;
   return;
  }
  var temp = this.First;  
  for(var i=1;i < this.Count;i++)
  {
   if(temp.next.key == skey)
   {
    temp.next = (temp.next.next != null) ? temp.next.next : null;
    this.Count--;
    break;
   }
   else
   {
    temp = temp.next;
   }
  }
 };
 //节点类
 function YNode(skey,scontent)
 {
  this.key = skey;
  this.content = scontent;
  this.next = null;
 } 
}

/*
	SimpleFloatDIVManager && SimpleFloatDIV 
	By Neo 2008.04.29 20:36
*/

/*
    EXP:
    
	var FDMgr = new SimpleFloatDIVManager();
	FDMgr.NewSplFDs([
		["marryA","marryAD","borderDIV",0,0,0,0],
		["marryB","marryBD","borderDIV",0,0,0,0],
		["marryC","marryCD","borderDIV",0,0,0,0],
		["marryD","marryDD","borderDIV",0,0,0,0]
	]);
	    
*/
function SimpleFloatDIV(fireObj,displayObj,objClassName,direction,x,y,handAjustUI,mgrObj){
	this.ID = typeof(fireObj)=="string"?fireObj:fireObj.id;
	this.FireObj = typeof(fireObj)=="string"?document.getElementById(fireObj):fireObj;
	this.DisplayObj = typeof(displayObj)=="string"?document.getElementById(displayObj):displayObj;
	if(handAjustUI==0 || handAjustUI==undefined)
		this.DisplayObj.style.position = "absolute";
	this.DisplayObj.className = objClassName;
	this.IsHidden = true;
	this.HiddenTimer  = -1;
	this.HiddenInterval = -1;
	this.DisplayDirection = direction;
	//alert(handAjustUI);
	this.HandAjustUI = handAjustUI;
	//alert(x + "," + y);
	this.handOffsetX = x;
	this.handOffsetY = y;
	this.SFDMgr = mgrObj;
	this.Init();
}
SimpleFloatDIV.prototype.Init = function(){
	if(this.HandAjustUI==0 || this.HandAjustUI == undefined)
		this.AjustUI();
	this.FireObj.Parent = this.DisplayObj.Parent = this;
	this.DisplayObj.onmouseover = this.FireObj.onmouseover = this.MouseOver;
	if(this.HandAjustUI==0 || this.HandAjustUI == undefined)
		this.DisplayObj.onmouseout = this.FireObj.onmouseout = this.MouseOut;
}
SimpleFloatDIV.prototype.AjustUI = function(){
	var posObj = this.getPosition(this.FireObj);
	//alert(this.handOffsetX + "," +  this.handOffsetY);
	if(this.DisplayDirection==undefined ||this.DisplayDirection==0){
		this.DisplayObj.style.left = posObj.x + this.handOffsetX + "px";
		this.DisplayObj.style.top = posObj.y + this.handOffsetY + this.FireObj.offsetHeight + "px";
	}else{
		this.DisplayObj.style.left = posObj.x + this.handOffsetX + this.FireObj.offsetWidth + "px";
		this.DisplayObj.style.top = posObj.y  + this.handOffsetY + "px";
	}
}
SimpleFloatDIV.prototype.getPosition=function(targetObj){
	for(var ox=0,oy=0;targetObj!=null;ox+=targetObj.offsetLeft,oy+=targetObj.offsetTop,targetObj=targetObj.offsetParent);
	return {x:ox,y:oy}
}
SimpleFloatDIV.prototype.MouseOver = function(){
	if(this.Parent.HandAjustUI==0 || this.Parent.HandAjustUI == undefined)
		clearTimeout(this.Parent.HiddenTimer);
	else{
		//娓呮鎵鏈夋棤瀹氫綅鏄剧ず鐘舵?
		if(this.Parent.SFDMgr!=undefined){
			var List = this.Parent.SFDMgr.ListPro();
			if(window.ActiveXObject){
			    var ListA = (new VBArray(List.Items())).toArray();
			    for(var ListItem in ListA)
			    {
				    if(ListA[ListItem].HandAjustUI==1)
					    ListA[ListItem].DisplayObj.style.display = "none";
			    }
			}else{
			    for(var i=0;i<List.Count;i++){ 
				    if(List.Item(i).HandAjustUI==1)
					    List.Item(i).DisplayObj.style.display = "none"; 
			   } 
			}
		}
	}
	this.Parent.IsHidden = false;
	this.Parent.DisplayObj.style.display = "";
}
SimpleFloatDIV.prototype.MouseOut = function(){
	this.Parent.IsHidden = true;
	this.Parent.HiddenTimer = setTimeout("hiddenDIV('" + this.Parent.DisplayObj.id + "')",10);
}
function hiddenDIV(targetObj){
		var obj = document.getElementById(targetObj);
		obj.style.display = "none";
}
function SimpleFloatDIVManager(){
    if(window.ActiveXObject){
	    this.List = new ActiveXObject("Scripting.Dictionary");
	}else{
	    this.List = new YoYoDic();
	}
}
SimpleFloatDIVManager.prototype.NewSplFD = function(fireObj,displayObj,objClassName,direction,x,y,handAjustUI,mgrObj){
	var FD = new SimpleFloatDIV(fireObj,displayObj,objClassName,direction,x,y,handAjustUI,mgrObj);
	this.InsertSplFD(FD);
}
SimpleFloatDIVManager.prototype.NewSplFDs = function(FDs){
	if(typeof(FDs)!="object")
		return;
	for(var i=0;i<FDs.length;i++){
		//alert(FDs[i][0]+ "," + FDs[i][1] + "," + FDs[i][2] + "," + FDs[i][3] + "," + FDs[i][4] + "," +  FDs[i][5] + "," + FDs[i][6]);
		this.NewSplFD(FDs[i][0],FDs[i][1],FDs[i][2],FDs[i][3],FDs[i][4],FDs[i][5],FDs[i][6],this);
	}
}
SimpleFloatDIVManager.prototype.InsertSplFD = function(obj){
	this.List.Add(obj.ID,obj);
}
SimpleFloatDIVManager.prototype.RemoveSplFD = function(objID){
	this.List.Remove(objID);
}
SimpleFloatDIVManager.prototype.GetSplFD = function(objID){
	return this.List.Item(objID);		
}
SimpleFloatDIVManager.prototype.Length = function(){
	return this.List.Count;
}
SimpleFloatDIVManager.prototype.ListPro = function(){
	return this.List;
}

window.onresize = function(){
	if(FDMgr!=undefined){
		var List = FDMgr.ListPro();
		if(window.ActiveXObject){
		    var ListA = (new VBArray(List.Items())).toArray();
		    for(var ListItem in ListA)
		    {
			    if(ListA[ListItem].HandAjustUI==0 || ListA[ListItem].HandAjustUI == undefined)
				    ListA[ListItem].AjustUI();
		    }
		}else{
		    for(var i=0;i<List.Count;i++){
			    if(List.Item(i).HandAjustUI==0 || List.Item(i).HandAjustUI == undefined)
				    List.Item(i).AjustUI();
		   } 
		}
	}
	DIVTarget();
}