floatDiv=function(){
	
	var oComponent=this;
	var oTarget,oContent,aExcursion;
	var hiddenDelayTimer;
	var showDelayTimer;
	var contentAnimShow,contentAnimHidden;
	var canClose=true;
	var oDefaultConfig={
	showConfig:{
		opacity: {to: 1 }
		},
	hiddenConfig:{
		opacity: {to: 0 }
	},
	showTime:0.8,
	hiddenTime:0.3,
	sFireEvent:"mouseover",
	needMask:false,
	oAppliedFunction:YAHOO.util.Easing.easeOut
	}
	var maskIframe;
	oComponent.init=function(sTagId,sContentId,excursion,oConfig){
		
		YL.isArray(excursion)?aExcursion=excursion:aExcursion=[0,0];
		oTarget = get(sTagId);
		oContent = get(sContentId);
		if(!oConfig && !YL.isObject(oConfig)){oConfig={}}
		(YL.isObject(oConfig.showConfig))?oDefaultConfig.showConfig=oConfig.showConfig:null;
		(YL.isObject(oConfig.hiddenConfig))?oDefaultConfig.hiddenConfig=oConfig.hiddenConfig:null;
		(YL.isNumber(oConfig.showTime))?oDefaultConfig.showTime=oConfig.showTime:null;
		(YL.isNumber(oConfig.hiddenTime))?oDefaultConfig.hiddenTime=oConfig.hiddenTime:null;
		(YL.isString(oConfig.sFireEvent))?oDefaultConfig.sFireEvent=oConfig.sFireEvent:null;
		(YL.isFunction(oConfig.oAppliedFunction))?oDefaultConfig.oAppliedFunction=oConfig.oAppliedFunction:null;
		(YL.isBoolean(oConfig.needMask))?oDefaultConfig.needMask=oConfig.needMask:null;
		contentAnimShow = new YAHOO.util.Anim(oContent, oDefaultConfig.showConfig, oDefaultConfig.showTime, oDefaultConfig.oAppliedFunction);
		contentAnimHidden = new YAHOO.util.Anim(oContent, oDefaultConfig.hiddenConfig,oDefaultConfig.hiddenTime, oDefaultConfig.oAppliedFunction);
		contentAnimShow.onStart.subscribe(oComponent.openDirect);
		contentAnimShow.onComplete.subscribe(afterShowAnim);
		contentAnimHidden.onComplete.subscribe(oComponent.closeDirect);

		if(oDefaultConfig.sFireEvent=="click"){
			
		//YUE.on(oTarget,"mouseover",function(){canClose=false;});
		//YUE.on(oTarget,"mouseout",function(){canClose=true;});
		//YUE.on(oContent,"mouseover",function(){canClose=false;});
		YUE.on(oTarget,"mouseover",function(){canClose=false;});
		YUE.on(oTarget,"mouseout",function(){canClose=true;});
		YUE.on(oContent,"mouseover",function(){canClose=false;});
		YUE.on(oContent,"mouseout",function(){canClose=true;});
		//YUE.on(oContent,"click",function(e){YUE.stopEvent(e);});
		YUE.on(oTarget,oDefaultConfig.sFireEvent,oComponent.showContent);
		YUE.on(document.body,oDefaultConfig.sFireEvent,oComponent.hiddenContent);
			}else{
		YUE.on(oTarget,"mouseover",function(){canClose=false;});
		YUE.on(oTarget,"mouseout",function(){canClose=true;});
		YUE.on(oContent,"mouseover",function(){canClose=false;});
		YUE.on(oContent,"mouseout",function(){canClose=true;});

		YUE.on(oTarget,oDefaultConfig.sFireEvent,oComponent.showContent);
		YUE.on(oTarget,"mouseout",oComponent.hiddenContent);
		YUE.on(oContent,oDefaultConfig.sFireEvent,oComponent.showContent);
		YUE.on(oContent,"mouseout",oComponent.hiddenContent);
		}
		
		if(oDefaultConfig.needMask){
			maskIframe = document.createElement("iframe");
			maskIframe.className="maskIframe";
			maskIframe.zIndex = oContent.zIndex+1;
			maskIframe.frameborder=0;
			document.body.appendChild(maskIframe);
			maskIframe.style.display="none";
			}else{
				maskIframe = null;
			}
		
		
		}
		
	
	var showContentDelay = function(e){
		try{YUE.stopEvent(e);}catch(E){}
		contentAnimHidden.stop(false);
		var xy = YUD.getXY(oTarget);
		oContent.style.display="";
		YUD.setXY(oContent,[(xy[0]+aExcursion[0]),(xy[1]+aExcursion[1])]);
		if(maskIframe){
			maskIframe.style.display="";
			YUD.setXY(maskIframe,[(xy[0]+aExcursion[0]),(xy[1]+aExcursion[1])]);
			}
		contentAnimShow.animate();
		
		}
		oComponent.hiddenContentDelay = function(e){
			if(!canClose){return;}
			contentAnimShow.stop(false);
			contentAnimHidden.animate();
			}

oComponent.hiddenContentForce = function(e){
			contentAnimShow.stop(false);
			contentAnimHidden.animate();
			}

oComponent.closeDirect=function(e){
	try{YUE.stopEvent(e);}catch(E){}
	oContent.style.display="none";
	if(maskIframe){
			maskIframe.style.display="none";
	}
	}
oComponent.openDirect=function(e){
	try{YUE.stopEvent(e);}catch(E){}
	oContent.style.display="";
	if(maskIframe){
			maskIframe.style.display="";
			var w,h;
			(contentAnimShow.attributes.width &&  contentAnimShow.attributes.width.to) ? w = contentAnimShow.attributes.width.to : w=oContent.offsetWidth;
			(contentAnimShow.attributes.height &&  contentAnimShow.attributes.height.to) ? h = contentAnimShow.attributes.height.to : h=oContent.offsetHeight;
			maskIframe.style.width=w+"px";
			maskIframe.style.height=h+"px";
	}
	}
var afterShowAnim = function(){
	if(maskIframe){
	maskIframe.style.width=oContent.offsetWidth+"px";
	maskIframe.style.height=oContent.offsetHeight+"px";
	}
	}

	oComponent.showContent = function(e){
		try{YUE.stopEvent(e);}catch(E){}
		(showDelayTimer!=null)?clearTimeout(showDelayTimer):false;
		showDelayTimer=setTimeout(showContentDelay,200);
		}
	oComponent.hiddenContent = function(e){
		(hiddenDelayTimer!=null)?clearTimeout(hiddenDelayTimer):false;
		hiddenDelayTimer=setTimeout(oComponent.hiddenContentDelay,200);
		
		}
	
	}
