<!--
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

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_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];}
}

//定义XMLHttpRequest对象
function send_request(url,date,processRequest,type){
 	http_request=false;
 	//开始初始化XMLHttpRequest对象
 	if(window.XMLHttpRequest){//Mozilla等浏览器初始化XMLHttpRequest过程
 		http_request=new XMLHttpRequest();
 		//有些版本的Mozilla浏览器处理服务器返回的未包含XML mime-type头部信息的内容时会出错.
 		//因此,要确保返回的内容包含text/xml信息.
 		if(http_request.overrideMimeType){
 			http_request.overrideMimeType("text/xml");
 		}
 	}
 	else if(window.ActiveXObject){//IE浏览器初始化XMLHttpRequest过程
 		try{
 			http_request=new ActiveXObject("Msxml2.XMLHTTP");
 		}
 		catch(e){
 			try{
 				http_request=new ActiveXObject("Microsoft.XMLHTTP");
 			}
 			catch(e){}
 		}
 	}
 	//异常,创建对象失败
 	if(!http_request){
 		window.alert("不能创建XMLHttpRequest对象实例!");
 		return false;
 	}
 	//指定响应处理函数
 	http_request.onreadystatechange=processRequest;
 	//发送HTTP请求信息
 	http_request.open("GET",url,type);
 	http_request.send(date);
 }
 function send_requestform(url,date,processRequest,type){
 	document.getElementById("InfoPassOrNotPassForm").action=url;
 	document.getElementById("InfoPassOrNotPassForm").submit();
 }
 //过滤字符
	function I_C_Convert(sStr){
			a="\n";
			b="<br/>";
			re=new RegExp(a,"ig");
			sStr=(""+sStr).replace(re,b);
			a="\r";
			b="";
			re=new RegExp(a,"ig");
			sStr=(""+sStr).replace(re,b);			
			return sStr;
		}
//反转字符
	function I_N_Reverse(sStr){
			a="<br/>";
			b="\n";
			re=new RegExp(a,"ig");
			sStr=(""+sStr).replace(re,b);
			a="";
			b="\r";
			re=new RegExp(a,"ig");
			sStr=(""+sStr).replace(re,b);			
			return sStr;
		}
/*
 *    function chooseRow(obj[,multi_mode[,absolute_select[,change_color,[orig_color]]]])
 *
 * 功能：公用行选择函数
 * 输入参数：
 *   obj : 当前操作行
 *   multi_mode:   单选(false)多选(true)模式，单选模式选中行后将会清除其他行，多选模式则可以选择多行，并且支持Shift操作。默认多选
 *   absolut_select: 绝对选择，默认为false。当为真时，则点击即选中，而不是修改状态(通常给双击事件调用)
 *   change_color: 选中行颜色，默认(#D8D6C7 --> #DDDDDD)
 *   orig_color:   背景色，默认(#FCFCED --> #FFFFFF)
 * 输出参数：
 *   改变行的myslted属性(行需要定义myslted属性，初始值false) ，以及样式
 * 注意：
 *   shift选择行时会导致页面文本也被选中，可以通过屏蔽onselectstart解决
 *   document.onselectstart=new Function('event.returnValue=false;');
 * 修改记录：
 *时间            作者         内容
 * ---------------------------------------------------
 *2004-11-10      朱建军        创建函数
 *2004-11-30      朱建军        根据新配色方案修改默认颜色
 */
var chooseRow_currRow = null;
function chooseRow(obj,multi_mode,absolut_select,change_color,orig_color){
  //init parameter
	if(obj == null || obj == undefined)
  		return false;
	if(obj.tagName != "TR")
		return false;
	if(orig_color == null || orig_color == undefined)
		orig_color = "#FFFFFF";
	if(change_color == null || change_color == undefined)
		change_color = "#E0E0E0";
	if(multi_mode == null || multi_mode == undefined)
	  multi_mode = true;
	if(absolut_select == null || absolut_select == undefined)
	  absolut_select = false;
  //get table
	oTable=window.event.srcElement;
	while(oTable.tagName!='TABLE'){
		oTable=oTable.parentElement;
	}
  //action
  if(multi_mode){//多选模式，需要区分shift事件
	  var i_begin=i_end=obj.rowIndex;
	  //shift操作，将两次选择点中间的表格行置选中
  	if(event.shiftKey){
		  //shift
		  if(chooseRow_currRow != null){
  			if(chooseRow_currRow.rowIndex < obj.rowIndex){
  				i_begin = chooseRow_currRow.rowIndex;
  				i_end = obj.rowIndex;
			 }else{
  				i_end = chooseRow_currRow.rowIndex;
  				i_begin = obj.rowIndex;
			 }
		  }else{
  			return false;
	   	}
  		for(var i=i_begin;i<=i_end;i++){
  				oTable.rows[i].style.backgroundColor = change_color;
  				oTable.rows[i].myslted = true;
  		}
  	}
    //如果单纯的鼠标右击
    if(!event.shiftKey){
      //改变当前行
      obj.myslted = ! (obj.myslted==true) || absolut_select;
      obj.style.backgroundColor = obj.myslted ? change_color : orig_color;
      chooseRow_currRow = obj;
  	}
  }else{//单选模式
 		//先将表格所有行状态销空
 		for(var i=1;i<oTable.rows.length;i++){
 			if(oTable.rows[i].myslted){
 				oTable.rows[i].style.backgroundColor = orig_color;
 				oTable.rows[i].myslted = false;
 			}
 		}
 		//改变当前行
    obj.myslted = ! (obj.myslted==true) || absolut_select;
    obj.style.backgroundColor = obj.myslted ? change_color : orig_color;

  }
}

//全选
function checkAll(){
	if(document.getElementById("checkAll").checked){
		document.getElementById("checkAll").title="取消全选";
		for(var i=0;i<document.getElementById("checkBoxCount").value;i++){
			
			document.getElementById("checkUser"+i).checked=true;
			
			
		}
	}else{
		document.getElementById("checkAll").title="全选";
		for(var i=0;i<document.getElementById("checkBoxCount").value;i++){
			
			document.getElementById("checkUser"+i).checked=false;
			
			
		}
		
	}
	
} 

//导出到EXCEL
function ExportExcel(type,strTemp){
	if(!confirm("确定导出到EXCEL?")){
		return false;
	}
	if(type=="multi"){
	 	var strTemp="";
		for(var i=0;i<document.getElementById("checkBoxCount").value;i++){
		
			if(document.getElementById("checkUser"+i).checked){
				
				strTemp+=document.getElementById("checkUser"+i).value+",";
				
			}
			
		}
		strTemp=strTemp.substr(0,strTemp.length-1);
	}
	if(strTemp==null || strTemp.length==0){
		alert("您还没有选择将要导出的记录，请检查！");
		return false;
	}
	createSubmitFrame();
	window.open("/supcon/jsp/admin/CampusInvite/ExportToExcel?UserIDsParam="+strTemp,"SubmitFrame");
	
}
//发送短信
function SendMsg(type,strTemp){
	if(!confirm("确定要发送短信吗?")){
		return false;
	}
	if(type=="multi"){
	 	var strTemp="";
		for(var i=0;i<document.getElementById("checkBoxCount").value;i++){
		
			if(document.getElementById("checkUser"+i).checked){
				
				strTemp+=document.getElementById("MobilePhone"+i).value+",";
				
			}
			
		}
		strTemp=strTemp.substr(0,strTemp.length-1);
	}
	document.all.TelCode.value=strTemp;
	
}
//产生一个iframe
function createSubmitFrame(){
    if(document.all("SubmitFrame"))
        document.body.removeChild(document.all("SubmitFrame"));
    var oIframe=document.createElement("<iframe style='height:0px;width:0px;' name='SubmitFrame'/>");
    document.body.appendChild(oIframe);
}

function jsTrim( strInput )
{
	return strInput.replace(/^\s+|\s+$/g,"")
}


			
//-->