<!--

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) {
      ml1_o = newImage("/images/ml1_o.gif");
      ml2_o = newImage("/images/ml2_o.gif");
      ml3_o = newImage("/images/ml3_o.gif");
	  ml4_o = newImage("/images/ml4_o.gif");
	  ml5_o = newImage("/images/ml5_o.gif");
	  ml6_o = newImage("/images/ml6_o.gif");
	  ml7_o = newImage("/images/ml7_o.gif");
	  icon1_o = newImage("/images/icon1_o.gif");
	  icon2_o = newImage("/images/icon2_o.gif");
	  icon3_o = newImage("/images/icon3_o.gif");
	  item1_o = newImage("/images/item1.gif");
	  item2_o = newImage("/images/item2.gif");
	  item3_o = newImage("/images/item3.gif");
	  item4_o = newImage("/images/item4.gif");
       preloadFlag = true;
   }
}

	function open_window(link,w,h) //opens new window
	{
		var win = "width="+w+",height="+h+",menubar=no,location=no,resizable=yes,scrollbars=yes";
		newWin = window.open(link,'newWin',win);
		newWin.focus();
	}

	function confirmDelete() //unsubscription confirmation
	{
		temp = window.confirm('{/literal}{$smarty.const.QUESTION_UNSUBSCRIBE}{literal}');
		if (temp) //delete
		{
			window.location="index.php?killuser=yes";
		}
	}

	function validate_custinfo() //validate customer information
	{
		if (document.custinfo_form.first_name.value=="" || document.custinfo_form.last_name.value=="")
		{
			alert("{/literal}{$smarty.const.ERROR_INPUT_NAME}{literal}");
			return false;
		}
		if (document.custinfo_form.email.value=="")
		{
			alert("{/literal}{$smarty.const.ERROR_INPUT_EMAIL}{literal}");
			return false;
		}
		if (document.custinfo_form.country.value=="")
		{
			alert("{/literal}{$smarty.const.ERROR_INPUT_COUNTRY}{literal}");
			return false;
		}
		if (document.custinfo_form.state.value=="")
		{
			alert("{/literal}{$smarty.const.ERROR_INPUT_STATE}{literal}");
			return false;
		}
		if (document.custinfo_form.zip.value=="")
		{
			alert("{/literal}{$smarty.const.ERROR_INPUT_ZIP}{literal}");
			return false;
		}
		if (document.custinfo_form.city.value=="")
		{
			alert("{/literal}{$smarty.const.ERROR_INPUT_CITY}{literal}");
			return false;
		}
		return true;
	}
-->

