var cp_tmp_height=0;
var cp_max_height=356;

var cp_parent_name="cPush";
var cp_timeOut;


function f4d_expand_layer(){
     clearTimeout(cp_timeOut);
     with(document.getElementById(cp_parent_name).style){
          cp_tmp_height=cp_tmp_height+10;
          if(cp_tmp_height<=cp_max_height){
                 display="block";
             height=cp_tmp_height+"px";
           cp_timeOut=setTimeout('f4d_expand_layer()',10);  
          }
     }
}

function f4d_collapse_layer(){
     clearTimeout(cp_timeOut);
     with(document.getElementById(cp_parent_name).style){
          cp_tmp_height=cp_tmp_height-10;
          if(cp_tmp_height>=10){
             height=cp_tmp_height+"px";
         cp_timeOut=setTimeout('f4d_collapse_layer()',10);  
          }
          else if(cp_tmp_height==0){
             height="1px";
                 display="none";
          }
     }  
}

var delayPush
var delayCount = 0
function f4d_init_expand_layer(){
     if(document.getElementById(cp_parent_name)){
        if(delayCount == 0) {
        unmuteEBflash();
          delayPush = setTimeout('f4d_expand_layer()', 1000);
        }
        else {
          f4d_expand_layer();
        }
     }
}

function f4d_init_collapse_layer(){
    clearTimeout(delayPush);
    muteEBflash();  
    delayCount = 0
     if(document.getElementById(cp_parent_name)){
      f4d_collapse_layer();
   }
}

function unmuteEBflash(){
  try {
    var push_div = document.getElementById(cp_parent_name); 
    var objects = push_div.getElementsByTagName('object');
    for(var i=0; objects != null && i < objects.length; i++) {
        if(objects[i].id.indexOf("ebRichFlash") != -1) {
            objects[i].sound_on_js();
            
        }
    }
  }
  catch(err){
  }

}

function muteEBflash(){
  try{
    var push_div = document.getElementById(cp_parent_name); 
    var objects = push_div.getElementsByTagName('object');
    for(var i=0; objects != null && i < objects.length; i++) {
        if(objects[i].id.indexOf("ebRichFlash") != -1) {
            objects[i].sound_off_js();
            
        }
    }
  }
  catch(err){
  }

}