
function addEvent(obj, evType, fn, useCapture){
  if (obj.addEventListener){
    obj.addEventListener(evType, fn, useCapture);
    return true;
  }
  else if (obj.attachEvent){
    var r = obj.attachEvent("on"+evType, fn);
    return r;
  } 
  else {
    alert("Non è stato possibile impostare un gestore di eventi");
  }
}

addEvent(window,'load',init,false);

function init(){
	if(!(location.search)){
	openW('Popup/safety-recall.html','Safety','640','500','scrollbars=yes');
	}
	notice();
	}


function openW(url,nome,w,h,scrollbars){
	var currWidth=screen.width;
	var currHeight=screen.height;
	var wleft=(currWidth/2)-240;
	var wtop=(currHeight/2)-240;
	var fin=window.open(url,nome,"width="+w+",height="+h+",left="+wleft+",top="+wtop+","+scrollbars);	}
	
function notice(){
		var btn = document.getElementById('btn-recall');
		btn.onclick = function(){
		openW('Popup/safety-recall.html','Safety','640','500','scrollbars=yes');
		}
	}