// Cross Browser DOM
// copyright Stephen Chapman, 4th Jan 2005
// you may copy this code but please keep the copyright notice as well
var aDOM = 0, ieDOM = 0, nsDOM = 0; var stdDOM = document.getElementById;
if (stdDOM) aDOM = 1; else {ieDOM = document.all; if (ieDOM) aDOM = 1; else {
var nsDOM = ((navigator.appName.indexOf('Netscape') != -1)
&& (parseInt(navigator.appVersion) ==4)); if (nsDOM) aDOM = 1;}}
function xDOM(objectId, wS) {
if (stdDOM) return wS ? document.getElementById(objectId).style:
document.getElementById(objectId);
if (ieDOM) return wS ? document.all[objectId].style: document.all[objectId];
if (nsDOM) return document.layers[objectId];
}

// More Object Functions
// copyright Stephen Chapman, 18th Jan 2005
// you may copy these functions but please keep the copyright notice as well
function setObjVis(objectID,vis) {var objs = xDOM(objectID,1); objs.visibility = vis;}
function toggleObjVis(objectID) {var objs = xDOM(objectID,1); var vis = objs.visibility; objs.visibility = (vis == "visible" || vis == "show") ? 'hidden' : 'visible';}
function moveObjTo(objectID,x,y) {var objs = xDOM(objectID,1); objs.left = x; objs.top = y;}
function moveObjBy(objectID,x,y) {var obj = xDOM(objectID,0);var objs = xDOM(objectID,1); if (obj.offsetLeft != null) {var l = obj.offsetLeft; var t = obj.offsetTop; objs.left = l+x; objs.top = t+y;} else if (objs.pixelLeft != null) {objs.pixelLeft += x; objs.pixelTop += y;} else obj.moveBy(x,y);}
function moveObjLayer(objectID,z) {var objs = xDOM(objectID,1); objs.zIndex = z;}


// Browser Window Size and Position
// copyright Stephen Chapman, 3rd Jan 2005
// you may copy these functions but please keep the copyright notice as well
function pageWidth() {return window.innerWidth != null? window.innerWidth: document.body != null? document.body.clientWidth:null;}
function pageHeight() {return window.innerHeight != null? window.innerHeight: document.body != null? document.body.clientHeight:null;}
function posLeft() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset:document.documentElement.scrollLeft? document.documentElement.scrollLeft:document.body.scrollLeft? document.body.scrollLeft:0;}
function posTop() {return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:document.documentElement.scrollTop? document.documentElement.scrollTop: document.body.scrollTop?document.body.scrollTop:0;}
function posRight() {return posLeft()+pageWidth();}
function posBottom() {return posTop()+pageHeight();}

function start() {
var x = (posLeft()-0) + 'px';
var y = (posBottom()-28) + 'px';
moveObjTo('contenedor_pie_fondo',x,y);
setObjVis('contenedor_pie_fondo','visible');

var x2 = (posLeft()-0) + 'px';
var y2 = (posBottom()-269) + 'px';
moveObjTo('contenedor_fondo_cuerpo',x2,y2);
setObjVis('contenedor_fondo_cuerpo','visible');
}

function detectspecialkeys(){
alert("you pressed one of the 'Alt', 'Ctrl', or 'Shift' keys")
}

function KeyCheck(e)

{

   var KeyID = (window.event) ? event.keyCode : e.keyCode;

   switch(KeyID)

   {

      case 38:

      // Arrow Up

      start();

      case 40:

      // Arrow Down

      start();
      
      case 36:

      // Inicio

      start();
      
      case 35:

      // Fin

      start();
      
      case 33:

      // RePag

      start();
      
      case 34:

      // AvPag

      start();
      
   }

}

document.onkeyup=KeyCheck;

window.onload = start;
window.onscroll = start;
window.onresize = start;



