function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function currentMonth(){
  var date = new Date().getMonth();
  return date;
}


function submitHiddenForm(visibleForm)
{ 
 if(visibleForm.comments){
	var mailtoUrl = buildContactUrl(visibleForm);
	var redirect="reply.html"
	
 }else{
	var mailtoUrl = buildListUrl(visibleForm);
	var redirect="reply2.html"
	}
	var form = document.hiddenForm;
 	form.action = mailtoUrl;
 	form.enctype = "multipart/form-data";
 	form.submit();
 	parent.body.location=redirect;
	
 
 
}


function buildContactUrl(form)
{
	/* declare variables to hold form values for clarity */
 	var realname = null;
 	var subject = null;
	var comments = null;

	/* This is the string we will build and set the action of the hidden form to */

 	var mailtoUrl = null;
  
 if ( form != null) { 
  	/* retrieve values from user */
  	realname = form.realname.value;
  	subject = form.subject.value;
  	comments = form.comments.value;
  	
  
  	/* Begin to build mailtoUrl */

  	mailtoUrl = "mailto:info@skihaus.com" +
   		"?subject=" + subject+ "&body=" + comments;

  	return mailtoUrl;
  	
	
 	}else{
	alert ("Please fill out the form before submitting");
      	}

}

function buildListUrl(form){

	var address = null;
 	var city = null;
 	var state = null;
 	var zip = null;
 	var phone = null;
 	
	var mailtoUrl = null;

if(form != null)
{
	realname = form.realname.value;
  	address = form.address.value;
	city = form.city.value;
	state = form.state.value;
	zip = form.zip.value;
        phone = form.phone.value;
		
	mailtoUrl = "mailto:mailinglist@skihaus.com" + 
		    "?subject=Please add me to your mailing list&body=" + realname + "  " + address + "  "+ city + "," + state + "   " + zip + "       " +phone;
	
	return mailtoUrl;
	
   	}else{
	alert("Please fill out the form before submitting");
}
}


