
function showdialog(pagename,width,height,info)
{
	var sScrollTop = parent.document.body.scrollTop+parent.document.documentElement.scrollTop;
	$(".massage_bg").height($(document).height()+sScrollTop);

	var strtop=sScrollTop+80;
	var templeft=width/2;
	
	var strleft=($(window).width()/2)-templeft;
	var strbgheight=$(document).height()

	strdialog = "<div class=\"massage_box\" style=\"top:" + strtop + "px; left:" + strleft + "px; width:" + width + "px; height:" + height + "px;\">";
	strdialog += "<iframe id=\"framePage\" src=\"" + pagename + "?siteinfo=" + info + "\" frameborder=\"0\" width=\"" + width + "\" height=\"" + height + "\" scrolling=\"no\" allowTransparency=\"true\" style=\"z-index:99999;\"><\/iframe>";
	strdialog+="<\/div>";
	strdialog += "<div class=\"massage_bg\" style=\"height:" + strbgheight + "px;\"><\/div>";

	$("#divdialog").show();
	$("#divdialog").html(strdialog);
}

$(window).resize(function(){
	var width=$(".massage_box").width();
	var templeft=width/2;
	var strleft=($(window).width()/2)-templeft;
	
	$(".massage_box").css("left",strleft+"px"); 
	$(".massage_bg").width($(window).width());
	$(".massage_bg").height($(document).height());
});

function closedialog()
{
	top.$("#divdialog").hide();
	top.$("#divdialog").html("");
}

function dialogok()
{
	top.location.reload();
}

