var xmlHttpDate;
var isHoverOn;
var isLargeDivOn;
var isClickHover = 0;

	function CreateXMLHttpRequest()
	{
		var xmlHttp;
		if (window.ActiveXObject){
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		else if (window.XMLHttpRequest){
			xmlHttp = new XMLHttpRequest();
		}
		return xmlHttp;
	}
	function StartXMLHttpRequestGET(sPage, sFunc)
	{	
		var timeStamp;
		timeStamp = new Date().getTime();
		sPage += "& timeStamp=" + timeStamp; // adding timestamp to prevent caching issues with urls
		xmlHttpDate = CreateXMLHttpRequest();
		xmlHttpDate.onreadystatechange = sFunc;
		xmlHttpDate.open("GET", sPage, true);
		xmlHttpDate.send(null);
	}
	function StartXMLHttpRequestPOST(sPage, sCallbackFunction, sPostParams)
	{
		// sPage = URL for page to call	
		CreateXMLHttpRequest();
		xmlHttpDate.onreadystatechange = sCallbackFunction;
		xmlHttpDate.open("POST", sPage, true);
		xmlHttpDate.send(sPostParams);
	}



//  Mountainsmith js file

	function go(sLocation)
	{
		if (sLocation) window.open(sLocation,this.target, 'width=400,height=300,left=300,top=300,scrollbars=yes');
	}
	

 // A utility function that returns true if a string contains only whitespace characters
 function isblank(s)
 {
  for (var i = 0; i < s.length; i++) {
   var c = s.charAt(i);
   if ((c != ' ') && (c != '\n') && (c != '')){return false};
  }
  return true;
 }
 
//Validates CheckBoxes so at least one is checked
function isChecked(form,checkBoxArray,myMin)
{
	var _countChecked = 0;
	/* iterate through all the elements in the checkbox array */
	for(i = 0; i < document[form][checkBoxArray].length; i++)
	{
		/* and check to see if each is checked */
		if(document[form][checkBoxArray][i].checked==true)
			/* if it is, increment a counter */
			{ _countChecked++; }
	}
	if(_countChecked < myMin)
	{ 
		return true;
	}
}  
 
 // This is a function that performs form verification. It is invoked from the onSubmit event handler. 
 // The handler should return whatever value this function returns
  function verify(f)
 {
  var msg;
  var empty_fields = "";
  var errors = "";
  var focusNumber = -1;
  var password1 = "";
  var password2 = "";
  var radio = 0;
  var ccType = "";
  var ccNumber = 0;
  var expMM = 0;
  var expYY = 0;
  var date = new Date();
  var month = date.getMonth() + 1;
  var Year = date.getYear();
  var UserName = "";
  
  // Loop through the elements of the form, looking for all Text and Textarea elements that don't
  // have an "optional" property defined. Then check for fields that are empty and make a list of them.
  // Also, if any of these elements have a "min" or "max" property defined, verify that they are numbers
  // and are in the right range. If the element has a "numeric" property defined, verify that it is a number
  // but don't check it's range. Put together error messages for fields that are wrong.
  
  for(var i = 0; i < f.length; i++) {
   var e = f.elements[i];
   if (((e.type == "text") || (e.type == "textarea") || e.type == "password" || e.type == "radio" || (e.type == "select-one")) && (!e.optional && e.name.search("Optional") == -1 || e.value > "") && (e.name != "")) {
    //First check if the field is empty
    if ((e.value == null) || (e.value == "") || isblank(e.value)) {
		empty_fields += "\n          " + e.name;
		if(focusNumber == -1){
			focusNumber = i;
		}
     continue;
    }
	
	if (e.name == "userName")
	{
	    UserName = e.value;
	}
	
	if (e.type == "password" && e.name == "password1")
	{		
		password1 = e.value; 
		
		if(e.value.length < 5)
		{
			errors += "- Password NEEDS to be at least 5 characters long.\n";
			if(focusNumber == -1) {
				focusNumber = i;
			}		
		}
		
		if (password1 == UserName)
		{
			errors += "- Password must be different than your UserName.\n";
			if(focusNumber == -1) {
				focusNumber = i;
			}
		}
	}
	
	if (e.type == "password" && e.name == "password2")
	{
		password2 = e.value;
		
		if (password1 != password2)
		{
			errors += "- Password-Verify doesn't match the Password field.\n";
			if(focusNumber == -1) {
				focusNumber = i;
			}
		}
		
		if (password2 == UserName)
		{
			errors += "- Password-Verify must be different than your UserName.\n";
			if(focusNumber == -1) {
				focusNumber = i;
			}
		}				
	}
	
	if (e.name == "emailAddress")
	{
											
		var emailReg = ".+@.+\\.[a-z]+";
		var regex = new RegExp(emailReg);
		if(!regex.test(e.value))
		{
			errors += "- Your email address is invalid.\n";
			if(focusNumber == -1) {
				focusNumber = i;		
			}			
		}
	}	
	
	if (e.name == "CVVCode")
    {
		exp = e.value;
		if(isNaN(e.value) || (ccType == "AmEx" && e.value.length != 4))
		{
			errors += "- Your CVV Code is invalid.\n";
			if(focusNumber == -1) {
				focusNumber = i;		
			}		
		}	
		else if(isNaN(e.value) || (ccType != "AmEx" && e.value.length != 3))
		{
			errors += "- Your CVV Code is invalid.\n";
			if(focusNumber == -1) {
				focusNumber = i;		
			}		
		}			
    }	
	
	if (e.name == "expMonth")
	{
		expMM = e.value;
	}
	
	if (e.name == "expYear")
    {
		expYY = e.value;
		
		if(expYY == Year && parseInt(expMM) < parseInt(month))
		{
			errors += "- Your exp date is invalid.\n";
			if(focusNumber == -1) {
				focusNumber = i;		
			}		
		}	
    }
    
    if(e.name == "shippingAddress1" || e.name == "shippingAddress2")
    {
		var addressValue;
		addressValue = e.value;
		if(addressValue.search(/PO Box/i) != -1 || addressValue.search(/P.O. Box/i) != -1 || addressValue.search(/P O Box/i) != -1)
		{
				errors += "- Sorry, but we can not ship to a P.O. Box.\n";
				if(focusNumber == -1) {
					focusNumber = i;		
			}		
		}
		
    }
	
	if (e.name == "creditCardType")
    {
		ccType = e.value;
    }
    
    if (e.name == "ccNumber")
    {
		ccNumber = e.value;
		
		if((checkCreditCard(ccNumber, ccType)) == false)
		{
			errors += "- Your credit card number is invalid.\n";
			if(focusNumber == -1) {
				focusNumber = i;		
			}		
		}		
    }	
	
    if (e.type == "radio" && radio == 0)
    {						
		if (isChecked(f.name, e.name, 1))
		{
			if (e.name == "QuestionType")
			{							
				empty_fields += "\n          " + e.name;
					if(focusNumber == -1){
						focusNumber = i;
					}				
			}
			
			radio = 1;
		}
    } 	
    
    //Now check for fields that are suppossed to be numeric
    if ((e.numeric || (e.min != null) || (e.max != null) || (e.name.search("Numeric") != -1))
		     && e.min != "" && e.max != "") {
        var v = parseFloat(e.value);
        var re_numeric = /^\d+$/;

        if (isNaN(v) || !re_numeric.exec(e.value) ||
				((e.min != null) && (v < e.min)) ||
				((e.max != null) && (v > e.max))) {
            errors += "- The field " + e.name + " must be a number (without spaces)";
            if (e.min != null)
                errors += " that is greater than " + e.min;
            if (e.max != null && e.min != null)
                errors += " and less than " + e.max;
            else if (e.max != null)
                errors += " that is less than " + e.max;
            errors += ".\n";
            if (focusNumber == -1) {
                focusNumber = i;
            }
        }
    }
    
    //Now Check to make sure all the date fields are correct
    if (e.date)
    { 
		var re_date = /^(\d{1,2})\/(\d{1,2})\/(\d{4})+/;
		var firstSlash = e.value.indexOf("/");
		var secondSlash = e.value.lastIndexOf("/");
		var month = Number(e.value.substring(0,firstSlash));
		var day = Number(e.value.substring(firstSlash + 1,secondSlash));
		var year = Number(e.value.substring(secondSlash + 1,secondSlash + 7));	
		if ((!re_date.exec(e.value)) || (day<0) || (day>31) || (month<0) || (month>12))
		{
			errors += "- The field " + e.name + " must be a valid date (ex: 1/1/2007)\n";	
			if(focusNumber == -1)
			{
				focusNumber = i;
			}						   
		}
		
	    if ((year<1900) || (year>2050))
	    {
		    errors += "- The field " + e.name + " must be a valid date between the years 1900 and 2050.";	
		    if(focusNumber == -1)
		    {
			    focusNumber = i;
		    }		        
	    }			
		
		// months with 30 days 
		if (month==4 || month==6 || month==9 || month==11) 
		{ 
		    if (day>30)
		    {
		    	errors += "- The field " + e.name + " must have a valid day\n"; 
				if(focusNumber == -1)
				{
					focusNumber = i;
				}
			}
		} 
		// february, leap year 
		if (month==2) 
		{   
		    if (day>29) 
		    {
				errors += "- The field " + e.name + " must have a valid day\n"; 
				if(focusNumber == -1)
				{
					focusNumber = i;
				}
			}
		    if ((day==29) && ((Number(year) % 4) != 0)) 
		    {
				errors += "- The field " + e.name + " must have a valid day\n"; 
				if(focusNumber == -1)
				{
					focusNumber = i;
				}
			}
		} 			
	}
   
   //Now check to make sure the money fields are correct
   if (e.money || (e.name.search("Money") != -1))
   {
	var money = e.value;
	
		if (isNaN(money))
		{
			errors += "- The field " + e.name + " must be a valid money value with no dollar sign.\n";
			if(focusNumber == -1) {
				focusNumber = i;
			}
		}
   }
   
   
   
   }
  }
  // Now if there were any errors, display the messages, and return false to prevent the form
  // from being submitted. Otherwise, return true.
  if (!empty_fields && !errors) return true;
  
  msg  = "____________________________________________________ _\n\n";
  msg += "The form was not submitted because of the following error(s).\n";
  msg += "Please correct these error(s) and re-submit.\n";
  msg += "____________________________________________________ _\n\n";
  
  if (empty_fields) {
   msg += "- The following required field(s) are empty:"
     + empty_fields + "\n";
   if (errors) msg += "\n";
  }
  msg += errors;
  alert(msg);
  f.elements[focusNumber].focus();
  return false;
 } 
 

function show_calendar(str_target, str_datetime) {
	var arr_months = ["January", "February", "March", "April", "May", "June",
		"July", "August", "September", "October", "November", "December"];
	var week_days = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
	var n_weekstart = 1; // day week starts from (normally 0 or 1)

	var dt_datetime = (str_datetime == null || str_datetime =="" ?  new Date() : str2dt(str_datetime)); 
	var dt_prev_month = new Date(dt_datetime);
	dt_prev_month.setMonth(dt_datetime.getMonth()-1);
	var dt_next_month = new Date(dt_datetime);
	dt_next_month.setMonth(dt_datetime.getMonth()+1);
	var dt_firstday = new Date(dt_datetime);
	dt_firstday.setDate(1);
	dt_firstday.setDate(1-(7+dt_firstday.getDay()-n_weekstart)%7);
	var dt_lastday = new Date(dt_next_month);
	dt_lastday.setDate(0);
	
	// html generation (feel free to tune it for your particular application)
	// print calendar header
	var str_buffer = new String (
		"<html>\n"+
		"<head>\n"+
		"	<title>Calendar</title>\n"+
		"</head>\n"+
		"<body bgcolor=\"White\">\n"+
		"<table class=\"clsOTable\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n"+
		"<tr><td bgcolor=\"#FFF\">\n"+
		"<table cellspacing=\"1\" cellpadding=\"3\" border=\"0\" width=\"100%\">\n"+
		"<tr>\n	<td bgcolor=\"#FFF\"><a href=\"javascript:window.opener.show_calendar('"+
		str_target+"', '"+ dt2dtstr(dt_prev_month)+"');\">"+
		"<img src=\"images/prev.jpg\" width=\"16\" height=\"16\" border=\"0\""+
		" alt=\"previous month\"></a></td>\n"+
		"	<td bgcolor=\"#FFF\" colspan=\"5\">"+
		"<font color=\"white\" face=\"tahoma, verdana\" size=\"2\">"
		+arr_months[dt_datetime.getMonth()]+" "+dt_datetime.getFullYear()+"</font></td>\n"+
		"	<td bgcolor=\"#FFF\" align=\"right\"><a href=\"javascript:window.opener.show_calendar('"
		+str_target+"', '"+dt2dtstr(dt_next_month)+"');\">"+
		"<img src=\"images/next.jpg\" width=\"16\" height=\"16\" border=\"0\""+
		" alt=\"next month\"></a></td>\n</tr>\n"
	);

	var dt_current_day = new Date(dt_firstday);
	// print weekdays titles
	str_buffer += "<tr>\n";
	for (var n=0; n<7; n++)
		str_buffer += "	<td bgcolor=\"#BCBDBF\">"+
		"<font color=\"white\" face=\"tahoma, verdana\" size=\"2\">"+
		week_days[(n_weekstart+n)%7]+"</font></td>\n";
	// print calendar table
	str_buffer += "</tr>\n";
	while (dt_current_day.getMonth() == dt_datetime.getMonth() ||
		dt_current_day.getMonth() == dt_firstday.getMonth()) {
		// print row heder
		str_buffer += "<tr>\n";
		for (var n_current_wday=0; n_current_wday<7; n_current_wday++) {
				if (dt_current_day.getDate() == dt_datetime.getDate() &&
					dt_current_day.getMonth() == dt_datetime.getMonth())
					// print current date
					str_buffer += "	<td bgcolor=\"#BCBDBF\" align=\"right\">";
				else if (dt_current_day.getDay() == 0 || dt_current_day.getDay() == 6)
					// weekend days
					str_buffer += "	<td bgcolor=\"#FFFFFF\" align=\"right\">";
				else
					// print working days of current month
					str_buffer += "	<td bgcolor=\"white\" align=\"right\">";

				if (dt_current_day.getMonth() == dt_datetime.getMonth())
					// print days of current month
					str_buffer += "<a href=\"javascript:window.opener."+str_target+
					".value='"+dt2dtstr(dt_current_day)+"'; window.close();\">"+
					"<font color=\"black\" face=\"tahoma, verdana\" size=\"2\">";
				else 
					// print days of other months
					str_buffer += "<a href=\"javascript:window.opener."+str_target+
					".value='"+dt2dtstr(dt_current_day)+"'; window.close();\">"+
					"<font color=\"gray\" face=\"tahoma, verdana\" size=\"2\">";
				str_buffer += dt_current_day.getDate()+"</font></a></td>\n";
				dt_current_day.setDate(dt_current_day.getDate()+1);
		}
		// print row footer
		str_buffer += "</tr>\n";
	}


	var vWinCal = window.open("", "Calendar", 
		"width=200,height=220,status=no,resizable=yes,top=200,left=500");
	vWinCal.opener = self;
	var calc_doc = vWinCal.document;
	calc_doc.write (str_buffer);
	calc_doc.close();
}
// datetime parsing and formatting routimes. modify them if you wish other datetime format
function str2dt (str_datetime) {
	var re_date = /^(\d+)\/(\d+)\/(\d+)+/;
	if (!re_date.exec(str_datetime))
		return alert("Invalid Datetime format: "+ str_datetime);

	return (new Date (RegExp.$3, RegExp.$1-1, RegExp.$2, RegExp.$4, RegExp.$5, RegExp.$6));
}
function dt2dtstr (dt_datetime) {
	return (new String (
			(dt_datetime.getMonth()+1)+"/"+dt_datetime.getDate()+"/"+dt_datetime.getFullYear()+" "));
}




	var sDivOn = "productDetailsFeaturs";
	var sDivOnFAQ = "";
	var oldid;

	// turns divs on and off
	function ToggleDiv(psID, psOffID){
		var psDisplay;
		var poElement = document.getElementById(psID);	
		
		if(document.getElementById("productDetailsP2P"))
		{
			document.getElementById("productDetailsP2P").style.display = "none";
			document.getElementById("closeDivP2P").style.display = "none";			
			
		}
		
		if(psOffID > ""){
			var psDisplay2;
			var poElement2 = document.getElementById(psOffID);

			psDisplay2 = (poElement.style.display == "block" || poElement.style.display == "normal") ? "none" : "none";		
			poElement2.style.display = psDisplay2;
		}

		psDisplay = (poElement.style.display == "block" || poElement.style.display == "normal") ? "none" : "block";				
		poElement.style.display = psDisplay;
		
		if(psOffID > ""){
			sDivOn = psID;
		}
	}
	
	function ToggleDivFAQ(psIDFAQ, sDivOn){
		var psDisplay, psDisplay2;
		var poElement = document.getElementById(psIDFAQ);
		
		if(sDivOnFAQ != "" && psIDFAQ != sDivOn)
		{
			var poElement2 = document.getElementById(sDivOn);
			psDisplay2 = (poElement.style.display == "block" || poElement.style.display == "normal") ? "none" : "none";		
			poElement2.style.display = psDisplay2;
		}

		psDisplay = (poElement.style.display == "block") ? "none" : "block";				
		poElement.style.display = psDisplay;
		
		sDivOnFAQ = psIDFAQ;
	}
	
	
	function ToggleDivLargeImage(sDivOnOff, iOff){
		var psDisplay;
		var poElement = document.getElementById(sDivOnOff);
 
		if(isClickHover == 1 && iOff == "divOn" )
		{
			return;
		}
		else if(sDivOnOff == "imageLarge" && iOff == "divOn" && isLargeDivOn == 1)
		{
			return;
		}
		else if(iOff == "hoverClick")
		{
			isClickHover = 1;
			return;	
		}
		else if(isClickHover == 1 && (iOff == "hoverOut" || iOff == "hover"))
		{
			return;
		}
		else if(iOff == "divOff" )
		{
			isClickHover = 0;		
		}
								
			
		if(sDivOnOff == "dealerResults" || sDivOnOff == "closeDivDealers")
		{
			if(poElement.style.display == "block" && iOff !=1)
			{
			    poElement.style.display = "block";
			}
			else
			{
				psDisplay = (poElement.style.display == "block") ? "none" : "block";				
				poElement.style.display = psDisplay;
			}		
		}
		else if((sDivOnOff == "imageLarge" && isLargeDivOn == 1) || iOff == "hoverOut")
		{
			if(iOff == "hover")
			{
			    poElement.style.display = "block";				
			}
			else
			{
				psDisplay = (poElement.style.display == "block") ? "none" : "block";				
				poElement.style.display = psDisplay;
			}			
		}
		else
		{
			psDisplay = (poElement.style.display == "block") ? "none" : "block";				
			poElement.style.display = psDisplay;
		}
		
		
		
		if(iOff == "divOn")
		{
			if(isLargeDivOn != 1)
			{
				isLargeDivOn = 1;
			}	
		}
		else if(iOff == "divOff")
		{
			isLargeDivOn = 0;
		}				
	}		
	
	
	
/*
   If a credit card number is invalid, an error reason is loaded into the 
   global ccErrorNo variable. This can be be used to index into the global error  
   string array to report the reason to the user if required:
   
   e.g. if (!checkCreditCard (number, name) alert (ccErrors(ccErrorNo);
*/

var ccErrorNo = 0;
var ccErrors = new Array ()

ccErrors [0] = "Unknown card type";
ccErrors [1] = "No card number provided";
ccErrors [2] = "Credit card number is in invalid format";
ccErrors [3] = "Credit card number is invalid";
ccErrors [4] = "Credit card number has an inappropriate number of digits";

function checkCreditCard (cardnumber, cardname) {
     
  // Array to hold the permitted card characteristics
  var cards = new Array();

  // Define the cards we support. You may add addtional card types.
  
  //  Name:      As in the selection box of the form - must be same as user's
  //  Length:    List of possible valid lengths of the card number for the card
  //  prefixes:  List of possible prefixes for the card
  //  checkdigit Boolean to say whether there is a check digit
  
  cards [0] = {name: "Visa", 
               length: "13,16", 
               prefixes: "4",
               checkdigit: true};
  cards [1] = {name: "MasterCard", 
               length: "16", 
               prefixes: "51,52,53,54,55",
               checkdigit: true};
  cards [2] = {name: "DinersClub", 
               length: "14,16", 
               prefixes: "300,301,302,303,304,305,36,38,55",
               checkdigit: true};
  cards [3] = {name: "CarteBlanche", 
               length: "14", 
               prefixes: "300,301,302,303,304,305,36,38",
               checkdigit: true};
  cards [4] = {name: "AmEx", 
               length: "15", 
               prefixes: "34,37",
               checkdigit: true};
  cards [5] = {name: "Discover", 
               length: "16", 
               prefixes: "6011,650",
               checkdigit: true};
  cards [6] = {name: "JCB", 
               length: "15,16", 
               prefixes: "3,1800,2131",
               checkdigit: true};
  cards [7] = {name: "enRoute", 
               length: "15", 
               prefixes: "2014,2149",
               checkdigit: true};
  cards [8] = {name: "Solo", 
               length: "16,18,19", 
               prefixes: "6334, 6767",
               checkdigit: true};
  cards [9] = {name: "Switch", 
               length: "16,18,19", 
               prefixes: "4903,4905,4911,4936,564182,633110,6333,6759",
               checkdigit: true};
  cards [10] = {name: "Maestro", 
               length: "16", 
               prefixes: "5020,6",
               checkdigit: true};
  cards [11] = {name: "VisaElectron", 
               length: "16", 
               prefixes: "417500,4917,4913",
               checkdigit: true};
               
  // Establish card type
  var cardType = -1;
  for (var i=0; i<cards.length; i++) {

    // See if it is this card (ignoring the case of the string)
    if (cardname.toLowerCase () == cards[i].name.toLowerCase()) {
      cardType = i;
      break;
    }
  }
  
  // If card type not found, report an error
  if (cardType == -1) {
     ccErrorNo = 0;
     return false; 
  }
   
  // Ensure that the user has provided a credit card number
  if (cardnumber.length == 0)  {
     ccErrorNo = 1;
     return false; 
  }
    
  // Now remove any spaces from the credit card number
  cardnumber = cardnumber.replace (/\s/g, "");
  
  // Check that the number is numeric
  var cardNo = cardnumber
  var cardexp = /^[0-9]{13,19}$/;
  if (!cardexp.exec(cardNo))  {
     ccErrorNo = 2;
     return false; 
  }
       
  // Now check the modulus 10 check digit - if required
  if (cards[cardType].checkdigit) {
    var checksum = 0;                                  // running checksum total
    var mychar = "";                                   // next char to process
    var j = 1;                                         // takes value of 1 or 2
  
    // Process each digit one by one starting at the right
    var calc;
    for (i = cardNo.length - 1; i >= 0; i--) {
    
      // Extract the next digit and multiply by 1 or 2 on alternative digits.
      calc = Number(cardNo.charAt(i)) * j;
    
      // If the result is in two digits add 1 to the checksum total
      if (calc > 9) {
        checksum = checksum + 1;
        calc = calc - 10;
      }
    
      // Add the units element to the checksum total
      checksum = checksum + calc;
    
      // Switch the value of j
      if (j ==1) {j = 2} else {j = 1};
    } 
  
    // All done - if checksum is divisible by 10, it is a valid modulus 10.
    // If not, report an error.
    if (checksum % 10 != 0)  {
     ccErrorNo = 3;
     return false; 
    }
  }  

  // The following are the card-specific checks we undertake.
  var LengthValid = false;
  var PrefixValid = false; 
  var undefined; 

  // We use these for holding the valid lengths and prefixes of a card type
  var prefix = new Array ();
  var lengths = new Array ();
    
  // Load an array with the valid prefixes for this card
  prefix = cards[cardType].prefixes.split(",");
      
  // Now see if any of them match what we have in the card number
  for (i=0; i<prefix.length; i++) {
    var exp = new RegExp ("^" + prefix[i]);
    if (exp.test (cardNo)) PrefixValid = true;
  }
      
  // If it isn't a valid prefix there's no point at looking at the length
  if (!PrefixValid) {
     ccErrorNo = 3;
     return false; 
  }
    
  // See if the length is valid for this card
  lengths = cards[cardType].length.split(",");
  for (j=0; j<lengths.length; j++) {
    if (cardNo.length == lengths[j]) LengthValid = true;
  }
  
  // See if all is OK by seeing if the length was valid. We only check the 
  // length if all else was hunky dory.
  if (!LengthValid) {
     ccErrorNo = 4;
     return false; 
  };   
  
  // The credit card is in the required format.
  return true;
}

/*============================================================================*/	
	
	
	
function expired(monthYear) 
{
	var month;
	var year;
	monthYear = monthYear.split("/");
	month = monthYear[0];
	year = monthYear[1];	
	var now = new Date();							// this function is designed to be Y2K compliant.
	var expiresIn = new Date(year,month,0,0,0);		// create an expired on date object with valid thru expiration date
	expiresIn.setMonth(expiresIn.getMonth() - 1);		// adjust the month, to first day, hour, minute & second of expired month
	if(expiresIn < now) return false;
	return true;									// then we get the miliseconds, and do a long integer comparison
}
