<!-- StereoViewPort version 1.0  -->
<!-- StereoViewPort is a trademark of Graphic Media Research, Cannon Falls, MN  -->
<!-- Copyright (c) 2001 Monte J. Ramstad  -->

///////Do not edit this file///////////////////////
imagearray = new Array("")
var i=0
var j=0
var vpos1=0
var vpos2=0
var showbgcolor="white"
var loaded=true
//var speedfactor=1
//var timedelay = 4000
var rightloaded = false
var leftloaded = false
var playbut = "Play"
var even=false
var step=20
var loaded=false
var origWidth, origHeight;

var shpos
var hposR
var scrollerwidth=0
var scrollerheight=0
var hpos1=0
var hpos2=0
var scrollx
var scrolly
var dscroll=2
var n=0
var vscroll
var hscroll
var oneimage
var sep
var zo=1
var ihe, iwi;
var newf = "P"
if (document.all) {
dscroll = 4
}

function writescroll(inside) {
  inside--;
  z=j;
  if (document.showdata.showcolor)
    showbgcolor=document.showdata.showcolor.value
  tool0='<A TITLE="Zoom" HREF="javascript:zoom('+z+')"><img SRC="http://www.pokescope.com/data/zoom3.gif" ALT="Zoom" BORDER=0 HEIGHT=19 WIDTH=19 ></A>'
  tool1='<A TITLE="Swap" HREF="javascript:swap('+z+')"><img SRC="http://www.pokescope.com/data/swap3.gif" ALT="Swap" BORDER=0 HEIGHT=19 WIDTH=19 ></A>'
  image1='<A TITLE="Scroll" HREF="javascript:scrollleft('+z+')"><img SRC="http://www.pokescope.com/data/left3.gif" ALT="Left" BORDER=0 HEIGHT=19 WIDTH=19 ></A>'
  image2='<A TITLE="Scroll" HREF="javascript:scrollright('+z+')"><img SRC="http://www.pokescope.com/data/right3.gif" ALT="Right" BORDER=0 HEIGHT=19 WIDTH=19 ></A>'
  image3='<A TITLE="Scroll" HREF="javascript:scrollup('+z+')"><img SRC="http://www.pokescope.com/data/up3.gif" ALT="Up" BORDER=0 HEIGHT=19 WIDTH=19 ></A>'
  image4='<A TITLE="Scroll" HREF="javascript:scrolldown('+z+')"><img SRC="http://www.pokescope.com/data/down3.gif" ALT="Down" BORDER=0 HEIGHT=19 WIDTH=19 ></A>'

  if (document.layers){
    if (inside == 0)
      shpos=(window.innerWidth-scrollerwidth-16)/3
    else
      shpos=(window.innerWidth-scrollerwidth-16)/6
    shpos+=(scrollerwidth/2-190)/2
    document.writeln('<ilayer id="mainScr'+inside+'" left='+shpos+' top=0 width=190 height=30 bgColor='+showbgcolor+' overflow=hiden visibility=show>')
    document.writeln('<layer id="izoom" left=5 top=2 width=19 visibility=hide>')
    document.writeln(tool0)
    document.writeln('</layer>') 
    document.writeln('<layer id="iswap" left=25 top=2 width=19 visibility=hide>')
    document.writeln(tool1)
    document.writeln('</layer>')
    document.writeln('<layer id="iscrollh'+inside+'" left=65 top=2 width=75  visibility=hide>')
    document.writeln(image1)
    document.writeln(image2)
    document.writeln('</layer>')  
    document.writeln('<layer id="imessage'+inside+'" left=50 top=2 width=150  visibility=hide>')
    document.writeln('<font size=+1>Loading ...</font>')
    document.writeln('</layer>')  
    document.writeln('<layer id="iscrollv'+inside+'" left=120 top=2 width=75  visibility=hide>')
    document.writeln(image3)
    document.writeln(image4)
    document.writeln('</layer>')
    document.writeln('</ilayer>')

   // document.mainScr1.document.izoom.clip.width=16
  }
  else if (document.all){
    if (inside==0)
      shpos=(document.body.offsetWidth-20-scrollerwidth)/3
    else
      shpos=(document.body.offsetWidth-20-scrollerwidth)/6
    shpos+=(scrollerwidth/2-190)/2
    document.writeln('<span id="main'+inside+'Scr" style="position:relative;left:'+shpos+';top:0;width:190;height:30;overflow:hiden;background-color:'+showbgcolor+'">')
    //document.writeln('<div style="position:absolute;width:190;height:30;clip:rect(0 190 30 0);left:0;top:0">')
    document.writeln('<div id="izoom'+inside+'" style="position:absolute;width:19;left:5;top:2;visibility:hidden;">')
    document.writeln(tool0)
    document.writeln('</div>')
    document.writeln('<div id="iswap'+inside+'" style="position:absolute;width:19;left:25;top:2;visibility:hidden;">')
    document.writeln(tool1)
    document.writeln('</div>')
    document.writeln('<div id="iscrollh'+inside+'" style="position:absolute;width:75;left:65;top:2;visibility:hidden;">')
    document.writeln(image1)
    document.writeln(image2)
    document.writeln('</div>')   
    document.writeln('<div id="imessage'+inside+'" style="position:absolute;width:150;left:50;top:2;visibility:hidden;">')
    document.writeln('<font size=+1>Loading ...</font>')
    document.writeln('</div>') 
    document.writeln('<div id="iscrollv'+inside+'" style="position:absolute;width:75;left:120;top:2;visibility:hidden;">')
    document.writeln(image3)
    document.writeln(image4)
    document.writeln('</div>')
    document.writeln('</span>')
  }
}
function onerightimage(inimage,iwidth,iheight,isep) {
  oneimage=inimage
  imagearray[2*i-1]=inimage
    image='<img src="'+oneimage+'" border="0">'
  scrollerwidth=2*iwidth
  scrollerheight=iheight
  if (document.showdata.showcolor)
    showbgcolor=document.showdata.showcolor.value
  if (document.layers){
    hposR=(window.innerWidth-16-scrollerwidth)/6
    //hposR = isep
    document.writeln('<ilayer id="mainR'+i+'" left='+hposR+' top=0 width='+scrollerwidth/2+' height='+scrollerheight+' bgColor='+showbgcolor+' overflow=hiden; visibility=hide>')
    document.writeln('<layer id="firstR" left=-'+scrollerwidth/2+' top=0 width='+scrollerwidth/2+' visibility=hide>')

    document.writeln(image)
    document.writeln('</layer>')
    document.writeln('<layer id="secondR" left=-'+scrollerwidth/2+' top=0 width='+scrollerwidth/2+' visibility=hide>')

    document.writeln(image)
    document.writeln('</layer>')
    document.writeln('</ilayer>')
  }
  if (document.all){
    hposR=(document.body.offsetWidth-20-scrollerwidth)/6
    //hposR = isep
    document.writeln('<span id="main2R'+i+'" style="position:relative;left:'+hposR+';top:0;width:'+scrollerwidth/2+';height:'+scrollerheight+';overflow:hiden;background-color:'+showbgcolor+'">')
    document.writeln('<div style="position:absolute;width:'+scrollerwidth/2+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth/2+' '+scrollerheight+' 0);left:0;top:0;">')
    document.writeln('<div id="first2R'+i+'" style="position:absolute;width:'+scrollerwidth/2+';left:-'+scrollerwidth/2+';top:0;visibility:hidden;">')
    document.writeln('</div>')
    document.writeln('<div id="second2R'+i+'" style="position:absolute;width:'+scrollerwidth/2+';left:-'+scrollerwidth/2+';top:0;visibility:visible;">')
    document.writeln('</div>')
    document.writeln('</div>')
    document.writeln('</span>')
  }
}

function oneleftimage(inimage,iwidth,iheight,isep) {
  i=i+1
  oneimage=inimage
  imagearray[2*i-2]=inimage
    image='<img src="'+oneimage+'" border="0">'
  scrollerwidth=2*iwidth
  scrollerheight=iheight
  if (document.showdata.showcolor)
    showbgcolor=document.showdata.showcolor.value
  if (document.layers){
    hposL=(window.innerWidth-16-scrollerwidth)/3
    //hposL= isep
    document.writeln('<ilayer id="mainL'+i+'" left='+hposL+' top=0 width='+scrollerwidth/2+' height='+scrollerheight+' bgColor='+showbgcolor+' overflow=hiden; visibility=hide>')
    document.writeln('<layer id="firstL" left=0 top=0 width='+scrollerwidth/2+' visibility=hide>')

    document.writeln(image)
    document.writeln('</layer>')
    document.writeln('<layer id="secondL" left=0 top=0 width='+scrollerwidth/2+' visibility=hide>')

    document.writeln(image)
    document.writeln('</layer>')
    document.writeln('</ilayer>')

  }
  if (document.all){
    hposL=(document.body.offsetWidth-20-scrollerwidth)/3
   // hposL= isep
    document.writeln('<span id="main2L'+i+'" style="position:relative;left:'+hposL+';top:0;width:'+scrollerwidth/2+';height:'+scrollerheight+';overflow:hiden;background-color:'+showbgcolor+'">')
    document.writeln('<div style="position:absolute;width:'+scrollerwidth/2+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth/2+' '+scrollerheight+' 0);left:0;top:0">')
    document.writeln('<div id="first2L'+i+'" style="position:absolute;width:'+scrollerwidth/2+';left:0;top:0;visibility:hidden;">')
    document.writeln('</div>')
    document.writeln('<div id="second2L'+i+'" style="position:absolute;width:'+scrollerwidth/2+';left:0;top:0;visibility:visible;">')
    document.writeln('</div>')
    document.writeln('</div>')
    document.writeln('</span>')
  }
}


function whileloading() {
  if (document.all){
      document.all.iscrollh0.style.visibility = "hidden"; 
      document.all.iscrollh1.style.visibility = "hidden";
      document.all.iscrollv0.style.visibility = "hidden"; 
     document.all.iscrollv1.style.visibility = "hidden";
     document.all.imessage0.style.visibility = "visible";
     document.all.imessage1.style.visibility = "visible";
  }
  else 
  if (document.layers){
      document.mainScr0.document.iscrollh0.visibility = 'hide'; 
      document.mainScr1.document.iscrollh1.visibility = 'hide'; 
      document.mainScr0.document.iscrollv0.visibility = 'hide'; 
      document.mainScr1.document.iscrollv1.visibility = 'hide'; 
      document.mainScr0.document.imessage0.visibility = 'show'; 
      document.mainScr1.document.imessage1.visibility = 'show';
  }
}
function move1(k){
  tlayerL=document.layers[k].document.firstL
  tlayerR=document.layers[k+1].document.firstR
  tlayer2L=document.layers[k].document.secondL
  tlayer2R=document.layers[k+1].document.secondR
  if (!leftloaded) {
  oneimage = imagearray[k]
  //oneimage = tlayerL.document.Image
    if (zo==0) {
      whileloading()
    }
    image='<img src="'+oneimage+'" onload="loadcheckL('+k+')" border="0">'
    tlayerL.document.write(image )
    tlayerL.document.close()
  }
  else {
    document.mainScr0.document.imessage0.visibility = 'hide'; 
    document.mainScr1.document.imessage1.visibility = 'hide';
    scrollerheight=document.layers[k].clip.height
    scrollerwidth=document.layers[k].clip.width*2
    iwi=tlayerL.document.images[0].width
    ihe=tlayerL.document.images[0].height
    if (zo==0) zoom(k)
    scrolly=-(scrollerheight-zo*ihe)/2
    scrollx=-(scrollerwidth-zo*iwi)/4
    if (newf=="P") {
      tlayer2R.clip.left=zo*iwi/2
      tlayer2L.clip.left=0
    }
    else {
      tlayer2L.clip.left=zo*iwi/2
      tlayer2R.clip.left=0
    }
    tlayer2L.clip.height=zo*ihe
    tlayer2L.clip.width=zo*iwi/2
    tlayer2R.clip.height=zo*ihe
    tlayer2R.clip.width=zo*iwi/2
 
    newscroll(k)
    oneimage = imagearray[k]
  //oneimage = tlayer2L.document.Image
    //image='<img src="'+tlayerL.document.images[0]+'" border="0">'
    //image='<img src="'+oneimage+'" border="0">'
    image='<img src="'+oneimage+'" width="'+zo*iwi+'" height="'+zo*ihe+'" border="0">'
    tlayer2L.document.write(image )
    tlayer2L.document.close()
    oneimage = imagearray[k+1]
  //oneimage = tlayer2R.document.Image
    image='<img src="'+oneimage+'" width="'+zo*iwi+'" height="'+zo*ihe+'" onload="loadcheckR()" border="0">'
    //image='<img src="'+tlayerL.document.images[0]+'" onload="loadcheckR()" border="0">'
    tlayer2R.document.write(image )
    tlayer2R.document.close()
  }

}

function move3(k){
  tdivL=first2L1
  tdivR=first2R1
  tdiv2L=second2L1
  tdiv2R=second2R1
  if (!leftloaded) {
  if (zo==0)
    whileloading()
    oneimage = imagearray[k]
    image ='<img src="'+oneimage+'" onload="loadcheckL('+k+')" border="0">'
    tdivL.innerHTML=image
  }
  else {
     document.all.imessage0.style.visibility = "hidden";
     document.all.imessage1.style.visibility = "hidden";
    //scrollerheight=document.layers[k].clip.height
    //scrollerwidth=document.layers[k].clip.width*2
    //scrolly=-(scrollerheight-tdivL.document.images[0].height)/2
    //scrollx=-(scrollerwidth-tdivL.document.images[0].width)/4
    iwi=tdivL.document.images[0].width
    ihe=tdivL.document.images[0].height
    if (zo==0) zoom(k)
    scrolly=-(scrollerheight-zo*ihe)/2
    scrollx=-(scrollerwidth-zo*iwi)/4
    if (newf=="P") {
    clipLeft=0
    clipRight=zo*iwi/2
    clipBottom=zo*ihe
    clipstring = 'rect(0 '+clipRight+' '+clipBottom+' '+clipLeft+')'
    tdiv2L.style.clip = clipstring;
    clipLeft=zo*iwi/2
    clipRight=zo*iwi
    clipstring = 'rect(0 '+clipRight+' '+clipBottom+' '+clipLeft+')'
    tdiv2R.style.clip = clipstring;
    }
    else {
    clipLeft=zo*iwi/2
    clipRight=zo*iwi
    clipBottom=zo*ihe
    clipstring = 'rect(0 '+clipRight+' '+clipBottom+' '+clipLeft+')'
    tdiv2L.style.clip = clipstring;
    clipLeft=0
    clipRight=zo*iwi/2
    clipstring = 'rect(0 '+clipRight+' '+clipBottom+' '+clipLeft+')'
    tdiv2R.style.clip = clipstring;
    //  tlayer2L.clip.left=zo*iwi/2
    //  tlayer2R.clip.left=0
    }


    newscroll(k)
    oneimage = imagearray[k]
    //imagel='<img src="'+oneimage+'" border="0">'
    imagel='<img src="'+oneimage+'" width="'+zo*iwi+'" height="'+zo*ihe+'" border="0">'
    tdiv2L.innerHTML=imagel
    imager='<img src="'+oneimage+'" width="'+zo*iwi+'" height="'+zo*ihe+'" onload="loadcheckR()" border="0">'
    tdiv2R.innerHTML=imager
  }
}

function startshow(){
zo = 0
//  for (j=0; j<i, j+=2) {
//   j=0
    if (document.all) {
      clipstring = 'rect(0 38 19 19)'
     // iswap0.style.clip = clipstring;
     // iswap1.style.clip = clipstring;
      clipstring = 'rect(0 19 19 0)'
     // izoom0.style.clip = clipstring;
     // izoom1.style.clip = clipstring;
      first2L1.style.pixelTop=scrollerheight
      first2R1.style.pixelTop=scrollerheight
      move3(j)
      iswap0.style.visibility='visible'
      izoom0.style.visibility='visible'
      iswap1.style.visibility='visible'
      izoom1.style.visibility='visible'
    }
    else if (document.layers) {
      //document.mainL1.document.firstL.top=scrollerheight
      //document.mainR1.document.firstR.top=scrollerheight
      //document.mainL1.visibility='show'
      //document.mainR1.visibility='show'
//      document.layers[j+2].document.izoom.clip.width=19
//      document.layers[j+3].document.izoom.clip.width=19
//      document.layers[j+2].document.iswap.clip.left=19
//      document.layers[j+3].document.iswap.clip.left=19
//      document.layers[j+2].document.iswap.clip.width=19
//      document.layers[j+3].document.iswap.clip.width=19
      document.layers[j].document.firstL.top=scrollerheight
      document.layers[j+1].document.firstR.top=scrollerheight
      document.layers[j].visibility='show'
      document.layers[j+1].visibility='show'
      move1(j)
      document.layers[j].document.secondL.visibility='show'
      document.layers[j+1].document.secondR.visibility='show'
      document.layers[j+2].document.izoom.visibility='show'
      document.layers[j+2].document.iswap.visibility='show'
      document.layers[j+3].document.izoom.visibility='show'
      document.layers[j+3].document.iswap.visibility='show'
    }
//  }
}
window.onload=startshow
window.onunload=endshow
function endshow() {
if (zo!=1)
  zoom(0)
}

//if (document.layers) {
//  origWidth = window.innerWidth;
//  origHeight = window.innerHeight;
//  onresize = function() { if(innerWidth != origWidth || innerHeight != origHeight) location.reload(); }
//}
//else if (document.all) onresize = function() { window.location.reload(); }
onresize = function() { i=0; j=0; startshow(); }

function loadcheckR() {
  rightloaded = true;
  loadcheck();
}
function loadcheckL(m) {
  leftloaded = true;
  if (document.all) {
    move3(m)
  }
  else if (document.layers) {
    move1(m)
  }
  loadcheck();
}
function loadcheck() {
  if ( ( (rightloaded) && (leftloaded)) ) {
    loaded=true
    rightloaded = false;
    leftloaded = false;
    if (j<2*i-2) {
    	j+=2
        //startshow()
        window.setTimeout("startshow()", 1000);
    }
  }
}
function newscroll(p) {
  oldh=hpos1
  oldv=vpos1
  if (document.all){
    tdivL=first2L1
    hpos1=(scrollerwidth-zo*tdivL.document.images[0].width)/2

    vpos1=(scrollerheight-zo*tdivL.document.images[0].height)
    if ((hpos1 <-1)) {
      document.all.iscrollh0.style.visibility = "visible"; 
      document.all.iscrollh1.style.visibility = "visible"; 
    }
    else {
      document.all.iscrollh0.style.visibility = "hidden"; 
      document.all.iscrollh1.style.visibility = "hidden";
    }
    if ((vpos1<-1)) {
      document.all.iscrollv0.style.visibility = "visible"; 
      document.all.iscrollv1.style.visibility = "visible"; 
    }
    else {
      document.all.iscrollv0.style.visibility = "hidden"; 
      document.all.iscrollv1.style.visibility = "hidden";
    }
  }
  else if (document.layers){
    //tlayerL=document.mainL1.document.firstL
    tlayerL=document.layers[p].document.firstL
    hpos1=(scrollerwidth-zo*tlayerL.document.images[0].width)/2
    vpos1=(scrollerheight-zo*tlayerL.document.images[0].height)
    if ((hpos1<-1)) {
      document.mainScr0.document.iscrollh0.visibility = 'show'; 
      document.mainScr1.document.iscrollh1.visibility = 'show'; 
    }
    else {
      document.mainScr0.document.iscrollh0.visibility = 'hide'; 
      document.mainScr1.document.iscrollh1.visibility = 'hide'; 
    }
    if ((vpos1<-1)) {
      document.mainScr0.document.iscrollv0.visibility = "show"; 
      document.mainScr1.document.iscrollv1.visibility = "show"; 
    }
    else {
      document.mainScr0.document.iscrollv0.visibility = "hide"; 
      document.mainScr1.document.iscrollv1.visibility = "hide"; 
    }
  }
  if (scrolly < 0) {
    scrolly=0
  }
  if (vpos1 < 0) {
    if (scrolly+vpos1 > 0) {
      scrolly=-vpos1
    }
    vpos1 = -scrolly
    vscroll=true
  }
  else {
    vscroll=false
    scrolly=0
    vpos1=vpos1/2
  }
  if (scrollx < 0) {
    scrollx=0
  }
  if (hpos1 < 0) {
    if (scrollx+hpos1 > 0) {
      scrollx=-hpos1
    }
    hpos1 = -scrollx
    hscroll=true
  }
  else {
    hscroll=false
    scrollx=0
    hpos1=hpos1/2
  }
  if (document.all){
    hpos2=-zo*tdivL.document.images[0].width/2+hpos1
   // hpos2=-tdivL.document.images[0].width/2-scrollx
  }
  else if (document.layers){
    hpos2=-zo*tlayerL.document.images[0].width/2+hpos1
    //hpos2=-zo*tlayerL.document.images[0].width/2-scrollx+hpos1
  }
//  if ((hpos1!=oldh)||(vpos1!=oldv)){
  newformat(p)
//  }
}
function swap(x) {
  if (newf=="P") newf="C"
  else newf="P"
  if (document.all) {
    move3(x)
  }
  if (document.layers) {
    move1(x)
  }
}
function newformat(q) {
//  j = document.stereoform.format.selectedIndex
//  newf=document.stereoform.format[j].value
//  newf="P"
  if (newf=="P") {
    h1=hpos1
    h2=hpos2
  }
  else if (newf=="C") {
    h2=hpos1
    h1=hpos2
  }
  if (document.all){
    second2L1.style.pixelTop=vpos1
    second2R1.style.pixelTop=vpos1
//    first2L.style.pixelLeft=h1
//    first2R.style.pixelLeft=h2
    second2L1.style.pixelLeft=h1
    second2R1.style.pixelLeft=h2
  }
  else if (document.layers){
    //document.mainL1.document.secondL.top=vpos1
    //document.mainR1.document.secondR.top=vpos1
    //document.mainL1.document.secondL.left=h1
    //document.mainR1.document.secondR.left=h2
    document.layers[q].document.secondL.top=vpos1
    document.layers[q+1].document.secondR.top=vpos1
    document.layers[q].document.secondL.left=h1
    document.layers[q+1].document.secondR.left=h2
  }
}
function scrollup(s) {
  if (loaded) {
    if (n<16) {
      n++
      scrolly=scrolly-dscroll
      newscroll(s)
      window.setTimeout('scrollup('+s+')', 10);
    }
    else {
      n=0
    } 
  }
}
function scrolldown(t) {
  if (loaded) {
    if (n<16) {
      n++
      scrolly=scrolly+dscroll
      newscroll(t)
      window.setTimeout('scrolldown('+t+')', 10);
    }
    else {
      n=0
    } 
  }
}
function scrollleft(u) {
  if (loaded) {
    if (n<16) {
      n++
      scrollx=scrollx-dscroll
      newscroll(u)
      window.setTimeout('scrollleft('+u+')', 10);
    }
    else {
      n=0
    } 
  }
}
function scrollright(v) {
  if (loaded) {
    if (n<16) {
      n++
      scrollx=scrollx+dscroll
      newscroll(v)
      window.setTimeout('scrollright('+v+')', 10);
    }
    else {
      n=0
    }
  }
}

function zoom(w) {
//if (zo<1) zo=1
//else 
//if (zo<0) { 
//  zo=1
    //zo=scrollerwidth/iwi
    //if (zo*ihe>scrollerheight) zo=scrollerheight/ihe
//}
//else {
if (zo==1 || zo==0) { 
    zo=scrollerwidth/iwi
    if (zo*ihe>scrollerheight) zo=scrollerheight/ihe
}
else {
  zo =1
}
//else
//if (zo>1) {
//  zo=1
// if (iwi>scrollerwidth) zo=scrollerwidth/iwi
// if (zo*ihe>scrollerheight) zo=scrollerheight/ihe
//}
  if (document.all) {
    move3(w)
  }
  else if (document.layers) {
    move1(w)
  }
//  newscroll(w)
}
