//<script language="javascript">
//<!--
function isin( v, a ) { 
	for( i = 0 ; i < a.length ; i++ ) if( v == a[i] ) return true ; 
	return false ; 
}

function showoptions( sValue ) {
	with ( document.forms["fagenda"] ) { 
		opt1[0].checked = true ; 
		opt1[0].checked = false ; 
		opt21[0].checked = true ; 
		opt21[0].checked = false ; 
		opt22[0].checked = true ; 
		opt22[0].checked = false ; 
		opt31[0].checked = true ; 
		opt31[0].checked = false ; 
		opt32[0].checked = true ; 
		opt32[0].checked = false ; 
		opt41[0].checked = true ; 
		opt41[0].checked = false ; 
		opt42[0].checked = true;
		opt42[0].checked = false
		resultado.value = sValue ; 
	} 

	tg('dv_agendas',false) ; 
	tg('dv_cadernos',false) ; 
	tg('dv_calendario',false) ; 
	tg('dv_pastas',false) ; 
	tg('dv_kits_executivos',false) ; 
	tg('dv_risque_rabisque',false) ; 
	tg('dv_porta_cartao',false) ; 
	tg('dv_bloco_anotacoes',false) ; 
	tg('dv_soft_baralhos',false) ; 
	tg('dv_soft_produtos',false) ; 
	tg('dv_projetos',false) ; 
	tg('dv_cristao',false) ; 
	tg('dv1',false);
	tg('dv2',false);
	tg('dv3',false);
	tg('dv4',false);
	tg('dv11',false) ; 
		
	if( isin( sValue, new Array( "1","11","12","13","14","14-1","14-2","15","16","16-1","16-2" ) ) ) { 
		tg('dv_agendas', true); 
	}
	
	if( isin( sValue, new Array( "11" ) ) ) { 
		tg('dv11', false); 
	}
	
	if( isin( sValue, new Array( "11-1","11-2" ) ) ) { 
		tg('dv_agendas', false); tg('dv11', false); 
	}
	
	if( isin( sValue, new Array( "11-3","11-4","11-5","11-6","11-7","11-8" ) ) ) { 
		tg('dv_agendas', false); tg('dv11', false); tg('dv1', false); 
	}
	
	if( isin( sValue, new Array( "13-1","13-2" ) ) ) { 
		tg('dv_agendas', true); tg('dv2', false); 
	}
	
	if( isin( sValue, new Array( "15" ) ) ) { 
		tg('dv3', false); 
	}
	
	if( isin( sValue, new Array( "122" ) ) ) { 
		tg('dv4', true); 
	}
	
	if( isin( sValue, new Array( "2","26-1","26-2","26-2-1","26-2-2","26-2-3" ) ) ) {
		tg('dv_cadernos', true) ; 
	}
	
	if( isin( sValue, new Array( "3","31","32" ) ) ) { 
		tg('dv_calendario',true) ; 
	}
	
	if( isin( sValue, new Array( "4","41","41-1","41-2","41-3","42","43","44","45" ) ) ) {
		tg('dv_pastas',true) ; 
	}

	if( isin( sValue, new Array( "5","51","52" ) ) ) { 
		tg('dv_kits_executivos',true) ; 
	}
	
	if( isin( sValue, new Array( "6","61","62" ) ) ) { 
		tg('dv_risque_rabisque',true) ; 
	}
	
	if( isin( sValue, new Array( "7","71","72" ) ) ) { 
		tg('dv_porta_cartao',true) ;  
	}
	
	//if( isin( sValue, new Array( "8" ) ) ) { 
	//	tg('dv_bloco_anotacoes',true) ;  
	//}
	
	if( isin( sValue, new Array( "9","91","92","93","94","95" ) ) ) { 
		tg('dv_soft_baralhos',true) ;  
	}
	
	if( isin( sValue, new Array( "A10","101","102","103","104","105","106" ) ) ) { 
		tg('dv_soft_produtos',true) ;  
	}
	
	if( isin( sValue, new Array( "A11","111","112","113","114","115","116" ) ) ) { 
		tg('dv_projetos',true) ;  
	}
	
	if( isin( sValue, new Array( "A12","121","121-1","121-2","121-3","121-4","122" ) ) ) { 
		tg('dv_cristao',true) ; 
	}

}

function tg(fname,visible){
	sl(fname,visible) ; sd(fname,visible) ;
}

function sl(fname,visible){
	if (document.layers) { 
		if( visible ) { s = 'show' ; b = 'block' ; } else { s = 'hide' ; b = 'none' ; }
		document.layers[eval('"'+fname+'"')].visibility = s ;
	} else if (document.all) { 
		if( visible ) { s = 'visible' ; b = 'block' ; } else { s = 'hidden' ; b = 'none' ; }
		document.all[eval('"'+fname+'"')].style.visibility = s ;
	} else if (document.getElementById) { 
		if( visible ) { s = 'visible' ; b = 'block' ; } else { s = 'hidden' ; b = 'none' ; }
		document.getElementById(eval('"'+fname+'"')).style.visibility = s ;
	}
}

function sd(fname,b){
	(b) ? s = 'block' : s = 'none' ;
	if (document.layers) document.layers[eval('"'+fname+'"')].display = s ;
	else if (document.all) document.all[eval('"'+fname+'"')].style.display = s ;
	else if (document.getElementById) document.getElementById(eval('"'+fname+'"')).style.display = s ;
}
//-->
//</script>
