<!-- 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);
}

///////////////////////////////////
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 setThumbData(TID, SID, Thumb_Path, Thumb_Alt, Slide_Path) {
  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 arrayNum = getArrayNum(document.forms.thumbNav.low.value);

document.getElementById('tdPrev').innerHTML='<!-- navPrev --><input type="image" src="/deljis/images/flatarrow_up.gif" name="prev" onclick="javascript:prevThumbs();" onmouseover="this.src=\'/deljis/images/flatarrow_up_hover.gif\'" onmouseout="this.src=\'/deljis/images/flatarrow_up.gif\'" value="<Prev" alt="Previous Thumb in this Collection">';
document.getElementById('td1').innerHTML='<!-- thumb1 --><a href="" id="s1"><img src="" width="50" height="50" alt="" border="0" class="inline" align="middle" id="t1"></a>';
document.getElementById('td2').innerHTML='<!-- thumb2 --><a href="" id="s2"><img src="" width="50" height="50" alt="" border="0" class="inline" align="middle" id="t2"></a>';
document.getElementById('td3').innerHTML='<!-- thumb3 --><a href="" id="s3"><img src="" width="50" height="50" alt="" border="0" class="inline" align="middle" id="t3"></a>';
document.getElementById('td4').innerHTML='<!-- thumb4 --><a href="" id="s4"><img src="" width="50" height="50" alt="" border="0" class="inline" align="middle" id="t4"></a>';
document.getElementById('td5').innerHTML='<!-- thumb5 --><a href="" id="s5"><img src="" width="50" height="50" alt="" border="0" class="inline" align="middle" id="t5"></a>';

//Change Thumbs

//Thumb1
//----------------------------------------------------------------------
document.forms.thumbNav.low.value=arrayThumbs[arrayNum]['PhotoID'];

for(var i=1;i<6;i++) {
 arrayNum=arrayNum+1;
 if (arrayNum < arrayThumbs.length) {
  setThumbData('t' + arrayNum, 's' + arrayNum, arrayThumbs[arrayNum]['Path_Thumb'], arrayThumbs[arrayNum]['Alt_Text'], arrayThumbs[arrayNum]['Path_Slide'])
 }else{
   if (arrayNum == arrayThumbs.length) {
      document.getElementById('td' + i).innerHTML='';
      document.getElementById('tdNext').innerHTML='';
    }else{
      document.getElementById('td' + i).innerHTML='';
   }
  }	
}
//----------------------------------------------------------------------
document.forms.thumbNav.high.value=arrayThumbs[arrayNum]['PhotoID'];
}
//######################################################################

//######################################################################
function prevThumbs() {
var PhotoID = document.forms.thumbNav.low.value;
var arrayNum = getArrayNum(document.forms.thumbNav.high.value);

document.getElementById('td1').innerHTML='<!-- thumb1 --><a href="" id="s1"><img src="" width="50" height="50" alt="" border="0" class="inline" align="middle" id="t1"></a>';
document.getElementById('td2').innerHTML='<!-- thumb2 --><a href="" id="s2"><img src="" width="50" height="50" alt="" border="0" class="inline" align="middle" id="t2"></a>';
document.getElementById('td3').innerHTML='<!-- thumb3 --><a href="" id="s3"><img src="" width="50" height="50" alt="" border="0" class="inline" align="middle" id="t3"></a>';
document.getElementById('td4').innerHTML='<!-- thumb4 --><a href="" id="s4"><img src="" width="50" height="50" alt="" border="0" class="inline" align="middle" id="t4"></a>';
document.getElementById('td5').innerHTML='<!-- thumb5 --><a href="" id="s5"><img src="" width="50" height="50" alt="" border="0" class="inline" align="middle" id="t5"></a>';
document.getElementById('tdNext').innerHTML='<!-- navNext --><input type="image" src="/deljis/images/flatarrow_down.gif" name="next" onclick="javascript:nextThumbs();" onmouseover="this.src=\'/deljis/images/flatarrow_down_hover.gif\'" onmouseout="this.src=\'/deljis/images/flatarrow_down.gif\'" value="Next>" alt="Next Thumb in this Collection">';

//set prev links
document.forms.thumbNav.high.value=PhotoID;

//Change Thumbs

//Thumb1
//----------------------------------------------------------------------
document.forms.thumbNav.high.value=arrayThumbs[arrayNum]['PhotoID'];

for(var i=1;i<6;i++) {
arrayNum=arrayNum-1;
 if (arrayNum > 0) {
  setThumbData('t' + arrayNum, 's' + arrayNum, arrayThumbs[arrayNum]['Path_Thumb'], arrayThumbs[arrayNum]['Alt_Text'], arrayThumbs[arrayNum]['Path_Slide'])
 }else{
   if (arrayNum == 0) {
      document.getElementById('tdPrev').innerHTML='';
      document.getElementById('td' + i).innerHTML='';
    }else{
    document.getElementById('td' + i).innerHTML='';
   }
  }	
}

//----------------------------------------------------------------------
document.forms.thumbNav.low.value=arrayThumbs[arrayNum]['PhotoID'];
}
//######################################################################

// End Javascript -->