var prices = new Array;
prices[0] = "0,0,0,0";   // Jan
prices[1] = "0,0,0,0";   // Feb
prices[2] = "22,0,0,0";  // Mar
prices[3] = "22,0,0,0";  // Apr
prices[4] = "22,0,0,0";  // Maj
prices[5] = "30,43,0,0"; // Jun
prices[6] = "35,48,0,0"; // Lug
prices[7] = "45,56,50,65"; // Aug
prices[8] = "30,43,0,0"; // Sep
prices[9] = "0,0,0,0";   // Oct
prices[10] = "0,0,0,0";  // Nov
prices[11] = "0,0,0,0";  // Dec

function getPrice( numGiorni, numAdulti, numBambini, mezzaP ) {
    var iOut = 0;
}

function suycDateDiff( start, end, interval, rounding ) {
    var iOut = 0;
    
    // Create 2 error messages, 1 for each argument. 
    var startMsg = "Check the Start Date and End Date\n"
        startMsg += "must be a valid date format.\n\n"
        startMsg += "Please try again." ;
		
    var intervalMsg = "Sorry the dateAdd function only accepts\n"
        intervalMsg += "d, h, m OR s intervals.\n\n"
        intervalMsg += "Please try again." ;

    var bufferA = Date.parse( start ) ;
    var bufferB = Date.parse( end ) ;
    	
    // check that the start parameter is a valid Date. 
    if ( isNaN (bufferA) || isNaN (bufferB) ) {
        alert( startMsg ) ;
        return null ;
    }
	
    // check that an interval parameter was not numeric. 
    if ( interval.charAt == 'undefined' ) {
        // the user specified an incorrect interval, handle the error. 
        alert( intervalMsg ) ;
        return null ;
    }
    
    var number = bufferB-bufferA ;
    
    // what kind of add to do? 
    switch (interval.charAt(0))
    {
        case 'd': case 'D': 
            iOut = parseInt(number / 86400000) ;
            if(rounding) iOut += parseInt((number % 86400000)/43200001) ;
            break ;
        case 'h': case 'H':
            iOut = parseInt(number / 3600000 ) ;
            if(rounding) iOut += parseInt((number % 3600000)/1800001) ;
            break ;
        case 'm': case 'M':
            iOut = parseInt(number / 60000 ) ;
            if(rounding) iOut += parseInt((number % 60000)/30001) ;
            break ;
        case 's': case 'S':
            iOut = parseInt(number / 1000 ) ;
            if(rounding) iOut += parseInt((number % 1000)/501) ;
            break ;
        default:
        // If we get to here then the interval parameter
        // didn't meet the d,h,m,s criteria.  Handle
        // the error. 		
        alert(intervalMsg) ;
        return null ;
    }
    
    return iOut ;
}

/* ------------------------------------------------------------------------------------------------------- * /
	--- non cancellare --- esempio di utilizzo della funzione suycDateDiff( start, end, interval, rounding ) 
/ * ------------------------------------------------------------------------------------------------------- * /
// The presentDate function is called on when you 
// click on the button on the form.
function presentDate(f) {
    var ierr = 1 ;
    
   // Verify whether the user wants to return only whole
   // intervals or intervals rounded to the nearest number 
   // of interval.
   var roundDays = f.chkWholeDays.checked ;
   
   // Verify that the user entered something in the
   // Start Date input box.
    if(f.startDate.value != '') {
        if(!isNaN(Date.parse( f.startDate.value ))) {
            var s = new Date(Date.parse(f.startDate.value)) ;
            ierr = 0 ;
        }
    }
    
    // Verify that the user entered something in the
   // Ending Date input box.
    if(f.endDate.value != '' && ierr != 1) {
        if(!isNaN(Date.parse( f.endDate.value ))) {
            var e = new Date(Date.parse(f.endDate.value)) ;
            
            // call the dateDiff function.
            var temp = suycDateDiff( s, e, f.selTypeOf.value, roundDays ) ;
        }else{
            ierr = 1;
        }
    }else{
        ierr = 1;
    }
    
    // update the tellTime field with our new value.
    if ( temp != null && ierr != 1 ) f.tellTime.value = temp.toString() ;
}

 
*/
