mywx=new Object();
mywx.windowFlag=true; 
mywx.title=null;
mywx.height='auto';
mywx.width=100;
mywx.style=null;
mywx.load=function(wx){
	
			 if(typeof(wx.title)!='undefined')  mywx.title=wx.title; 
			 if(typeof(wx.width)!='undefined')  mywx.width=wx.width;
			 if(typeof(wx.height)!='undefined') mywx.height=wx.height;
			 if(typeof(wx.style)!='undefined')  mywx.style=wx.style;
		
		//display
		if(mywx.windowFlag){
			jQuery("body").append( mywx.screen() );
			mywx.windowFlag=false;
		}

		//close
		jQuery("#floatBox .title span").click(function(){
			mywx.closes();
		});
		mywx.fillData();
		return mywx;	
	}

	mywx.screen=function(){
		var temp_float=new String;
  		temp_float="<div id='floatBoxBg'></div>";
  		temp_float+="<div id='floatBox' class=\"floatBox\">";
  		temp_float+="<div class='title'><h4></h4><span>×</span></div>";
  		temp_float+="<div class='content'></div>";
  		temp_float+="</div>";
		return temp_float;
	}
		
	mywx.closes=function(){
		jQuery("#floatBoxBg").hide();
		jQuery("#floatBox").hide();
	}

	mywx.fillData=function(){
		jQuery("#floatBox .title h4").html(mywx.title);
		jQuery("#floatBoxBg").css({display:"block",height:jQuery(document).height()});
		jQuery("#floatBox").removeClass();
		jQuery("#floatBox").attr("class","floatBox "+mywx.style);
		jQuery("#floatBox").css({display:"block",left:((jQuery(document).width())/2-(parseInt(mywx.width)/2))+"px",top:(jQuery(document).scrollTop()+220)+"px",width:mywx.width,height:mywx.height});
	}
	
	//显示列表..........
	//TEXT
	mywx.text=function(content){
		jQuery("#floatBox .content").html(content);
	}
	
	//URL
	mywx.url=function(url){
		//var content_array=content.split("?");
			jQuery("#floatBox .content").ajaxStart(function(){			
		});
		$.ajax({
			type:"GET",
			url:url,
			//data:content_array[2],
			dataType:"html",
			error:function(){
				jQuery("#floatBox .content").html("error...");
			},
			success:function(html){
			 jQuery("#floatBox .content").html(html);
			}
		});
  }

  //ID
  mywx.id=function(content){
	jQuery("#floatBox .content").html(jQuery("#"+content+"").html());
  }

  //框架
  mywx.iframe=function(content){
	jQuery("#floatBox .content").html("<iframe src=\""+content+"\" width=\"100%\" height=\""+(parseInt(wx.para.height)-30)+"px"+"\" scrolling=\"auto\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\"></iframe>");
  }
