// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// SRC="MAG_gallery.js"
// Application: maggiesattic.us
//
// Copyright 2007-2010, Aultimatedesigns.com - All rights reserved!
//
//
function showShow(zzz){document.getElementById(zzz).style.display = "inline"}
function hideShow(zzz){document.getElementById(zzz).style.display = "none"; isViz = 0; document.getElementById(savID).style.border = "solid 2px #ffecaa"; notFT = 0;}
//
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// images must be uniform size at 400w x 250h
showPix = new Array(
//
"MAGimg/GALimg/wsgall_beertaste_2010_09_11_7960.jpg#1%September 2010, Our First Monthly Beer Tasting Event, Second Staturday Each Month",
"MAGimg/GALimg/wsgall_beertaste_2010_09_11_7981.jpg#1%September 2010, Our First Monthly Beer Tasting Event, Second Staturday Each Month",
"MAGimg/GALimg/wsgall_beertaste_2010_09_11_7939.jpg#1%September 2010, Our First Monthly Beer Tasting Event, Second Staturday Each Month",
"MAGimg/GALimg/wsgall_beertaste_2010_09_11_7954.jpg#1%September 2010, Our First Monthly Beer Tasting Event, Second Staturday Each Month",
//
"MAGimg/GALimg/wsgall_wt-casa_2010_06_10_7301.jpg#1%'Maggie's On The Town' - wine tasting event hosted by Casa Mia Cafe in Tavares   June 2010",
"MAGimg/GALimg/wsgall_wt-casa_2010_06_10_7303.jpg#1%'Maggie's On The Town' - wine tasting event hosted by Casa Mia Cafe in Tavares   June 2010",
"MAGimg/GALimg/wsgall_wt-casa_2010_06_10_7307.jpg#1%'Maggie's On The Town' - wine tasting event hosted by Casa Mia Cafe in Tavares   June 2010",
//
"MAGimg/GALimg/wsgall_wt-blues_2010_05_22_6576.jpg#1%2010 Mt. Dora Blues & Wine Festival - Maggie's Attic pouring station",
"MAGimg/GALimg/wsgall_wt-blues_2010_05_22_6700-6710.jpg#1%2010 Mt. Dora Blues & Wine Festival - Maggie's Attic, 1<sup>st</sup> Place WINNER For Best White Wine",
//
//"MAGimg/GALimg/wsgall_wt-sushi_2010_05_13_6326.jpg#1%'Maggie's On The Town' - Wine Tasting Hosted by Mt. Dora Sushi and Steaks   May 2010",
//"MAGimg/GALimg/wsgall_wt-sushi_2010_05_13_6339.jpg#1%'Maggie's On The Town' - Wine Tasting Hosted by Mt. Dora Sushi and Steaks   May 2010",
//"MAGimg/GALimg/wsgall_wt-sushi_2010_05_13_6322-6351.jpg#1%'Maggie's On The Town' - Wine Tasting hosted by Mt. Dora Sushi and Steaks   May 2010",
//
"MAGimg/GALimg/wsgall_wt_2010_05_01_6255.jpg#1%2009 Florida Star Winner Lisa Maree & Keyboard Artist Tony Preform May 2010 Wine Tasting.",
"MAGimg/GALimg/wsgall_wt_2010_09_04_7875.jpg#1%Lisa Maree & Tony Preform September 2010 Wine Tasting & Mount Dora Centennial Celebration.",
"MAGimg/GALimg/wsgall_wt_2010_09_04_7914.jpg#1%Lisa Maree & Tony Preform September 2010 Wine Tasting & Mount Dora Centennial Celebration.",
//
"MAGimg/GALimg/wsgall_wt_2010_05_01_6266.jpg#1%May 2010 Wine Tasting at 'Piece of Mine' Venue",
"MAGimg/GALimg/wsgall_wt-pieceofmine_2010_08_21_7760.jpg#1%August 2010 Wine Tasting at 'Piece of Mine' Venue",
"MAGimg/GALimg/wsgall_wt_2010_09_04_7864.jpg#1%August 2010 Wine Tasting at 'Piece of Mine' Venue",
"MAGimg/GALimg/wsgall_wt_2010_02_20_5689.jpg#1%February 2010 Wine Tasting at 'Piece of Mine' Venue",
"MAGimg/GALimg/wsgall_wt_2010_05_01_6262.jpg#1%May 2010 wine Tasting at 'Emz on Fifth' Venue",
"MAGimg/GALimg/wsgall_wt-emz_2010_08_21_7745.jpg#1%August 2010 wine Tasting at 'Emz on Fifth' Venue",
"MAGimg/GALimg/wsgall_wt-artshow_2010_02_06_5657.jpg#1%2010 Mount Dora Art Show Weekend and Wine Tasting at 'Maggie's Attic' Vinue.",
//
"MAGimg/GALimg/wsgall_artshow_2010_02_06_5660.jpg#1%The Party's Here - 2010 Mount Dora Art Show Weekend and Wine Tasting",
"MAGimg/GALimg/wsgall_artshow_2010_02_06_5655.jpg#1%Fun At The 2010 Mount Dora Art Show Weekend and Wine Tasting",
"MAGimg/GALimg/wsgall_artshow-wt_2010_02_06_5665.jpg#1%Fun At The 2010 Mount Dora Art Show Weekend and Maggie's Wine Tasting",
"MAGimg/GALimg/wsgall_wt-archive_2007_05_00_1111.jpg#1%May 2007 Wine Tasting at Maggie's Attic",
"MAGimg/GALimg/wsgall_wt_2007_05_19_S5300108.jpg#1%Great Wine Tastings Twice Each Monthly - 2009",
"MAGimg/GALimg/wsgall_wt_2007_05_19_S5300031.jpg#1%Great Wine Tastings Twice Each Monthly - 2007",
"MAGimg/GALimg/wsgall_event_2007_05_19_S5300033.jpg#1%Fun Times At The Wine Tastings",
"MAGimg/GALimg/wsgall_satlive_2010_02_13_5673.jpg#1%Great Entertainment at Wine Tastings and Wine Down Wednesdays (T Scott Walker)",
"MAGimg/GALimg/wsgall_satlive_2010_02_13_5680.jpg#1%Great Entertainment at Wine Tastings and Wine Down Wednesdays (T Scott Walker)",
"MAGimg/GALimg/wsgall_wt_2010_02_20_5699.jpg#1%Great Entertainment at Wine Tastings and Wine Down Wednesdays (Port Barlow)",
"MAGimg/GALimg/wsgall_wdw_2007_06_13_S5300060.jpg#1%Great Entertainment at Wine Tastings and Wine Down Wednesdays (Jim Rast)",
"MAGimg/GALimg/wsgall_wt-rharris_2009_09_19_1111.jpg#1%Great Entertainment at Wine Tastings and Wine Down Wednesdays (Robert Harris)",
"MAGimg/GALimg/wsgall_ma_2009_11_15_1111.jpg#1%Relax with your favorite wine or beer in the breeze way",
"MAGimg/GALimg/wsgall_christmas_2008_12_17_1219.jpg#1%Cheers !",
"MAGimg/GALimg/wsgall_christmas_2008_12_17_1211.jpg#1%Cheers !",
"MAGimg/GALimg/wsgall_christmas_2008_12_05_1022.jpg#1%Carolers Stopped by Maggie's durnig 2008 Mount Dora Christmas Walk Event.",
"MAGimg/GALimg/wsgall_christmas_2008_12_05_1040.jpg#1%Stop by Maggie's For Some Holiday Cheer",
"MAGimg/GALimg/wsgall_christmas_2008_12_17_1206.jpg#1%Fun Times During The Holiday Season",
"MAGimg/GALimg/wsgall_christmas_2009_01_03_1762.jpg#1%Great Times During The Holiday Season At Maggie's",
"MAGimg/GALimg/wsgall_christmas_2008_12_20_1370.jpg#1%Great Times During The Hoilday Season At Maggie's",
"MAGimg/GALimg/wsgall_christmas_2008_12_05_1085.jpg#1%Christmas And The Hoidays Around Maggie's",
"MAGimg/GALimg/wsgall_christmas_2008_12_17_1166.jpg#1%Christmas And The Hoidays Around Maggie's"
//

//"MAGimg/GALimg/gall_2010_02_art-wt_003.jpg#1%2010 Art Show Weekend and Wine Tasting",
)
isViz = 0
picN = 0
picL = 0
notFT = 0
notready = "Images are still loading, try again."
// dir: p = previous, n = next, s = start at indicated idx
// idx: index of pict to dsply, if null goes by script.
function pictShow(thisImg, dir, idx){if(!document.images){alert(notready); return}
                                     if(picL == 0){alert(notready); return}
                  if(isViz == 0){showShow('showtime'); isViz = 1};
                  if(dir == "s"){picN = idx;
                                 sepp = showPix[picN].indexOf("#"); // end of img source
                                 seppD = showPix[picN].indexOf("%");  // begin img desc
                                 document.showThis.src = showPix[picN].substr(0, sepp);
                                 //document.getElementById("picD").value = showPix[picN].substr(seppD+1);
                                 document.getElementById("picD").innerHTML = showPix[picN].substr(seppD+1);
                                 thisIMG = "pix".concat(picN);
                                 document.getElementById(thisIMG).style.border = "dashed 2px #0077ff";
                                 if(notFT == 1){document.getElementById(savID).style.border = "solid 2px #ffecaa"};
                                 notFT = 1;  savID = thisIMG;
                                 return}
                  if(dir == "n"){picN++};
                  if(dir == "p"){picN--};
                  if(picN > showPix.length - 1){picN = 0};
                  if(picN < 0){picN = showPix.length - 1};
                  sepp = showPix[picN].indexOf("#");  // end of img source
                  seppD = showPix[picN].indexOf("%");  // begin img desc
                  document.showThis.src = showPix[picN].substr(0, sepp);
                  //document.getElementById("picD").value = showPix[picN].substr(seppD+1);
                  document.getElementById("picD").innerHTML = showPix[picN].substr(seppD+1);
                  thisIMG = "pix".concat(picN);
                  document.getElementById(thisIMG).style.border = "dashed 2px #0077ff";
                  if(notFT == 1){document.getElementById(savID).style.border = "solid 2px #ffecaa"};
                  notFFT = 1;  savID = thisIMG;
                  }
function pictLoad(){picL = 1}
//
// <img src="MAGimg/GALimg/gall_2010_02_art-wt_004.jpg" width="500" height="315" onclick = "javascript:pictshow(this, 's', '0')" class="imgTN">
//
htmlSegg = "<img src='IMGIMG' id='pixSQSQ' width='560' height='315' onclick = 'javascript:pictShow(this, &quot;s&quot;, &quot;NNN&quot;)' class='imgTN' onLoad='javascript:allLoaded()'>"
imgsrc = /IMGIMG/
imgseq = /NNN/
imgID = /SQSQ/
htmlWrk = ""
wrkSegg = ""
iLoaded = 0
// buildGall parameter is the gallery segment number.
function pixLoad(){buildGall('1'); picL = 1; return}
//
function buildGall(segg){Asize = showPix.length; jj = 0; htmlWrk = "";
                         iLoaded = 0; rCnt = 0; iCnt = 0;
                         while(jj < Asize){
                         thisSeq = showPix[jj].charAt(showPix[jj].indexOf("#")+1)
                         if(thisSeq == segg){
                         wrkSegg = htmlSegg;
                         srcval = showPix[jj].substr(0, showPix[jj].indexOf("#"));
                         wrkSegg = wrkSegg.replace(imgsrc, srcval);
                         wrkSegg = wrkSegg.replace(imgseq, jj);
                         wrkSegg = wrkSegg.replace(imgID, jj);
                         htmlWrk = htmlWrk.concat(wrkSegg);
                         iCnt++; rCnt++;
                         if(rCnt == 6){rCnt = 0; htmlWrk = htmlWrk.concat("<br>")};
                         jj++ };
                         }
                         // insert html into division
                         document.getElementById("galsegg").innerHTML = htmlWrk;
                         }
//
function allLoaded(){iLoaded++;
            if(iLoaded == iCnt){document.getElementById('loadng').style.display = "none"
            }}
//
// -------------------------------------------------------------------------------

//
//
