﻿
 function ImgStarNotFound(i)
{
	i.src="http://www.tuttovoli.com/Image/Stelle/ndstar.gif";
	
}

function ImgCarNotFound(i)
{
    i.src="Image/car_NA.jpg";
}   

function ImgNotFound(i)
{
	i.src="Image/hotel_NA.jpg";
	
} 

function ImgCruiseNotFound(i)
{
    i.src="Image/cruise_NA.jpg";
}  



  function ImgTrasp(i)
{
    i.src="Image/trasp.gif";
}

    function HidePastDates(date) {
		var now = new Date();
		if (compareDates(now, date) < 0) {
			return (true);
		}
		return false;
	} 
	
	function compareDates(date1, date2) {
		var year1 = date1.getYear();
		var year2 = date2.getYear();
		var month1 = date1.getMonth();
		var month2 = date2.getMonth();
		var day1 = date1.getDate();
		var day2 = date2.getDate();
		if (year1 > year2) { return -1; }
		if (year2 > year1) { return 1; }
		if (month1 > month2) { return -1; }
		if (month2 > month1) { return 1; }
		if (day1 > day2) { return -1; }
		if (day2 > day1) { return 1; }
		return 0;
	}     
        
 
 function MM_openBrWindow(theURL, winName, features, width, height, bReturnObject)
{ 
	var window_width;
	var window_height;

	if(!width) 
			window_width = (screen.width/2)+150;
	else
		window_width = width;

	if(!height) 
		window_height = (screen.height/2)+130;
	else
		window_height = height;
			
	var window_top = (screen.height-window_height)/2;
	var window_left = (screen.width-window_width)/2;
	var newfeatures = features+",width="+window_width+",height="+window_height+",top="+window_top+",left="+window_left
	objWindow = window.open(theURL,winName,newfeatures);
	if(typeof(objWindow)=='object') { 
		objWindow.focus(); 
	} else {
		alert('Attenzione! Attivare popup!');
	}
	if (bReturnObject)
	{
		return objWindow;
	}
}
           


