var history_image_info = [ [ 393, 500, '/Images/history/img/001_145wellington.jpg', 'Old Toronto Office - Wellington St.' ], [ 727, 484, '/Images/history/img/002_519west7.jpg', "Old Vancouver Office - 7th Ave." ], [ 639, 500, '/Images/history/img/003_980nairn.jpg', "Old Winnipeg Office - Nairn St." ], [ 500, 376, '/Images/history/img/004_farrellrd.jpg', "Old Calgary Office - Farrell Rd." ], [ 500, 350, '/Images/history/img/005_map.jpg', "Wellington Office Map" ], [ 762, 526, '/Images/history/img/006_osbornewpg.jpg', "Old Winnipeg Office - Osbourne St." ], [ 500, 377, '/Images/history/img/007_sundries.jpg', "Sundries Department - 145 Wellington St." ], [ 500, 413, '/Images/history/img/008_workshop.jpg', "Workshop at 145 - Wellington St." ], [ 326, 500, '/Images/history/img/009_1897.jpg', "Mail Order Catalogue - 1897" ], [ 328, 500, '/Images/history/img/010_1898.jpg', "Price List - 1898" ], [ 323, 500, '/Images/history/img/011_1899.jpg', "Mail Order Catalogue - 1899" ], [ 323, 500, '/Images/history/img/012_1900.jpg', "Mail Order Catalogue - 1900" ], [ 332, 500, '/Images/history/img/013_catalogue.jpg', "Pirice list - 1901" ], [ 323, 500, '/Images/history/img/014_1906.jpg', "Catalogue - 1906" ], [ 506, 698, '/Images/history/img/015_catalogue1.jpg', "Pharmaceutical Catalogue" ], [ 337, 500, '/Images/history/img/016_ad.jpg', "Battery Ad" ], [ 382, 550, '/Images/history/img/017_flyer.jpg', "Gloves Ad" ], [ 374, 500, '/Images/history/img/018_flyer2.jpg', "Flyer - 1974" ], [ 324, 500, '/Images/history/img/019_flyer1.jpg', "Catalogue Page" ], [ 330, 500, '/Images/history/img/020_ointments.jpg', "Skin Care" ], [ 450, 302, '/Images/history/img/021_wa.jpg', "Headlight" ], [ 450, 370, '/Images/history/img/022_thermotherapy.jpg', "Thermo-Therapy" ], [ 450, 274, '/Images/history/img/023_maternityset.jpg', "Maternity Set" ], [ 450, 414, '/Images/history/img/024_laryngoscope.jpg', "Tobold's Laryngoscope" ], [ 450, 308, '/Images/history/img/025_flexoplast.jpg', "Adhesive Bandage" ], [ 450, 532, '/Images/history/img/026_ear.jpg', "Ear of Dionysius" ], [ 353, 500, '/Images/history/img/027_book.jpg', "Employee Ledger" ], [ 369, 500, '/Images/history/img/028_order.jpg', "Vendor Order" ], [ 500, 349, '/Images/history/img/029_note.jpg', "Vendor Note" ], [ 321, 500, '/Images/history/img/030_specials.jpg', "Specialties List" ], [ 366, 500, '/Images/history/img/031_terms.jpg', "Note of Terms" ], [ 508, 956, '/Images/history/img/032_thanks.jpg', "Thank You Note" ], [ 594, 397, '/Images/history/img/033_tradeshow.jpg', "Trade Show Booth - 1953" ], [ 286, 500, '/Images/history/img/034_war.jpg', "War Document" ], [ 388, 500, '/Images/history/img/035_waybill.jpg', "Pick Slip" ], ]; var history_gallery_scroll_interval; var history_did_scroll_notice = 1; function setup_scroll_notice() { // var text = $('history_company_history'); // text.onmouseover = function() { // if ( history_did_scroll_notice == 0 ) { // $('history_scroll_notice').style.display = 'block'; // history_did_scroll_notice = 1; // setTimeout( function () { $('history_scroll_notice').style.display = 'none'; }, 3000 ); // } // } } function setup_image_gallery() { var myMove = new Drag($('history_image_view')); $('history_image_view_nav_close').onclick = function() { $('history_image_view').style.display = 'none'; } var links = $$('#history_gallery_images a'); for ( var i = 0; i < links.length; i++ ) { links[i].onclick = function(num) { return function(){ show_image(num); return false; } }(i) } setup_image_gallery_tips(); // ####################################################33 $('history_gallery_up').onmouseover = function() { history_gallery_scroll_interval = setInterval( function(){ scroll_gallery('up') }, 100 ); } $('history_gallery_up').onmouseout = function() { clearInterval(history_gallery_scroll_interval); } $('history_gallery_down').onmouseover = function() { history_gallery_scroll_interval = setInterval( function(){ scroll_gallery('down') }, 100 ); } $('history_gallery_down').onmouseout = function() { clearInterval(history_gallery_scroll_interval); } } function scroll_gallery(dir) { var offset = 80; if ( dir == 'up' ) { offset = -80; } var list = new Fx.Scroll('history_gallery_images'); imgs = $('history_gallery_images'); // alert( imgs.scrollTop + ' | ' + imgs.offsetTop) list.set(0, imgs.scrollTop + offset ); // list.set(0, 0 ); list = 0; } function setup_image_gallery_tips() { var myTips = new Tips('#history_gallery_images a', { className: 'history_tips'}); myTips.addEvent('show', function(tip){ tip.fade('in'); }); myTips.addEvent('hide', function(tip){ tip.fade('out'); }); /* var galPics = $$('#history_gallery li img'); for ( var i = 0; i < galPics.length; i++ ) { var text = galPics[i].title; var multi = text.split('::'); galPics[i].store('tip:title', multi[0]); if (multi[1]) { galPics[i].store('tip:text', multi[1]); } }*/ var galPics = $$('#history_gallery_images a'); for ( var i = 0; i < galPics.length; i++ ) { galPics[i].store('tip:text', ''); } } function show_image(num) { // alert(document.body.scrollTop); // var offset = 0; var ScrollTop = document.body.scrollTop; if (ScrollTop == 0) { if (window.pageYOffset) ScrollTop = window.pageYOffset; else ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0; } /* if (navigator.appName == "Microsoft Internet Explorer") { offset = document.body.scrollTop; } else { offset = window.pageYOffset; } */ if (num == 0) { $('history_image_view_nav_prev').style.visibility = 'hidden'; $('history_image_view_nav_prev').onclick = function() { return false; } } else { $('history_image_view_nav_prev').style.visibility = 'visible'; $('history_image_view_nav_prev').onclick = function(i){ return function(){ show_image(i); } }(num-1) } var lim = history_image_info.length - 1; if (navigator.appName == "Microsoft Internet Explorer") { lim--; } if ( num == lim ) { $('history_image_view_nav_next').style.visibility = 'hidden'; $('history_image_view_nav_next').onclick = function() { return false; } } else { $('history_image_view_nav_next').style.visibility = 'visible'; $('history_image_view_nav_next').onclick = function(i){ return function(){ show_image(i); } }(num+1) } var cur = $('history_image_view').style.top; if (cur) { cur = cur.substr(0, cur.length - 2); } if (cur < ScrollTop) { $('history_image_view').style.top = ScrollTop + 'px'; } $('history_image_view').style.display = 'block'; $('history_image_view_title').style.width = history_image_info[num][0]; var viewFx= new Fx.Morph($('history_image_view'), {duration: 'short', transition: Fx.Transitions.Sine.easeOut}); viewFx.start({ 'height': history_image_info[num][1] + 50, 'width': history_image_info[num][0] }); //$('history_image_view').style.width = history_image_info[num][0] + 'px'; // $('history_image_view').style.height = history_image_info[num][1] + 100 + 'px'; var img = $('history_image_view_image'); img.src = history_image_info[num][2]; var imgFx = new Fx.Morph(img, {duration: 'short', transition: Fx.Transitions.Sine.easeOut}); imgFx.start({ 'height': history_image_info[num][1], 'width': history_image_info[num][0] }) img.width = history_image_info[num][0]; img.height = history_image_info[num][1]; $('history_image_view_title').innerHTML = history_image_info[num][3]; } function setup_company_history_scroll() { // var slider = new Slider('history_company_history', 'history_company_history_slide_knob'); var el = $('history_company_history_slider'); var mySlider = new Slider(el, el.getElement('#history_company_history_slide_knob'), { steps: $('history_company_history').scrollHeight - $('history_company_history').offsetHeight, mode: 'vertical', range: [0, $('history_company_history').scrollHeight - $('history_company_history').offsetHeight], /* onStart: function(){ this.scrollFx = this.scrollFx || new Fx.Scroll('history_company_history', { offset: { 'x': 0, 'y': 0 } }); },*/ onChange: function(val){ // this.knob.setStyle(this.p, pos); // this.knob.set(20, pos); this.scrollFx = this.scrollFx || new Fx.Scroll('history_company_history'); this.scrollFx.set(0, val); } // onComplete: function(){ // } }); } function setup_history_tips () { var myTips = new Tips('#history_people_slide li', { className: 'history_tips'}); myTips.addEvent('show', function(tip){ tip.fade('in'); }); myTips.addEvent('hide', function(tip){ tip.fade('out'); }); /* var galTips = new Tips('#history_gallery li img', { className: 'history_tips' }); galTips.addEvent('show', function(tip){ tip.fade('in'); }); galTips.addEvent('hide', function(tip){ tip.fade('out'); }); var galPics = $$('#history_gallery li img'); for ( var i = 0; i < galPics.length; i++ ) { var text = galPics[i].title; var multi = text.split('::'); galPics[i].store('tip:title', multi[0]); if (multi[1]) { galPics[i].store('tip:text', multi[1]); } } */ } /*James Stevens Daniel Stevens Paul Stevens Peter Stevens Jeff Stevens */ function preload_history_images() { var images = new Array(); for ( var i = 0; i < history_image_info.length; i++ ) { var stupid_ie = history_image_info[i]; if (navigator.appName == "Microsoft Internet Explorer") { stupid_ie = new Array(history_image_info[i]); } images[i] = new Image( stupid_ie[0], stupid_ie[1] ); images[i].src = stupid_ie[2]; } }