﻿
function killErrors() {
return true;
}
window.onerror = killErrors;


function ShowPic(id) {

  var winClose = 0;
  if (window.viewimage != null && ! viewimage.closed)
  {
    viewimage.close();
    winClose = 1;
  }

  if (window.viewimage == null || viewimage.closed || winClose)
  {
	url="ClassAlbum.asp?Action=ShowPhoto&PhotoID="+id;
    var w_opt="width=720,height=600,resizable=0,scrollbars=1,menubar=0,status=1";
    viewimage=window.open(url,"Preview",w_opt);

    if (window.viewimage != null)
      viewimage.focus();
  }

}


function openScript(url, width, height){
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=no' );
}


function PopWindow()
{ 
openScript('messanger.asp?action=newmsg',420,320); 
}


function DoTitle(addTitle) { 
var revisedTitle; 
var currentTitle = document.frmgbk.title.value; 
revisedTitle = currentTitle+addTitle; 
document.frmgbk.title.value=revisedTitle; 
document.frmgbk.title.focus(); 
return; }

function strlength(str)
{
var l=str.length;
var teststr="ͬѧ¼";
var t=l;
if (teststr.length==3){
for(i=0;i<l;i++){
		thischar=str.charCodeAt(i);		
		if(thischar>255){
		t=t+1;}
	}
}
return t;

}



var ie = (document.all)? true:false
if (ie){function ctlent(eventobject){if(event.ctrlKey && window.event.keyCode==13){this.document.frmgbk.submit();}}}

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}


function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }


function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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;
}


<!--
// Scrolling message settings
var MessageText = "校友交流Q群[1]:2593288[毕业] Q群[2]:15124458[学生] 各容纳200人！"
var DisplayLength = 260
var pos = 1 - DisplayLength;
function ScrollInStatusBar(){
var scroll = "";
pos++;
if (pos == MessageText.length) pos = 1 - DisplayLength;
if (pos<0) {
for (var i=1; i<=Math.abs(pos); i++)
scroll = scroll + "";
scroll = scroll + MessageText.substring(0, DisplayLength - i + 1);
}
else
scroll = scroll + MessageText.substring(pos, pos + DisplayLength);
window.status = scroll;
//Scrolling speed
setTimeout("ScrollInStatusBar()",0);
}
ScrollInStatusBar()
//-->

