<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=337,height=370');");
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function tellafriendwindow(url) {
  window.open (url,'','width=700,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
}

jQuery.fn.yswaddVerifyOptions = function() {
   return this.each(function() {
		jQuery("form",this).each(function(index){
			if (jQuery(this).attr('action').indexOf("test-order") >= 0 || jQuery(this).attr('action').indexOf("order.store.yahoo.") >= 0)
			{
				jQuery(this).submit(function(){
					return yswForceSelection(jQuery(this));
				});
			}
		});    									  
	});
}

// force selection

function yswForceSelection(formToCheck) {
   
	var optionsOk = true;
   var yswRadioOptions = new Array();
	//loop through all select boxes without rel="optional"
	jQuery("select:not([class*=optional])",formToCheck).not("[onChange]").each(function(index) {
		if (optionsOk && jQuery(this).attr('selectedIndex') == 0) {
	   		var firstLetter = jQuery(this).attr('name').substring(0,1).toLowerCase();
			if (firstLetter == "a" || firstLetter == "e" || firstLetter == "i" || firstLetter == "o" || firstLetter == "u") {
				alert('Please select an ' + jQuery(this).attr('name').toLowerCase().toLowerCase().replace(/<\/?[^>]+(>|$)/g, ""));
			}
			else
			{
				alert('Please select a ' + jQuery(this).attr('name').toLowerCase().toLowerCase().replace(/<\/?[^>]+(>|$)/g, ""));
			}
			optionsOk = false;
		}
	});
	
	if (optionsOk) {
		jQuery("input:radio:not([class*=optional])",formToCheck).each(function(index) {
			var radioName = jQuery(this).attr('name');
			if (yswRadioOptions[radioName]) {
				if (jQuery(this).attr('checked') == "1") {
					yswRadioOptions[radioName] = "1";
				}
			}
			else
			{
			   if (jQuery(this).attr('checked') == "1") {
					yswRadioOptions[radioName] = "1";
				}
				else
				{
					yswRadioOptions[radioName] = "0";
				}
			}
		});

		for (radioName in yswRadioOptions)
		{
		   if (yswRadioOptions[radioName] == "0") {
		   		var firstLetter = radioName.substring(0,1).toLowerCase();
				if (firstLetter == "a" || firstLetter == "e" || firstLetter == "i" || firstLetter == "o" || firstLetter == "u") {
					alert('Please select an ' + radioName.toLowerCase().replace(/<\/?[^>]+(>|$)/g, ""));
				}
				else
				{
					alert('Please select a ' + radioName.toLowerCase().replace(/<\/?[^>]+(>|$)/g, ""));
				}
				optionsOk = false;
				break;
			}
		}
		
	};
   return optionsOk;
}


// End Force Selection -->
