function days_between(date1, date2) {

    // The number of milliseconds in one day
    var ONE_DAY = 1000 * 60 * 60 * 24

    // Convert both dates to milliseconds
    var date1_ms = date1.getTime()
    var date2_ms = date2.getTime()

    // Calculate the difference in milliseconds
    var difference_ms = Math.abs(date1_ms - date2_ms)
    
    // Convert back to days and return
    return Math.round(difference_ms/ONE_DAY)

}



var win;
var features = "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes";
function replaceArgs()
{
  str = arguments[0];
  for (var i=1; i <= arguments.length; i++) {
    str = str.replace ("{" + (i-1).toString() + "}", arguments[i]);
  }
  return str;
}

function singlewindow(num, code, total)
    {

        var windowname = code;
        if (code.indexOf("_") > 0) {
            windowname = code.substring(0, code.indexOf("_"));
        }
                        var sWidth = 800;
        var sHeight = 600;
        if (screen.availWidth) {
                                    sWidth = screen.availWidth;
            sHeight = screen.availHeight;
        } else if (document.all) {
                                    sWidth = window.screen.availWidth;
            sHeight = window.screen.availHeight;
        }
        var width = Math.min(800, Math.floor(sWidth/total - 10));
        try {
            var args = replaceArgs("height={0},width={1},top={2},left={3},menubar=1,location=1,resizable=1,scrollbars=1,toolbar=1",
                                   sHeight,
                                   width,
                                   0,
                                   Math.floor(width*num + 10*num));
            var mywin = window.open(code, windowname, args);
            mywin.focus();
        } catch (ignored) {
            return false;
        }
                return true;
    }

function GetDirections()
{
var total=0;
if (document.getElementById("mapquest").checked){total++;}
if (document.getElementById("googlemaps").checked){total++;}
if (document.getElementById("super").checked){total++;}
if (document.getElementById("yahoo").checked){total++;}
var num=-1;
var fcity=document.getElementById("fromcity").value;
var fstate=document.getElementById("fromstate").value;
var fzip=document.getElementById("fromzip").value;
var fadd=document.getElementById("fromaddress").value;
var tcity=document.getElementById("tocity").value;
var tstate=document.getElementById("tostate").value;
var tzip=document.getElementById("tozip").value;
var tadd=document.getElementById("toaddress").value;
if (document.getElementById("mapquest").checked)
{
var pricelineurl='http://www.mapquest.com/maps?1c='+fcity+'&1s='+fstate+'&1a='+fadd+'&1z='+fzip+'&2c='+tcity+'&2s='+tstate+'&2a='+tadd+'&2z='+tzip;

num++;
singlewindow(num, pricelineurl, total);
}
if (document.getElementById("googlemaps").checked)
{
var gmapsurl='http://maps.google.com/maps?f=d&saddr='+fadd+',+'+fcity+'+'+fstate+'+'+fzip+'&daddr='+tadd+',+'+tcity+'+'+tstate+'+'+tzip;

num++;
singlewindow(num, gmapsurl, total);
}
if (document.getElementById("yahoo").checked)
{
var yahoourl='http://maps.yahoo.com/#zoom=8&q1='+fadd+'%2C'+fcity+'%2C'+fstate+'%20'+fzip+'&q2='+tadd+'%2C%20'+tcity+'%2C'+tstate+'%20'+tzip;

num++;
singlewindow(num, yahoourl, total);
}
if (document.getElementById("super").checked)
{
var superurl='http://yellowpages.superpages.com/directions.jsp?SRC=&URI=&UI=2004&var1=&var2=&var9=&var10=&STYPE=&OCC=&DCC=&ORPIM=1&DRPIM=1&OPNAME=1&SP_LABEL_ORIGIN=&SP_LABEL1_ORIGIN=&SP_ADDR_ORIGIN=&SP_CITY_ORIGIN=&SP_STATE_ORIGIN=&SP_GEOCODE_ORIGIN=false&SP_LONG_ORIGIN=&SP_LAT_ORIGIN=&SP_LABEL_DESTINATION=&SP_LABEL1_DESTINATION=&SP_ADDR_DESTINATION=&SP_CITY_DESTINATION=&SP_STATE_DESTINATION=&SP_GEOCODE_DESTINATION=false&SP_LONG_DESTINATION=&SP_LAT_DESTINATION=&LANG=en-US&ADDR_ORIGIN='+fadd+'+Dr&CITY_ORIGIN='+fcity+'STATE_ORIGIN='+fstate+'&ZIP_ORIGIN='+fzip+'&ADDR_DESTINATION='+tadd+'&CITY_DESTINATION='+tcity+'&STATE_DESTINATION='+tstate+'&ZIP_DESTINATION='+tzip+'&results_display_mode=map&route_type=fastest&ROUTE_UNITS=2';

num++;
singlewindow(num, superurl, total);
}
}
var newlink



function glink() {



var start= document.forms[1].yay



if (start.options[start.selectedIndex].value == "Switzerland")



{



makeSwit()



}else



if (start.options[start.selectedIndex].value == "Italy")



{



makeItaly()



}else



if (start.options[start.selectedIndex].value == "Russia")



{



makeRussia()



}else



if (start.options[start.selectedIndex].value == "Britain")



{



makeBrit()



}else



if (start.options[start.selectedIndex].value == "United States")



{



makeMile()



}else



if (start.options[start.selectedIndex].value == "Europe")



{



makeEuro()



}else



if (start.options[start.selectedIndex].value == "France")



{



makeFrance()



}else



if (start.options[start.selectedIndex].value == "Lithuania")



{



makeLitho()



}else



if (start.options[start.selectedIndex].value == "Estonia")



{



makeEsto()



}else



if (start.options[start.selectedIndex].value == "Latvia")



{



makeLatv()



}else



if (start.options[start.selectedIndex].value == "Australia")



{



makeAustra()



}else



if (start.options[start.selectedIndex].value == "Mexico")



{



makeMexico()



}else



if (start.options[start.selectedIndex].value == "World Cities")



{



makeWorld()



}else



alert('The Page You Selected Is not Availiable')



}	



function makeBrit()



			{



			newWindow = window.open('http://www.thepalmbeachtimes.com/brit.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=260')



			}



function makeMile()



			{



			newWindow = window.open('http://www.thepalmbeachtimes.com/map.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=260')



			}



function makeEuro()



			{



			newWindow = window.open('http://www.thepalmbeachtimes.com/euro.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=260')



			}



function makeFrance()



			{



			newWindow = window.open('http://www.thepalmbeachtimes.com/france.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=260')



			}



function makeLitho()



			{



			newWindow = window.open('http://www.thepalmbeachtimes.com/litho.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=260')



			}



function makeItaly()



			{



			newWindow = window.open('http://www.thepalmbeachtimes.com/Italy.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=260')



			}



function makeRussia()



			{



			newWindow = window.open('http://www.thepalmbeachtimes.com/rus.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=260')



			}



function makeEsto()



			{



			newWindow = window.open('http://www.thepalmbeachtimes.com/esto.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=260')



			}





function makeSwit()





			{





			newWindow = window.open('http://www.thepalmbeachtimes.com/swit.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=260')





			}

function makeLatv()





			{





			newWindow = window.open('http://www.thepalmbeachtimes.com/lat.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=260')





			}

function makeAustra()





			{





			newWindow = window.open('http://www.thepalmbeachtimes.com/austra.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=260')





			}

function makeMexico()





			{





			newWindow = window.open('http://www.thepalmbeachtimes.com/TravelNavigator/mexico.htm','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=802,height=462')





			}

function makeWorld()





			{





			newWindow = window.open('http://www.thepalmbeachtimes.com/world.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=260')





			}	