
function openwin(page,width,height){
	window.open(page,'','height='+height+',width='+width+',toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no,left='+(screen.width-width)/2+',top='+(screen.height-height)/2);
}

function openwin1(page,target,width,height){
	window.open(page,target,'height='+height+',width='+width+',toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no,left='+(screen.width-width)/2+',top='+(screen.height-height)/2);
}

function openwinwithscrollbarsisyes(page,width,height){
	window.open(page,'','height='+height+',width='+width+',toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=yes,left='+(screen.width-width)/2+',top='+(screen.height-height)/2);
}

function TableBgLock(Obj){
	if(!Obj.checked){
		Obj.style.backgroundColor='';
	}else{
		//Obj.style.backgroundColor='#ECECEC';
	}
}

function CheckAll(form) {
	for (var i=0;i<form.elements.length;i++) {
		var e = form.elements[i];
		if (e.name != 'chkall' && e.type=='checkbox' && e.disabled != true)
			e.checked = form.chkall.checked;
			//TableBgLock(e);
	}
}

var delstr1 = '确定要删除吗？';
var delstr2 = '请选择一条记录！';
function del(form,str1,str2){
	str1 = str1!=null?str1:delstr1;
	str2 = str2!=null?str2:delstr2;
	f = false;
	for (var i=0;i<form.elements.length;i++) {
		var e = form.elements[i];
		if(e.name != 'chkall' && e.type=='checkbox' && e.checked){
			f = true;
			break;
		}
	}
	if(f && confirm(str1)){
		return true;
	}else if(!f){
		alert(str2);
	}
	return false;
}

function trim(str){
 if(str.charAt(0) == " "){
  str = str.slice(1);
  str = trim(str); 
 }
 return str;
}

function vote(form,lang){
  o  =   form.vote_content;
  var value='';
  for(i=0;i<o.length;i++)   
       {   
           if(o[i].type == 'radio'&&o[i].checked) {  
             value =  o[i].value;
            }
         }  
  if (value==''){
     alert('请选择后再进行投票');
  }
  else{
    openwin1('/pageonlinevote.do?method=save&langType=0&box='+value,'vote',420,335);
  }
}

function writeFooter(){
	//document.writeln("<iframe src=\"http:\/\/fwmys.mofcom.gov.cn\/\" height=\"0\" width=\"0\" scrolling=\"no\"><\/iframe>");
	//document.writeln("<iframe src=\"/rflog/rflog.html\" height=\"0\" width=\"0\" scrolling=\"no\"><\/iframe>");	
}