
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("m"+n),pic+"menu_"+n+"_2.gif");
   MenuStr="<div ID='Menu'>";
   MenuStr=MenuStr+"<table border=0 cellpadding=0 cellspacing=0";
   if (n>=6) {MenuStr=MenuStr+" align=right";}
   MenuStr=MenuStr+"><tr><td width='"+20+"'>&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("m"+n),pic+"menu_"+n+"_1.gif");
}
