// JavaScript Document
function addSWF   (URL, WIDTH, HEIGHT, TRANSPARENT)
{
document.write (' <object classid="clsid:27CDB6E-AE6D-11cf-96B8-444553540000" ');
document.write (' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ');
document.write (' width="'+ WIDTH +'" height="'+ HEIGHT +'">');
document.write (' <param name="movie" value="'+ URL +'" />');
document.write (' <param name="quality" value="high" />');

if ( TRANSPARENT ) {
  document.write (' <param name="Wmode" value="Transparent" />');
}

document.write (' <embed src="'+ URL +'" quality="high" ');

if ( TRANSPARENT ) {
document.write (' Wmode = "transparent" ');
}

document.write (' pluginspage="http://www.macromedia.com/go/getflashplayer" ');
document.write (' type="application/x-shockwave-flash" width="'+ WIDTH +'" height="'+ HEIGHT +'"></embed> ');
document.write (' </object>');

}

var carregar;

function carregarImagem(imagem) {
	carregar = new Image();
	carregar.src = imagem;
	document.getElementById("imagem").innerHTML = "<img src=\"imagem/carregando.gif\" />";
	setTimeout("verificar()", 100);
}

function verificar() {
	if(carregar.complete) {
		document.getElementById("imagem").innerHTML = "<img src=\"" + carregar.src + "\" />";
	} else {
		setTimeout("verificar()", 100);
	}
}


<!-- Begin
var eventos = "";
var evento = new Array(12);
for (i = 0; i <= 12; i++) {
	evento[i] = new Array(32);
	for (x = 0; x <= 31; x++) {
		evento[i][x] = false;
	}
}

evento[3][16] = "Track & Field Run Series - S&atilde;o Paulo";
evento[4][13] = "Track & Field Run Series - Rio de Janeiro";
evento[5][4] = "Track & Field Run Series - Belo Horizonte";
evento[5][25] = "Ironman Brasil";
evento[6][8] = "Track & Field Run Series - Bras&iacute;lia";
evento[6][15] = "Track & Field Run Series - Campinas";
evento[6][29] = "Track & Field Run Series - S&atilde;o Paulo";
evento[7][13] = "Diamond Run - Belo Horizonte";
evento[7][27] = "Track & Field Run Series - Ribeir&atilde;o Preto";
evento[8][3] = "Track & Field Run Series - Rio de Janeiro";
evento[8][10] = "Volkswagen Run";
evento[8][17] = "Track & Field Run Series - Porto Alegre";
evento[8][31] = "Track & Field Run Series - Curitiba";
evento[9][14] = "Ironman 70.3";
evento[9][21] = "Track & Field Run Series - Po&aacute;";
evento[9][24] = "Track & Field Run Series - Florian&oacute;polis";
evento[9][28] = "Track & Field Run Series - Belo Horizonte";
evento[10][19] = "Track & Field Run Series - Bras&iacute;lia";
evento[11][9] = "Rock'n Run - S&atilde;o Paulo";
evento[11][16] = "Ayrton Senna Racing Day";
evento[11][23] = "Rock'n Run - Florian&oacute;polis";
evento[11][30] = "Track & Field Run Series - S&atilde;o Paulo";

var day_of_week = new Array('Dom','Seg','Ter','Qua','Qui','Sex','Sab');
var month_of_year = new Array('Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro');

var Calendar = new Date();

var year = Calendar.getYear();	    // Retorna o ano
var month = Calendar.getMonth();    // Retorna mes (0-11)
var today = Calendar.getDate();    // Retorna dias (1-31)
var weekday = Calendar.getDay();    // Retorna dias (1-31)

var DAYS_OF_WEEK = 7;    // "constant" para o numero de dias na semana
var DAYS_OF_MONTH = 31;    // "constant" para o numero de dias no mes
var cal;    // Usado para imprimir na tela

Calendar.setDate(1);    // Comecar o calendario no dia '1'
Calendar.setMonth(month);    // Comecar o calendario com o mes atual


var TR_start = '<TR>';
var TR_end = '</TR>';
var highlight_start = '<TD WIDTH="22"  bgcolor="#ff6600"><CENTER>';
var highlight_end   = '</CENTER></TD>';
var evento_start = '<TD WIDTH="22"  bgcolor="#999999"><CENTER>';
var evento_end   = '</CENTER></TD>';
var TD_start = '<TD WIDTH="22"><CENTER>';
var TD_end = '</CENTER></TD>';

cal =  '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 STYLE="border:1px solid #999999;"><TR><TD>';
cal += '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>' + TR_start;
cal += '<TD COLSPAN="' + DAYS_OF_WEEK + '" BGCOLOR="#999999"><CENTER><B>';
cal += month_of_year[month]  + '</B>' + TD_end + TR_end;
cal += TR_start;

for(index=0; index < DAYS_OF_WEEK; index++)
{

if(weekday == index)
cal += TD_start + day_of_week[index] + TD_end;
else
cal += TD_start + day_of_week[index] + TD_end;
}

cal += TD_end + TR_end;
cal += TR_start;

for(index=0; index < Calendar.getDay(); index++)
cal += TD_start + '  ' + TD_end;

for(index=0; index < DAYS_OF_MONTH; index++) {
	if( Calendar.getDate() > index ) {
		week_day =Calendar.getDay();
		if(week_day == 0)
			cal += TR_start;
		if(week_day != DAYS_OF_WEEK) {
			var day  = Calendar.getDate();
			if(evento[month + 1][index + 1] != false) {
				eventos += "<B>" + (index + 1) + "</B> - " + evento[month + 1][index + 1] + "<BR>";
				cal += evento_start + day + evento_end;
			} else if( today==Calendar.getDate() )
				cal += highlight_start + day + highlight_end;
			else
				cal += TD_start + day + TD_end;
		}
		if(week_day == DAYS_OF_WEEK)
			cal += TR_end;
	}
	Calendar.setDate(Calendar.getDate()+1);
}
cal += '</TD></TR><TR><TD COLSPAN="7" BGCOLOR="#999999" >';
cal += eventos;
cal += '</TD></TR></TABLE></TABLE>';

function exibirCalendario() {
//  MOSTRAR CALENDARIO
document.write(cal);
}
//  End -->


function carregarVideo(video, width, height, transparent) {
	var teste = document.getElementById("video");
	var novovideo;
	novovideo = ' <object classid="clsid:27CDB6E-AE6D-11cf-96B8-444553540000" ';
	novovideo += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ';
	novovideo += ' width="'+ width +'" height="'+ height +'">';
	novovideo += ' <param name="movie" value="'+ video +'" />';
	novovideo += ' <param name="quality" value="high" />';
	
	if ( transparent ) {
		novovideo += ' <param name="Wmode" value="Transparent" />';
	}	
	novovideo += ' <embed src="'+ video +'" quality="high" ';
	if ( transparent ) {
	novovideo += ' Wmode = "transparent" ';
	}	
	novovideo += ' pluginspage="http://www.macromedia.com/go/getflashplayer" ';
	novovideo += ' type="application/x-shockwave-flash" width="'+ width +'" height="'+ height +'"></embed> ';
	novovideo += ' </object>';

	teste.innerHTML = "<br>" + novovideo;
}