// script global para manejar los datos //

/* Posicion del menu en el eje y. IExplorer */
TopOffset = 54;

/* Variable Menu Horizontal para FireFox	*/
/* >> Agrego GJBC: 2007-10-13				*/

	// ancho de menu
		menuWidth = 970;
	// divisiones del menu
		menuDivision = 6;
	// altura Encabezado
		headerHeight = 229;
	// Posicion del menu en el eje y //
		menuTop = headerHeight;
/* Fin. Variable Menu Horizontal para FireFox	*/

window.onresize = function() {
	window.location.reload();
}
//funcion para mostrar imagen
function  MostrarImagen(objeto, imagen)
{
	objeto.style.backgroundImage = imagen;
}
function  QuitarImagen(objeto)
{
	objeto.style.backgroundImage = "";
}
function Verpagina(pagina)
{
	location.href = pagina;
}

// BROWSER DETECTION //
function BrowserDetect() {
   var ua = navigator.userAgent.toLowerCase();

   // browser engine name
   this.isGecko       = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
   this.isAppleWebKit = (ua.indexOf('applewebkit') != -1);

// browser name
   this.isKonqueror   = (ua.indexOf('konqueror') != -1);
   this.isSafari      = (ua.indexOf('safari') != - 1);
   this.isOmniweb     = (ua.indexOf('omniweb') != - 1);
   this.isOpera       = (ua.indexOf('opera') != -1);
   this.isIcab        = (ua.indexOf('icab') != -1);
   this.isAol         = (ua.indexOf('aol') != -1);
   this.isIE          = (ua.indexOf('msie') != -1 && !this.isOpera && (ua.indexOf('webtv') == -1) );
   this.isMozilla     = (this.isGecko && ua.indexOf('gecko/') + 14 == ua.length);
   this.isFirebird    = (ua.indexOf('firebird/') != -1);
   this.isFirefox    = (ua.indexOf('firefox/') != -1);
   this.isNS          = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && !this.isOpera && !this.isSafari && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );

   // spoofing and compatible browsers
   this.isIECompatible = ( (ua.indexOf('msie') != -1) && !this.isIE);
   this.isNSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.isNS && !this.isMozilla);

   // rendering engine versions
   this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
   this.equivalentMozilla = ( (this.isGecko) ? parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) ) : -1 );
   this.appleWebKitVersion = ( (this.isAppleWebKit) ? parseFloat( ua.substring( ua.indexOf('applewebkit/') + 12) ) : -1 );

   // browser version
   this.versionMinor = parseFloat(navigator.appVersion);

   // correct version number
   if (this.isGecko && !this.isMozilla) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('/', ua.indexOf('gecko/') + 6) + 1 ) );
   }
   else if (this.isMozilla) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
   }
   else if (this.isIE && this.versionMinor >= 4) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
   }
   else if (this.isKonqueror) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );
   }
   else if (this.isSafari) {
      this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('safari/') + 7 ) );
   }
   else if (this.isOmniweb) {
      this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('omniweb/') + 8 ) );
   }
   else if (this.isOpera) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera') + 6 ) );
   }
   else if (this.isIcab) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab') + 5 ) );
   }

   this.versionMajor = parseInt(this.versionMinor);

   // dom support
   this.isDOM1 = (document.getElementById);
   this.isDOM2Event = (document.addEventListener && document.removeEventListener);

   // css compatibility mode
   this.mode = document.compatMode ? document.compatMode : 'BackCompat';

   // platform
   this.isWin    = (ua.indexOf('win') != -1);
   this.isWin32  = (this.isWin && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1 || ua.indexOf('xp') != -1) );
   this.isMac    = (ua.indexOf('mac') != -1);
   this.isUnix   = (ua.indexOf('unix') != -1 || ua.indexOf('sunos') != -1 || ua.indexOf('bsd') != -1 || ua.indexOf('x11') != -1)
   this.isLinux  = (ua.indexOf('linux') != -1);

   // specific browser shortcuts
   this.isNS4x = (this.isNS && this.versionMajor == 4);
   this.isNS40x = (this.isNS4x && this.versionMinor < 4.5);
   this.isNS47x = (this.isNS4x && this.versionMinor >= 4.7);
   this.isNS4up = (this.isNS && this.versionMinor >= 4);
   this.isNS6x = (this.isNS && this.versionMajor == 6);
   this.isNS6up = (this.isNS && this.versionMajor >= 6);
   this.isNS7x = (this.isNS && this.versionMajor == 7);

  NetscapeVer = navigator.userAgent;
  NSVersion = NetscapeVer.substring(82,85) ;
  this.isNS7even = (NSVersion == 7.0);

    this.isNS7up = (this.isNS && this.versionMajor >= 7);

   this.isIE4x = (this.isIE && this.versionMajor == 4);
   this.isIE4up = (this.isIE && this.versionMajor >= 4);
   this.isIE5x = (this.isIE && this.versionMajor == 5);
   this.isIE55 = (this.isIE && this.versionMinor == 5.5);
   this.isIE5up = (this.isIE && this.versionMajor >= 5);
   this.isIE6x = (this.isIE && this.versionMajor == 6);
   this.isIE6up = (this.isIE && this.versionMajor >= 6);

   this.isIE4xMac = (this.isIE4x && this.isMac);
   this.isIEMac = (this.isIE && this.isMac);
}
var browser = new BrowserDetect();

if (browser.isNS47x) {
	alert("It appears you are using an outdated version of Netscape, you will now be redirected to the Netscape site.");
	location.href = "http://channels.netscape.com/ns/browsers/default.jsp";
}

// IMAGE SWAPPING AND PRELOADING
function init() {
	MM_preloadImages(
		'/images/nav/learn_on.gif',
		'/images/nav/explore_on.gif',
		'/images/nav/contact_on.gif',
		'/images/nav/about_on.gif',
		'/images/nav/search_on.gif',
		'/images/forfinancialprof_on.gif',
		'/images/forbenefitsmang_on.gif',
		'/images/careercenter_on.gif',
		'/images/menu_arrow.gif'
	);
}

function imgRoll (OorF,imName,subPath) {
	if (subPath == 'nav') { subPath = '/nav/'; } else { subPath = ''; }
	document.images[imName].src = '/images/' + subPath + imName + '_' + OorF + '.gif';
}

function nav_imgRoll (OorF,imName) {
	document.getElementById(imName).src = '/images/nav/' + imName + '_' + OorF + '.gif';
}


function MM_preloadImages() { //v3.0

	var d=document;

	if (d.images) {
	  if (!d.MM_p) d.MM_p=new Array();

	  var i, j=d.MM_p.length, a=MM_preloadImages.arguments;

	  for (i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0) {
			d.MM_p[j]=new Image;
			d.MM_p[j++].src=a[i];
		}
	}
}

ypSlideOutMenu.Registry = []
ypSlideOutMenu.aniLen = 300
ypSlideOutMenu.hideDelay = 150
ypSlideOutMenu.minCPUResolution = 10
// constructor
function ypSlideOutMenu(id, dir, left, top, width, height) {
	this.ie = document.all ? 1 : 0
	this.ns4 = document.layers ? 1 : 0
	this.dom = document.getElementById ? 1 : 0
	if (this.ie || this.ns4 || this.dom) {
		this.id = id
		this.dir = dir
		this.orientation = dir == "left" || dir == "right" ? "h" : "v"
		this.dirType = dir == "right" || dir == "down" ? "-" : "+"
		this.dim = this.orientation == "h" ? width : height
		this.hideTimer = false
		this.aniTimer = false
		this.open = false
		this.over = false
		this.startTime = 0
		this.gRef = "ypSlideOutMenu_"+id
		eval(this.gRef+"=this")
		ypSlideOutMenu.Registry[id] = this
		var d = document
		var strCSS = '<style type="text/css">';
		strCSS += '#' + this.id + 'Container { visibility:hidden; '
		strCSS += 'left:' + left + 'px; '
		strCSS += 'top:' + top + 'px; '
		strCSS += 'overflow:hidden; z-index:10; }'
		strCSS += '#' + this.id + 'Container, #' + this.id + 'Content { position:absolute; '
		strCSS += 'width:' + width + 'px; '
		strCSS += 'height:' + height + 'px; '
		strCSS += '}'
		strCSS += '</style>'
		d.write(strCSS)
		this.load()
	}
}
ypSlideOutMenu.prototype.load = function() {
	var d = document
	var lyrId1 = this.id + "Container"
	var lyrId2 = this.id + "Content"
	var obj1 = this.dom ? d.getElementById(lyrId1) : this.ie ? d.all[lyrId1] : d.layers[lyrId1]
	if (obj1) var obj2 = this.ns4 ? obj1.layers[lyrId2] : this.ie ? d.all[lyrId2] : d.getElementById(lyrId2)
	var temp
	if (!obj1 || !obj2) window.setTimeout(this.gRef + ".load()", 100)
	else {
		this.container = obj1
		this.menu = obj2
		this.style = this.ns4 ? this.menu : this.menu.style
		this.homePos = eval("0" + this.dirType + this.dim)
		this.outPos = 0
		this.accelConst = (this.outPos - this.homePos) / ypSlideOutMenu.aniLen / ypSlideOutMenu.aniLen
		// set event handlers.
		if (this.ns4) this.menu.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
		this.menu.onmouseover = new Function("ypSlideOutMenu.showMenu('" + this.id + "')")
		this.menu.onmouseout = new Function("ypSlideOutMenu.hideMenu('" + this.id + "')")
		//set initial state
		this.endSlide()
	}
}
ypSlideOutMenu.showMenu = function(id) {
	var reg = ypSlideOutMenu.Registry
	var obj = ypSlideOutMenu.Registry[id]
	if((obj != null) && (obj != undefined)){
		if (obj.container) {
			obj.over = true
			for (menu in reg) if (id != menu) ypSlideOutMenu.hide(menu)
			if (obj.hideTimer) { reg[id].hideTimer = window.clearTimeout(reg[id].hideTimer) }
			if (!obj.open && !obj.aniTimer) reg[id].startSlide(true)
		}
	}
}
ypSlideOutMenu.hideMenu = function(id) {
	var obj = ypSlideOutMenu.Registry[id]
	if((obj != null) && (obj != undefined)){
		if (obj.container) {
			if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
			obj.hideTimer = window.setTimeout("ypSlideOutMenu.hide('" + id + "')", ypSlideOutMenu.hideDelay);
		}
	}
}
ypSlideOutMenu.hideAll = function() {
	var reg = ypSlideOutMenu.Registry
	for (menu in reg) {
		ypSlideOutMenu.hide(menu);
		if (menu.hideTimer) window.clearTimeout(menu.hideTimer);
	}
}
ypSlideOutMenu.hide = function(id) {
	var obj = ypSlideOutMenu.Registry[id]
	obj.over = false
	if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
	obj.hideTimer = 0
	if (obj.open && !obj.aniTimer) obj.startSlide(false)
}
ypSlideOutMenu.prototype.startSlide = function(open) {
	this[open ? "onactivate" : "ondeactivate"]()
	this.open = open
	if (open) this.setVisibility(true)
	this.startTime = (new Date()).getTime()
	this.aniTimer = window.setInterval(this.gRef + ".slide()", ypSlideOutMenu.minCPUResolution)
}
ypSlideOutMenu.prototype.slide = function() {
	var elapsed = (new Date()).getTime() - this.startTime
	if (elapsed > ypSlideOutMenu.aniLen) this.endSlide()
	else {
		var d = Math.round(Math.pow(ypSlideOutMenu.aniLen-elapsed, 2) * this.accelConst)
		if (this.open && this.dirType == "-") d = -d
		else if (this.open && this.dirType == "+") d = -d
		else if (!this.open && this.dirType == "-") d = -this.dim + d
		else d = this.dim + d
		this.moveTo(d)
	}
}
ypSlideOutMenu.prototype.endSlide = function() {
	this.aniTimer = window.clearTimeout(this.aniTimer)
	this.moveTo(this.open ? this.outPos : this.homePos)
	if (!this.open) this.setVisibility(false)
	if ((this.open && !this.over) || (!this.open && this.over)) {
		this.startSlide(this.over)
	}
}
ypSlideOutMenu.prototype.setVisibility = function(bShow) {
	var s = this.ns4 ? this.container : this.container.style
	s.visibility = bShow ? "visible" : "hidden"
}
ypSlideOutMenu.prototype.moveTo = function(p) {
	this.style[this.orientation == "h" ? "left" : "top"] = this.ns4 ? p : p + "px"
}
ypSlideOutMenu.prototype.getPos = function(c) {
	return parseInt(this.style[c])
}
ypSlideOutMenu.prototype.onactivate = function() { }
ypSlideOutMenu.prototype.ondeactivate = function() { }



/* --- DROP DOWN POSITIONING tama�o del menu --- */
	/* menu heights */
	menu1Height = 300;
	menu2Height = 300;
	menu3Height = 300;
	menu4Height = 300;
	menu5Height = 300;

	//menus de apollos
	menu6Height = 60;

	/* menu left posicion modificar posicion vertical */
	LeftOffset1 = -328;
	LeftOffset2 = -166;
	LeftOffset3 = -1;
	LeftOffset4 = 161;
	LeftOffset5 = 325;
	LeftOffset6 = -180;
	if(browser.isFirefox)
	{
		LeftOffset1 = -350;
		LeftOffset2 = -188;
		LeftOffset3 = -23;
		LeftOffset4 = 139;
		LeftOffset5 = 303;
		LeftOffset6 = -202;

	}
	if (browser.isMozilla || browser.isNS7up) {
		LeftOffset1 = LeftOffset1 + 10;
		LeftOffset3 = LeftOffset3 + 10;
		LeftOffset2 = LeftOffset2 + 10;
		LeftOffset4 = LeftOffset4 + 10;
		LeftOffset5 = LeftOffset5 + 10;
		LeftOffset6 = LeftOffset6 + 10;
		TopOffset = TopOffset + 2;
	}
	if (browser.isSafari || browser.isIEMac || browser.isFirefox || browser.isOpera) {
		menu1Height = menu1Height - 4;
		menu2Height = menu2Height - 12;
		menu3Height = menu3Height - 2;
		menu4Height = menu4Height - 14;
		menu5Height = menu5Height - 4;
		menu6Height = menu6Height - 4;
		LeftOffset1 = LeftOffset1 + 10;
		LeftOffset2 = LeftOffset2 + 10;
		LeftOffset3 = LeftOffset3 + 10;
		LeftOffset4 = LeftOffset4 + 10;
		LeftOffset5 = LeftOffset5 + 10;
		LeftOffset6 = LeftOffset6 + 10;
		TopOffset = TopOffset + 2;
	}
	if ( (browser.isFirefox && browser.isWin) || (browser.isOpera && browser.isWin) ) {
		menu1Height = menu1Height + 4;
		menu2Height = menu2Height + 12;
		menu3Height = menu3Height + 2;
		menu4Height = menu4Height + 14;
		menu5Height = menu5Height + 4;
		menu6Height = menu6Height + 4;
	}
	if (browser.isOpera && browser.isMac) {
		menu1Height = menu1Height + 2;
		menu2Height = menu2Height + 6;
		menu3Height = menu3Height + 1;
		menu4Height = menu4Height + 7;
		menu5Height = menu5Height + 2;
		menu6Height = menu6Height + 2;
	}
	if (browser.isIEMac || (browser.isFirefox && browser.isWin) || (browser.isNS7up && browser.isMac) ) {
		TopOffset = TopOffset - 1;
	}
	if (browser.isNS7up && browser.isMac) {
		menu1Height = menu1Height - 4;
		menu2Height = menu2Height - 12;
		menu3Height = menu3Height - 2;
		menu4Height = menu4Height - 14;
		menu5Height = menu5Height - 4;
		menu6Height = menu6Height - 4;
	}
	//cambia las propiedades de alto y ancho del menu
var myMenu1 = new ypSlideOutMenu("menu1", "down", 0, 0, 165, menu1Height)
var myMenu2 = new ypSlideOutMenu("menu2", "down", 0, 0, 167, menu2Height)
var myMenu3 = new ypSlideOutMenu("menu3", "down", 0, 0, 165, menu3Height)
var myMenu4 = new ypSlideOutMenu("menu4", "down", 0, 0, 167, menu4Height)
var myMenu5 = new ypSlideOutMenu("menu5", "down", 0, 0, 160, menu5Height)
var myMenu6 = new ypSlideOutMenu("menu6", "down", 0, 0, 49, menu6Height)

myMenu1.onactivate = repositionMenu1
myMenu2.onactivate = repositionMenu2
myMenu3.onactivate = repositionMenu3
myMenu4.onactivate = repositionMenu4
myMenu5.onactivate = repositionMenu5
myMenu6.onactivate = repositionMenu6

menu1ID = 'learn';
menu2ID = 'explore';
menu3ID = 'contact';
menu4ID = 'about';
menu5ID = 'search';

browsMin_Top = 79;

/*	Inicio Modificacion para FireFox por GJBC: 2007-10-13	*/
function repositionMenu1() {
 if (browser.isFirefox) {
		LeftOffset1 = 1 * ( menuWidth / menuDivision ) - 20;
		
		if (window.innerWidth < menuWidth)
			{menu1Left = LeftOffset1}
		else 	{menu1Left = (window.innerWidth - menuWidth)/2 + LeftOffset1};
		
		myMenu1.container.style ? myMenu1.container.style.left = menu1Left + "px" : myMenu1.container.left = menu1Left;
		myMenu1.container.style ? myMenu1.container.style.top = menuTop + "px" : myMenu1.container.left = menuTop;
 } else {
	menu1Left = getWindowWidth() / 2 + LeftOffset1;
	if (getWindowWidth() < 777) {
		menu1Left = 140;
	}
	menu1Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu1Top = browsMin_Top;
	}
	myMenu1.container.style ? myMenu1.container.style.left = menu1Left + "px" : myMenu1.container.left = menu1Left;
	myMenu1.container.style ? myMenu1.container.style.top = menu1Top + "px" : myMenu1.container.left = menu1Top;
 }
}

function repositionMenu2() {
if (browser.isFirefox) {
	LeftOffset2 = 2 * ( menuWidth / menuDivision ) - 16;

	if (window.innerWidth < menuWidth)
			{menu2Left = LeftOffset2}
	else 	{menu2Left = (window.innerWidth - menuWidth)/2 + LeftOffset2};

	myMenu2.container.style ? myMenu2.container.style.left = menu2Left + "px" : myMenu2.container.left = menu2Left;
	myMenu2.container.style ? myMenu2.container.style.top = menuTop + "px" : myMenu2.container.left = menuTop;
 } else {
	menu2Left = getWindowWidth() / 2 + LeftOffset2;
	if (getWindowWidth() < 777) {
		menu2Left = 271;
	}
	menu2Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu2Top = browsMin_Top;
	}
	myMenu2.container.style ? myMenu2.container.style.left = menu2Left + "px" : myMenu2.container.left = menu2Left;
	myMenu2.container.style ? myMenu2.container.style.top = menu2Top + "px" : myMenu2.container.left = menu2Top;
 }
}

function repositionMenu3() {
 if (browser.isFirefox) {
	LeftOffset3 = 3 * ( menuWidth / menuDivision ) - 14;

	if (window.innerWidth < menuWidth)
			{menu3Left = LeftOffset3}
	else 	{menu3Left = (window.innerWidth - menuWidth)/2 + LeftOffset3};

	myMenu3.container.style ? myMenu3.container.style.left = menu3Left + "px" : myMenu3.container.left = menu3Left;
	myMenu3.container.style ? myMenu3.container.style.top = menuTop + "px" : myMenu3.container.left = menuTop;
 } else {
	menu3Left = getWindowWidth() / 2 + LeftOffset3;
	if (getWindowWidth() < 777) {
		menu3Left = 433;
	}
	menu3Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu3Top = browsMin_Top;
	}
	myMenu3.container.style ? myMenu3.container.style.left = menu3Left + "px" : myMenu3.container.left = menu3Left;
	myMenu3.container.style ? myMenu3.container.style.top = menu3Top + "px" : myMenu3.container.left = menu3Top;
 }
}

function repositionMenu4() {
 if (browser.isFirefox) {
	LeftOffset4 = 4 * ( menuWidth / menuDivision ) - 12;

	if (window.innerWidth < menuWidth)
			{menu4Left = LeftOffset4}
	else 	{menu4Left = (window.innerWidth - menuWidth)/2 + LeftOffset4};

	myMenu4.container.style ? myMenu4.container.style.left = menu4Left + "px" : myMenu4.container.left = menu4Left;
	myMenu4.container.style ? myMenu4.container.style.top = menuTop + "px" : myMenu4.container.left = menuTop;
 } else {
	menu4Left = getWindowWidth() / 2 + LeftOffset4;
	if (getWindowWidth() < 777) {
		menu4Left = 530;
	}
	menu4Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu4Top = browsMin_Top;
	}
	myMenu4.container.style ? myMenu4.container.style.left = menu4Left + "px" : myMenu4.container.left = menu4Left;
	myMenu4.container.style ? myMenu4.container.style.top = menu4Top + "px" : myMenu4.container.left = menu4Top;
 }
}

function repositionMenu5() {
 if (browser.isFirefox) {
	LeftOffset5 = 5 * ( menuWidth / menuDivision ) - 10;

	if (window.innerWidth < menuWidth)
			{menu5Left = LeftOffset5}
	else 	{menu5Left = (window.innerWidth - menuWidth)/2 + LeftOffset5};

	myMenu5.container.style ? myMenu5.container.style.left = menu5Left + "px" : myMenu5.container.left = menu5Left;
	myMenu5.container.style ? myMenu5.container.style.top = menuTop + "px" : myMenu5.container.left = menuTop;
 } else {
	menu5Left = getWindowWidth() / 2 + LeftOffset5;
	if (getWindowWidth() < 777) {
		menu5Left = 684;
	}
	menu5Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu5Top = browsMin_Top;
	}
	myMenu5.container.style ? myMenu5.container.style.left = menu5Left + "px" : myMenu5.container.left = menu5Left;
	myMenu5.container.style ? myMenu5.container.style.top = menu5Top + "px" : myMenu5.container.left = menu5Top;
 }
}

function repositionMenu6() {
 if (browser.isFirefox) {
	LeftOffset6 = 6 * ( menuWidth / menuDivision) - 8;

	if (window.innerWidth < menuWidth)
			{menu6Left = LeftOffset6}
	else 	{menu6Left = (window.innerWidth - menuWidth)/2 + LeftOffset6};

	myMenu6.container.style ? myMenu6.container.style.left = menu6Left + "px" : myMenu6.container.left = menu6Left;
	myMenu6.container.style ? myMenu6.container.style.top = menuTop + "px" : myMenu6.container.left = menuTop;
 } else {
	menu6Left = getWindowWidth() / 2 + LeftOffset6;
	if (getWindowWidth() < 777) {
		menu6Left = 140;
	}
	menu6Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu6Top = browsMin_Top;
	}
	myMenu6.container.style ? myMenu6.container.style.left = menu6Left + "px" : myMenu6.container.left = menu6Left;
	myMenu6.container.style ? myMenu6.container.style.top = menu6Top + "px" : myMenu6.container.left = menu6Top;
 }
}
// Fin Modificacion para FireFox por GJBC: 2007-10-13


function getWindowWidth() {
	return window.innerWidth ? window.innerWidth : document.body.offsetWidth;
}

function getWindowHeight() {
	return window.innerHeight ? window.innerHeight : document.body.offsetHeight;
}

function getImgX(menID) {
	return document.getElementById(menID).x ? document.getElementById(menID).x : document.all[menID].offsetLeft;
}
function getImgY(menID) {
	return document.getElementById(menID).y ? document.getElementById(menID).y : document.getElementById(menID).offsetTop;
}


/* ---- SUB MENU FLY-OUTS ---- */
ypSlideOutSubMenu.Registry = []
ypSlideOutSubMenu.aniLen = 300
ypSlideOutSubMenu.hideDelay = 150
ypSlideOutSubMenu.minCPUResolution = 10
// constructor
function ypSlideOutSubMenu(id, dir, left, top, width, height) {
	this.ie = document.all ? 1 : 0
	this.ns4 = document.layers ? 1 : 0
	this.dom = document.getElementById ? 1 : 0
	if (this.ie || this.ns4 || this.dom) {
		this.id = id
		this.dir = dir
		this.orientation = dir == "left" || dir == "right" ? "h" : "v"
		this.dirType = dir == "right" || dir == "down" ? "-" : "+"
		this.dim = this.orientation == "h" ? width : height
		this.hideTimer = false
		this.aniTimer = false
		this.open = false
		this.over = false
		this.startTime = 0
		this.gRef = "ypSlideOutSubMenu_"+id
		eval(this.gRef+"=this")
		ypSlideOutSubMenu.Registry[id] = this
		var d = document
		var strCSS = '<style type="text/css">';
		strCSS += '#' + this.id + 'Container { visibility:hidden; '
		strCSS += 'left:' + left + 'px; '
		strCSS += 'top:' + top + 'px; '
		strCSS += 'overflow:hidden; z-index:10; }'
		strCSS += '#' + this.id + 'Container, #' + this.id + 'Content { position:absolute; '
		strCSS += 'width:' + width + 'px; '
		strCSS += 'height:' + height + 'px; '
		strCSS += '}'
		strCSS += '</style>'
		d.write(strCSS)
		this.load()
	}
}
ypSlideOutSubMenu.prototype.load = function() {
	var d = document
	var lyrId1 = this.id + "Container"
	var lyrId2 = this.id + "Content"
	var obj1 = this.dom ? d.getElementById(lyrId1) : this.ie ? d.all[lyrId1] : d.layers[lyrId1]
	if (obj1) var obj2 = this.ns4 ? obj1.layers[lyrId2] : this.ie ? d.all[lyrId2] : d.getElementById(lyrId2)
	var temp
	if (!obj1 || !obj2) window.setTimeout(this.gRef + ".load()", 100)
	else {
		this.container = obj1
		this.menu = obj2
		this.style = this.ns4 ? this.menu : this.menu.style
		this.homePos = eval("0" + this.dirType + this.dim)
		this.outPos = 0
		this.accelConst = (this.outPos - this.homePos) / ypSlideOutSubMenu.aniLen / ypSlideOutSubMenu.aniLen
		// set event handlers.
		if (this.ns4) this.menu.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
		this.menu.onmouseover = new Function("ypSlideOutSubMenu.showMenu('" + this.id + "')")
		this.menu.onmouseout = new Function("ypSlideOutSubMenu.hideMenu('" + this.id + "')")
		//set initial state
		this.endSlide()
	}
}
ypSlideOutSubMenu.showMenu = function(id) {
	var reg = ypSlideOutSubMenu.Registry
	var obj = ypSlideOutSubMenu.Registry[id]
	if (obj.container) {
		obj.over = true
		//for (menu in reg) if ((id != menu) && (id1 != menu)) ypSlideOutSubMenu.hide(menu)
		if (obj.hideTimer) { reg[id].hideTimer = window.clearTimeout(reg[id].hideTimer) }
		if (!obj.open && !obj.aniTimer) reg[id].startSlide(true)
	}
}
ypSlideOutSubMenu.hideMenu = function(id) {
	var obj = ypSlideOutSubMenu.Registry[id]
	if (obj.container) {
		if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
		obj.hideTimer = window.setTimeout("ypSlideOutSubMenu.hide('" + id + "')", ypSlideOutSubMenu.hideDelay);
	}
}
ypSlideOutSubMenu.hideAll = function() {
		var reg = ypSlideOutSubMenu.Registry
	for (menu in reg) {
		ypSlideOutSubMenu.hide(menu);
		if (menu.hideTimer) window.clearTimeout(menu.hideTimer);
	}
}
ypSlideOutSubMenu.hide = function(id) {
	var obj = ypSlideOutSubMenu.Registry[id]
	obj.over = false
	if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
	obj.hideTimer = 0
	if (obj.open && !obj.aniTimer) obj.startSlide(false)
}
ypSlideOutSubMenu.prototype.startSlide = function(open) {
	this[open ? "onactivate" : "ondeactivate"]()
	this.open = open
	if (open) this.setVisibility(true)
	this.startTime = (new Date()).getTime()
	this.aniTimer = window.setInterval(this.gRef + ".slide()", ypSlideOutSubMenu.minCPUResolution)
}
ypSlideOutSubMenu.prototype.slide = function() {
	var elapsed = (new Date()).getTime() - this.startTime
	if (elapsed > ypSlideOutSubMenu.aniLen) this.endSlide()
	else {
		var d = Math.round(Math.pow(ypSlideOutSubMenu.aniLen-elapsed, 2) * this.accelConst)
		if (this.open && this.dirType == "-") d = -d
		else if (this.open && this.dirType == "+") d = -d
		else if (!this.open && this.dirType == "-") d = -this.dim + d
		else d = this.dim + d
		this.moveTo(d)
	}
}
ypSlideOutSubMenu.prototype.endSlide = function() {
	this.aniTimer = window.clearTimeout(this.aniTimer)
	this.moveTo(this.open ? this.outPos : this.homePos)
	if (!this.open) this.setVisibility(false)
	if ((this.open && !this.over) || (!this.open && this.over)) {
		this.startSlide(this.over)
	}
}
ypSlideOutSubMenu.prototype.setVisibility = function(bShow) {
	var s = this.ns4 ? this.container : this.container.style
	s.visibility = bShow ? "visible" : "hidden"
}
ypSlideOutSubMenu.prototype.moveTo = function(p) {
	this.style[this.orientation == "h" ? "left" : "top"] = this.ns4 ? p : p + "px"
}
ypSlideOutSubMenu.prototype.getPos = function(c) {
	return parseInt(this.style[c])
}
ypSlideOutSubMenu.prototype.onactivate = function() { }
ypSlideOutSubMenu.prototype.ondeactivate = function() { }




// DROP DOWN POSITIONING
/* menu heights */
submenu1aHeight = 150;
submenu2cHeight = 160;
submenu2aHeight = 210;
submenu2bHeight = 210;
submenu3aHeight = 180;
subsubmenu3aHeight = 150;
subsubmenu3bHeight = 150;
submenu3bHeight = 150;

if (browser.isSafari || browser.isIEMac || browser.isFirefox || (browser.isNS7up && browser.isMac)) {
	submenu1aHeight = submenu1aHeight - 10;
	submenu2cHeight = submenu2cHeight - 10;
	submenu2aHeight = submenu2aHeight - 10;
	submenu2bHeight = submenu2bHeight - 10;
	submenu3aHeight = submenu3aHeight - 10;
	submenu3bHeight = submenu3bHeight - 10;
	subsubmenu3aHeight = subsubmenu3aHeight - 10;
	subsubmenu3bHeight = subsubmenu3bHeight - 10;
}
if (browser.isFirefox && browser.isWin) {
	submenu1aHeight = submenu1aHeight + 10;
	submenu2cHeight = submenu2cHeight + 10;
	submenu2aHeight = submenu2aHeight + 10;
	submenu2bHeight = submenu2bHeight + 10;
	submenu3aHeight = submenu3aHeight + 10;
	submenu3bHeight = submenu3bHeight + 10;
	subsubmenu3aHeight = subsubmenu3aHeight + 10;
	subsubmenu3bHeight = subsubmenu3bHeight + 10;
}
if (browser.isOpera && browser.isMac) {
	submenu1aHeight = submenu1aHeight - 5;
	submenu2cHeight = submenu2cHeight - 5;
	submenu2aHeight = submenu2aHeight - 5;
	submenu2bHeight = submenu2bHeight;
	submenu3aHeight = submenu3bHeight - 5;
	submenu3bHeight = submenu3bHeight - 5;
	subsubmenu3aHeight = subsubmenu3aHeight - 5;
	subsubmenu3bHeight = subsubmenu3bHeight - 5;
}

var mySubMenu1a = new ypSlideOutSubMenu("submenu1a", "right", 0, 0, 163, submenu1aHeight)
var mySubMenu2c = new ypSlideOutSubMenu("submenu2c", "right", 0, 0, 163, submenu2cHeight)
var mySubMenu2a = new ypSlideOutSubMenu("submenu2a", "right", 0, 227, 163, submenu2aHeight)
var mySubMenu2b = new ypSlideOutSubMenu("submenu2b", "right", 0, 0, 163, submenu2bHeight)
var mySubMenu3a = new ypSlideOutSubMenu("submenu3a", "right", 0, 293, 163, submenu3aHeight)
var mySubSubMenu3a = new ypSlideOutSubMenu("subsubmenu3a", "right", 0, 293, 163, subsubmenu3aHeight)
var mySubSubMenu3b = new ypSlideOutSubMenu("subsubmenu3b", "right", 0, 326, 163, subsubmenu3bHeight)
var mySubMenu3b = new ypSlideOutSubMenu("submenu3b", "right", 0, 326, 163, submenu3bHeight)

mySubMenu1a.onactivate = repositionSubMenu1a
mySubMenu2c.onactivate = repositionSubMenu2c
mySubMenu2a.onactivate = repositionSubMenu2a
mySubMenu2b.onactivate = repositionSubMenu2b
mySubMenu3a.onactivate = repositionSubMenu3a
mySubMenu3b.onactivate = repositionSubMenu3b
mySubSubMenu3a.onactivate = repositionSubSubMenu3a
mySubSubMenu3b.onactivate = repositionSubSubMenu3b

subLeftPos = 164;
subLeftPos2 = 169;

function repositionSubMenu1a() {
	submenuLeft = menu1Left + subLeftPos;
	submenuTop = menuTop + 80;
	mySubMenu1a.container.style ? mySubMenu1a.container.style.left = submenuLeft + "px" : mySubMenu1a.container.left = submenuLeft;
	mySubMenu1a.container.style ? mySubMenu1a.container.style.top = submenuTop + "px" : mySubMenu1a.container.top = submenuTop;
}
function repositionSubMenu2a() {
	submenuLeft = menu2Left + subLeftPos2-2;
	submenuTop = menuTop + 1;
	mySubMenu2a.container.style ? mySubMenu2a.container.style.left = submenuLeft + "px" : mySubMenu2a.container.left = submenuLeft;
	mySubMenu2a.container.style ? mySubMenu2a.container.style.top = submenuTop -1  : mySubMenu2a.container.top = submenuTop;
}
function repositionSubMenu2b() {
	submenuLeft = menu2Left + subLeftPos2-2;
	submenuTop = menuTop + 33;
	mySubMenu2b.container.style ? mySubMenu2b.container.style.left = submenuLeft + "px" : mySubMenu2b.container.left = submenuLeft;
	mySubMenu2b.container.style ? mySubMenu2b.container.style.top = submenuTop + "px" : mySubMenu2b.container.top = submenuTop;
}
function repositionSubMenu2c() {
	submenuLeft = menu2Left + subLeftPos+1;
	submenuTop = menuTop + 65;
	mySubMenu2c.container.style ? mySubMenu2c.container.style.left = submenuLeft + "px" : mySubMenu2c.container.left = submenuLeft;
	mySubMenu2c.container.style ? mySubMenu2c.container.style.top = submenuTop + "px" : mySubMenu2c.container.top = submenuTop;
}
// cambia las propiedades del nivel 3 del submenu 3a
function repositionSubMenu3a() {
	submenuLeft = menu3Left + subLeftPos+0;
	submenuTop = menuTop + 65;
	mySubMenu3a.container.style ? mySubMenu3a.container.style.left = submenuLeft + "px" : mySubMenu3a.container.left = submenuLeft;
	mySubMenu3a.container.style ? mySubMenu3a.container.style.top = submenuTop +1 : mySubMenu3a.container.top = submenuTop;
}
function repositionSubSubMenu3a() {
	submenuLeft = menu3Left + subLeftPos + 162;
	submenuTop = menuTop + 65;
	mySubSubMenu3a.container.style ? mySubSubMenu3a.container.style.left = submenuLeft + "px" : mySubSubMenu3a.container.left = submenuLeft;
	mySubSubMenu3a.container.style ? mySubSubMenu3a.container.style.top = submenuTop +1 : mySubSubMenu3a.container.top = submenuTop;
}
function repositionSubSubMenu3b() {
	submenuLeft = menu3Left + subLeftPos + 162;
	submenuTop = menuTop + 95;
	mySubSubMenu3b.container.style ? mySubSubMenu3b.container.style.left = submenuLeft + "px" : mySubSubMenu3b.container.left = submenuLeft;
	mySubSubMenu3b.container.style ? mySubSubMenu3b.container.style.top = submenuTop + 4 : mySubSubMenu3b.container.top = submenuTop;
}
function repositionSubMenu3b() {
	submenuLeft = menu3Left + subLeftPos;
	submenuTop = menuTop + 98;
	mySubMenu3b.container.style ? mySubMenu3b.container.style.left = submenuLeft + "px" : mySubMenu3b.container.left = submenuLeft;
	mySubMenu3b.container.style ? mySubMenu3b.container.style.top = submenuTop +1 : mySubMenu3b.container.top = submenuTop;
}

function subActive(id,OorF) {
	classN = 'menuAr';
	if (OorF == 'on') { classN = 'hover'; }
	document.getElementById(id).className = classN;
}

if (browser.isNS7x && browser.isWin) {
	document.write('<style type="text/css">.menu { -moz-opacity: 0.7; } .sub-menu { -moz-opacity: 0.7; } </style>');
}

//Flash module loader Added 12/13/04 //// Cory
function targetOpener( siteLink ){
            var newWindow = '';
            if ( siteLink.substring(0,4) == "http" ) {
                        newWindow = window.open( siteLink ,'offsite','height=600,width=800,scrollbars=yes,resizable=yes');
                        if ( !newWindow.opener ) newWindow.opener = self;
                        window.focus();
            } else {
                        window.opener.location.href=siteLink
            }
}

