
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+"_0.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("menu0"+n),pic+"menu_0"+n+"_1.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)
{

  return false;
}

var timer = 0;
var curid = 1;
function displist(cur, total, isauto)
{
	clearTimeout(timer);
	for(var t=1; t<=total; t++)
	{
		var tPic = document.getElementById("pbg"+t);
		var tList = document.getElementById("plist"+t);
		if (tPic != null && tList != null)
		{
			var cFile = tPic.style.backgroundImage;
			cFile = cFile.substring(0, cFile.length-6);
			if (t == cur) { tPic.style.background = cFile+'1.gif)'; tList.style.display = ''; }	
			else { tPic.style.background = cFile+'2.gif)'; tList.style.display = 'none'; }
		}
	}
	if (isauto) { timer=setTimeout("autolist()",6000); }
	return false;
}

function dispdata(name, cur, total)
{
	for(var t=1; t<=total; t++)
	{
		var tList = document.getElementById(name+t);
		if (tList != null)
		{
			if (t == cur) { tList.style.display = ''; }	
			else { tList.style.display = 'none'; }
		}
	}
	return false;
}

function autolist()
{
	if (curid>2) curid = 1;	
	displist(curid, 2, true);
	curid++;	
}
function autoplay(){ timer=setTimeout("autolist()",6000); }



