

//used to do some album manipulation
 function show_idx()
 {
    showhide_nav();
	location.hash=g_cur_photo;
    location.hash="header";
 }

function showhide_nav()
{
if (g_cur_photo == g_alb_photos_idx.length - 1) {
	 document.getElementById('fwdarrow').innerHTML=''
	}
	else {
	document.getElementById('fwdarrow').innerHTML='<img src="./theme/next_arrow.gif" height="20px" onclick="alb_next()" style="float:right; padding: 5px 50px 0 0;"/>'
	}

if (g_cur_photo == 0) {
	 document.getElementById('backarrow').innerHTML=''
	}
	else {
	document.getElementById('backarrow').innerHTML='<img src="./theme/back_arrow.gif" height="20px" onClick="alb_prev()"  style="float:left; padding: 5px 0 0 15px;"/> '
	}
	
}


 
var g_cur_photo;

 
function alb_show_enl(n)
{
g_cur_photo = n;
    document.getElementById('imagez').innerHTML='<IMG SRC="' +  g_alb_photos_enl[g_cur_photo]   + '"> <br>'
    document.getElementById('captionz').innerHTML=' '+  g_alb_captions[g_cur_photo] +''
    document.getElementById('filez').innerHTML=' ' + g_alb_photos_enl[g_cur_photo].substring(11)    + ''
	showhide_nav();
}



function alb_first()
{
  //  alb_slideshow_stop();
	alb_show_enl(0);
}

function alb_last()
{
//	alb_slideshow_stop();
	alb_show_enl(g_alb_photos_idx.length - 1);
}



function alb_prev()
{
//	alb_slideshow_stop();
	if (g_cur_photo > 0)
	{	alb_show_enl(g_cur_photo - 1);
       show_idx();
    }

}

function alb_next()
{
  //  alb_slideshow_stop();
	if (g_cur_photo < g_alb_photos_idx.length - 1)
    {
		alb_show_enl((g_cur_photo - 0) + 1);
		show_idx();
	}

}



 //write index to a string
function generate_index2(nRowSize)
{
	labels_and_filenames_above_image = true;
   // init_page();
  // document.writeln('<div id="indexz">');

   myIndex = '<TR>';
	for (i = 0; i < g_alb_photos_idx.length; i++) {
   myIndex = myIndex + '<TD VALIGN=MIDDLE ALIGN=CENTER class="idx-td" >';
	    
             
 myIndex = myIndex + '<IMG class="idx-img" SRC="' + g_alb_photos_idx[i] + '"  onClick="alb_show_enl(\'' + i +'\')" BORDER=0 VALIGN=MIDDLE ALIGN=CENTER>';
     	
      
	  myIndex = myIndex + '<\/TD>';
		if ((i + 1) % nRowSize == 0)
		  myIndex = myIndex +'<\/TR><TR>';
	}
   myIndex = myIndex + '<\/TR>';

   
    document.getElementById('imagez').innerHTML=''
document.getElementById('captionz').innerHTML=''
document.getElementById('filez').innerHTML=' '
     



}
    



 /*
#403610 
 #8c0000 red in background
ereebf - light yellow for picture background
#a85028; = date header
#d0aa3c; = background under the title
#dbbf4e;
#ee3c0c;
#c63008;
#f45d3f;
#e7d564; = the yellow in the main of the page

    */


//writes index as a ul\li
function generate_index3()
{
    
    document.writeln('<ul>');
   
    for (i = 0; i < g_alb_photos_idx.length; i++)
    {
        
        //these 2 lines do the same thing, i did it to test passing a name and doing something with it...
        // 	document.write('<li><IMG name=' + i + ' SRC="' + g_alb_photos_idx[i] + '" onmouseover="this.style.borderColor=\'#00ff00\';"  onmouseout="this.style.borderColor=\'#ff0000\';"  onClick="alb_show_enl(\'' + i +'\')"> ');
   //	document.write('<li><IMG id="' + i + '" SRC="' + g_alb_photos_idx[i] + '" onmouseover="highlight_img(\'' + i +'\',1)"  onmouseout="highlight_img(\'' + i +'\',2)"  onClick="alb_show_enl(\'' + i +'\')"> ');
        //the above code is now captured in the stylesheet for #thumbnails img:hover

      
      document.write('<li><IMG id="' + i + '" SRC="' + g_alb_photos_idx[i] + '" onClick="alb_show_enl(\'' + i +'\')"> ');

        document.writeln('<\/li>');
    
    }
     
    document.writeln('<\/ul>');
   
}






