//Validate fields
	function checkData (){
	if (document.signup.Last_Name.value == "") {
		alert("Please fill in your last name.")
		document.signup.Last_Name.focus()
		return false}
	if (document.signup.First_Name.value == "") {
		alert("Please fill in your first name.")
		document.signup.First_Name.focus()
		return false}
	if (document.signup.Customer_Email.value == "") {
		alert("Please fill in your email Address.")
		document.signup.Customer_Email.focus()
		return false}
		}
//Validate fields end
		
		
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) {
		home_over = newImage("images/home-over.gif");
		new_invent_over = newImage("images/new_invent-over.gif");
		used_invent_over = newImage("images/used_invent-over.gif");
		rentals_over = newImage("images/rentals-over.gif");
		services_over = newImage("images/services-over.gif");
		parts_store_over = newImage("images/parts_store-over.gif");
		contact_over = newImage("images/contact-over.gif");
		preloadFlag = true;
	}
}


<!-- Add and delete from list to list --->

<!--

// Fill the selcted item list with the items already present in parent.
function fillInitialDestList() {
var destList1 = window.document.forms[0].destList1; 
for (var count = destList1.options.length - 1; count >= 0; count--) {
destList1.options[count] = null;
}
for(var i = 0; i < srcList1.options.length; i++) { 
if (srcList1.options[i] != null)
destList1.options[i] = new Option(srcList1.options[i].text);
   }
}
// Add the selected items from the source to destination list
function addSrcToDestList1() {
destList1 = window.document.forms[0].destList1;
srcList1 = window.document.forms[0].srcList1; 
var len = destList1.length;
for(var i = 0; i < srcList1.length; i++) {
if ((srcList1.options[i] != null) && (srcList1.options[i].selected)) {
//Check if this value already exist in the destList or not
//if not then add it otherwise do not add it.
var found = false;
for(var count = 0; count < len; count++) {
if (destList1.options[count] != null) {
if (srcList1.options[i].text == destList1.options[count].text) {
found = true;

break;
      }
   }
}
if (found != true) {
destList1.options[len] = new Option(srcList1.options[i].text);

len++;
         }
      }
   }
}
// Deletes from the destination list.
function deleteFromDestList1() {
var destList1  = window.document.forms[0].destList1;
var len = destList1.options.length;
for(var i = (len-1); i >= 0; i--) {
if ((destList1.options[i] != null) && (destList1.options[i].selected == true)) {
destList1.options[i] = null;
      }
   }
}
// End -->

<!--

// Fill the selcted item list with the items already present in parent.
function fillInitialDestList2() {
var destList2 = window.document.forms[0].destList2; 
for (var count = destList2.options.length - 1; count >= 0; count--) {
destList2.options[count] = null;
}
for(var i = 0; i < srcList2.options.length; i++) { 
if (srcList2.options[i] != null)
destList2.options[i] = new Option(srcList2.options[i].text);
   }
}
// Add the selected items from the source to destination list
function addSrcToDestList2() {
destList2 = window.document.forms[0].destList2;
srcList2 = window.document.forms[0].srcList2; 
var len = destList2.length;
for(var i = 0; i < srcList2.length; i++) {
if ((srcList2.options[i] != null) && (srcList2.options[i].selected)) {
//Check if this value already exist in the destList or not
//if not then add it otherwise do not add it.
var found = false;
for(var count = 0; count < len; count++) {
if (destList2.options[count] != null) {
if (srcList2.options[i].text == destList2.options[count].text) {
found = true;
break;
      }
   }
}
if (found != true) {
destList2.options[len] = new Option(srcList2.options[i].text); 
len++;
         }
      }
   }
}
// Deletes from the destination list.
function deleteFromDestList2() {
var destList2  = window.document.forms[0].destList2;
var len = destList2.options.length;
for(var i = (len-1); i >= 0; i--) {
if ((destList2.options[i] != null) && (destList2.options[i].selected == true)) {
destList2.options[i] = null;
      }
   }
}

function BuildString() {
	//alert("hi");
	var destListA  = window.document.forms[0].destList1;
	var destListB  = window.document.forms[0].destList2;
	var hdnFeatureA = window.document.forms[0].hdnFeature1;
	var hdnFeatureB = window.document.forms[0].hdnFeature2;

	var lenA = destListA.options.length;
	var lenB = destListB.options.length;

	for(var i = (lenA-1); i >= 0; i--) {
		if (destListA.options[i] != null) {
			hdnFeatureA.value += destListA.options[i].text;
			hdnFeatureA.value += "|";
    }
  }
	for(var i = (lenB-1); i >= 0; i--) {
		if (destListB.options[i] != null) {
			hdnFeatureB.value += destListB.options[i].text;
			hdnFeatureB.value += "|";
    }
  }

	//alert(hdnFeatureA.value);
	//alert(hdnFeatureB.value);
}

// Collapse and Expand functions

imgout=new Image(10,10);
imgin=new Image(10,10);

/////////////////BEGIN USER EDITABLE///////////////////////////////
	imgout.src="images/icon_up.gif";
	imgin.src="images/icon_down.gif";
///////////////END USER EDITABLE///////////////////////////////////

/**
 * Toggle the state of an object
 *
 * @param string id The ID of the object to toggle
 */
function toggleCollapseState(id)
{
    var obj = getObj(id);

    if(!obj)
        return false;

    if(obj.style.display == 'none')
    {
        var state = 1;
        obj.style.display = '';
				obj.src=eval("imgin.src");
    }

    else
    {
        var state = 0;
        obj.style.display = 'none';
				obj.src=eval("imgout.src");
    }

    saveCollapseState(id, state);

    return true;
}


/**
 * Modify the document cookie to remember the state of an object
 *
 * @param string id The ID of the object
 * @param integer state The state of the object
 */
function saveCollapseState(id, state)
{
    var cookie = readCookie('collapseState');

    if(!cookie)
        cookie = '';

    var search = new RegExp('(' + id + ')=([01]{1}),');

    if(search.test(cookie))
        cookie = cookie.replace(search, '$1$2=' + state + ',');
    else
        cookie += id + '=' + state + ',';

    setCookie('collapseState', cookie, new Date('January 1, 2020'));
}