// JavaScript Document



function initDisplay(){

	teaser  = document.getElementById('teaser');
	content = document.getElementById('content');
	footer  = document.getElementById('footer');
		
    status  = 'teaser';
	
	
}


function ShowTeaser(){

	if (status != 'teaser') {
		new Effect.SlideDown('teaser',{fps:50});
		new Effect.Fade('content',{duration:1,fps:100});
	}
    status = 'teaser';	

} // end function ShowTeaser




function ShowContent(next_content){

	if (status == 'teaser'){
		new Effect.SlideUp('teaser',{fps:50});       
    	content.style.display = 'block';		
	} // end if
	
	status = next_content;

} // end function ShowTeaser


function ChangeTeaser(tn_element) {


	if (status != 'teaser') return;
		
new Effect.Parallel(
    [ new Effect.Fade('teaser'), 
      new Effect.Opacity(tn_element, 
        {to: 0.0, from: 1.0 } ) ],
    { duration: 0.5, 
      afterFinish: function()
        { Element.hide(effect.effects[0].this.parentNode); } 
    }
  );



} // end function ChangeTeaser


// **********************
// little teaser 

function little_teaser () {
	
	this.id;
	this.class;
	this.status;
	this.programm_id;
	this.no_of_layers;
	this.current_layer_id;

} // end function little_teaser



// ---------------------------
// little_teaser setId
// ---------------------------

little_teaser.prototype.setId = function( value ) {
	
	this.id = value;
	
} // end


// ---------------------------
// little_teaser getId
// ---------------------------

little_teaser.prototype.getId = function() {
	
	return this.id;
	
} // end


// ---------------------------
// little_teaser setClass
// ---------------------------

little_teaser.prototype.setClass = function( value ) {
	
	this.class = value;
	
} // end


// ---------------------------
// little_teaser getClass
// ---------------------------

little_teaser.prototype.getClass = function() {
	
	return this.class;
	
} // end


// ---------------------------
// little_teaser setStatus
// ---------------------------

little_teaser.prototype.setStatus = function( value ) {
	
	this.status = value;
	
} // end


// ---------------------------
// little_teaser getStatus
// ---------------------------

little_teaser.prototype.getStatus = function() {
	
	return this.status;
	
} // end


// ---------------------------
// little_teaser setCurrentLayerId
// ---------------------------

little_teaser.prototype.setCurrentLayerId = function( value ) {
	
	this.current_layer_id = value;
	
} // end


// ---------------------------
// little_teaser getCurrentLayerId
// ---------------------------

little_teaser.prototype.getCurrentLayerId = function() {
	
	return this.current_layer_id;
	
} // end


// ---------------------------
// little_teaser setProgrammId
// ---------------------------

little_teaser.prototype.setProgrammId = function( value ) {
	
	this.programm_id = value;
	
} // end


// ---------------------------
// little_teaser getProgrammId
// ---------------------------

little_teaser.prototype.getProgrammId = function() {
	
	return this.programm_id;
	
} // end


// ---------------------------
// little_teaser SlideDown
// ---------------------------

little_teaser.prototype.SlideDown = function() {
	
	if ( this.status == 'down' ) return;
	else {
		new Effect.SlideDown(this.id);
		this.status = 'down';
		new Effect.Appear( 'empty_nav_item_' + this.programm_id );
	} // end else
	
} // end


// ---------------------------
// little_teaser SlideUp
// ---------------------------

little_teaser.prototype.SlideUp = function() {
	
	if ( this.status == 'up' ) return;
	else {
		new Effect.SlideUp(this.id);
		this.status = 'up';
		new Effect.Fade( 'empty_nav_item_' + this.programm_id );
	} // end else
	
} // end


// ---------------------------
// little_teaser ChangeLayer
// ---------------------------

little_teaser.prototype.ChangeLayer = function( value ) {
	
	new_layer_id = value;
	
	if ( this.status == 'up' ) {
	
		this.SlideDown();
	
	}
	
	
	new Effect.Fade( this.current_layer_id );
	new Effect.Appear( new_layer_id );
	this.current_layer_id = new_layer_id;

} // end

