//timerinfo.js
var secs
var timerID = null
var timerRunning = false
var delay = 1000
var step = 1;
function InitializeTimer(seconds)
{
    // Set the length of the timer, in seconds
    secs = seconds //10
    StopTheClock()
    StartTheTimer()
}
function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}
function StartTheTimer()
{
    if (secs==0)
    {
        StopTheClock()
			if(step==1){
			animateHeight('Layer1',283);
			InitializeTimer(10);
			step=2;
			}
			else{
			animateRollUp('Layer1',53);
			}	
    }
    else
    {
        self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function Magique_DoFSCommand(command, args) {
	var MagiqueObj = isInternetExplorer ? document.all.Magique : document.Magique;
animateRollUp(command,args);
}
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub Magique_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call Magique_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
function animateHeight(id, size)
{
el = document.getElementById(id);
var h_size1 = el.offsetHeight;
if (h_size1 < size)
{
el.style.height = h_size1 + 5 +"px";
setTimeout("animateHeight('" + id + "','" + size + "')", 1);
}
}
function loadPage(){
window.location="info-magique.htm";
}
function animateRollUp(id, size)
{
el = document.getElementById(id);
var h_size1 = el.offsetHeight;
if (h_size1 >size)
{
el.style.height = h_size1 - 5 +"px";
setTimeout("animateRollUp('" + id + "','" + size + "')", 1);
	if(h_size1<size || h_size1==size){
	el.style.visibility="hidden";
	}
}
}
