// Original script:
// Horizontal Tiny Scrolling - a smooth scrolling script for horizontal websites
// (the brother of the vertical "Tiny Scrolling")
// by Marco Rosella - http://www.centralscrutinizer.it/en/design/js-php/horizontal-tiny-scrolling
//                v0.6 - February 14, 2007
// Published under a GNU General Public License 

// edited by Kalimiko - December 1rst, 2008 .... I kept a  small part of the script to enable horizontal wheelscrolling in firefox only
// for the complete actual version of this script see the website http://www.thehorizontalway.com/
// where you can download a template for horizontal layouts http://www.thehorizontalway.com/download/THW_template_0.6.zip */

  if (navigator.vendor==("Netscape6")||navigator.product==("Gecko")||navigator.product==("gecko")) 
  {window.onload = function() { scrollTips.init();} 
    var scrollTips = {
    	init : function() {	
    		if (window.addEventListener) {
    		window.addEventListener("DOMMouseScroll", this.mouseScroll, false);
    		} ; 
    		var left = document.getElementById('left');
    		var right = document.getElementById('right');
    	},
    	mouseScroll : function(e) {
    		if (!e) var e = window.event;
    		if (e.wheelDelta <= 0 || e.detail>=0){  
    		window.scrollBy(80,0);
    		} else  window.scrollBy(-80,0) ; 
    	}	
    }
  };


//---------------------------------------------------
// function horizontal scroll working in Opera!!
// working version found on http://www.kirsanov.com/source.html
// All thanks to Dmitry Kirsanov Studio

  function hscr(){
  window.scrollBy(-event.wheelDelta/3,0);
  }

  NS6=(navigator.vendor==("Netscape6")||navigator.product==("Gecko")||navigator.product==("gecko"));
  IE=(document.all)?true:false;
  DOM=(document.getElementById)?true:false;
  IE4=IE&&!DOM;
  IE5=(IE&&navigator.appVersion.indexOf("5.")!=-1);
  isMac=(navigator.appVersion.indexOf("Mac")!=-1);
  IE5M=IE5&&isMac;

  document.onmousewheel=hscr;
  
  if(IE5M){DOM=false;IE4=true};
  
  function ks(c){
    switch(c){
      case 33:window.scrollBy(-750,0);
      break;
      case 34:window.scrollBy(750,0);
      break;
      case 38:window.scrollBy(-50,0);
      break;
      case 40:window.scrollBy(50,0);
      break;
      case 37:window.scrollBy(-40,0);
      break;
      case 39:window.scrollBy(40,0);
      break;
      case 35:window.scrollBy(10000,0);
      break;
      case 36:window.scrollBy(-10000,0);
      break;
    }
  }
  function k(e){ks(event.keyCode);
  }
  function km(event){ks(event.keyCode);
  };
  if(NS6)document.onkeypress=km;
  else document.onkeydown=k;



