function changeState( obj, mainID ){
	
	var tags = document.getElementById( mainID + '_tag' ).getElementsByTagName( 'a' );

	for( var i = 0; i < tags.length; i++ ){
		tags[i].className = '';
		tags[i].setAttribute( 'index', i );
	}
	
	obj.className = 'on';
	
	var listOjb = document.getElementById( mainID + '_list' ).getElementsByTagName( 'ul' );
	
	for( i = 0; i < listOjb.length; i++ ){
		//alert( obj.getAttribute( 'index' ) );
		listOjb[i].style.display = ( obj.getAttribute( 'index' ) == i ) ? 'block' : 'none';
	}
	
	if( document.getElementById( mainID + '_more' ) ){
		document.getElementById( mainID + '_more' ).childNodes[0].href = obj.getAttribute( 'link' );
	}
}

function changeDiv( obj, mainID ){
	var tags = document.getElementById( mainID + '_tag' ).getElementsByTagName( 'a' );
	for( var i = 0; i < tags.length; i++ ){
		tags[i].className = '';
		tags[i].setAttribute( 'index', i );
	}
	obj.className = 'on';
	var listOjb = document.getElementById( mainID + '_list' ).getElementsByTagName( 'span' );
	for( i = 0; i < listOjb.length; i++ ){
		listOjb[i].style.display = ( obj.getAttribute( 'index' ) == i ) ? 'block' : 'none';
	}
	if( document.getElementById( mainID + '_more' ) ){
		document.getElementById( mainID + '_more' ).childNodes[0].href = obj.getAttribute( 'link' );
	}
}

function ShowPrize( idx ){
        var obj = new Array();
        var i = 1;
        
        idx = ( idx <= 0 ) ? 1 : idx;
        idx = ( idx > 5 ) ? 5 : idx;
        
        for( ; i <= 5; i++ ){
            obj[i] = document.getElementById( 'leftnav' + i );
        }
        
        for( i = 1; i < 6; i++){
            if( i == idx ){
                obj[i].style.display = 'block';
            }else{ 
                obj[i].style.display = 'none';
            }
        }
		
		for( i = 1; i <= 5; i++ ){
			obj[i] = document.getElementById( 'leftnavtitle' + i ).childNodes[0];
			//alert( obj[i].tagName );
		}
		
		for( i = 1; i <= 5; i++ ){
			//alert( obj[i].className );
			obj[i].className = ( i == idx ) ? 'on' : 'off';
			//alert( obj[i].className );
		}
     }

