function slideIt(selection) {
  if (!(selection == currSelection)) {
    xTarget = ((selection%2) * (winWidth-242))+46; 
    yTarget = (Math.floor(selection/2)) * (winHeight-242)+46;
    doSlide();
    initguideObjects(yTarget, xTarget);
    setWinpos(selection);
    setTimeout('flipWins();',1500);
    putNav(selection);
  }
    currSelection = selection;
}

function doSlide() {
  dX = (xTarget - cleft); dY = (yTarget - ctop);
  if (!(dX==0) || !(dY==0)) {
    stepX = (Math.abs(dX)<2) ? dX:dX/10;
    stepY = (Math.abs(dY)<2) ? dY:dY/10;
    cleft = cleft + stepX; ctop = ctop + stepY;
    initsliderObjects();
    setTimeout("doSlide();",Kdelay);
  }
  initClicker();
}
function setWinpos(selection) {
  for (x=1; x>-1; x--){
    winObject[x].DHTML.visibility='hidden';
    winObject[x].DHTML.top = guideObject[locationArray[selection][x]].top;
    winObject[x].DHTML.left = guideObject[locationArray[selection][x]].left;
    winObject[x].DHTML.width = guideObject[locationArray[selection][x]].width;
    winObject[x].DHTML.height = guideObject[locationArray[selection][x]].height;
  }  
}
function loadPages(selection) {
    if(Zflag.gecko) {
        document.getElementById(winObject[0].ID).src = contentArray[selection][0] ;
    } else if(Zflag.IE) {
        document.frames[winObject[0].ID].document.location = contentArray[selection][0] ;
    }
}

function flipWins() {
  for (x=1;x>-1;x--) { 
    winObject[x].DHTML.visibility = 'visible';
  }
}

function putNav(selection) {
  if (selection == 3 || selection==2) {
    if(Zflag.gecko) {
        document.getElementById(winObject[1].ID).src = contentArray[selection][1] ;
    } else if(Zflag.IE) {
        document.frames[winObject[1].ID].document.location = contentArray[selection][1] ;
    }
  } else {    
    if(Zflag.gecko) {
      window.frames.navframe.document.getElementById('dataspace').innerHTML = "";
      window.frames.navframe.document.getElementById('dataspace').innerHTML = window.frames.mainframe.document.getElementById('navigation').innerHTML;
    } else if(Zflag.IE) {
      document.frames['navframe'].document.dataspace.innerHTML = "";
      document.frames['navframe'].document.dataspace.innerHTML = document.frames['mainframe'].document.navigation.innerHTML;
    }
  }
}


