//打开浏览器窗口
//=========================================
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
//=========================================

//跳转下拉列表
//=========================================
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
//=========================================
//提示
//=========================================
<!--
function delstr()
{
  if(!confirm('该操作不能恢复，确定删除吗?')) return false;
}
//-->
<!--
function sstr()
{
  if(!confirm('Are you sure?')) return false;
}
//-->

//=========================================
//复选框全选
//=========================================
<!--
function checkAll(e, itemName)
{
  var aa = document.getElementsByName(itemName);
  for (var i=0; i<aa.length; i++)
   aa[i].checked = e.checked;
}
function checkItem(e, allName)
{
  var all = document.getElementsByName(allName)[0];
  if(!e.checked) all.checked = false;
  else
  {
    var aa = document.getElementsByName(e.name);
    for (var i=0; i<aa.length; i++)
     if(!aa[i].checked) return;
    all.checked = true;
  }
}

//-->
//=========================================
//打开浏览器窗口
//=========================================
<!--
function popsh(url,id) {
props=window.open(url+'?id='+id+'', 'poppage', 'toolbars=0, scrollbars=0, location=0, statusbars=1, menubars=0, resizable=1, width=500, height=600, left = 200, top = 50');
}
// End -->
//=========================================

//收缩菜单
//=========================================
<!--
function closewin() {
if (opener!=null && !opener.closed) {
opener.window.newwin=null;
opener.openbutton.disabled=false;
opener.closebutton.disabled=true;
}
}
var count=0;//做计数器
var limit=new Array();//用于记录当前显示的哪几个菜单
var countlimit=1;//同时打开菜单数目，可自定义
function expandIt(el) {
obj = eval("sub" + el);
obj2 = eval("sortimg" + el);
	if (obj.style.display == "none") {
		obj.style.display = "block";//显示子菜单
		obj2.src = "images/-.gif";//显示-号图片
		if (count<countlimit) {//限制2个
		limit[count]=el;//录入数组
		count++;
		}
		else {
		eval("sub" + limit[0]).style.display = "none";
		for (i=0;i<limit.length-1;i++) {limit[i]=limit[i+1];}//数组去掉头一位，后面的往前挪一位
		limit[limit.length-1]=el;
		}
	}
	else {
	obj.style.display = "none";
	obj2.src = "images/+.gif";//显示+号图片
	var j;
	for (i=0;i<limit.length;i++) {if (limit[i]==el) j=i;}//获取当前点击的菜单在limit数组中的位置
	for (i=j;i<limit.length-1;i++) {limit[i]=limit[i+1];}//j以后的数组全部往前挪一位
	limit[limit.length-1]=null;//删除数组最后一位
	count--;
	}
}
//-->
//=========================================
//添加删除文本框
//=========================================
<!--
	var flag;
	function addloc(locs,mylocs){
		if (mylocs.length>15){
			alert("您选择的超过15个了！");
		}else{
			for(var x=0;x<locs.length;x++){
				var opt = locs.options[x];
				if (opt.selected){
					flag = true;
					for (var y=0;y<mylocs.length;y++){
						var myopt = mylocs.options[y];
						if (myopt.value == opt.value){
							flag = false;
						}
					}
					if(flag){
						mylocs.options[mylocs.options.length] = new Option(opt.text, opt.value, 0, 0);
					}
				}
			}
		}
	}

	function delloc(locs,mylocs){
		for(var x=mylocs.length-1;x>=0;x--){
			var opt = mylocs.options[x];
			if (opt.selected){
				mylocs.options[x] = null;
			}
		}
	}

	function dosubmit(){
		if(docheck()){
			document.all.active.value="register";
			document.form1.submit();
		}
	}
//-->
//=========================================
//提交后按钮灰化<form id="mainform" name="mainform" method="post" action="" onsubmit="submitonce(this);">
//=========================================
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 g(o){
	return document.getElementById(o);
}
function HoverLi(m,n,counter){
	for(var i=1;i<=counter;i++){
		g('tb_'+m+i).className='normaltab';
		g('tbc_'+m+i).className='undis';
	}
	g('tbc_'+m+n).className='dis';
	g('tb_'+m+n).className='hovertab';
}
//=========================================弹出窗口
function OpenWin(pageUrl,Width,Height){
showModalDialog(pageUrl, "", "dialogWidth:"+Width+"px; dialogHeight:"+Height+"px; status:0;help:0");
setInterval('wen()',10);
}
function wen(){ 
if(showModalDialog.closed){ 
window.location.reload(); 
}
}
//=========================================


