var t;
var doLoop = true;

//:::::::::::::::::::::::::::::::::::::::::::::::::

function scrollDivToTop(divid)
{ 
var div = document.getElementById(divid);

if (div.scrollTop>0 && doLoop){
div.scrollTop-=3; 
t = setTimeout("scrollDivToTop('" + divid + "')", 1);
}
else clearTimeout(t);
}

//:::::::::::::::::::::::::::::::::::::::::::::::::

function scrollDivToBottom(divid)
{

var div = document.getElementById(divid);

if (div.scrollTop<999999999 && doLoop){
div.scrollTop+=3; 
t = setTimeout("scrollDivToBottom('" + divid + "')", 1);
}
else clearTimeout(t);
}

//:::::::::::::::::::::::::::::::::::::::::::::::::
function stop()
{
	doLoop = false;
	setTimeout('doLoop = true;', 5);
}
function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}
function sound(action){
	if(action == 'off'){
		soundManager.stop('smash0')
		document.getElementById("sound_panel").innerHTML = "sound | <a href='javascript:void(0);' onclick=\"sound('on')\" title=\"Click to turn on\">off</a>";
	} else {
		soundManager.play('smash0', 99)
		document.getElementById("sound_panel").innerHTML = "sound | <a href='javascript:void(0);' onclick=\"sound('off')\" title=\"Click to turn off\">on</a>";
	}
}
function beginSound(){
 if(soundManager.checkMovie('default') != false) {
   soundManager.play('smash0', 99);
  } else {
    setTimeout('beginSound()',1000);
  }
}
