var msg = "Bienvenue sur le site de Toboggan";
var comeback = false;
var displaylength = 0;
    
function msgdisplay(text) {
    if (text.length != 0) {
        msg = text;
        display();
    } else
        display();
}

function display() {
    if ( comeback ) {
    	displaylength--;
    	if (displaylength == 0) comeback = false;
    } else {
    	displaylength++;
    	if (displaylength == msg.length) comeback = true;
    }
    
    window.status = msg.substring(0, displaylength);
    if (displaylength == msg.length) {
    	window.setTimeout("display()", 10000);
    } else {
    	window.setTimeout("display()", 50);
    }
}

var screen_width = window.screen.availWidth;   
if ( screen_width > 1024 ) {
    window.document.write('<style type="text/css">');
    window.document.write('table.page{width: 1024px;}');
    window.document.write('table.externallink{width: 1024px;}');
    window.document.write('</style>');
}
