
function layshow() {
   alert("tys");
}

function layshow(Obj_Lay) {
   //var Obj_Lay;
   //Obj_Lay=eval('m1'+'.style');
   Obj_Lay.style.left=event.clientX-2;
   Obj_Lay.style.top=event.clientY-1;
   Obj_Lay.style.visibility='visible';
}

function layhide(Obj_Lay) {
   //var Obj_Lay;
   //Obj_Lay=eval('m1'+'.style');
   Obj_Lay.style.visibility='hidden';
}

function nwin(turl,wd,hd) {
   tt=(screen.height-hd)/2;
   ll=(screen.width-wd)/2;
   winn=window.open(turl,"","scrollbars=yes,resizable=yes,status=no,width="+wd+",height="+hd+",top="+tt+",left="+ll);
   winn.focus();
   return false;
}

function swaypic(pic,p) {
   if (pic!=null) {pic.src=p;}
}

function GetFileType(fn) {
   if (fn=="") {tfn="";}
   else {
      i=fn.length;
      tem=fn.substring(i-3,i);
      tem=tem.toLowerCase();
	  tfn=tem;
   }
   return tfn;	  
}

function showpic(url) {
   var npic=new Image();
   npic.src=url;
   wd=npic.width+24;
   hd=npic.height+24;
   tt=(screen.height-hd)/2;
   ll=(screen.width-wd)/2;
   winn=window.open("showpic.asp?url="+url,"","scrollbars=no,resizable=no,status=no,width="+wd+",height="+hd+",top="+tt+",left="+ll);
   winn.focus();
   return false;   
}

function sendinf(sus) {
   window.open("/Schoolweb/SendInf/default.asp?user="+sus,"","width=400,height=215,top="+(screen.height-215)/2+",left="+(screen.width-400)/2);
   return false;
}

function tg(CaseID) {
   nwin("/SchoolWeb/Main/UpLoad.asp?CaseID=" + CaseID,"500","300");
   return false;
}


function showmenu(n,wd,pic) {
   swaypic(eval("menu0"+n),pic+"menu_0"+n+"_1.gif");
   MenuStr="<div ID='Menu'>";
   MenuStr=MenuStr+"<table border=0 cellpadding=0 cellspacing=0";
   if (n>=4) {MenuStr=MenuStr+" align=right";}
   MenuStr=MenuStr+"><tr><td width='"+wd+"'>&nbsp;</td>";
   MenuStr=MenuStr+"<td>"+eval("m"+n)+"</td>";
   MenuStr=MenuStr+"</tr></table></div>";
   if (n==1) {menuid.innerHTML=curtime;}
   else {menuid.innerHTML=MenuStr;}
  
}

function hidemenu(n,pic) {
  swaypic(eval("menu0"+n),pic+"menu_0"+n+"_0.gif");
}

function reimgsize()
{
	for (i=0;i<document.images.length;i++)
	{
		if (document.images[i].width>500)
		{
			document.images[i].width=500;
		}
	}
}

//改变图片大小
function resizepic(thispic)
{
if(thispic.width>450){thispic.height=thispic.height*500/thispic.width;thispic.width=500;} 
}
//无级缩放图片大小
function bbimg(o)
{
  var zoom=parseInt(o.style.zoom, 10)||100;
  zoom+=event.wheelDelta/12;
  if (zoom>0) o.style.zoom=zoom+'%';
  return false;
}

 function openwin(url,width,height)
    {
      window.open(url,"","width="+width+",height="+height+",scrollbars=yes,resizable=no,toolbar=no,menubar=no,status=no,left=160,top=20")
    } 
