function dialog(n,t,i,r,u){var f,e,o;dialogFirst==!0&&(f=new String,f='
',f+='",$("body").append(f),dialogFirst=!1,$("#floatBox .title span").click(function(){$("#floatBoxBg").hide(),$("#floatBox").hide(),location.reload()})),$("#floatBox .title h4").html(n),contentType=t.substring(0,t.indexOf(":")),t=t.substring(t.indexOf(":")+1,t.length);switch(contentType){case"url":e=t.split("?"),$("#floatBox .content").ajaxStart(function(){$(this).html("loading...")}),$.ajax({type:e[0],url:e[1],data:e[2],error:function(){$("#floatBox .content").html("error...")},success:function(n){$("#floatBox .content").html(n)}});break;case"text":$("#floatBox .content").html(t);break;case"id":$("#floatBox .content").html($("#"+t+"").html());break;case"iframe":$("#floatBox .content").html('')}o=getPageScroll()[1]+getPageHeight()/10+50,$("#floatBoxBg").css({display:"block",height:$(document).height()}),$("#floatBox").removeClass(),$("#floatBox").attr("class","floatBox "+u),$("#floatBox").css({display:"block",left:$(document).width()/2-parseInt(i)/2+"px",top:o+"px",width:i,height:r})}function getPageScroll(){var t,n;return self.pageYOffset?(n=self.pageYOffset,t=self.pageXOffset):document.documentElement&&document.documentElement.scrollTop?(n=document.documentElement.scrollTop,t=document.documentElement.scrollLeft):document.body&&(n=document.body.scrollTop,t=document.body.scrollLeft),[t,n]}function getPageHeight(){var n;return self.innerHeight?n=self.innerHeight:document.documentElement&&document.documentElement.clientHeight?n=document.documentElement.clientHeight:document.body&&(n=document.body.clientHeight),n}var dialogFirst=!0;