﻿// 显示无模式对话框
function ShowDialog(url, width, height) {
	var arr = showModalDialog(url, window, "dialogWidth:" + width + "px;dialogHeight:" + height + "px;help:no;scroll:no;status:no");
}

function preview() /* Preview for the "Compilation" */
	{
		if(document.frm_post.HtmlCode.value.length>0)
			{
				pr=window.open("","Preview","scrollbars=1,width=800,height=500");
				pr.document.write(document.frm_post.HtmlCode.value);
			}
		else alert('无任何内容可供预览!')
}


//ajax提示框功能
var Obj=''
document.onmouseup=MUp
document.onmousemove=MMove

function MDown(Object){
Obj=Object.id
document.all(Obj).setCapture()
pX=event.x-document.all(Obj).style.pixelLeft;
pY=event.y-document.all(Obj).style.pixelTop;
}

function MMove(){
if(Obj!=''){
  document.all(Obj).style.left=event.x-pX;
  document.all(Obj).style.top=event.y-pY;
  }
}

function MUp(){
if(Obj!=''){
  document.all(Obj).releaseCapture();
  Obj='';
  }
}

function openWithIframe(tit,url,w,h){
massage_box.style.left = (screen.width - w) / 2-100;
massage_box.style.top = (screen.height - h) / 2-100;
massage_box.style.screenx = (screen.width - w) / 2-100;//仅适用于Netscape
massage_box.style.screeny = (screen.height - h) / 2-100;//仅适用于Netscape
massage_box.style.width = w+"px";
massage_box.style.height = h+"px";
pop_title.innerHTML=tit;
mask.style.display='';
massage_box.style.display=''
var popiframe='<iframe src="'+url+'" width="'+(w-12)+'px"  height="'+(h-37)+'px" frameborder=0 scrolling=no></iframe>';
pop_iframe.innerHTML=popiframe;
}
function closeWithIframe(){
massage_box.style.display="none";
mask.style.display="none";
}

document.write('<div id="massage_box" style="position:absolute; FILTER: progid:DXImageTransform.Microsoft.DropShadow();z-index:100;display:none">');
document.write('<div style="border-width:1 1 3 1; width:100%; height:100%; background:#fff; color:#004080; font-size:12px; line-height:150%">');
document.write('<div onmousedown=MDown(massage_box) style="background:#004080; height:20px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;color:#fff;cursor:move;padding:0 0 4px 0">');
document.write('<div style="display:inline; width:150px; position:absolute;padding:3px 0 0 5px" id=pop_title></div>');
document.write('<span onClick="closeWithIframe()" style="float:right; display:inline; cursor:hand;padding:5px;font-size:14px"><img src="../images/other/close.gif"></span>');
document.write('</div>');
document.write('<div style="padding:5px" id=pop_iframe></div>');
document.write('</div>');
document.write('</div>');
document.write('<div id="mask" style="position:absolute; top:0; left:0; width:expression(body.scrollWidth); background:#666; filter:ALPHA(opacity=60); z-index:1; display:none;height:100%"></div>');
//ajax提示框功能========================================

//--层效果
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->