function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function externalLinks() {
  if (!document.getElementsByTagName) return;
  var anchors = document.getElementsByTagName("a");
  for (var i=0; i<anchors.length; i++) {
     var anchor = anchors[i];
     if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
        anchor.target = "_blank";
     } else if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "top") {
        anchor.target = "_top";
     } else if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "back") {
        anchor.setAttribute("href", "javascript:history.back();");
     } else if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "popup") {
        anchor.setAttribute("href", "javascript:popUpWindow('"+anchor.getAttribute("href")+"', '', 580, 400, 'yes');");
     }
  }
}



var win = null;
function popUpWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no,toolbar=no,location=no,status=no';
win = open(mypage,myname,settings)
}




// define onload events
addLoadEvent(externalLinks);

// load flash menu
var flashvars = {};
flashvars.xmlToLoad = "flash_home.xml"; // inicializo mi idioma

var attributes = {};

var params = {
  wmode: "transparent",
  allowScriptAccess: "always"
};
swfobject.embedSWF("../rcs/menuLilla.swf", "nav", "900", "155", "9.0.0", "../rcs/expressInstall.swf", flashvars, params, attributes);


function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}

function MM_setTextOfLayer(objName,x,newText) {//v3.0A Modified by Uncle Massimo and packaged by Uncle Al  for NN6 Compatibility
  var obj = (document.getElementById) ? tmt_findObj(objName) : MM_findObj(objName);
  if (obj!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}
