$(document).ready(function(){
   $("li").click(function(event){
     	var code = $(this).attr('id');
     	var toggle='N'              ;
        var ypo=0;         
        var baseid=$(this).attr('id');
// dim previous lite  sons 
 	$("li").each(function (i) {
        	if ($(this).attr("son") =='Y' && $(this).attr("name") != baseid && $(this).css("display") =='block')
                {    
                	$(this).hide();	
		}

        });
// end 
        $("li").each(function (i) {
                var name = $(this).attr("name");
                var id1 =   $(this).attr("id");
     		if (code == name ) 
	{
                        var ybase =$(this).attr("yxbasecnt");

       			$(this).css('position','absolute');
   		     	$(this).toggle("slow");
                        //ybase =$(this).attr("yxbasecnt") ;
                        //alert('debug sie '+ybase);
             		toggle ='Y';          
// lateral pos 
                                             
     			$(this).css('left','283px');
     			$(this).css('z-index','8');
                        if ( isNaN($(this).css('top')) ) {$(this).css('top',ybase+'px') }   
                        //var ypos=  parseInt($(this).css('top')) +parseInt(ypo);
                        //alert(ypos);
                        //if ($(this).attr("yxbasecnt") == '0')
                        //{
                        //var yposputa=ypos +'px';  
                        //alert(ypos);
                        //$(this).css('top',yposputa);
                        //var position = $(this).position();
                         ybase =ybase +24;
                   	//$(this).attr("yxbasecnt",ypos); 
                        //ypo=ypo+24;
                        //}
                        //else 
                        //{
                        //        tmpx = $(this).attr("yxbasecnt");
			//	$(this).css('top',tmpx);

                        //}

                        
     		}
                else {ypo =0}     
     		if (toggle =='Y') event.preventDefault();
        });
   });

 });


