MasterOrderSwitch = true;
ImageFolder = 'ImagesInfo';

function slideInformation(filter) {
SlideName = ['2001-12', '2003-06-1', '2003-06-2', '2003-09', '2003-11-1', '2003-11-2', '2004-07', '2007-04', '2007-06', '2008-01', '2008-06', '2009-06-Shorts', '2009-06-Jeans', '2009-06'];
SlideType = ['jpg', 'gif', 'png', 'bmp'];
SlideWidthTh = [100, 50, 82, 100, 67, 67, 60, 87, 100, 100, 100, 67, 67, 100];
SlideHeightTh = [62, 100, 100, 67, 100, 100, 100, 100, 76, 100, 100, 100, 100, 94];
SlideWidth = [530, 177, 120, 450, 300, 300, 350, 200, 512, 200, 500, 400, 400, 500];
SlideHeight = [330, 350, 148, 300, 450, 450, 600, 230, 384, 200, 500, 600, 600, 471];
SlideCaption = ['Myself - December 2001', 'Myself - June 2003 no. 1', 'Myself - June 2003 no. 2', 'Myself - September 2003', 'Myself - November 2003 no. 1', 'Myself - November 2003 no. 2', 'Myself - July 2004', 'Myself - April 2007', 'Myself - June 2007', 'Myself - January 2008', 'Myself - June 2008', 'Myself - June 2009 - Shorts', 'Myself - June 2009 - Jeans', 'Myself - June 2009 - Kneeling'];
SlideMax = SlideName.length - 1;
PageMax = Math.ceil(SlideName.length / 10);
if (MasterOrderSwitch == true) {
SlideOrder = 'Backward';
SlideJump = SlideMax;
SlideNew = SlideMax;
MasterOrderSwitch = false;
}
}

SwitchOrder = true;
SwitchFilter = false;
UniformImageTypes = true;
UniformDimensions = false;

function determineNames(slide) {SlideNameDefined = 'Centauri-' + SlideName[slide];}

function determineImageTypes(slide) {SlideTypeDefined = SlideType[0];}

function uniformDimensions(slide) {}

function insertMenu(page) {
PageTitle = 'Photos of Me';
if (page == 1) {SubSection = PageTitle;}
else if (page > 1) {SubSection = PageTitle + ' - Page ' + page;}
else if (page == 0) {SubSection = PageTitle + ' - Slideshow (View all / Jump to image)';}
MenuSelector = 'CellMenuTop';
document.getElementById(MenuSelector).innerHTML = '<h2>Information</h2><h3>'+SubSection+'</h3><p>You actually <i>want</i> to see the horror that is me?&nbsp; Okay, here you go:</p>' + menuBar(MenuSelector, page) + subMenuBar(MenuSelector, page);
MenuSelector = 'CellMenuBottom';
document.getElementById(MenuSelector).innerHTML = subMenuBar(MenuSelector, page) + menuBar(MenuSelector, page);
}

function menuBar(menuSelector, page) {
MenuButton1 = 'class="Button" id="'+menuSelector+'-PhotosList" onmouseover="buttonOver(this.id)" onmouseout="buttonOut(this.id)"';
MenuButton0 = 'class="Button" id="'+menuSelector+'-Slideshow" onmouseover="buttonOver(this.id)" onmouseout="buttonOut(this.id)"';
if (page == 0) {MenuButton0 = 'class="ButtonInverse"';}
else {MenuButton1 = 'class="ButtonInverse"';}
return('<table><tr><td '+MenuButton1+' onclick="pageContent(1, &#39;'+SlideFilter+'&#39;)">List of Photos</td><td '+MenuButton0+' onclick="pageContent(0, &#39;'+SlideFilter+'&#39;)">Slideshow</td>' + menuBarOrder(menuSelector, page) + menuBarFilter(menuSelector, page) + '</tr></table>');
}

function insertContent(page, jump, filter) {
if (SlideOrder == 'Backward') {SlideJump = SlideMax; SlideNew = SlideMax;}
else {SlideJump = 0; SlideNew = 0;}
ImagePage = 10 * (page - 1);
Image1 = 0 + ImagePage;
Image2 = 1 + ImagePage;
Image3 = 2 + ImagePage;
Image4 = 3 + ImagePage;
Image5 = 4 + ImagePage;
Image6 = 5 + ImagePage;
Image7 = 6 + ImagePage;
Image8 = 7 + ImagePage;
Image9 = 8 + ImagePage;
Image10 = 9 + ImagePage;
if (page > 0 && page < PageMax) {
if (jump == true) {
return('<option>' + SlideCaption[Math.abs(SlideJump-Image1)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image2)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image3)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image4)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image5)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image6)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image7)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image8)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image9)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image10)]);
}
else {
return(insertStructure(Math.abs(SlideJump-Image1)) + insertStructure(Math.abs(SlideJump-Image2)) + insertStructure(Math.abs(SlideJump-Image3)) + insertStructure(Math.abs(SlideJump-Image4)) + insertStructure(Math.abs(SlideJump-Image5)) + insertStructure(Math.abs(SlideJump-Image6)) + insertStructure(Math.abs(SlideJump-Image7)) + insertStructure(Math.abs(SlideJump-Image8)) + insertStructure(Math.abs(SlideJump-Image9)) + insertStructure(Math.abs(SlideJump-Image10)));
}
}
else if (page == PageMax) {
ImageLast = SlideMax + 1 - (PageMax - 1) * 10;
if (ImageLast == 1) {
if (jump == true) {
return('<option>' + SlideCaption[Math.abs(SlideJump-Image1)]);
}
else {
return(insertStructure(Math.abs(SlideJump-Image1)));
}
}
else if (ImageLast == 2) {
if (jump == true) {
return('<option>' + SlideCaption[Math.abs(SlideJump-Image1)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image2)]);
}
else {
return(insertStructure(Math.abs(SlideJump-Image1)) + insertStructure(Math.abs(SlideJump-Image2)));
}
}
else if (ImageLast == 3) {
if (jump == true) {
return('<option>' + SlideCaption[Math.abs(SlideJump-Image1)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image2)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image3)]);
}
else {
return(insertStructure(Math.abs(SlideJump-Image1)) + insertStructure(Math.abs(SlideJump-Image2)) + insertStructure(Math.abs(SlideJump-Image3)));
}
}
else if (ImageLast == 4) {
if (jump == true) {
return('<option>' + SlideCaption[Math.abs(SlideJump-Image1)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image2)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image3)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image4)]);
}
else {
return(insertStructure(Math.abs(SlideJump-Image1)) + insertStructure(Math.abs(SlideJump-Image2)) + insertStructure(Math.abs(SlideJump-Image3)) + insertStructure(Math.abs(SlideJump-Image4)));
}
}
else if (ImageLast == 5) {
if (jump == true) {
return('<option>' + SlideCaption[Math.abs(SlideJump-Image1)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image2)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image3)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image4)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image5)]);
}
else {
return(insertStructure(Math.abs(SlideJump-Image1)) + insertStructure(Math.abs(SlideJump-Image2)) + insertStructure(Math.abs(SlideJump-Image3)) + insertStructure(Math.abs(SlideJump-Image4)) + insertStructure(Math.abs(SlideJump-Image5)));
}
}
else if (ImageLast == 6) {
if (jump == true) {
return('<option>' + SlideCaption[Math.abs(SlideJump-Image1)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image2)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image3)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image4)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image5)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image6)]);
}
else {
return(insertStructure(Math.abs(SlideJump-Image1)) + insertStructure(Math.abs(SlideJump-Image2)) + insertStructure(Math.abs(SlideJump-Image3)) + insertStructure(Math.abs(SlideJump-Image4)) + insertStructure(Math.abs(SlideJump-Image5)) + insertStructure(Math.abs(SlideJump-Image6)));
}
}
else if (ImageLast == 7) {
if (jump == true) {
return('<option>' + SlideCaption[Math.abs(SlideJump-Image1)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image2)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image3)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image4)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image5)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image6)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image7)]);
}
else {
return(insertStructure(Math.abs(SlideJump-Image1)) + insertStructure(Math.abs(SlideJump-Image2)) + insertStructure(Math.abs(SlideJump-Image3)) + insertStructure(Math.abs(SlideJump-Image4)) + insertStructure(Math.abs(SlideJump-Image5)) + insertStructure(Math.abs(SlideJump-Image6)) + insertStructure(Math.abs(SlideJump-Image7)));
}
}
else if (ImageLast == 8) {
if (jump == true) {
return('<option>' + SlideCaption[Math.abs(SlideJump-Image1)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image2)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image3)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image4)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image5)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image6)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image7)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image8)]);
}
else {
return(insertStructure(Math.abs(SlideJump-Image1)) + insertStructure(Math.abs(SlideJump-Image2)) + insertStructure(Math.abs(SlideJump-Image3)) + insertStructure(Math.abs(SlideJump-Image4)) + insertStructure(Math.abs(SlideJump-Image5)) + insertStructure(Math.abs(SlideJump-Image6)) + insertStructure(Math.abs(SlideJump-Image7)) + insertStructure(Math.abs(SlideJump-Image8)));
}
}
else if (ImageLast == 9) {
if (jump == true) {
return('<option>' + SlideCaption[Math.abs(SlideJump-Image1)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image2)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image3)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image4)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image5)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image6)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image7)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image8)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image9)]);
}
else {
return(insertStructure(Math.abs(SlideJump-Image1)) + insertStructure(Math.abs(SlideJump-Image2)) + insertStructure(Math.abs(SlideJump-Image3)) + insertStructure(Math.abs(SlideJump-Image4)) + insertStructure(Math.abs(SlideJump-Image5)) + insertStructure(Math.abs(SlideJump-Image6)) + insertStructure(Math.abs(SlideJump-Image7)) + insertStructure(Math.abs(SlideJump-Image8)) + insertStructure(Math.abs(SlideJump-Image9)));
}
}
else if (ImageLast == 10) {
if (jump == true) {
return('<option>' + SlideCaption[Math.abs(SlideJump-Image1)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image2)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image3)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image4)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image5)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image6)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image7)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image8)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image9)] + '<option>' + SlideCaption[Math.abs(SlideJump-Image10)]);
}
else {
return(insertStructure(Math.abs(SlideJump-Image1)) + insertStructure(Math.abs(SlideJump-Image2)) + insertStructure(Math.abs(SlideJump-Image3)) + insertStructure(Math.abs(SlideJump-Image4)) + insertStructure(Math.abs(SlideJump-Image5)) + insertStructure(Math.abs(SlideJump-Image6)) + insertStructure(Math.abs(SlideJump-Image7)) + insertStructure(Math.abs(SlideJump-Image8)) + insertStructure(Math.abs(SlideJump-Image9)) + insertStructure(Math.abs(SlideJump-Image10)));
}
}
else {return('');}
}
else if (page == 0) {
return(insertSlideshow(SlideNew));
}
else {return('');}
}

function insertDescription(name, cellDescription) {
if (name == '2001-12') {
document.getElementById(cellDescription).innerHTML = '<p>The oldest photo I have online.&nbsp; I had a mushroom cut back then.&nbsp; Yup.&nbsp; Quite a sight...</p>';
}
else if (name == '2003-06-1') {
document.getElementById(cellDescription).innerHTML = '<p>This photo was taken when I went on a trip to the west coast with my family.</p>';
}
else if (name == '2003-06-2') {
document.getElementById(cellDescription).innerHTML = '<p>The picture that was on my old drivers license.</p>';
}
else if (name == '2003-09') {
document.getElementById(cellDescription).innerHTML = '<p>A wacky collage I made of myself.</p>';
}
else if (name == '2003-11-1') {
document.getElementById(cellDescription).innerHTML = '<p>Showing off a new jean jacket.</p>';
}
else if (name == '2003-11-2') {
document.getElementById(cellDescription).innerHTML = '<p>Displaying my new corduroy jacket.</p>';
}
else if (name == '2004-07') {
document.getElementById(cellDescription).innerHTML = '<p>I got a buzz cut in July of 2004, which is something I had never done before and probably won&#39;t ever do again.</p>';
}
else if (name == '2007-04') {
document.getElementById(cellDescription).innerHTML = '<p>A picture of me taken at one of my past jobs.</p>';
}
else if (name == '2007-06') {
document.getElementById(cellDescription).innerHTML = '<p>Hangin&#39; out in my apartment.</p>';
}
else if (name == '2008-01') {
document.getElementById(cellDescription).innerHTML = '<p>I&#39;d had a few drinks with some friends prior to this one having been snapped.</p>';
}
else if (name == '2008-06') {
document.getElementById(cellDescription).innerHTML = '<p>One of the few photos of me that turned out looking nice.&nbsp; You can of course see that my hair has grown longer again.</p>';
}
else if (name == '2009-06') {
document.getElementById(cellDescription).innerHTML = '<p>Me at home with my hair nearly blunt by this point.&nbsp; I look so pretty!&nbsp; ^_^</p>';
}
else if (name == '2009-06-Jeans') {
document.getElementById(cellDescription).innerHTML = '<p>I wish I could learn how to smile at the camera without it winding up looking like a goofy smirk...</p>';
}
else if (name == '2009-06-Shorts') {
document.getElementById(cellDescription).innerHTML = '<p>Hey, I&#39;m wearing shorts for the first time in about 10 years.&nbsp; I think there&#39;s a trace of a smile in this one too!&nbsp; :P</p>';
}
else {
document.getElementById(cellDescription).innerHTML = '<p><i>None</i></p>';
}
}

function insertJumpList(filter) {
document.getElementById('JumpList').innerHTML = insertContent(1, true, filter) + insertContent(2, true, filter);
}

function applyFilter(page, filter) {}

function insertFilterList(filter) {}