Hi all,
I want to be able to compare to given times on a web page and if they less than 1 hour apart or if they time they have entered is before the actual time I want it to display an alert. How do I do this, I managed it in php however I had the problem that it used the server time which is based in the US and the client time which was UK....

This is how I did my php version if any one is able to help with a javascript one I would be very gratful.

PHP Code:
$timenow=$_POST['theTime']; //javascript time


// This is the javascript time broken down into sperate parts and glued backtogeather as seconds
$time3 "{$timenow}"//set the time portion as a variable
$time4 explode(":",$time3); //seperate the time portion

//convert to seconds
$javahours=($time4[0] * 3600);
$javaminutes=($time4[1] * 60);

//get total amount of seconds
$javatimeinseconds $javahours $javaminutes;

// now do it for the alarm time.
$alarmhours=($alarm1 3600);
$alarmminutes=($alarm2 60);

$alarmtimeinseconds $alarmhours+$alarmminutes;

//do the calculation to get the time difference.
$timedifference = ($alarmtimeinseconds $javatimeinseconds);
//if ($alarmtimeinseconds < $javatimeinseconds) {
    
//    die('<html>
//        <head>
//        <title>www.wakemeup.co.uk - - ALARM TIME BEFORE ACTUAL TIME.</title>
//        </head>

//        <body>
//        <p align="center"><font face="Century Gothic">You are trying to set a reminder in the past please try again.</font></p>
//        <p align="center"><font face="Century Gothic"><a href="newentry.php"><img src="images/new.jpg" width="220" height="36" border="0"></a></font> </p>
//        <p align="center">&nbsp;</p>
//        </body>
//        </html>');
//}


//if ($timedifference < 3600) {
//    die('<html>
//        <head>
//        <title>www.wakemeup.co.uk - - NOT ENOUGH NOTICE.</title>
//        </head>

//        <body>
//        <p align="center"><font face="Century Gothic">Sorry but you must give at least 1 hours notice in order to set a reminder please try again</font></p>
//        <p align="center"><font face="Century Gothic"><a href="newentry.php"><img src="images/new.jpg" width="220" height="36" border="0"></a></font> </p>
//        <p align="center">&nbsp;</p>
//        </body>
//    /    </html>');
//}