var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

var phrase = new Array('<span>Новое мыло</span><br />у тебя уже есть,<br />теперь нужны<br /><span>новые визитки.</span><br />4 шага &ndash; и всё<br />готово','Я в графе<br /><span>"кто ты"</span><br />ничего не написал.<br />Я такой<br />многогранный...','Твои визитки &ndash;<br />что хочешь, то и<br />делаешь. Хочешь<br /><span>печатаешь...</span>','..хочешь &mdash; <span>в блог<br />вставляешь.</span>');
var Text, TextN = 0, tmpN;

init = function() {
	Text = document.getElementById('balloon_text');
//	setInterval('replace()', 15000);
}

/*replace = function () {
	tmpN = parseInt(Math.random()*phrase.length);
	if ( TextN == tmpN ) {
		if ( tmpN == 0 ) tmpN++;
		else tmpN--;
	}
	Text.innerHTML = phrase[tmpN];
	TextN = tmpN;
}*/

function replace(step) {
	try {
		Text.innerHTML = phrase[step];
	}
	catch (err) {}
}

function mainflash_DoFSCommand(command, args) {
	var mainflashObj = isInternetExplorer ? document.all.mainflash : document.mainflash;
	replace(command);
}
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 mainflash_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call mainflash_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

window.onload = init;
