
function openWin(url) {
    window.open(url, '', 'width=400px, height=220px, resizable=yes, scrollbars=no, left=' + (screen.availWidth-620)/2 + ',top=' + (screen.availHeight-470)/2);
}

function openWin1(url, name) 
{	
    var myWin = window.open(url, name, 'width=400px, height=220px, resizable=yes, scrollbars=no, left=' + (screen.availWidth)/4 + ',top=' + (screen.availHeight)/4);
    myWin.focus();
}

function openWin2(url) 
{	
    var myWin = window.open(url, 'userStatusTree', 'width=400px, height=220px, resizable=yes, scrollbars=no, left=' + (screen.availWidth)/4 + ',top=' + (screen.availHeight)/4);
    myWin.focus();
}

function openWin3(url) 
{	
    var myWin = window.open(url, '', 'width=400px, height=400px, resizable=yes, scrollbars=yes, left=' + (screen.availWidth)/4 + ',top=' + (screen.availHeight)/4);
    myWin.focus();
}

function openWin4(url) 
{	
    var myWin = window.open(url, '', 'width=400px, height=400px, resizable=yes, scrollbars=no, left=' + (screen.availWidth)/4 + ',top=' + (screen.availHeight)/4);
    myWin.focus();
}

function openWin5(url) 
{	
    var myWin = window.open(url, '', 'width=400px, height=500px, resizable=yes, scrollbars=no, left=' + (screen.availWidth + 800)/4 + ',top=' + (screen.availHeight)/4);
    myWin.focus();
}

function openWin6(url) 
{	
    var myWin = window.open(url, '', 'width=600px, height=350px, resizable=yes, scrollbars=no, left=' + (screen.availWidth)/4 + ',top=' + (screen.availHeight)/4);
    myWin.focus();
}

function openWin7(url) 
{	
    var myWin = window.open(url, '', 'width=800px, height=500px, resizable=no, scrollbars=yes,status=no,resizable=no,left=' + (screen.availWidth-600)/4 + ',top=' + (screen.availHeight)/4);
    myWin.focus();
}

function openWin8(url) 
{	
    var myWin = window.open(url, '', 'width=620px, height=350px, resizable=no, scrollbars=yes,status=no,resizable=no,left=' + (screen.availWidth)/4 + ',top=' + (screen.availHeight)/4);
    myWin.focus();
}


function selectAll(form, isCheck) {
	for(var i = 0; i < form.length; i++) {
		var e = form[i];
		if(e.type == "checkbox") {
			e.checked = isCheck;
		}
	}
}

function getChecked(form) {
	for(var i = 0; i < form.length; i++) {
		var e = form[i];
		if(e.type == "checkbox" && e.checked && e.name == "ids") {
			return e.value;			
		}
	}
	return "";
}

function getChecks(form) {
	var ids = "";
	for(var i = 0; i < form.length; i++) {
		var e = form[i];
		if(e.type == "checkbox" && e.checked && e.name == "ids") {
			if(ids != "") {
				ids += ",";
			}
			ids += e.value;			
		}
	}
	return ids;
}

function getRadioChecked(form) {
	for(var i = 0; i < form.length; i++) {
		var e = form[i];
		if(e.type == "radio" && e.checked && e.name == "id") {
			return e.value;			
		}
	}
	return "";
}

function getChecksNum(form){
	var k = 0 ;
	for(var i = 0; i < form.length; i++) {
		var e = form[i];
		if(e.type == "checkbox" && e.checked && e.name == "ids") {
			k += 1 ;
		}
	}
	return k;
}

//友情连接跳转
function gotoUrl(url){
	if (url){
		window.open(url) ;
	}
}

function searchSubmit(form){
  if(form.keyword.value == "") {
	  alert("请填写搜索条件！");
	  form.keyword.focus();
	  return false;
  }
  form.method.value = "find" ;
  form.submit();
}