<!--
var downStrokeField;

function autojump(fieldName,nextFieldName,fakeMaxLength){
  var myForm=document.forms[document.forms.length - 1];
  var myField=myForm.elements[fieldName];
  myField.nextField=myForm.elements[nextFieldName];
  if (myField.maxLength == null)
    myField.maxLength=fakeMaxLength;
  myField.onkeydown=autojump_keyDown;
  myField.onkeyup=autojump_keyUp;
}
function autojump_keyDown(){
  this.beforeLength=this.value.length;
  downStrokeField=this;
}
function autojump_keyUp(){
  if (
    (this == downStrokeField) && 
    (this.value.length > this.beforeLength) && 
    (this.value.length >= this.maxLength)
  )
    this.nextField.focus();
  downStrokeField=null;
}

function enterSameBillShip(){
  if(document.checkout1.bill_ship.checked == true){
    //document.checkout1.shp_contact.value = document.checkout1.contact.value;
	document.checkout1.shp_company.value = document.checkout1.company.value;
	document.checkout1.shp_address1.value = document.checkout1.address1.value;
	document.checkout1.shp_address2.value = document.checkout1.address2.value;
	document.checkout1.shp_city.value = document.checkout1.city.value;
	document.checkout1.shp_state.value = document.checkout1.state.value;
	document.checkout1.shp_zip.value = document.checkout1.zip.value;
	document.checkout1.shp_day_phone1.value = document.checkout1.day_phone1.value;
	document.checkout1.shp_day_phone2.value = document.checkout1.day_phone2.value;
	document.checkout1.shp_day_phone3.value = document.checkout1.day_phone3.value;
  }
  else{
	//document.checkout1.shp_contact.value = '';
	document.checkout1.shp_company.value = '';
	document.checkout1.shp_address1.value = '';
	document.checkout1.shp_address2.value = '';
	document.checkout1.shp_city.value = '';
	document.checkout1.shp_state.value = '';
	document.checkout1.shp_zip.value = '';
	document.checkout1.shp_day_phone1.value = '';
	document.checkout1.shp_day_phone2.value = '';
	document.checkout1.shp_day_phone3.value = '';
  }
}
function popUp(URL){
  props=window.open(URL,'','menubar=0, scrollbars=1, resizable=1, location=0, status=0, width=700, height=500');
}

function popUp300(URL, item){
  var page = 'blank.php?item=' + item + "&url=" + URL;
  props=window.open(page, '','menubar=0, scrollbars=0, resizable=0, location=0, status=0, width=375, height=400');
}	
function submitLoginForm(loginForm){
	document.loginForm.submit();
}

function submitForm(){
 document.sendMail.submit(); 
}

function clearForm(url){
  location.href = url; 
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		hr_menu_Products_over	= newImage("/images/menu/hr_menu_Products-over.gif");
		hr_menu_Home_over		= newImage("/images/menu/hr_menu_Home-over.gif");
		hr_menu_Contact_Us_over = newImage("/images/menu/hr_menu_Contact-Us-over.gif");
		hr_menu_My_Account_over = newImage("/images/menu/hr_menu_My-Account-over.gif");
		square_over				= newImage("/images/mo_effects/square-over.gif");
		lock_over				= newImage("/images/mo_effects/lock-over.gif");
		person_over				= newImage("/images/mo_effects/person-over.gif");
		preloadFlag = true;
	}
}

function bcolor(bcol,d_name){
  if (document.all){
    var thestyle= eval ('document.all.'+d_name+'.style');
    thestyle.backgroundColor=bcol;
  }
}


var submitRolls = new Object();
function submitroll(src, oversrc, name){
  this.src=src;
  this.oversrc=oversrc;
  this.name=name;
  this.alt="Login";
  this.write=submitroll_write;
}
function submitroll_write(){
  var thisform = 'document.forms[' + (document.forms.length - 1) + ']';
  submitRolls[this.name] = new Object();
  submitRolls[this.name].over = new Image();
  submitRolls[this.name].over.src = this.oversrc;
  submitRolls[this.name].out = new Image();
  submitRolls[this.name].out.src = this.src;
  document.write
  (
  '<A onMouseOver="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].over.src"' + 
  ' onMouseOut="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].out.src"' + 
  ' HREF="javascript:'
  );
  if (this.sendfield){
    if (! this.sendvalue)
      this.sendvalue = 1;
    document.write(thisform, ".elements['", this.sendfield, "'].value='", this.sendvalue, "';");
  }
  document.write(thisform + '.submit();void(0);"');
  if (this.msg)document.write(' onClick="return confirm(\'' , this.msg, '\')"');
  document.write('>');
  document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '" BORDER=0 NAME="' + this.name + '"');
  if (this.height)document.write(' HEIGHT=' + this.height);
  if (this.width)document.write(' WIDTH='  + this.width);
  if (this.otheratts)document.write(' ' + this.otheratts);
  document.write('></A>');
  if (this.sendfield){
    document.write('<INPUT TYPE=HIDDEN NAME="' + this.sendfield + '">');
    document.forms[document.forms.length - 1].elements[this.sendfield].value='';
  }
}


function submitEnter(myfield,e){
  var keycode;
  if (window.event) keycode = window.event.keyCode;
  else if (e) keycode = e.which;
  else return true;
  if (keycode == 13){
    myfield.form.submit();
    return false;
  }
  else
  return true;
}


/******************
y2k
******************/
function y2k(number){ 
	return (number < 1000) ? number + 1900 : number; 
}

var today = new Date();
var day   = today.getDate();
var month = today.getMonth();
var year  = y2k(today.getYear());

/******************
padout
******************/
function padout(number){ 
	return (number < 10) ? '0' + number : number; 
}

/******************
restart
******************/
function restart() {

    if(document.data.date.value == ''){
      document.data.date.value = '' + padout(month - 0 + 1) + '/' + padout(day) + '/' + year;
	}
	else{
	  document.data.date2.value = '' + padout(month - 0 + 1) + '/' + padout(day) + '/' + year;
	}

    mywindow.close();
}

/******************
newWindow
******************/
function newWindow() {
    mywindow=open('/cal.htm','Calendar','resizable=no,width=350,height=270');
    mywindow.location.href = '/cal.htm';
    if (mywindow.opener == null) mywindow.opener = self;
}

/******************
restart2
******************/
function restart2() {

    if(document.checkout1.date.value == ''){
      document.checkout1.date.value = '' + padout(month - 0 + 1) + '/' + padout(day) + '/' + year;
	}
	else{
	  document.checkout1.date2.value = '' + padout(month - 0 + 1) + '/' + padout(day) + '/' + year;
	}

    mywindow.close();
}
/******************
newWindow2
******************/
function newWindow2(field) {
	if(field==1){
	  document.checkout1.date.value = '';
	}
	else{
	  document.checkout1.date2.value = '';
	}
    mywindow=open('cal2.htm','Calendar','resizable=no,width=350,height=270');
    mywindow.location.href = 'cal2.htm';
    if (mywindow.opener == null) mywindow.opener = self;
}



function formSurveySelect() {
  if (document.myForm.survey_q1.selectedIndex < 4){ 
    document.myForm.survey_q2.disabled = true;
	if(document.myForm.survey_q1.selectedIndex != 4)
	  document.myForm.survey_q3.disabled = true;
	document.myForm.survey_q2.selectedIndex = 0;
	document.myForm.survey_q3.value = '';
	return true;
  }

  if(document.myForm.survey_q1.value=='Magazine'){
     document.myForm.survey_q3.disabled = false;
	 document.myForm.survey_q2.disabled = true;
  }

  // SEARCH ENGINE
  if (document.myForm.survey_q1.selectedIndex==5){ 
    document.myForm.survey_q2.disabled = false;



   if(document.myForm.survey_q2.value == 'Other'){
	  document.myForm.survey_q2.disabled = false;
	  document.myForm.survey_q3.disabled = false;
   }
   else{
	 document.myForm.survey_q3.value = '';
	 document.myForm.survey_q3.disabled = true;
   }
   return true;
  }
  return true;
}




function goURL(URL){
      window.location.href = URL;
}

function popUpHelp(section){
  var page;

  page = '/help.php?helpID=' + section;

  mywindow=open(page,'Calendar','resizable=yes,width=450,height=470');
  mywindow.location.href = page;
  if (mywindow.opener == null) mywindow.opener = self;
}


/******************
submitTrackingForm
******************/
function submitTrackingForm(formID) {
	if(formID=='WTKNS'){
	  document.trackingForm_WTKNS.submit();
	  return true;
	}
	  
}

//-->