/**
* BTR JavaScripts
*
* @package BTR
* @author Miguel Dieckmann <info@dieckmann-it.de>
* @copyright 2008 M. Dieckmann IT - Services http://www.dieckmann-it.de
* @version Fri Sep 07 09:01:10 CEST 2008 @550 /Internet Time/
*/

function BTR_init() {
	if ( document.getElementById('msgbox') ) {
		window.setTimeout('closeMsgBox()', 5000);
	}
	if ( document.getElementById('errorbox') ) {
		window.setTimeout('blinkErrorBox(0)', 1);
	}
}

function closeMsgBox() {
	Effect.Fade('msgbox');
}

function closeErrorBox() {
	Effect.Fade('errorbox');
}

function blinkErrorBox(go) {
	Effect.Pulsate('errorbox', {duration: 1, pulses: 3});
	if ( go == 1 ) window.setTimeout('closeErrorBox()', 8000);
	else window.setTimeout('blinkErrorBox(1)', 5000);
}

function confirmaction(warntext,url) {
	var delok;
	delok = confirm (warntext);
	if  (delok==true ) {
		window.location.href = url;
	}
}
