// Global JavaScript Document
// Coming Soon
function coming() {alert('Coming Soon!');}
// Legal Alert Message for Footer
function legal() {
	alert("The materials on Baker International's Internet sites are provided 'as is.' Baker International makes no warranties, express or implied, and Baker International disclaims and negates all other warranties, including without limitation, implied warranties of merchantability, fitness for a particular purpose, or noninfringement of intellectual property or other violation of rights.")
}
// Confirm
function really(url) {
    if (confirm("Are you sure?")) location.href = url;
}
// Test browser Type
var isNC    = (document.layers) ? true : false;
var isIE    = (document.all)? true : false;
var isDOM   = (document.getElementById && !isIE)? true : false;
// Date and Time
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)
year = year + 1900;
// Begin Greeting
function greeting() {
var today = new Date();
var hrs = today.getHours();
document.write("Welcome and Good ");
if (hrs < 6)
document.write("(Early) Morning");
else if (hrs < 12)
document.write("Morning");
else if (hrs <= 18)
document.write("Afternoon");
else if (hrs <= 22)
document.write("Evening");
else
document.write("(Late) Evening");
document.writeln("!");
};
function clock() {
if (!document.layers && !document.all) return;
var digital = new Date();
var hours = digital.getHours();
var minutes = digital.getMinutes();
var seconds = digital.getSeconds();
var amOrPm = "AM";
if (hours > 11) amOrPm = "PM";
if (hours > 12) hours = hours - 12;
if (hours == 0) hours = 12;
if (minutes <= 9) minutes = "0" + minutes;
if (seconds <= 9) seconds = "0" + seconds;
dispTime = hours + ":" + minutes + " " + amOrPm;
if (document.layers) {
document.layers.pendule.document.write(dispTime);
document.layers.pendule.document.close();
}
else
if (document.all.pendule)
pendule.innerHTML = dispTime;
setTimeout("clock()", 60000);
}
// Validate Email address and password
function isEmail(string) {
   if (!string) return false;
   var iChars = "*|,\":<>[]{}`\';()&$#%";

   for (var i = 0; i < string.length; i++) {
      if (iChars.indexOf(string.charAt(i)) != -1)
         return false;
   }
   return true;
}
// JavaScript1.2 Version
function isEmail(string) {
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
        return true;
    else
        return false;
}
function isReady(form) {
    if (isEmail(form.email.value) == false) {
        alert("Please enter a valid email address.");
        form.email.focus();
        return false;
    }
}