function validateCC(theForm)
{
if (theForm.CreditCardSelect.selectedIndex == 0)
  {
    alert("Please select a credit card type.");
    theForm.CreditCardSelect.focus();
    return (false);
  }
 
if (theForm.ExpirationMonthSelect.selectedIndex == 0)
  {
    alert("Please select an expiration month.");
    theForm.ExpirationMonthSelect.focus();
    return (false);
  }

if (theForm.ExpirationYearSelect.selectedIndex == 0)
  {
    alert("Please select an expiration year.");
    theForm.ExpirationYearSelect.focus();
    return (false);
  }
	<!--- Credit Card Validation --->
	var ccstring = theForm.CreditCardNumber.value; // set the cc string to some credit card number
	var invalid = 0;
	var p_ccstring = ""; // all non-number junk will be parsed out
	var running_total = 0;
	var temp;
	// go through ccstring and remove all non-numbers
	for (var i = 0; i < ccstring.length; i++) {
	        temp = parseInt(ccstring.charAt(i));
	        if (!(isNaN(temp))) p_ccstring = p_ccstring + temp; // string context
	}
	// go through LUHN formula
	// PASS 1
	for (i = p_ccstring.length - 2; i >= 0; i -= 2) {
	        temp = parseInt(p_ccstring.charAt(i)) * 2;
	        temp = temp + ""; // change number to string context for manipulation below
	        if (temp.length == 2) running_total += parseInt(temp.charAt(0)) + parseInt(temp.charAt(1)) + 0;
	        else running_total += parseInt(temp);
	}
	// PASS 2
	for (i = p_ccstring.length - 1; i >= 0; i -= 2) {
	        running_total += parseInt(p_ccstring.charAt(i));
	}
	// now, run MOD 10 on running_total
	invalid = running_total % 10;
	if (running_total == 0)
	        invalid = 1;
	if (ccstring == 0)
	        invalid = 1;
	if (invalid) {
	        alert("Please enter a valid credit card number."); // credit card is valid
	        theForm.CreditCardNumber.focus();
	        return(false);
	}
return (true);
}

function ConfirmCancel(){
	var tempconfirm;
	tempconfirm = confirm("Are you sure you want to cancel this order?")
	if(tempconfirm){ return true; }
	else { return false; }
}

function SetValue() {
	document.ProcessForm.TrackingNumber.value = document.TrackingForm.Tracking.value;
}

function validateLogin(theForm) {
	if (theForm.email__.value == "") {
		alert("Please enter your email address.");
		theForm.email__.focus();
		return false;
	}

	if (theForm.password__.value == "" && theForm.sendpassword.checked == 0) {
		alert("Please enter a valid password.");
		theForm.password__.focus();
		return false;
	}
	return true;
}
$(document).ready(function () {
    var hoverColour = "#FFF";
    $(".navlink").hover(
                function() {
                    $(this).removeClass("navlink");
                    $(this).addClass("navlink_highlighted");
                },
                function(source) {
                    $(this).removeClass("navlink_highlighted");
                    $(this).addClass("navlink");
                }
    );
    $("a.hoverBtn").show("fast", function() {
        $(this).wrap("<div class=\"hoverBtn\">");
        $(this).attr("class", "");
    });    
    $("div.hoverBtn").show("fast", function() {
        //append the background div
        $(this).append("<div></div>");
        //on link hover
        $(this).children("a").hover(function(){
            //store initial link colour
            if ($(this).attr("rel") == "") {
                $(this).attr("rel", $(this).css("color"));
            }
            //fade in the background
            $(this).parent().children("div")
                .stop()
                .css({"display": "none", "opacity": "1"})
                .fadeIn("fast");
            //fade the colour
            $(this) .stop()
                .css({"color": $(this).attr("rel")})
                .animate({"color": hoverColour}, 350);
        },function(){
            //fade out the background
            $(this).parent().children("div")
                .stop()
                .fadeOut("slow");
            //fade the colour
            $(this) .stop()
                .animate({"color": $(this).attr("rel")}, 250);
        });
    });
});
function clear_field(element) {
    val = element.value
    if (val=="Enter Keyword / Part # Here") {
        element.value="";
    }
}
function unclear_field(element) {
    val = element.value;
    if (val=="") {
        element.value="Enter Keyword / Part # Here";
    }
}