function selectChannel(cid){
	if(cid=='/qrjh/section/2?m=more'){
    	location.href = '/qrjh/section/2?m=more';
    }else if(cid != 0){
	    location.href = '/qrjh/channel/'+cid;
    }
    return;
}

function selectChannel2(url)
{
	if(url){
		window.location.href=url;
	}
}
function trim(str){
	return (str + '').replace(/(\s+)$/g , '').replace(/^\s+/g , '');
}
/*
清除html
*/
function cleanHTML(str)
{   str = str.replace(/&nbsp;/gi,"");
	return str.replace(/<[^>].*?>/gi,"");
}

var userAgent = navigator.userAgent.toLowerCase();
var is_webtv = userAgent.indexOf('webtv') != -1;
var is_kon = userAgent.indexOf('konqueror') != -1;
var is_mac = userAgent.indexOf('mac') != -1;
var is_saf = userAgent.indexOf('applewebkit') != -1 || navigator.vendor == 'Apple Computer, Inc.';
var is_opera = userAgent.indexOf('opera') != -1 && opera.version();
var is_moz = (navigator.product == 'Gecko' && !is_saf) && userAgent.substr(userAgent.indexOf('firefox') + 8, 3);
var is_ns = userAgent.indexOf('compatible') == -1 && userAgent.indexOf('mozilla') != -1 && !is_opera && !is_webtv && !is_saf;
var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera && !is_saf && !is_webtv) && userAgent.substr(userAgent.indexOf('msie') + 5, 3);
var ie_ver = userAgent.substr(userAgent.indexOf('msie') + 5, 3);

function isIE(){
    var userAgent = navigator.userAgent.toLowerCase();
    return (userAgent.indexOf('msie') != -1 && !is_opera && !is_saf && !is_webtv) && userAgent.substr(userAgent.indexOf('msie') + 5, 3);;
}

function set_se(){
   	if(isIE()){
   		addIndexIE();
   	}else{
   		addIndexFF();
   	}
}

function addIndexIE(){
    var add = document.getElementById('add');
    add.style.behavior= 'url(#default#homepage)';
    add.setHomePage('http://www.1000plan.org/');
}

function addIndexFF(){
    if(document.all){
	    document.body.style.behavior='url(#default#homepage)';
	    document.body.setHomePage('http://www.1000plan.org/');
    }else if(window.sidebar){
	    if(window.netscape){
		    try{
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
				alert('是否将“http://www.1000plan.org/”设为主页？');
			}
			catch(e){
				alert('this action was aviod by your browser，if you want to enable，please enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true');
			}
		}
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
		prefs.setCharPref('browser.startup.homepage','http://www.1000plan.org/');
	}
}

function check_search_job()
	{   //job_keyword = document.getElementById('job_keyword').value;
		job_plan = document.getElementById('job_plan').value;
		job_back = document.getElementById('job_back').value;
		job_field = document.getElementById('job_field').value;
		if(job_plan==0 && job_back==0 && job_field==0){
			alert('请输入检索条件');
			return false;
		}else{
			document.getElementById('search').submit();
		}
	}
	
function delete_alert(type){
	if(type == "section"){
		return confirm('网站分区是网站内容系统的重要组成部分,操作错误会导致网站无法正常运行,并且一经删除,无法恢复,你确定要执行此操作吗?');
	
	}else if(type == "category"){
		return confirm('计划类别是网站内容系统的重要组成部分,操作错误会导致网站无法正常运行,并且一经删除,无法恢复,你确定要执行此操作吗?');
	
	}else if(type == "article"){
		return confirm('文章类别是网站内容系统的重要组成部分,操作错误会导致网站无法正常运行,并且一经删除,无法恢复,你确定要执行此操作吗?');
	
	}else if(type == "job"){
		return confirm('招聘计划是网站招聘系统的重要组成部分,操作错误会导致网站无法正常运行,并且一经删除,无法恢复,你确定要执行此操作吗?');
	
	}else if(type == "huiguo"){
		return confirm('回国方式是网站招聘系统的重要组成部分,操作错误会导致网站无法正常运行,并且一经删除,无法恢复,你确定要执行此操作吗?');
	
	}else if(type == "domain"){
		return confirm('领域类别是网站招聘系统的重要组成部分,操作错误会导致网站无法正常运行,并且一经删除,无法恢复,你确定要执行此操作吗?');
	}
}
