<!-- Begin Javascript
// MY SCRIPTS
// Use this area to add new scripts that you need for your site

//######################################################################
<!--

//Popup
function openWindow(url,h,w) {
    var wint = (screen.height - h) / 2;
    var winl = (screen.width - w) / 2;
    popupWin = window.open(url,"deWin",'toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=1,scrollbars=1,top='+wint+',screenY='+wint+',left='+winl+',screenX='+winl+',width='+w+',innerWidth='+w+',height='+h+',innerHeight='+h);
}

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="Disabled. Images & Videos used by permission of the copyright holder who retains all rights.";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")



//######################################################################

//######################################################################
//phased out
function setLink(ID,Path,Attr) {
//loop urls on page
 for (i=0; i<document.links.length; i++) {
 if (document.links[i].id==ID) {
//  document.links[i].href=Path_Slide;
   if(Attr=='href') {
   document.links[i].href=Path;
   }
   if(Attr=='onclick'){
//alert('b '+document.links[i].onclick);
   document.links[i].onclick=Path;
//alert('a '+document.links[i].onclick);
   }
  }
 }
}

function test(ID) {
//loop images on page
// for (i=0; i<document.images.length; i++) {
// if (document.images[i].id==ID) {
//alert(ID);
//  }
// }
alert(document.getElementById(ID).src);
}

//######################################################################


//######################################################################
function getArrayNum(PhotoID) {
//loop array
 for (i=1; i<arrayThumbs.length; i++) {
//compare current photoid to all array
  if (arrayThumbs[i]['PhotoID']==PhotoID) {
   return i;
  }
 }
}
//######################################################################

//######################################################################
function setThumbDataInner(TID, Data) {
if (Data!=''){
  document.getElementById(TID).innerHTML=Data;
}
}
function setThumbData(TID, SID, Thumb_Path, Thumb_Alt, Slide_Path) {
if (document.getElementById(SID) && document.getElementById(TID)){
  document.getElementById(SID).href=Slide_Path;
  document.getElementById(TID).src=Thumb_Path;
  document.getElementById(TID).alt=Thumb_Alt;
}
}
//######################################################################

//######################################################################
function nextThumbs() {
var PhotoID = document.forms.thumbNav.high.value;
var intLow = document.forms.thumbNav.low.value;
var intLowIndex = 0;
var intHigh = document.forms.thumbNav.high.value;
var intHighIndex = 0;
//alert('h ' + intHigh);

//find current index and set next
for (i=1; i<arrayThumbs.length; i++) {
if (arrayThumbs[i]['PhotoID']==intHigh){
intHighIndex=(i+1);
}
}
//alert(intHighIndex);
//if next index < arrayThumbs.length
if(intHighIndex<arrayThumbs.length){
//set new low
//intLowIndex=(intHighIndex-4);
//intLow=arrayThumbs[intLowIndex]['PhotoID'];
//document.forms.thumbNav.low.value=intLow;

//set new low
if (document.getElementById('td1').innerHTML!=''){
//find current low index
for (i=1; i<arrayThumbs.length; i++) {
if (arrayThumbs[i]['PhotoID']==intLow){
intLowIndex=(i);
}
}
intLowIndex=(intHighIndex-4);
//intHighIndex=(+1);
//if (intHighIndex > arrayThumbs.length){
//intHighIndex=arrayThumbs.length-1;
//}
intLow=arrayThumbs[intLowIndex]['PhotoID'];
document.forms.thumbNav.low.value=intLow;
}

//set new high
intHigh=arrayThumbs[intHighIndex]['PhotoID'];
document.forms.thumbNav.high.value=intHigh;

//alert(intLow + intHigh);
//Add Prev Arrow
if(intLowIndex>=1 && document.getElementById('tdPrev').innerHTML==''){
document.getElementById('tdPrev').innerHTML='<!-- navPrev --><input type="image" src="/videos/images/flatarrow_up.gif" name="prev" onclick="javascript:prevThumbs();" onmouseover="this.src=\'/videos/images/flatarrow_up_hover.gif\'" onmouseout="this.src=\'/videos/images/flatarrow_up.gif\'" value="<Prev" alt="Previous Thumb in this Collection">';
}
//move all thumbs up
setThumbDataInner('td1', document.getElementById('td2').innerHTML);
setThumbDataInner('td2', document.getElementById('td3').innerHTML);
setThumbDataInner('td3', document.getElementById('td4').innerHTML);
setThumbDataInner('td4', document.getElementById('td5').innerHTML);
setThumbDataInner('td5', '<!-- thumb5 --><a href="'+arrayThumbs[intHighIndex]['Path_Slide']+'" id="s5_'+intHighIndex+'"><img src="'+arrayThumbs[intHighIndex]['Path_Thumb']+'" width="50" height="50" alt="'+arrayThumbs[intHighIndex]['Alt_Text']+'" border="0" class="inline" align="middle" id="t5_'+intHighIndex+'"></a>');
//remove arrows if needed
if(intLowIndex==1){
document.getElementById('tdPrev').innerHTML='';
}
if(intHighIndex==(arrayThumbs.length-1)){
document.getElementById('tdNext').innerHTML='';
}
}else{
//remove next arrow
document.getElementById('tdNext').innerHTML='';
}
}
//######################################################################

//######################################################################
function prevThumbs() {
var PhotoID = document.forms.thumbNav.high.value;
var intLow = document.forms.thumbNav.low.value;
var intLowIndex = 0;
var intHigh = document.forms.thumbNav.high.value;
var intHighIndex = 0;

//find current low index and set prev
for (i=1; i<arrayThumbs.length; i++) {
if (arrayThumbs[i]['PhotoID']==intLow){
intLowIndex=(i-1);
}
}
//if prev index > 0
if(intLowIndex>0){
//set new low
intLow=arrayThumbs[intLowIndex]['PhotoID'];
document.forms.thumbNav.low.value=intLow;

//set new high
if (document.getElementById('td5').innerHTML!=''){
//find current high index
for (i=1; i<arrayThumbs.length; i++) {
if (arrayThumbs[i]['PhotoID']==intHigh){
intHighIndex=(i);
}
}
intHighIndex=(intLowIndex+4);
//intHighIndex=(+1);
//if (intHighIndex > arrayThumbs.length){
//intHighIndex=arrayThumbs.length-1;
//}
intHigh=arrayThumbs[intHighIndex]['PhotoID'];
document.forms.thumbNav.high.value=intHigh;
}
//alert(intLow + intHigh);
//Add Next Arrow
if(intHighIndex<=arrayThumbs.length && document.getElementById('tdNext').innerHTML==''){
document.getElementById('tdNext').innerHTML='<!-- navNext --><input type="image" src="/videos/images/flatarrow_down.gif" name="next" onclick="javascript:nextThumbs();" onmouseover="this.src=\'/videos/images/flatarrow_down_hover.gif\'" onmouseout="this.src=\'/videos/images/flatarrow_down.gif\'" value="Next>" alt="Next Thumb in this Collection">';
}
//move all thumbs up
setThumbDataInner('td5', document.getElementById('td4').innerHTML);
setThumbDataInner('td4', document.getElementById('td3').innerHTML);
setThumbDataInner('td3', document.getElementById('td2').innerHTML);
setThumbDataInner('td2', document.getElementById('td1').innerHTML);
setThumbDataInner('td1', '<!-- thumb1 --><a href="'+arrayThumbs[intLowIndex]['Path_Slide']+'" id="s1_'+intLowIndex+'"><img src="'+arrayThumbs[intLowIndex]['Path_Thumb']+'" width="50" height="50" alt="'+arrayThumbs[intLowIndex]['Alt_Text']+'" border="0" class="inline" align="middle" id="t1_'+intLowIndex+'"></a>');
//remove arrows if needed
if(intLowIndex==1){
document.getElementById('tdPrev').innerHTML='';
}
if(intHighIndex==0){
document.getElementById('tdNext').innerHTML='';
}
}else{
//remove prev arrow
document.getElementById('tdPrev').innerHTML='';
}
}
//######################################################################

// End Javascript -->