/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Alf Magne Kalleland :: http://www.dhtmlgoodies.com/ */

/****************************************************************************************
	(C) www.dhtmlgoodies.com, September 2005
	Terms of use: You are free to use this script as long as the copyright message is kept intact. However,
 you may not redistribute, sell or repost it without our permission.

	Alf Magne Kalleland
****************************************************************************************/		
	
var initHeight1 = 0;
var slidedown_direction1 = 1;
var slidedownContentBox1 = false;
var slidedownContent1 = false;
var slidedownActive1 = false;
var contentHeight1 = false;
var slidedownSpeed1 = 3;  // Higher value = faster script
var slidedownTimer1 = 7; // Lower value = faster script

function slidedown_showHide1() {
  if(initHeight1==0)slidedown_direction1=slidedownSpeed1; else slidedown_direction1 = slidedownSpeed1*-1;
  if(!slidedownContentBox1) {
    slidedownContentBox1 = document.getElementById('dhtmlgoodies_contentBox1');
    slidedownContent1 = document.getElementById('dhtmlgoodies_content1');
    contentHeight1 = document.getElementById('dhtmlgoodies_content1').offsetHeight;
  }
  slidedownContentBox1.style.visibility='visible';
  slidedownActive1 = true;
  slidedown_showHide1_start();
}

function slidedown_showHide1_start() {
  if(!slidedownActive1)return;
  initHeight1 = initHeight1/1 + slidedown_direction1;
  if(initHeight1 <= 0) {
    slidedownActive1 = false; 
    slidedownContentBox1.style.visibility='hidden';
    initHeight = 0;
  }
  if(initHeight1>contentHeight1) {
    slidedownActive1 = false; 
  }
  slidedownContentBox1.style.height = initHeight1 + 'px';
  slidedownContent1.style.top = initHeight1 - contentHeight1 + 'px';
  setTimeout('slidedown_showHide1_start()',slidedownTimer1); // Choose a lower value than 10 to make the script move faster
}

function setslidedownWidth1(newWidth) {
  document.getElementById('dhtmlgoodies_slidedown1').style.width = newWidth + 'px';
  document.getElementById('dhtmlgoodies_contentBox1').style.width = newWidth + 'px';
}

function setSlideDownSpeed1(newSpeed1) {
  slidedownSpeed1 = newSpeed1;
}

