function launchEasyImage() {
	window.open('/easyimage.cfm','easyimage','scrollbars=no,toolbar=no,status=no,resizable=no,width=600,height=560');
}

function isEmail(s){
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(s)){
		return true;
	}
	else {
		return false;
	}
}

function isValidDate(day,month,year){
/*
Purpose: return true if the date is valid, false otherwise

Arguments: day integer representing day of month
month integer representing month of year
year integer representing year
*/
var dteDate;

//set up a Date object based on the day, month and year arguments
//javascript months start at 0 (0-11 instead of 1-12)
month = month -1;
dteDate=new Date(year,month,day);

/*
Javascript Dates are a little too forgiving and will change the date to a reasonable guess if it's invalid. We'll use this to our advantage by creating the date object and then comparing it to the details we put it. If the Date object is different, then it must have been an invalid date to start with...
*/

return ((day==dteDate.getDate()) && (month==dteDate.getMonth()) && (year==dteDate.getFullYear()));
}


function submitSearch() {

  var prefix = 'http://www.michaels.com';

  document.mainSearch.action = prefix + "/art/online/search";
  
  var selectedIndex = document.mainSearch.type.selectedIndex;
  var selectedValue = document.mainSearch.type.options[selectedIndex].value;

  if(selectedValue == 1) {
    document.mainSearch.action = prefix + "/art/online/artprintssearch";
  }

  return true;
}
