
YAHOO.example.init = function() {
    var tabViewtapasbbq = new YAHOO.widget.TabView ('tapasbbq'  , { orientation: 'left' });
    var tabViewtapas    = new YAHOO.widget.TabView ('tapas'     , { orientation: 'left' });
    var tabViewbbq      = new YAHOO.widget.TabView ('bbq'       , { orientation: 'left' });
    var tabViewtraiteur = new YAHOO.widget.TabView ('traiteur'  , { orientation: 'left' });
    var tabViewejm      = new YAHOO.widget.TabView ('ejm'       , { orientation: 'left' });
    var tabViewejt      = new YAHOO.widget.TabView ('ejt'       , { orientation: 'left' });
};


YAHOO.example.init();

(function () {
    YAHOO.util.Event.onDOMReady(function (ev) {
        var carousel    = new YAHOO.widget.Carousel("ccontainer", {
            numVisible: 1, animation: { speed: 0.5 }
        });
        carousel.render(); // get ready for rendering the widget
        carousel.show();   // display the widget

        var tapcarousel    = new YAHOO.widget.Carousel("tapascontainer", {
            numVisible: 1, animation: { speed: 0.5 }
        });
        tapcarousel.render(); // get ready for rendering the widget
        tapcarousel.show();   // display the widget
    });
})();


var map;

function loadGoogleMap() {
    if (GBrowserIsCompatible()) {
       map = new GMap2(document.getElementById("map_canvas"));
       container = document.getElementById("map_canvas");
       map.setCenter(new GLatLng(50.852300, 2.892494), 13);
       map.addControl(new GLargeMapControl());
       map.openInfoWindowHtml(map.getCenter(), "<B>Traiteur Slagerij Decroos</B><BR>Maarschalk Frenchlaan 10<BR>B-8900 Ieper");
	   map.enableContinuousZoom();
	   map.enableScrollWheelZoom();
       GEvent.addDomListener(container, "DOMMouseScroll", wheelZoom);
       GEvent.addDomListener(container, "mousewheel", wheelZoom);
       var point = new GLatLng(50.852300, 2.892494);
       map.addOverlay(new GMarker(point));
    }
 }

// Mouse wheel zoom - Event handler -----
function wheelZoom(event) {
	
	if (event.cancelable) {
		event.preventDefault();
	}
	map.closeInfoWindow();
	if((event.detail || -event.wheelDelta) < 0) {
		window.setTimeout(function(){
			map.zoomIn();
		},200);
	} 
	else {
		window.setTimeout(function(){
			map.zoomOut();
		},200);
	}
	return false; 
}


function InitTableStyles ( ) {
   var tables = document.getElementsByTagName("table");

   if (tables) { 
      for (var j = 0; j < tables.length; j++) { 
         if (tables[j].className == "productListTable") {
            var rows = tables[j].getElementsByTagName("tr"); 
            for (var i = 0; i < rows.length; i++) { 
               var cells = rows[i].getElementsByTagName("td"); 
               for (var k = 0; k < cells.length; k++) { 
                  if (k == 1) {
                     if (i % 2)
                        cells[k].className = "odd2";
                     else
                        cells[k].className = "even2";
                  } else {
                     if (i % 2)
                        cells[k].className = "odd";
                     else
                        cells[k].className = "even";
                  }
               }
            }
         }
         if (tables[j].className == "allergenListTable") {
            var rows = tables[j].getElementsByTagName("tr"); 
            for (var i = 0; i < rows.length; i++) { 
               var cells = rows[i].getElementsByTagName("td"); 
               for (var k = 0; k < cells.length; k++) { 
                  if (k == 0) {
                     if (i % 2)
                        cells[k].className = "odd0";
                     else
                        cells[k].className = "even0";
                  } else {
                     if (i % 2)
                        cells[k].className = "oddother";
                     else
                        cells[k].className = "evenother";
                  }
               }
            }
         } 
      }
   }
 
}


