// Global JavaScript Document
// Legal Alert Message for Footer
function legal() {
	alert("The materials on VSI Products LLC's Internet sites are provided 'as is.' VSI Products LLC makes no warranties, express or implied, and VSI Products LLC 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;
}
// Coming Soon
function comingSoon() {
    alert("Coming Soon! Please try back again later.");
}
// 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);
}
// Print this page functions
var i = 0;
var headerHTML;
var infoHTML;
function displayHeader()
	{
		var header = document.getElementById("TBD");
		header.innerHTML = headerHTML;
	}

function printPage() {

		var header = document.getElementById("TBD");
		headerHTML = header.innerHTML;
		header.innerHTML = " ";
		window.print();
		setTimeout("displayHeader();", 3000);
	}
// 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 isReadyTO(form) {
    if (isEmail(form.sendTo.value) == false) {
        alert("Please enter a valid email address.");
        form.sendTo.focus();
        return false;
    }
}
function isReadyFROM(form) {
    if (isEmail(form.sentFrom.value) == false) {
        alert("Please enter a valid email address.");
        form.sentFrom.focus();
        return false;
    }
}
