function lsActivate(obj){
	//alert(obj);
	//$('catland_selected').style.display='none';
	//$('catland_selected').parentNode.className='';	
	var i;
	var idnum = obj.id.split("lsl")[1];
	
	for(i=0; i<lscids.length; i++){
		//alert(lscids[i]);
		$('bb'+lscids[i]).style.display = 'none';
		$('lsl'+lscids[i]).parentNode.className = '';
	}
	$('lslall').parentNode.className = '';
	$('bball').style.display = 'none';
	
	$('lsl'+idnum).parentNode.className = 'catland_selected';
	$('bb'+idnum).appear({ duration: 0.5 });
}

function lsShowAll(){
	for(i=0; i<lscids.length; i++){
	//	alert(lscids[i]);
		$('bb'+lscids[i]).style.display = 'none';
		$('lsl'+lscids[i]).parentNode.className = '';
	}
	$('lslall').parentNode.className = 'catland_selected';
	$('bball').appear({ duration: 0.5 });
}

function intval( mixed_var, base ) {
	var tmp;
 
    var type = typeof( mixed_var );
 
    if(type == 'boolean'){
        if (mixed_var == true) {
            return 1;
        } else {
            return 0;
        }
    } else if(type == 'string'){
        tmp = parseInt(mixed_var * 1, 10);
        if(isNaN(tmp) || !isFinite(tmp)){
            return 0;
        } else{
            return tmp.toString(base || 10);
        }
    } else if(type == 'number' && isFinite(mixed_var) ){
        return Math.floor(mixed_var);
    } else{
        return 0;
    }
}
