function getDateAndDay()
{
  var d, day, x, s;
  var x = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
  d = new Date();
  day = d.getDay();
  s = x[day];
  s += ":  ";
  s += (d.getMonth() + 1) + "/";  
  s += d.getDate() + "/";  
  s += d.getFullYear();  
  return(s);
}

today = new Date();
year = (today.getFullYear) ? today.getFullYear() : today.getYear();
month = today.getMonth();
switch (month) {
			 case 0 : month = "Jan"; break;
			 case 1 : month = "Feb"; break;
			 case 2 : month = "Mar"; break;
                         case 3 : month = "Apr"; break;
			 case 4 : month = "May"; break;
			 case 5 : month = "Jun"; break;
			 case 6 : month = "Jul"; break;
			 case 7 : month = "Aug"; break;
			 case 8 : month = "Sep"; break;
			 case 9 : month = "Oct"; break;
			 case 10 : month = "Nov"; break;
			 case 11 : month = "Dec"; break;
			 }
date = today.getDate();
day = today.getDay();
switch (day) {
			 case 0 : day = "Sunday"; break;
			 case 1 : day = "Monday"; break;
			 case 2 : day = "Tuesday"; break;
			 case 3 : day = "Wednesday"; break;
			 case 4 : day = "Thursday"; break;
			 case 5 : day = "Friday"; break;
			 case 6 : day = "Saturday"; break;
			 }
hours = today.getHours();
  if (hours<12)  greeting = 'Good morning!';
	if (hours<18 && hours>11)  greeting = 'Good afternoon!';
	if (hours<20 && hours>17)  greeting = 'Good evening!';
	if (hours>19)  greeting = 'Good evening!';
hour = (hours>12) ? (hours-12) : hours;
halfDay = (hours>11 && hours<24) ? 'PM' : 'AM';
minutes = today.getMinutes();
dayStr =  day+ ', ' +month+ ' ' +date+ ', ' +year;
timeStr = (minutes<10) ? hour+ ':0' +minutes+ ' ' +halfDay : hour+ ':' +minutes+ ' ' +halfDay;

////////////////////////////////////////////////////////

var newwindow;
function popUp(url)
{
	newwindow=window.open(url, 'popUp', config='height=415, width=640, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no, left=10 top=10');
	if (window.focus) {newwindow.focus()}
}

var newwindow;
function popUp2(url)
{
	newwindow=window.open(url, 'popUp2', config='height=545, width=770, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no, left=10 top=10');
	if (window.focus) {newwindow.focus()}
}

var newwindow;
function warranty(url)
{
	newwindow=window.open(url, 'warranty', config='height=545, width=770, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=no, left=10 top=10');
	if (window.focus) {newwindow.focus()}
}

var newwindow;
function video(url)
{
	newwindow=window.open(url, 'video', config='height=475, width=640, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no, left=10 top=10');
	if (window.focus) {newwindow.focus()}
}

//////////////////////////////////////////////////////

var url;
var msg = "  is not maintained by NAME and will open in a new browser window. NAME does not provide and is not responsible for products or services offered through this website and cannot guarantee the accuracy, content or security of this website.";

function redir(form) {
url = form;
	if(confirm('"' + url + '"'  + msg)) {
	setTimeout('rd();',300);
	}
}

function rd() {
window.open(url,'newWin');

}

//////////// Form validation ////////////////

function validate_email(theControl)
{
	
	if ( theControl.value == "" || theControl.value.length <= 0 )
	{

   alert("Ooops! The email address must be filled in correctly to send the form. Please"
   +" check the prefix and '@' sign and try again.");
   theControl.focus()
		return false;
	}
	
	var reEmail = /^.+\@.+\..+$/
	var holderValue;
	var thisValue = theControl.value;
	
	// Check for e-mail addresses from ISPs and other sources that have been consistently
	// entered incorrectly.  If detected, correct the situation.
	if
		(
			(thisValue.substring(thisValue.length - 4, thisValue.length).toLowerCase()) == '@aol' ||
			(thisValue.substring(thisValue.length - 4, thisValue.length).toLowerCase()) == '@msn' ||
			(thisValue.substring(thisValue.length - 6, thisValue.length).toLowerCase()) == '@yahoo' ||
			(thisValue.substring(thisValue.length - 6, thisValue.length).toLowerCase()) == '@lycos' ||
			(thisValue.substring(thisValue.length - 7, thisValue.length).toLowerCase()) == '@excite' ||
			(thisValue.substring(thisValue.length - 10, thisValue.length).toLowerCase()) == '@altavista' ||
			(thisValue.substring(thisValue.length - 11, thisValue.length).toLowerCase()) == '@compuserve' ||
			(thisValue.substring(thisValue.length - 8, thisValue.length).toLowerCase()) == '@prodigy' ||
			(thisValue.substring(thisValue.length - 8, thisValue.length).toLowerCase()) == '@hotmail' ||
			(thisValue.substring(thisValue.length - 9, thisValue.length).toLowerCase()) == '@netscape'
		)
		{
			holderValue = thisValue.concat('.com');
			thisValue = holderValue;
			theControl.value = thisValue;
		}
	if
		(
			(thisValue.substring(thisValue.length - 5, thisValue.length).toLowerCase()) == '@home'
		)
		{
			holderValue = thisValue.concat('.net');
			thisValue = holderValue;
			theControl.value = thisValue;
		}
		
	// Now check the actual value of the e-mail address for validity.
	var flagFirstCheck = (theControl.value.length < 6) ||
		(thisValue.indexOf('@') == -1) || 
		(thisValue.indexOf('.') == -1) || 
		(thisValue.indexOf('@',(thisValue.indexOf('@')+1)) != -1) ||
		((thisValue.indexOf('.')+1) == thisValue.length) || 
		((thisValue.indexOf('@')+1) == thisValue.length)
	var flagSecondCheck = reEmail.test(thisValue)
	if ( flagFirstCheck || !flagSecondCheck)
	{

   alert("Ooops! This email address seems to be incorrect. Please"
   +" check the prefix and '@' sign.");
   theControl.focus()

		return false;
	} 
	else {

		return true;
	}
}

  
function FValidateControl(control, prompt) {
  if (control.value=="") {
    alert("The " + prompt +" field is a required field. Please fill in all required fields before you send the form.")
    control.focus()
    return false }
  return true }

function FSubmitValidation(form) {
if (!FValidateControl(form.dear_jeff,'Dear Jeff')) return false
if (!FValidateControl(form.name,'Name')) return false
if (!validate_email(form.Email,'Email Address')) return false
if (!FValidateControl(form.bank,'I bank at')) return false
   return true }

function validatefield(thisfield,imgname){
  if (thisfield.value == "") {
  imgname.src="gifs/stop.gif";
  }
  else
  {
  imgname.src="gifs/ok.gif";
  } 
}

function click()
{ if (event.button==2) {
alert('Right Mouse Click is Disabled!'); }}
document.onmousedown=click

