function smartRollover() {  
  if(document.getElementsByTagName) {  
    var images = document.getElementsByTagName("img");  
    var preImages = new Array();  
      for(var i=0; i < images.length; i++) {  
        if(images[i].getAttribute("src").match("_off.")) {  
        var preImage = new Image();  
        preImage.src =  
        images[i].getAttribute("src").replace("_off.", "_on.");  
        preImages.push(preImage);  
        images[i].onmouseover = function() {  
          this.setAttribute("src",  
          this.getAttribute("src").replace("_off.", "_on."));  
        }  
        images[i].onmouseout = function() {  
          this.setAttribute("src",  
          this.getAttribute("src").replace("_on.", "_off."));  
        }  
      }  
    }  
  }  
}  
if(window.addEventListener) {  
  window.addEventListener("load", smartRollover, false);  
}  
else if(window.attachEvent) {  
  window.attachEvent("onload", smartRollover);  
}  // JavaScript Document

function calorie_open(str){
	var target = "";
	
	switch (str) {
	case "plane":
		target = "calorie_plane.html";
		break;
	case "coconuts":
		target = "calorie_coconuts.html";
		break;
	case "sesami":
		target = "calorie_sesami.html";
		break;
	default:
		target = "error.html";
	}
	
	window.open(target,"_blank","width=990px,height=540px");
}

function whats_now_open(url){
	window.open(url,"_blank","");
}// JavaScript Document
