// JavaScript Document
<!--
document.write('<div id="main" style="position:absolute;display:none;cursor:default;filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=60);opacity:0.6;-moz-opacity:0.6;-khtml-opacity:0.6; left:30px; top:20px; width:480px; height:335px; z-index:10; background-color: #eeeeee; border: 1px none #000000;padding:10px;"> ');
document.write('</div>');
document.write('<div id="box" style="position:absolute;display:none; left:247px; top:99px; width:188px; height:179px; z-index:20; padding:0px;">');
document.write('<table width="100%" border="0" height="100%" cellpadding="2" cellspacing="2" class="boxside"><tr><td height="18" width="99%" align="left" onmousedown="hitobj(event);" onmousemove="moveobj(event,box);" onmouseup="releasem();" onmouseout="releasem();" id="dg_title" style="font-bold:true;font-size:10pt;cursor:move;"></td><td id="bclose" align="right" style="cursor:pointer;width:16px;" onclick="javascript:closebox();">×</td></tr>');
document.write('<tr><td id="content" colspan="2" valign="top" align="center" height="100%" bgcolor="#ffffff">');
document.write('</td></tr></table>');
document.write('</div>');
function showselect(objstr,objform,url,sname,sm,title,tframe){
var dlg='  <iframe id="dialog" name="dialog" frameborder="0" scrolling="auto" width="100%" height="100%" src=""></iframe>';
  fullsc();
  $("content").innerHTML=dlg;
  var dialog=$("dialog");
  if(!title)title="选择列表";
  if(!tframe)tframe="window.parent";
  $("dg_title").innerHTML=title;
	var box=$("box")
	box.style.width=600;//document.body.clientWidth-40;
	box.style.height=450;
  showbox();
  if(objstr.length>0){
     url+="?objstr="+objstr;
	 if(objform.length>0)url+="&objform="+objform;
  }else{
	 if(objform.length>0)url+="&objform="+objform;
  }
  url=url+"&sname="+sname+"&smulti="+sm+"&tframe="+tframe;
  //alert(url);
  dialog.src=url;
}
function showinfo(content,title,color){
  fullsc();
  if(!title||title.length<1)title="提示信息";
  $("dg_title").innerHTML=title;
  if(!color||color.length<1)color="blue";
  $("content").innerHTML='<div style="color:'+color+';">'+content+'</div><br><br><input id="button_cancel" type="button" onclick="closebox();"  value="确定" />';
  var box=$("box");
  box.style.width=300;
  box.style.height=160;
  showbox();
}
function showurl(url,title){
var dlg='  <iframe id="dialog" name="dialog" frameborder="0" scrolling="auto" width="100%" height="100%" src=""></iframe>';
  fullsc();
  if(!title||title.length<1)title="提示信息";
  $("dg_title").innerHTML=title;
  url=url.toLowerCase();
  if((url.indexOf("jpg")>-1)||(url.indexOf("jpeg")>-1)||(url.indexOf("gif")>-1)||(url.indexOf("png")>-1)){
	  showimg(url,title);
	  return false;
  }else{
	  $("content").innerHTML=dlg;
	  $("dialog").style.height=360;
	  $("dialog").src=url;
	  $("box").style.width=600;
	  $("box").style.height=360;
  }
  $("bclose").style.display='';
  showbox();
}
function showimg(url,title){
  fullsc();
  if(!title||title.length<1)title="查看图片";
  $("dg_title").innerHTML=title;
  url=url.toLowerCase();
  if((url.indexOf("jpg")>-1)||(url.indexOf("jpeg")>-1)||(url.indexOf("gif")>-1)||(url.indexOf("png")>-1)){
	  $("content").innerHTML='<img src="'+url+'" border="0" onload="setimgsize(this,800);" />';
  }
  $("bclose").style.display='';
  $("box").style.width=600;
  $("box").style.height=360;
  showbox();
}
function showdialog(url,content,title,color,dtype,tframe){
//dtype=0普通提示，有确定按纽,dtype=1询问模式，有确定和取消按纽
  fullsc();
  if(!title||title.length<1)title="提示信息";
  $("dg_title").innerHTML=title;
  if(!color||color.length<1)color="blue";
  if(!tframe)tframe="window.parent";
  if(!eval(tframe))tframe="window.parent";
  var sstr='<div style="color:'+color+';" align="center">'+content;
  if(!dtype||dtype==0){
    if(!url||url.length<1){
	  sstr+='<br><br><input id="button_cancel" type="button" onclick="history.go(-1);closebox();"  value="确定" />';
	}else{
	  sstr+='<br><br><input id="button_cancel" type="button" onclick="'+tframe+'.location=\''+url+'\';closebox();"  value="确定" />';
	}
  $("bclose").style.display='none';
  }else{
  sstr+='<br><br><input type="button" id="button_ok" onclick="'+tframe+'.location=\''+url+'\';closebox();"  value="确定" />';
  sstr+='&nbsp;<input id="button_cancel" type="button" onclick="closebox();"  value="取消" />';
  $("bclose").style.display='';
  }
  sstr+='</div>';
  $("content").innerHTML=sstr;
  var box=$("box");
  box.style.width=300;
  box.style.height=160;
  showbox();
}
function showbox(){
  var main=$("main");
  var box=$("box");
  main.style.display="";
  box.style.display="";
  centerobj(box);
}
function fullsc(){
  var main=$("main");
  var box=$("box");
  var sw=document.body.clientWidth;
  var sh=document.body.clientHeight;
  var hh=document.body.scrollHeight;
  if(sh<hh)sh=hh;
  if(!IE){
    sw=sw-20;
	sh=sh-20;
  }
  main.style.left=0;
  main.style.top=0;
  main.style.width=sw;
  main.style.height=sh;
}
function closebox(){
  $("main").style.display="none";
  $("box").style.display="none";
  $("content").innerHTML="";
  var dlg=$("dialog");
  if(dlg)dlg.src="";
}
function centerobj(obj){
  var sw=document.body.clientWidth;
  var sh=document.body.clientHeight;
  var ow=obj.style.width;
  var oh=obj.style.height;
  var sl=parseInt((parseInt(sw)-parseInt(ow))/2);
  var st=parseInt((parseInt(sh)-parseInt(oh))/2);
  var tt=top.document.body.scrollTop||top.document.documentElement.scrollTop||top.window.pageYOffset||0;
  obj.style.left=sl;
  obj.style.top=st+tt;
}
-->
