var bln_is_ie = (document.all && navigator.plugins.length == 0 && navigator.userAgent.indexOf('Win') != -1) ? true : false;
function fun_detect_flash(arg_required_major_version){
	if(navigator.plugins.length > 0){
		var str_flash_name = 'Shockwave Flash';
		for(int_count = 0; int_count <= parseInt(navigator.plugins.length - 1); int_count++){
			if(navigator.plugins[int_count].name.indexOf(str_flash_name) != -1){
				str_flash_desc = navigator.plugins[int_count].description;
				int_flash_major_version = str_flash_desc.substring(str_flash_name.length + 1,str_flash_name.length + 2);
				if(int_flash_major_version >= arg_required_major_version) return true; else return false;
			}
		}
	}else{
		if(bln_is_ie){
			document.writeln('<scr' + 'ipt language="VBscript" type="text/vbscript">');
			document.writeln('	bln_is_detectable_with_vb = FALSE');
			document.writeln('	If ScriptEngineMajorVersion >= 2 Then');
			document.writeln('		bln_is_detectable_with_vb = TRUE');
			document.writeln('	End If');
			document.writeln('	Function fun_detect_activex_control(str_activex_control_name)');
			document.writeln('		On Error Resume Next');
			document.writeln('		fun_detect_activex_control = FALSE');
			document.writeln('		If bln_is_detectable_with_vb Then');
			document.writeln('			fun_detect_activex_control = IsObject(CreateObject(str_activex_control_name))');
			document.writeln('		End If');
			document.writeln('	End Function');
			document.writeln('</scr' + 'ipt>');
			if(bln_is_detectable_with_vb){
				var obj_is_flash_on_ie = fun_detect_activex_control('ShockwaveFlash.ShockwaveFlash.' + arg_required_major_version);
				return obj_is_flash_on_ie;
			}
		}
	}
}
function fun_show_flash_obj_0(int_width,int_height,str_id,str_url){
	document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,19,0\" width=\"'+int_width+'\" height=\"'+int_height+'\" name=\"'+str_id+'\" id=\"'+str_id+'\">');
    document.write('	<param name="movie" value="' + str_url + '"/>');	
	document.write('	<param name=\"quality\" value=\"high\">');
	document.write('	<embed src=\"' + str_url +'\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"'+int_width+'\" height=\"'+int_height+'\"></embed>');
	document.write('</object>');
}
function fun_show_flash_obj_1(int_width,int_height,str_id,str_url,str_allparam,str_direcionando_linkHome){
	document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,19,0\" width=\"'+int_width+'\" height=\"'+int_height+'\" name=\"'+str_id+'\" id=\"'+str_id+'\">');
    document.write('	<param name="movie" value="' + str_url + str_allparam + '&' + str_direcionando_linkHome + '"/>');	
	document.write('	<param name=\"quality\" value=\"high\">');
	document.writeln('  <param name=\"flashvars\" value=\"'+str_allparam + '&' + str_direcionando_linkHome + '\">');		
	document.write('	<embed src=\"' + str_url + '?' + str_allparam + '&' + str_direcionando_linkHome + '\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"'+int_width+'\" height=\"'+int_height+'\"></embed>');
	document.write('</object>');
}

function fun_show_flash_obj_2(int_width,int_height,str_id,str_url,str_allparam,str_marca_bt){	
	document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,19,0\" width=\"'+int_width+'\" height=\"'+int_height+'\" name=\"'+str_id+'\" id=\"'+str_id+'\">');
    document.write('	<param name="movie" value="' + str_url + '?' + str_allparam + '&' + str_marca_bt +'"/>');	
	document.write('	<param name=\"quality\" value=\"high\">');
	document.write('	<param name=\"wmode\" value="transparent">');
	document.writeln('  <param name=\"flashvars\" value=\"'+str_allparam + '&' +  str_marca_bt +'\">');
	document.write('	<embed src=\"' + str_url + '?' + str_allparam + '&' +  str_marca_bt +'\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" wmode=\"transparent\" type=\"application/x-shockwave-flash\" width=\"'+int_width+'\" height=\"'+int_height+'\"></embed>');
	document.write('</object>');
//   document.write(str_url + '?' + str_allparam + '&' +  str_marca_bt);	
}
function fun_show_flash_vitrine(int_width,int_height,str_id,str_url,str_allparam){
	document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,19,0\" width=\"'+int_width+'\" height=\"'+int_height+'\" name=\"'+str_id+'\" id=\"'+str_id+'\">');
    document.write('	<param name="movie" value="' + str_url + str_allparam + '"/>');	
	document.write('	<param name=\"quality\" value=\"high\">');
	document.writeln('  <param name=\"flashvars\" value=\"'+str_allparam + '\">');		
	document.write('	<embed src=\"' + str_url + '?' + str_allparam + '\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"'+int_width+'\" height=\"'+int_height+'\"></embed>');
	document.write('</object>');
}

