function strim(str){
  lIdx=0;
  rIdx=str.length;
  if(strim.arguments.length==2){
    act=strim.arguments[1].toLowerCase();
    alert(act);
  }
  else{
    act="all";
  }
  for(var i=0;i<str.length;i++){
    thelStr=str.substring(lIdx,lIdx+1);
    therStr=str.substring(rIdx,rIdx-1);
    if ((act=="all" || act=="left")&&thelStr==" "){
      lIdx++;
    }
    if ((act=="all" || act=="right")&&therStr==" "){
      rIdx--;
    }
  }
  str=str.slice(lIdx,rIdx);
  return(str);
}




  function inerr(f,n){
    if(f.value=="" || f.value==null){
      alert(n);
      f.focus();
      return true;
    }
    else
      return false;
  }
  
  
  function StrLen(sString)
{
 var sStr,iCount,i,strTemp ;
 iCount = 0 ;
 sStr = sString.split("");
 for (i = 0 ; i < sStr.length ; i ++)
  {
      strTemp = escape(sStr[i]); 
   if (strTemp.indexOf("%u",0) == -1) //  表示是汉字
   { 
   iCount = iCount + 1 ;
   } 
   else 
   {
   iCount = iCount + 2 ;
   }
 }
return iCount ;
}


function contain(str,charset)// 字符串包含测试函数
{
var i;
for(i=0;i<charset.length;i++)
if(str.indexOf(charset.charAt(i))>=0)
return true;
return false;
}


function showSysMessage(pID){
var pID=pID;
window.open ('../SysMessage.asp?pID='+pID+'','','scrollbars=yes,resizable=no,menubar=no,width=516,height=600,top=30,left=250');
}

function showShare(nID){
var nID=nID;
window.open ('studentShare.asp?nID='+nID+'','','scrollbars=yes,resizable=no,menubar=no,width=516,height=600,top=30,left=250');
}

function showShare2(nID){
var nID=nID;
window.open ('../studentShare.asp?nID='+nID+'','','scrollbars=yes,resizable=no,menubar=no,width=516,height=600,top=30,left=250');
}

function showNews(nID){
var nID=nID;
window.open ('news.asp?nID='+nID+'','','scrollbars=yes,resizable=no,menubar=no,width=516,height=600,top=30,left=250');
}
function showwindow(url){
window.open ('student/s_reg.asp');
}
function showBaomingbidu(btID){
var btID=btID;
window.open ('baoming_bidu.asp?btID='+btID+'','','scrollbars=yes,resizable=no,menubar=no,width=516,height=600,top=30,left=250');
}

                                                                              