// Funciones generales

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


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];}}
}



/*
Shake image script (onMouseover)- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

//configure shake degree (where larger # equals greater shake)
var rector=1

///////DONE EDITTING///////////
var stopit=0 
var a=1

function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}

function rattleimage(){
if ((!document.all&&!document.getElementById)||stopit==1)
return
if (a==1){
shake.style.top=parseInt(shake.style.top)+rector
}
else if (a==2){
shake.style.left=parseInt(shake.style.left)+rector
}
else if (a==3){
shake.style.top=parseInt(shake.style.top)-rector
}
else{
shake.style.left=parseInt(shake.style.left)-rector
}
if (a<4)
a++
else
a=1
setTimeout("rattleimage()",50)
}

function stoprattle(which){
stopit=1
which.style.left=0
which.style.top=0
}



// Navigation Properties

var webSiteWidth = 780;
var curNav = null;
var delay = 250;
var timer = 0;

// |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// Navigation Functions

function showSub( subName, xOffset ){
	var e, windowWidth, webSiteLeft;
	cancelHide();
	hideSubNavigation();
	e = document.getElementById(subName);
	windowWidth = document.all ? document.body.clientWidth : window.innerWidth;
	webSiteLeft = (windowWidth - webSiteWidth)/2;
	if( webSiteLeft < 0 ) webSiteLeft = 0;
	e.style.left = webSiteLeft + xOffset;

	e.style.visibility = 'visible';
	curNav = subName;
}
function hideSubNavigation(){
	if( curNav != null ){
		e = document.getElementById(curNav);
		e.style.visibility = 'hidden';
		curNav = null;
	}
}
function hideSub(){
	timer = setTimeout('hideSubNavigation()', delay);
}
function cancelHide(){
	clearTimeout(timer);
	timer = 0;
}
function navOver(e){
	e.style.backgroundColor = '#88A8CE';
	e.style.color = '#FDFDFD';
}
function navOut(e){
	e.style.backgroundColor = '#FDFDFD';
	e.style.color = '#01143F';
}

// |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||