function $104get(obj){
    return typeof(obj)=="object"?obj:document.getElementById(obj);
}

function choice_all(objname,opt){
	var i,V,L,O = document.getElementById(objname);
	if(O){
		L = O.getElementsByTagName("INPUT");
		V = (opt)?1:0;
		for (i=0;i<L.length;++i)
			L.item(i).checked = V;
	}
}

function view_switch(objname,opt){
	var T = document.getElementById(objname);
	if(T) 
		if(opt)
			T.style.display = opt;
		else
			T.style.display = (T.style.display=='')?'none':'';
}

function switch_div(divid,image,imgsrc){
	if(typeof(imgsrc) == "undefined"){
		imgsrc = "img";
	}
	if($104get(divid).style.display == "none"){
		$104get(divid).style.display = "";
		$104get(image).src = imgsrc + '/icon_off.gif';
	}else{
		$104get(divid).style.display = "none";
		$104get(image).src = imgsrc + '/icon_on.gif';
	}
}
function postsocial(cate){
	var url=(_global_basehref)?_global_basehref:location.href;
	url+='&jobsource=104social_';
	var tit=document.title;
	if(cate == 'f'){
		window.open('http://www.facebook.com/share.php?u='.concat(encodeURIComponent(url+cate+'&fn=1')));
	}
	if(cate == 'p'){
		window.open('http://www.plurk.com/?qualifier=shares&status='.concat(encodeURIComponent(url+cate)).concat(' ').concat('(').concat(encodeURIComponent(tit)).concat(')'));
	}
	if(cate == 't')	{
		window.open('http://twitter.com/home/?status='.concat(encodeURIComponent(tit)).concat(' ').concat(encodeURIComponent(url+cate)));
	}
	return false;
}