function createMessage(){
	if($("#floatBox").length == 0){
		var str="";
		str += "<div id=\"floatBoxBg\" style=\"filter:alpha(opacity=0);opacity:0;\"></div>";
		str += "<div id=\"floatBox\" style=\"filter:alpha(opacity=0);opacity:0;\">";
		str += "  <div class=\"title\">";
		str += "    <h4></h4>";
		str += "    <span id=\"guanbi\"><img height=\"19\" src=\"images/x.gif\" width=\"19\" /></span>";
		str += "  </div>";
		str += "  <div class=\"content\"><iframe marginwidth=\"0\" marginheight=\"0\" src=\"\" frameborder=\"0\" width=\"470\" height=\"270\"></iframe></div>";
		str += "</div>";
		
		$("body").append(str);
		
		$("#guanbi").click(function(){
			$("#floatBoxBg").animate({opacity:"0"},"normal",function(){$(this).hide();});
			$("#floatBox").animate({opacity:"0"},"normal",function(){$(this).hide();});
		})
	}
}

function showmessage(){
	$("#floatBox").css({left:(($(document).width()-parseInt($("#floatBox").width()))/2)+"px",top:((document.documentElement.clientHeight-parseInt($("#floatBox").height()))/2+document.documentElement.scrollTop)+"px"});
	$("#floatBox").show();
	$("#floatBox").animate({opacity:"1"},"normal");
	
	$("#floatBoxBg").css({height:$(document).height()+"px"});
	$("#floatBoxBg").show();
	$("#floatBoxBg").animate({opacity:"0.2"},"normal");
}

function message(title,src){
	createMessage();
	$("#floatBox h4").html(title);
	$("#floatBox iframe").attr("src",src);
	showmessage();
}
