// JavaScript Document
function meteTitulo(caja,pverde,ancho,alto){
	if(ancho === undefined)ancho=document.getElementById(caja).offsetWidth;
	if(alto === undefined)alto=document.getElementById(caja).offsetHeight*1.3;
	if(pverde === undefined)pverde="";
	var flashvars = {texto:escape(UTF8.encode(document.getElementById(caja).innerHTML)), esverde:pverde};
	//var flashvars = {texto:"<h2>hola</h2>"};
	var params = {};
	var attributes = {};
	//alert(caja+" , "+ancho+" , "+alto);
	swfobject.embedSWF("titulera.swf", caja, ancho, alto, "8.0.0","playerProductInstall.swf", flashvars, params, attributes);
}

function amenu(dire){
	var aParte = document.URL.split("?parte=");
	var flashvars = {direcc:dire,ancla:aParte[1]};
	var params = {wmode:"transparent"};
	var attributes = {};
	swfobject.embedSWF("img/header.swf", "banner", "986", "113", "8.0.0","playerProductInstall.swf", flashvars, params, attributes);
	
}

//+ Jonas Raoni Soares Silva
//@ http://jsfromhell.com/geral/utf-8 [rev. #1]

UTF8 = {
    encode: function(s){
        for(var c, i = -1, l = (s = s.split("")).length, o = String.fromCharCode; ++i < l;
            s[i] = (c = s[i].charCodeAt(0)) >= 127 ? o(0xc0 | (c >>> 6)) + o(0x80 | (c & 0x3f)) : s[i]
        );
        return s.join("");
    },
    decode: function(s){
        for(var a, b, i = -1, l = (s = s.split("")).length, o = String.fromCharCode, c = "charCodeAt"; ++i < l;
            ((a = s[i][c](0)) & 0x80) &&
            (s[i] = (a & 0xfc) == 0xc0 && ((b = s[i + 1][c](0)) & 0xc0) == 0x80 ?
            o(((a & 0x03) << 6) + (b & 0x3f)) : o(128), s[++i] = "")
        );
        return s.join("");
    }
};