if(document.getElementById){
	cpA="document.getElementById(";
	cpB=").style";
	cpC=")";
}
else{
	if(navigator.appName == "Microsoft Internet Explorer"){
		cpA="document.all[";
		cpB="].style";
		cpC="]";
	}
	else{
		cpA="document.layers[";
		cpB="]";
		cpC="]";
	}
}

function parametro(theArgName){
	var txt_titulo="";
	var b = document.location;
	var a = new String(b);
	var srch = a.substr(a.indexOf('?')+1);
	partOf = srch.split("&");
	for (var i=0; i<partOf.length; i++) {
		var tmp = partOf[i].split("=");
		if (tmp[0] == theArgName) txt_titulo=unescape(tmp[1]);
	}
	return txt_titulo;
}

function poner_mapa(ruta,variable,nombre,ancho,alto){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
	document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab');
	document.write('#version=6,0,29,0" width="' + ancho + '" height="' + alto + '" ');
	document.write('id="' + nombre +'" class="flash_fullscrenIE">\n');
	document.write('<param name="movie" value="' + ruta + '">\n');
	document.write('<param name="flashvars" value="' + variable + '=' + parametro(variable) + '">\n');
    document.write('<param name="quality" value="high">\n');
    document.write('<param name="width" value="100%">\n');
    document.write('<param name="height" value="100%">\n');
	document.write('<param name="SCALE" value="exactfit">\n');
	document.write('<embed src="' + ruta + '" width="' + ancho + '" ');
	document.write('height="' + alto + '" quality=high ');
	document.write('pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?');
	document.write('P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ');
	document.write('scale="exactfit" flashvars="' + variable + '=' + parametro(variable) + '" ');
	document.write('name="' + nombre + '" id="' + nombre + '"" class="flash_fullscrenN"></embed>\n');
	document.write('</object>\n');
}

function contenido(div_destino,div_origen){
	div_A= eval(cpA + "'" + div_destino + "'" + cpC);
	div_B= eval(cpA + "'" + div_origen + "'" + cpC);
	if (div_A && div_B) { 
		div_A.innerHTML = div_B.innerHTML;
	}
}
