var photoDir = "/about_niagara_falls/photo_gallery/photos/"; // get current photo id from URL var thisURL = document.location.href; var splitURL = thisURL.split("#"); var photoId = splitURL[1] - 1; // if no photoId supplied then set default var photoId = (!photoId)? 0 : photoId; // CSS border size x 2 var borderSize = 10; // Photo directory for this gallery // Define each photo's name, height, width, and caption // Source, Width, Height, Caption, Date Taken, Photographer var photoArray = new Array( new Array("PWQZRKYOQSOGHTV.jpg", "700", "467", "The Falls at night.", "1/9/2007", "Roland Tobiasz"), new Array("DSLIGTUIKZEFBLP.jpg", "700", "525", "The waterfall in the court yard at City Hall", "5/2/2006", "City of Niagara Falls"), new Array("PCBIOUPBUBDQOLB.jpg", "700", "525", "Tulips in bloom at the Floral Gardens on the Niagara River Parkway", "5/2/2006", "City of Niagara Falls"), new Array("LYKPCGXDQLLLYZP.jpg", "700", "525", "The Sir Adam Beck 1 Generating Station in Niagara Falls. Built back in the early 1920's this power station is still in operation today.", "5/2/2006", "City of Niagara Falls"), new Array("ROTGDEAFDRJXAGG.jpg", "700", "265", "Maid's of the Mist", "7/28/2002", "Elmina S. Sagum-Faju"), new Array("SQWPBRZYVTMEEYP.jpg", "700", "525", "View from River Rd.", "8/28/2005", "Mitchell Lucas"), new Array("EPFCZSOIPTSCVVN.jpg", "700", "525", "This photo of American Falls was taken from the Canadian side.", "5/8/2006", "Rainbow"), new Array("EBDGSTLJOZWZWMG.jpg", "700", "525", "A winter day near the Falls", "12/23/2005", "Jessie-Lynn Mace"), new Array("AEZZLRJJZFLRUWU.jpg", "700", "525", "American Falls", "7/4/2005", "Eli Stoltzfus"), new Array("RQBLDIDAKBUSINB.jpg", "700", "525", "American Falls at Night", "7/4/2005", "Eli Stoltzfus"), new Array("MIWPATRXZIWBNXQ.jpg", "700", "525", "Horseshoe Falls at Night", "7/4/2005", "Eli Stoltzfus"), new Array("UQBJOQNBQEYSXUX.jpg", "700", "524", "waters of the falls", "10/4/2005", "Paula Hainzer"), new Array("GOMQCUTJQKMRKBU.jpg", "700", "527", "falls edge with rainbow", "6/8/2006", "Tzara Prevost"), new Array("UPNEPXNRUQWCIYG.jpg", "700", "530", "Niagara Falls Fire Dept Rescue 1 on Niagara Parkway", "6/10/2006", "Travis Bush"), new Array("BPEGHCASDHOBGKB.jpg", "700", "464", "Canadian and American Falls with a beautiful rainbow.", "5/15/2005", "Suljic"), new Array("AEWUVIBMCLCOKHP.jpg", "700", "525", "A View Of Niagara Falls From Canada .", "9/4/2004", "Behzad Zenhari"), new Array("XLELBTEZDVPGDTB.jpg", "700", "525", "A View Of Niagara Falls From Canada .", "9/4/2005", "Behzad Zenhari"), new Array("MOMRXWGPMACJUWO.jpg", "700", "525", "The Horseshoe Falls. The old Toronto Power Station can be seen on the right side of the image.", "9/4/2005", "Behzad Zenhari"), new Array("XJZKUSCYEZCPFCH.jpg", "700", "525", "The Niagara Falls showing a Maid of the Mist boat in the water.", "9/4/2005", "Behzad Zenhari"), new Array("YQQVNTGOXTVHMAH.jpg", "700", "525", "Very Close to Niagara falls .", "9/4/2005", "Behzad Zenhari"), new Array("YWNQWINQAQRDUUA.jpg", "700", "525", "The Maid of the Mist close to the Falls.", "9/4/2006", "Behzad Zenhari"), new Array("ZHONBKRFBAVTTMH.jpg", "700", "525", "Riding The Maid of the Mist!", "6/20/2006", "Malinda Heronemus"), new Array("RFPBSKLMPLJRHXX.jpg", "700", "525", "Fireworks over the Falls taken from a 7th floor apartment balcony on Drummond Road. Great view of fireworks every summer weekend night. Thanks Niagara Falls.", "6/30/2006", "David P. Barnhart"), new Array("SXLUNYAIHPKLNRE.jpg", "700", "525", "Fountain outside the Fallsview Casino.", "6/17/2006", "David P. Barnhart"), new Array("EQQBFIMZDTUPABD.jpg", "700", "467", "Niagara Parks, Butterfly Conservatory", "7/25/2006", "Sandra Ghany"), new Array("RGKXIEOYWTKWXQD.jpg", "700", "255", "Three photos that were stiched togeter to make one pan of The Falls.", "7/24/2006", "Michael F. Schroeder"), new Array("QUSEUVHRSBWFPDT.jpg", "700", "465", "Niagara Falls From The Air", "7/2/2006", "David Klein"), new Array("STJPHBQNLAPMOWP.jpg", "700", "933", "The New Ferris Wheel", "8/1/2006", "Amie Elliott"), new Array("XYLKVRXJJBAEMLZ.jpg", "700", "933", "Park across from the falls. Its beautiful at springtime!!", "5/14/2006", "Diana Kirtland"), new Array("OPQLTMQUFBFFLDA.jpg", "700", "933", "Butterfly Conservatory. Its definitely a place to visit!!", "5/14/2006", "Diana Kirtland"), new Array("IWAMBLGJCONZZVB.jpg", "700", "524", "Butterfly Conservatory, Niagara Falls, Canada", "8/15/2006", "Charlene Pingitore"), new Array("DIXHJMHQZWTUHVD.jpg", "700", "525", "Butterfly Conservatory, Niagara Falls, Canada", "8/15/2006", "Charlene"), new Array("LCMYJKSZHEHBABC.jpg", "700", "525", "The wonderful colours of Fall are displayed here at the Dufferin Islands Nature Area, in the heart of Niagara Falls, ON Canada.", "10/3/2005", "B. Redman"), new Array("WMLLLNHLDQOFNMH.jpg", "700", "525", "Brock’s Monument, located in picturesque Queenston Heights.", "5/1/2006", "B. Redman"), new Array("NFKKGYHNVTUUBGV.jpg", "700", "525", "The Niagara Parks Floral Clock is a free horticultural attraction and features a floral design with upwards of 16,000 plants. Built in 1950, the clock is one of the largest in the world.", "8/2/2006", "B. Redman"), new Array("IXWLZNQITCFVSZR.jpg", "700", "525", "View of the Niagara River and Falls", "8/24/2006", "luba"), new Array("JMRZHWUKVQGURIT.jpg", "700", "525", "Image of the Falls showing the power station and the Maid of the Mist on a clear day.", "6/11/2006", "Ceara"), new Array("CVMLMKQMZCEIEMG.jpg", "700", "525", "The Niagara Falls from Table Rock in the winter.", "1/3/2005", "Jarous"), new Array("ORYQXEEHHAAASNP.jpg", "700", "525", "Frozen view to the Horseshoefalls", "3/1/2006", "Mike & Sabina Herrmann"), new Array("QMQMTJJGQLFSLMX.jpg", "700", "933", "Minus 8 degrees in the park near the Horseshoefalls", "2/26/2006", "Mike & Sabina Herrmann"), new Array("OJTTCVMGNBSJFFV.jpg", "700", "933", "Niagara Falls with the orange sunset lighting up the mist", "7/19/2006", "patricia matte"), new Array("UXNHAMFFJEFETNB.jpg", "700", "525", "Image of a butterfly at the conservatory", "7/21/2006", "patricia matte"), new Array("GSSDHITNVAGKVXX.jpg", "700", "525", "Springtime in front of the Parks Commission Police Station! What a beautiful view!", "5/14/2006", "Diana Kirtland"), new Array("ZTXQLXAODVPZHBA.jpg", "700", "525", "Canadian Horseshoe Falls, from tourist's Platform. very cold spray, but amazing experience.", "12/14/2005", "Sean Malone"), new Array("MWMYKLDAHMCCJTE.jpg", "700", "774", "Winter wonderland photo taken on Freeman Street", "2/12/2005", "John Albanese"), new Array("GTERSZFVPGRQSSL.jpg", "700", "525", "Some Canadian geese at Whirlpool Golf Course along the Niagara Parkway.", "7/9/2006", "B. Redman"), new Array("WGAEVQGNATYMJEP.jpg", "700", "525", "The beautiful Botanical Gardens; located on the scenic Niagara Parkway.", "6/28/2006", "B. Redman"), new Array("GVTMOLOIMSCZYZK.jpg", "700", "525", "A bird's eye view of the Niagara gorge from the Whirlpool Aero Car.", "7/18/2006", "B. Redman"), new Array("BGYQXCVAZNPTAWM.jpg", "700", "933", "A spider's web caught in a ray of sunshine at the Niagara Parks Botanical Gardens.", "6/30/2006", "B. Redman"), new Array("ZCVQZQYORNQTOPL.jpg", "700", "525", "The Niagara Parks Botanical Gardens is the unique outdoor classroom for students attending the Niagara Parks School of Horticulture.", "6/30/2006", "B. Redman"), new Array("NQTQZUXIHUFRSGY.jpg", "700", "525", "The Niagara Parks School of Horticulture, located on the scenic Niagara Parkway.", "6/30/2006", "B. Redman"), new Array("JZWOGQIEOKBYMCV.jpg", "700", "933", "The Niagara Parks Botanical Gardens are truly an enriching experience for all seasons.", "6/30/2006", "B. Redman"), new Array("LFXAYLFPVAARJKF.jpg", "700", "1078", "This towering rose graces the gardens at the Niagara Parks Botanical Gardens.", "6/30/2006", "B. Redman"), new Array("AAUTSFOKWOQGPVS.jpg", "700", "837", "A gorgeous afternoon in September to set sail on a catamaran.", "9/10/2006", "B. Redman"), new Array("VZRQMOQASWACZTK.jpg", "700", "933", "These sailboats grace the marina with beauty.", "9/10/2006", "B. Redman"), new Array("ZRFGWVSHJMFGIQE.jpg", "700", "481", "A little piece of farm life captured.", "9/11/2006", "B. Redman"), new Array("YALULJISJVNPNHM.jpg", "700", "525", "Travelling on a country road through rolling vineyards to find some of Niagara's finest.", "9/2/2006", "B. Redman"), new Array("CBCSJTRFHYKGPSC.jpg", "700", "933", "Taking in a beautiful sunset on Lake Ontario.", "8/21/2006", "B. Redman"), new Array("LWYIADEHBPSNJXK.jpg", "700", "525", "A beautifull trip from Italy to Niagara falls", "7/15/2006", "Oriana Navone"), new Array("CAFEKKMKUXBRGBL.jpg", "700", "295", "An unforgetable sunrise", "7/16/2006", "D. Lapas"), new Array("IAFEEMZRQNRJPWG.jpg", "700", "525", "View to the Canadian Horseshoefalls taken from the Skylon Tower", "9/19/2006", "Ton van der Kris"), new Array("OAZSKNOSHIACCCG.jpg", "700", "525", "Canadian Horseshoe Falls & part of Ontario, taken from the Skylon.", "6/26/2006", "Ghie Tabs"), new Array("QZNRKROKEXSPNBT.jpg", "700", "525", "Sunrise from our window", "9/22/2006", "Gaynell Goodnight Crainshaw"), new Array("NJCNELBMFWQKMHX.jpg", "700", "525", "Picture taken from our hotel room at the Marriot the first morning of our honeymoon and first trip to Canada.", "9/18/2005", "Rich A Plisco"), new Array("ZEJSPBQLCUATAAS.jpg", "700", "1050", "A view of the horseshoe falls close up", "10/9/2006", "Jeanne Walsh"), new Array("UZGJZEPUJGXIMWI.jpg", "700", "933", "A beautiful Thanksgiving afternoon drive in Pelham.", "10/9/2006", "B. Redman"), new Array("WNBISBRGVDHGWGN.jpg", "700", "933", "A Pumpkin Farm is a great place to be with the family at this time of year.", "10/9/2006", "B. Redman"), new Array("REBMVYGYPJZUJOG.jpg", "700", "525", "Fall scenery is among us, so enjoy!", "10/16/2006", "B. Redman"), new Array("TEKSJPOGWUBTSTY.jpg", "700", "933", "Looking out at the Fall colours.", "10/16/2006", "B. Redman"), new Array("ADADDBSEGNKAZUL.jpg", "700", "555", "A Pink Tulip in front of the Fallsview Casino.", "5/6/2006", "Ashley Duffus"), new Array("JLDYMWRUPUNVGVS.jpg", "700", "525", "KING'S BRIDGE PARK, NIAGARA FALLS", "8/8/2006", "A BEAUTIFULL SUMMER DAY"), new Array("YZQUTPBJXPVTUGL.jpg", "700", "525", "The Niagara Falls from the Niagara River Parkway in the spring", "4/8/2006", "Michael A. Macias"), new Array("WXDUGLKMXUYLUCI.jpg", "700", "525", "butterfly on niagara falls", "8/10/2006", "cosmin"), new Array("BGFZJCPIZKFATDL.jpg", "700", "464", "Sunrise over the falls", "10/16/2006", "Ian Sobrian"), new Array("FYOPMWRVNAUYVBB.jpg", "700", "464", "A view of the Canadian Falls", "10/16/2006", "Ian Sobrian"), new Array("WTWTYWXQMXUZSSH.jpg", "700", "525", "A Maple Leaf sidewalk in Niagara Falls", "10/20/2004", "Donna Pollard"), new Array("KCBLYNYOODWQIZY.jpg", "700", "933", "Resident of the Butterfly Conservatory", "9/30/2006", "Suzanne Burns"), new Array("ZQJSXMNNXMWRZYN.jpg", "700", "525", "Horseshoe Falls from the air", "9/29/2006", "Suzanne Burns"), new Array("KWCBWHSSPKAKJBI.jpg", "700", "525", "Double Rainbow taken from the Niagara Parkway", "9/29/2006", "Suzanne Burns"), new Array("ELYWOCWPZYXZPDR.jpg", "700", "464", "sunrise over the falls", "6/1/2006", "christina robinson"), new Array("JVCSCCWQTCEZIEC.jpg", "700", "394", "Niagara Falls Complete View", "7/23/2006", "Sai Shanker"), new Array("TJGTPWWPYGPFFSW.jpg", "700", "525", "After a recent ice storm, all the trees around the City were covered in ice like these trees on Marlborough Place.", "1/16/2007", "Teresa Antoine"), new Array("OVFZMNSUMNDTBOB.jpg", "700", "525", "One of the icy trees after the recent ice storm.", "1/16/2007", "Teresa Antoine"), new Array("IMJCKBOBEYMUSHT.jpg", "700", "525", "Multi- coloured falls at night", "4/13/2005", "Dave Jeffrey"), new Array("TEGONYCUTRTPJBE.jpg", "700", "525", "A view of both Niagara Falls from the United States. In the foreground, the American Falls with the Horseshoe Falls visible in the background. On the right, the old 'Ontario Power' power station is visible. Click the link for more information about the power station: \'Ontario Power\' Hydroelectric Generating Station<\/a>", "5/13/2006", "RH"), new Array("NGYLBYKEBPNTNTW.jpg", "700", "525", "Mother Nature displays her creation of an intricate ice castle with the recent ice and snow storms Niagara has encountered.", "1/27/2007", "B. Redman"), new Array("RXPTHOHYFTBYSCE.jpg", "700", "525", "Tobogganing at Stamford High School", "2/1/2007", "Teresa Antoine"), new Array("HRKETBEIZQZKMCY.jpg", "700", "465", "Statue by the falls", "12/20/2007", "Derek Bottomley"), new Array("DPKUZJMNYDIZUCE.jpg", "700", "1053", "Up from the falls", "12/20/2007", "Derek Bottomley"), new Array("XCHVPBOUQLFOJMT.jpg", "700", "525", "Very artistic, isn’t it?", "1/28/2007", "V'Kat"), new Array("GVTLQFHEWNTAYAH.jpg", "700", "422", "The Rainbow Bridge from the Canadian side at night.", "10/19/2006", "Joe Sacco"), new Array("MCJORAFFELHHNFC.jpg", "700", "525", "Falls during winter", "2/18/2007", "Cheval & Pearlyn"), new Array("ZJXVGCJQIXHEDDQ.jpg", "700", "525", "A view from the falls in Canada, from my first trip to the falls. That was amazing!", "1/2/2007", "Ivette Concepcion"), new Array("WJHNMTNWQBTGSGY.jpg", "700", "527", "Niagara Falls taken from the Skylon Tower", "4/18/2007", "Ronnie Connolly"), new Array("HAHQQOIVNXRCEPP.jpg", "700", "465", "Down River!", "5/10/2006", "Marcy Schaefer"), new Array("IVAYMAETMWWYLVD.jpg", "700", "525", "The Niagara River from the Maid of the Mist boat", "6/19/2006", "saadat shah"), new Array("JDUJSKMJYNFDXAO.jpg", "700", "467", "Skylon Tower and Fallsview Casino", "1/1/2007", "Jacek Fortuna"), new Array("MZZUNVPSSUNTPJK.jpg", "700", "467", "Horseshoe Falls", "1/1/2007", "Jacek Fortuna"), new Array("QCQTXWBUGUOOKAY.jpg", "700", "164", "Ice and Water, a cool and very nice Day on the Falls", "12/21/2007", "Jens Egel"), new Array("RGQHSKPLLWJDQWF.jpg", "700", "467", "City of Niagara Falls by night", "5/26/2007", "Jacek Fortuna"), new Array("XOOGRUNRVHJKDDX.jpg", "700", "465", "Fallsview Casino", "5/26/2007", "Jacek Fortuna"), new Array("TRELYLFINMGFEZO.jpg", "700", "457", "Horseshoe Falls", "5/26/2007", "Jacek Fortuna"), new Array("FOSEPAZSLLCPHPR.jpg", "700", "525", "Spring in Niagara Falls", "5/8/2007", "ingrid kamphuis"), new Array("HENRMHCMSYUXEMM.jpg", "700", "525", "Horseshoe Falls from the air", "5/8/2007", "Ingrid Kamphuis"), new Array("GHZAGJYWQRXVUKF.jpg", "700", "525", "Butterfly poses at the conservatory", "10/10/2006", "Paula May"), new Array("ENQFGTPPOVQTNQH.jpg", "700", "525", "Horseshoe Falls", "6/16/2007", "Shari Becker"), new Array("VTAOPMAIFEUVTUM.jpg", "700", "525", "Trip To Niagra Falls 27.08.2006", "8/27/2006", "Veselin Iliev"), new Array("YCDSTLCINJXKAUY.jpg", "700", "525", "Trip To Niagra Falls 27.08.2006", "8/27/2006", "Veselin Iliev"), new Array("DBIWYTNDDRNXUWN.jpg", "700", "525", "View from the Skylon Tower", "5/21/2007", "Beau W. Fischook"), new Array("PIAPJMFHTIZGLYE.jpg", "700", "933", "Just some of the flowers on the Niagara Parkway", "9/28/2005", "Javier y Virginia"), new Array("IPOUNBHJSXPEIIY.jpg", "700", "526", "Frosty ice falls.", "2/7/2007", "Dave Jeffrey"), new Array("DWRPMVAIEFQHIBR.jpg", "700", "526", "A frozen rainbow.", "2/7/2007", "Dave Jeffrey"), new Array("AJYRTRRVTPGFBKW.jpg", "700", "526", "The very frosty view from the Skylon Tower.", "2/8/2007", "Dave Jeffrey"), new Array("YQUHNLAULSMTDJR.jpg", "700", "526", "Snow covered bushes beside the falls.", "2/7/2007", "Dave Jeffrey"), new Array("IIAMJWCLXFJXYTW.jpg", "700", "526", "The bitter edge of the falls.", "2/7/2007", "Dave Jeffrey"), new Array("KTDEBGGBUBEOVTF.jpg", "700", "525", "Bottom-up view", "6/18/2007", "Paul Couturier"), new Array("RVCQVQBTPAZZETP.jpg", "700", "525", "Amazing Niagara", "8/26/2006", "Deepak"), new Array("YELEBDZPZEAMPTC.jpg", "700", "525", "Fireworks over the Falls", "8/28/2006", "Mitchell Lucas"), new Array("PYCGTMRKFOIEWVA.jpg", "700", "525", "Horseshoe Falls on a cloudy day.", "9/9/2006", "Rodney Buike"), new Array("MSMKPXOKCLGNEXX.jpg", "700", "525", "The Big Niagara", "7/22/2007", "Ivan Kanov"), new Array("UNCKVITGGPUXJNR.jpg", "700", "1050", "Behind the Falls- Side view of the Falls", "7/11/2007", "Caroline Gallagher"), new Array("GTLEITWYFWQOOIB.jpg", "700", "525", "little brigde in the secret garden, clifton hill", "6/10/2007", "Jonathan Kelly"), new Array("FSYMROUZKCGRODA.jpg", "700", "933", "The fallsview casino", "8/23/2007", "Jonathan Kelly"), new Array("UXSGJSXWYYNJZMB.jpg", "700", "933", "Fallsview Casino Resort at Night", "8/8/2007", "Rafael Lesnial"), new Array("PCDVYDFJGQMKEDO.jpg", "700", "525", "Skylon tower at sunset", "8/25/2007", "Sweta"), new Array("JHCNINOVJWJGCUC.jpg", "700", "525", "Welland River Niagara Falls morning", "1/30/2006", "doug collee"), new Array("VWQBHYBBRUWXRMW.jpg", "700", "525", "Niagara River near Chippawa in the morning", "9/2/2007", "doug collee"), new Array("LXVNVMBIDUSVKZL.jpg", "700", "525", "The Falls and beyond", "6/10/2005", "doug collee"), new Array("PLAPMVALYYMSCTR.jpg", "700", "525", "Pond near City of Niagara Falls", "9/26/2007", "Leslie Ward"), new Array("SEOOZLYCFGJPTUH.jpg", "700", "466", "Heartland Forest Nature Trail.", "11/20/2007", "chester Murawski"), new Array("TNGPPFMWYYLASEO.jpg", "700", "466", "Niagara Parks Greenhouse Xmas Display.", "1/8/2007", "chester Murawski"), new Array("XYHMXNEBPIBQIZG.jpg", "700", "525", "Horse Shoe Falls from Chopper", "8/22/2007", "Abhishek Kumar Agnihotri"), new Array("PVZFCUSGICEFZUD.jpg", "700", "525", "Cold day but still as beautiful as ever.", "10/19/2007", "Christi Tisland"), new Array("KFHTDUMSYPQSPOE.jpg", "700", "525", "Picture of the Maid of the Mist from the Skylon Tower!!!", "6/12/2006", "Stacey Koontz"), new Array("BNMCDIEUAEMQOSJ.jpg", "700", "318", "Niagara Falls at sunsight.", "7/18/2007", "A.K"), new Array("XETLVFPKPEIUGFN.jpg", "700", "466", "Niagara Skyline at night", "4/22/2008", "chester murawski"), new Array("GQCOHOKHYDNRUUD.jpg", "700", "466", "Blossoms along the parkway", "5/19/2008", "chester murawski"), new Array("HNNYXDGACQDQUHG.jpg", "700", "463", "A majestic view overlooking Niagara Fall and the Visitors Center", "7/19/2006", "Corey Rimmer"), new Array("CBBSHZYIWETGQRF.jpg", "700", "525", "Over the edge.", "8/26/2007", "David"), new Array("OVFREZYHHCMMUWT.jpg", "700", "525", "Blue Butterfly at Conservatory", "4/30/2008", "Alan Davis"), new Array("LULTSGLVRDYHMDT.jpg", "700", "525", "Spring flower at the backyard, Niagara Falls", "7/1/2008", "Sylvia Lay Kheng, Ang"), new Array("HOENOGSEAWEBWAW.jpg", "700", "525", "Rainbow over the Canadian Falls", "8/11/2007", "Chantelle Joseph"), new Array("THQISXLERCFDHYT.jpg", "700", "467", "Fireworks over Niagara at night.", "7/9/2008", "Adi Persaud"), new Array("BCBMUXUDWETYJXE.jpg", "700", "525", "A beatiful view of the Niagara river and Horseshoe falls. Il seems that the building floats on the river.", "7/14/2008", "Jhonatan Sanchez"), new Array("BBCIJGTESQKZGFG.jpg", "700", "525", "Close up of Horseshoe Falls Canada", "9/8/2008", "Marie Downey"), new Array("UIANXADYPLQGRJK.jpg", "700", "525", "Horseshoe Falls on an Autumn morning", "10/10/2008", "Dave Barr"), new Array("DFKBDWEBOMRVTQF.jpg", "700", "527", "Niagara Parks School of Horticulture", "10/22/2008", "Henry Wojnarowski"), new Array("CAEJIXFOEHJILGN.jpg", "700", "465", "Horseshoe Falls on a December Night", "12/14/2008", "Glen Titanic"), new Array("SWRUIZMECESHVEH.jpg", "700", "520", "Fallsview Casino from top of Skylon Tower", "1/14/2008", "K.Kusznir"), new Array("VRUWYWWZAPZUBEH.jpg", "700", "520", "Niagara Falls ( Horseshoe ) from the top of Skylon Tower", "1/14/2008", "K.Kusznir"), new Array("XLLBYBKRTXNUCUF.jpg", "700", "467", "Night view of the horseshoe falls. Pentax DSLR", "7/10/2007", "Adam Truesdale"), new Array("OPOUHDVPONGVSDT.jpg", "700", "525", "The awesome Niagara fall at sunrise !", "9/9/2006", "Shah Bipin Gunvantlal."), new Array("PKMGOVOAIGKLIQC.jpg", "700", "1059", "HDR image of the Skylon Tower.", "1/1/2007", "Jacek Fortuna"), new Array("KMMIDQKNRSHXTZI.jpg", "700", "525", "Tons of water going down the edge with thunder.", "9/18/2006", "Shah Bipin Gunvantlal."), new Array("ITOJDCLGDKCSOBM.jpg", "700", "525", "Niagara Falls Canada", "6/21/2008", "Virginia Francis"), new Array("JYEDVBLRQQZFNUS.jpg", "700", "525", "Golden rays of the rising sun hitting the Horseshoe Niagara fall.", "9/9/2006", "Shah Bipin Gunvantlal"), new Array("FTQZMFSVEXQCQYK.jpg", "700", "525", "The Horseshoe Falls at night", "8/22/2009", "Behzad Zenhari"), new Array("PXCSCHWXFDZCIUG.jpg", "700", "467", "The Cable car ride over the Niagara Gorge is a trip not to be missed when visiting the region. The bird's eye view of the Niagara River can only be described as awesome!", "9/6/2009", "Blake Emmerson"), new Array("ZUKYZVLPYMJPYRJ.jpg", "700", "393", "Horseshoe Falls at night in stark black and white.", "10/1/2009", "Ilona and Darryl Smith"), new Array("RAZKVPMTTHDMODF.jpg", "700", "465", "Canadian Falls and American With The Rainbow", "5/29/2009", "WalMar Montreuil") ); // Number of photos in this gallery var photoNum = photoArray.length; Object.extend(Element, { getWidth: function(element) { element = $(element); return element.offsetWidth; }, setWidth: function(element,w) { element = $(element); element.style.width = w +"px"; }, setHeight: function(element,h) { element = $(element); element.style.height = h +"px"; }, setSrc: function(element,src) { element = $(element); element.src = src; }, setHref: function(element,href) { element = $(element); element.href = href; }, setInnerHTML: function(element,content) { element = $(element); element.innerHTML = content; } }); /*--------------------------------------------------------------------------*/ var Slideshow = Class.create(); Slideshow.prototype = { initialize: function(photoId) { this.photoId = photoId; this.photo = 'Photo'; this.photoBox = 'Container'; this.prevLink = 'PrevLink'; this.nextLink = 'NextLink'; this.captionBox = 'CaptionContainer'; this.caption = 'Caption'; this.counter = 'Counter'; this.loader = 'Loading'; this.phDate = 'PhotoDate'; this.photographer = 'Photographer'; }, getCurrentSize: function() { // Get current height and width, subtracting CSS border size this.wCur = Element.getWidth(this.photoBox) - borderSize; this.hCur = Element.getHeight(this.photoBox) - borderSize; }, getNewSize: function() { // Get current height and width this.wNew = photoArray[photoId][1]; this.hNew = photoArray[photoId][2]; }, getScaleFactor: function() { this.getCurrentSize(); this.getNewSize(); // Scalars based on change from old to new this.xScale = (this.wNew / this.wCur) * 100; this.yScale = (this.hNew / this.hCur) * 100; }, setNewPhotoParams: function() { // Set source of new image Element.setSrc(this.photo,photoDir + photoArray[photoId][0]); // Set anchor for bookmarking Element.setHref(this.prevLink, "#" + (photoId+1)); Element.setHref(this.nextLink, "#" + (photoId+1)); }, setPhotoCaption: function() { // Add caption from gallery array Element.setInnerHTML(this.phDate,photoArray[photoId][4]); Element.setInnerHTML(this.photographer,photoArray[photoId][5]); Element.setInnerHTML(this.caption,photoArray[photoId][3]); Element.setInnerHTML(this.counter,((photoId+1)+'/'+photoNum)); }, resizePhotoBox: function() { this.getScaleFactor(); new Effect.Scale(this.photoBox, this.yScale, {scaleX: false, duration: 0.3, queue: 'front'}); new Effect.Scale(this.photoBox, this.xScale, {scaleY: false, delay: 0.5, duration: 0.3}); // Dynamically resize caption box as well Element.setWidth(this.captionBox,this.wNew-(-borderSize)); }, showPhoto: function(){ new Effect.Fade(this.loader, {delay: 0.5, duration: 0.3}); // Workaround for problems calling object method "afterFinish" new Effect.Appear(this.photo, {duration: 0.5, queue: 'end', afterFinish: function(){Element.show('CaptionContainer');Element.show('PrevLink');Element.show('NextLink');}}); }, nextPhoto: function(){ // Figure out which photo is next (photoId == (photoArray.length - 1)) ? photoId = 0 : photoId++; this.initSwap(); }, prevPhoto: function(){ // Figure out which photo is previous (photoId == 0) ? photoId = photoArray.length - 1 : photoId--; this.initSwap(); }, initSwap: function() { // Begin by hiding main elements Element.show(this.loader); Element.hide(this.photo); Element.hide(this.captionBox); Element.hide(this.prevLink); Element.hide(this.nextLink); // Set new dimensions and source, then resize this.setNewPhotoParams(); this.resizePhotoBox(); this.setPhotoCaption(); } } /*--------------------------------------------------------------------------*/ // Establish CSS-driven events via Behaviour script var myrules = { '#Photo' : function(element){ element.onload = function(){ var myPhoto = new Slideshow(photoId); myPhoto.showPhoto(); } }, '#PrevLink' : function(element){ element.onmouseover = function(){ //soundManager.play('beep'); } element.onclick = function(){ var myPhoto = new Slideshow(photoId); myPhoto.prevPhoto(); //soundManager.play('select'); } }, '#NextLink' : function(element){ element.onmouseover = function(){ //soundManager.play('beep'); } element.onclick = function(){ var myPhoto = new Slideshow(photoId); myPhoto.nextPhoto(); //soundManager.play('select'); } }, a : function(element){ element.onfocus = function(){ this.blur(); } } }; function updateCaptionAnchors() { var currentPhoto = window.location.hash.replace(/#/, ""); if (currentPhoto == "") { document.getElementById("nextCapAnc").href = "#1"; document.getElementById("prevCapAnc").href = "#" + photoNum; } else { if (currentPhoto == photoNum) { document.getElementById("nextCapAnc").href = "#1"; document.getElementById("prevCapAnc").href = "#" + (parseInt(currentPhoto) - 1); } else if (currentPhoto == 1) { document.getElementById("nextCapAnc").href = "#" + (parseInt(currentPhoto) + 1); document.getElementById("prevCapAnc").href = "#" + parseInt(photoNum); } else { document.getElementById("nextCapAnc").href = "#" + (parseInt(currentPhoto) + 1); document.getElementById("prevCapAnc").href = "#" + (parseInt(currentPhoto) - 1); } } } function openpopup(popurl,wid,hei) { winpops=window.open(popurl,"cnfpg","width="+wid+",height="+hei+",top=10,left=10,resizable,scrollbars") } // Add window.onload event to initialize Behaviour.addLoadEvent(init); Behaviour.apply(); function init() { var myPhoto = new Slideshow(photoId); myPhoto.initSwap(); // soundManagerInit(); }