// COMUM.JS
// CAIAC SOLUÇÕES PARA INTERNET
// www.caiac.com.br

function Flash(swf, w, h, id) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+id+'" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+w+'" height="'+h+'">');
	document.write('<param name="movie" value="'+swf+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<param name="scale" value="exactfit">');
	document.write('<embed src="'+swf+'" swliveconnect="true" wmode="transparent" scale="exactfit" name="'+id+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed>');
	document.write('</object>');
}

function abreComercial(num, tam) {
	var comerciais = new Array("", "camp4", "camp3", "camp2_zsul", "camp2_dep", "camp1");
	
	comercial = comerciais[num] + (tam != "" ? tam : "") + ".flv";
	
	var rnd = Math.floor(Math.random()*1000)
	
	var a_video = document.createElement("A");
	a_video.rel = "lyteframe";
	a_video.rev = "width: 324px; height: 263px; scrolling: no;";
	a_video.href = "video.php?video="+comercial+"&rnd="+rnd;
	myLytebox.start(a_video, false, true);
	a_video = null;
}