/**
 * Esta función hace lo mismo que 'target = 'blank'
 */
function externalLinks() {
	var anchors = $$('a');
	
	for (var i=0; i<anchors.length; i++) { 
		var anchor = anchors[i];
		if (anchors[i].rel == "external") {
			anchors[i].target = "_blank";	
		}
	}
}
	
function verify_flash_version (value) {
	var version = deconcept.SWFObjectUtil.getPlayerVersion();
	var info_noflash;
	if (version['major'] < value) {
		var info_noflash = $$('div.info_noflash');
		for(var i=0;i<info_noflash.length;i++) {
			info_noflash[i].setStyle({display:'block'})
		}
		return false;
	} else {
		return true;	
	}
}

function load_home (url) {
	var presentacion = new SWFObject(url, "home", "778", "443", "8", "#FFFFFF");
	presentacion.addParam("wmode", "opaque");
	presentacion.addParam('quality', 'high');
	presentacion.addParam('pluginspage', 'http://www.macromedia.com/go/getflashplayer');
	presentacion.addParam('play', 'true');
	presentacion.addParam('loop', 'true');
	presentacion.addParam('scale', 'showall');
	presentacion.addParam('devicefont', 'false');
	presentacion.addParam('menu', 'false');
	presentacion.setAttribute('style', '');
	presentacion.write("container_swf");
}

function load_header (url, opt) {
	var header = new SWFObject(url, "header", "778", "219", "8", "#FFFFFF");
	header.addParam("wmode", "opaque");
	header.addParam('quality', 'high');
	header.addParam('pluginspage', 'http://www.macromedia.com/go/getflashplayer');
	header.addParam('play', 'true');
	header.addParam('loop', 'true');
	header.addParam('scale', 'showall');
	header.addParam('devicefont', 'false');
	header.addParam('menu', 'false');
	header.addVariable("menu_1_opt", opt); 
	header.addVariable("webroot", 'http://www.access-seaf.com'); 
	header.setAttribute('style', '');
	header.write("header_swf");
}

function load_map (url) {
	var mapa = new SWFObject(url, "mapa", "410", "320", "8", "#E6E6E6");
	mapa.addParam("wmode", "opaque");
	mapa.addParam('quality', 'high');
	mapa.addParam('pluginspage', 'http://www.macromedia.com/go/getflashplayer');
	mapa.addParam('play', 'true');
	mapa.addParam('loop', 'true');
	mapa.addParam('scale', 'showall');
	mapa.addParam('devicefont', 'false');
	mapa.addParam('menu', 'false');
	mapa.setAttribute('style', '');
	mapa.write("mapa_swf");
}
	
function init () {
	externalLinks();
}