// JavaScript Document



    var mycallBack = function(){
        document.getElementById("callback").innerHTML = "<br><br><b>Callback handler.</b>";
    } 

<!--- The error handler pops an alert with the error code and message. --->
    var myerrorhandler = function(errorCode,errorMessage){
        alert("[In Error Handler]" + "\n\n" + "Error Code: " + errorCode + "\n\n" + "Error Message: " + errorMessage);
    } 





$().ready(function() {
  //$('#skischoolslideshow').jqm();
  $('#skischoolslideshow').jqm({trigger: 'a.skischoolslideshow'});
		});
//  $().ready(function() {
//	//$('#contactform').jqm();
//	$('#contactform').jqm({trigger: 'a.contactform'});
//		document.getElementById('contactStart').style.visibility = "visible";
//		document.getElementById('contactResult').style.visibility = "hidden";
//		return false;
//        });
//  $().ready(function() {
//	//$('#contactform').jqm();
//	$('#sscvideo').jqm({trigger: 'a.sscvideo'});
//        });
  $().ready(function() {
	//$('#contactform').jqm();
	$('#sscPage').jqm({trigger: 'a.sscPage'});
        });	



$().ready(function() {

  $('#sscvideo')
    .jqDrag('.jqDrag')
    .jqResize('.jqResize')
	// document.getElementById('contactStart').style.visibility = "visible";
	// document.getElementById('contactResult').style.visibility = "visible"; 
    .jqm({
      trigger:'a.sscvideo',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF');
		h.w.css('width','500px');
		document.getElementById('contactStart').style.visibility = 'visible';
		document.getElementById('fnameFlag').style.visibility = 'hidden';
	    document.getElementById('lnameFlag').style.visibility = 'hidden';
	    document.getElementById('emailFlag').style.visibility = 'hidden';
	    document.getElementById('messageFlag').style.visibility = 'hidden';  
		var cntForm = "<h3>Contact Form Here</h3>";
	  
		//document.getElementById('contactStart').innerHTML = cntForm;
		document.addcontactform.reset();
		document.getElementById('contactResult').innerHTML = '';
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); }
	   //document.getElementById('contactResult').style.visibility = 'hidden';
	   //document.getElementById('contactStart').style.visibility = 'visible'; 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});



// START LIVE BIND
jQuery().ready(function($){
 
  // initialize modal,
  // load the container with a remote return based on the 'href'
  //    attribute of triggering element(s)
 
  //$('#contactsschform').jqm({ajax:'@href'});
 
 
  // open the modal whenever anchor links on the page are clicked
   $('.sscvideo').live('click',function(){
      $('#sscvideo').jqmShow();
  });
 
 
})
//END LIVE BIND




$().ready(function() {

  $('#spmvideo')
    .jqDrag('.jqDrag')
    .jqResize('.jqResize')
	// document.getElementById('contactStart').style.visibility = "visible";
	// document.getElementById('contactResult').style.visibility = "visible"; 
    .jqm({
      trigger:'a.spmvideo',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF');
		h.w.css('width','500px');
		//h.w.css('height','680px');
		//document.getElementById('contactStart').innerHTML = cntForm;
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); }
	   //document.getElementById('contactResult').style.visibility = 'hidden';
	   //document.getElementById('contactStart').style.visibility = 'visible'; 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});

$().ready(function() {

  $('#jsvideo')
    .jqDrag('.jqDrag')
    .jqResize('.jqResize')
	// document.getElementById('contactStart').style.visibility = "visible";
	// document.getElementById('contactResult').style.visibility = "visible"; 
    .jqm({
      trigger:'a.jsvideo',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF');
		h.w.css('width','500px');
		//h.w.css('height','680px');
		//document.getElementById('contactStart').innerHTML = cntForm;
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); }
	   //document.getElementById('contactResult').style.visibility = 'hidden';
	   //document.getElementById('contactStart').style.visibility = 'visible'; 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});



//EMAIL LIST DRAG AND RESIZE

$().ready(function() {

  $('#emailList')
   .jqDrag('.jqDrag')
   .jqResize('.jqResize')
	//document.getElementById('ex3').style.visibility = "hidden";
	// document.getElementById('contactResult').style.visibility = "visible"; 
    .jqm({
      trigger:'a.emailList',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF');
		//document.getElementById('contactStart').style.visibility = 'visible';
	    //document.getElementById('fnameFlag').style.visibility = 'hidden';
	    //document.getElementById('lnameFlag').style.visibility = 'hidden';
	    //document.getElementById('emailFlag').style.visibility = 'hidden';
	    //document.getElementById('messageFlag').style.visibility = 'hidden'; 
	  
		//document.getElementById('contactStart').innerHTML = cntForm;
		//document.contactformsp.reset();
		//document.getElementById('contactSPResult').innerHTML = '';
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); }
	   //document.getElementById('contactResult').style.visibility = 'hidden';
	   //document.getElementById('contactStart').style.visibility = 'visible'; 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});





//CONTACT SKIPATROL DRAG AND RESIZE

$().ready(function() {

  $('#contactSPform')
   .jqDrag('.jqDrag')
   .jqResize('.jqResize')
	// document.getElementById('contactResult').style.visibility = "visible"; 
    .jqm({
      trigger:'a.contactSPform',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF');
		//document.getElementById('contactStart').style.visibility = 'visible';
	    //document.getElementById('fnameFlag').style.visibility = 'hidden';
	    //document.getElementById('lnameFlag').style.visibility = 'hidden';
	    //document.getElementById('emailFlag').style.visibility = 'hidden';
	    //document.getElementById('messageFlag').style.visibility = 'hidden'; 
	  
		//document.getElementById('contactStart').innerHTML = cntForm;
		//document.contactformsp.reset();
		//document.getElementById('contactSPResult').innerHTML = '';
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); }
	   //document.getElementById('contactResult').style.visibility = 'hidden';
	   //document.getElementById('contactStart').style.visibility = 'visible'; 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});







//CONTACT GENERAL DRAG AND RESIZE

$().ready(function() {

  $('#contactform')
     .jqDrag('.jqDrag')
     .jqResize('.jqResize')
	//document.getElementById('ex3').style.visibility = "hidden";
	// document.getElementById('contactResult').style.visibility = "visible"; 
    .jqm({
      trigger:'a.contactform',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF');
		//document.getElementById('contactStart').style.visibility = 'visible';
	    //document.getElementById('fnameFlag').style.visibility = 'hidden';
	    //document.getElementById('lnameFlag').style.visibility = 'hidden';
	    //document.getElementById('emailFlag').style.visibility = 'hidden';
	    //document.getElementById('messageFlag').style.visibility = 'hidden'; 
	  
		//document.getElementById('contactStart').innerHTML = cntForm;
		//document.contactformsp.reset();
		//document.getElementById('contactSPResult').innerHTML = '';
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); }
	   //document.getElementById('contactResult').style.visibility = 'hidden';
	   //document.getElementById('contactStart').style.visibility = 'visible'; 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});






// START LIVE BIND ON CONTACT CIONTACT
jQuery().ready(function($){
 
  // initialize modal,
  // load the container with a remote return based on the 'href'
  //    attribute of triggering element(s)
 
  //$('#contactsschform').jqm({ajax:'@href'});
 
 
  // open the modal whenever anchor links on the page are clicked
   $('.contactform').live('click',function(){
      $('#contactform').jqmShow();
  });
 
 
})
//END LIVE BIND


$().ready(function() {

  $('#tpcommentform')
    .jqDrag('.jqDrag')
    .jqResize('.jqResize')
	// document.getElementById('contactStart').style.visibility = "visible";
	// document.getElementById('contactResult').style.visibility = "visible"; 
    .jqm({
      trigger:'a.tpcommentform',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF');
		document.getElementById('tpcommentStart').style.visibility = 'visible';
	    document.getElementById('fnameFlag').style.visibility = 'hidden';
	    document.getElementById('lnameFlag').style.visibility = 'hidden';
	   // document.getElementById('emailFlag').style.visibility = 'hidden';
	    document.getElementById('messageFlag').style.visibility = 'hidden';  
		var cntForm = "<h3>Contact Form Here</h3>";
	  
		//document.getElementById('contactStart').innerHTML = cntForm;
		document.contactformsp.reset();
		document.getElementById('tpcommentConfirm').innerHTML = '';
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); }
	   //document.getElementById('contactResult').style.visibility = 'hidden';
	   //document.getElementById('contactStart').style.visibility = 'visible'; 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});


/*SKI SCHOOL*/

$().ready(function() {

  $('#contactsschform')
    .jqDrag('.jqDrag')
    .jqResize('.jqResize')
	// document.getElementById('contactStart').style.visibility = "visible";
	// document.getElementById('contactResult').style.visibility = "visible"; 
    .jqm({
      trigger:'a.contactsschform',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF');
		document.getElementById('contactSkiSchoolStart').style.visibility = 'visible';
	    document.getElementById('fnameFlag').style.visibility = 'hidden';
	    document.getElementById('lnameFlag').style.visibility = 'hidden';
	    document.getElementById('emailFlag').style.visibility = 'hidden';
	    document.getElementById('messageFlag').style.visibility = 'hidden';  
		var cntForm = "<h3>Contact Form Here</h3>";
	  
		//document.getElementById('contactStart').innerHTML = cntForm;
		document.contactformsp.reset();
		document.getElementById('contactSkiSchoolResult').innerHTML = '';
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); }
	   //document.getElementById('contactResult').style.visibility = 'hidden';
	   //document.getElementById('contactStart').style.visibility = 'visible'; 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});

// START LIVE BIND ON SKI SCHOOL CIONTACT
jQuery().ready(function($){
 
  // initialize modal,
  // load the container with a remote return based on the 'href'
  //    attribute of triggering element(s)
 
  //$('#contactsschform').jqm({ajax:'@href'});
 
 
  // open the modal whenever anchor links on the page are clicked
   $('.contactsschform').live('click',function(){
      $('#contactsschform').jqmShow();
  });
 
 
})
//END LIVE BIND

/*SNOW REPORT DRAG AND RESIZE*/
$().ready(function() {

  $('#currentCond')
   .jqDrag('.jqDrag')
   .jqResize('.jqResize')
	//document.getElementById('ex3').style.visibility = "hidden";
	// document.getElementById('contactResult').style.visibility = "visible"; 
    .jqm({
      trigger:'a.currentCond',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF');
		//document.getElementById('contactStart').style.visibility = 'visible';
	    //document.getElementById('fnameFlag').style.visibility = 'hidden';
	    //document.getElementById('lnameFlag').style.visibility = 'hidden';
	    //document.getElementById('emailFlag').style.visibility = 'hidden';
	    //document.getElementById('messageFlag').style.visibility = 'hidden'; 
	  
		//document.getElementById('contactStart').innerHTML = cntForm;
		//document.contactformsp.reset();
		//document.getElementById('contactSPResult').innerHTML = '';
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); }
	   //document.getElementById('contactResult').style.visibility = 'hidden';
	   //document.getElementById('contactStart').style.visibility = 'visible'; 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});


//WEBCAM DRAG AND RESIZE
$().ready(function() {

  $('#webCam')
   .jqDrag('.jqDrag')
   //.jqResize('.jqResize')
	//document.getElementById('ex3').style.visibility = "hidden";
	// document.getElementById('contactResult').style.visibility = "visible"; 
    .jqm({
      trigger:'a.webCam',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF');
		h.w.css('width', '660px');
		h.w.css('height', '600px');
		//document.getElementById('contactStart').style.visibility = 'visible';
	    //document.getElementById('fnameFlag').style.visibility = 'hidden';
	    //document.getElementById('lnameFlag').style.visibility = 'hidden';
	    //document.getElementById('emailFlag').style.visibility = 'hidden';
	    //document.getElementById('messageFlag').style.visibility = 'hidden'; 
	  
		//document.getElementById('contactStart').innerHTML = cntForm;
		//document.contactformsp.reset();
		//document.getElementById('contactSPResult').innerHTML = '';
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); }
	   //document.getElementById('contactResult').style.visibility = 'hidden';
	   //document.getElementById('contactStart').style.visibility = 'visible'; 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});





//WEBCAM DRAG AND RESIZE
$().ready(function() {

  $('#jobs')
   .jqDrag('.jqDrag')
   .jqResize('.jqResize')
	//document.getElementById('ex3').style.visibility = "hidden";
	// document.getElementById('contactResult').style.visibility = "visible"; 
    .jqm({
      trigger:'a.jobs',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF');
		//document.getElementById('contactStart').style.visibility = 'visible';
	    //document.getElementById('fnameFlag').style.visibility = 'hidden';
	    //document.getElementById('lnameFlag').style.visibility = 'hidden';
	    //document.getElementById('emailFlag').style.visibility = 'hidden';
	    //document.getElementById('messageFlag').style.visibility = 'hidden'; 
	  
		//document.getElementById('contactStart').innerHTML = cntForm;
		//document.contactformsp.reset();
		//document.getElementById('contactSPResult').innerHTML = '';
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); }
	   //document.getElementById('contactResult').style.visibility = 'hidden';
	   //document.getElementById('contactStart').style.visibility = 'visible'; 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});
/*GIFT CARDS*/
$().ready(function() {

  $('#gifts')
   .jqDrag('.jqDrag')
   .jqResize('.jqResize')
	//document.getElementById('ex3').style.visibility = "hidden";
	// document.getElementById('contactResult').style.visibility = "visible"; 
    .jqm({
      trigger:'a.gifts',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF');
		//document.getElementById('contactStart').style.visibility = 'visible';
	    //document.getElementById('fnameFlag').style.visibility = 'hidden';
	    //document.getElementById('lnameFlag').style.visibility = 'hidden';
	    //document.getElementById('emailFlag').style.visibility = 'hidden';
	    //document.getElementById('messageFlag').style.visibility = 'hidden'; 
	  
		//document.getElementById('contactStart').innerHTML = cntForm;
		//document.contactformsp.reset();
		//document.getElementById('contactSPResult').innerHTML = '';
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); }
	   //document.getElementById('contactResult').style.visibility = 'hidden';
	   //document.getElementById('contactStart').style.visibility = 'visible'; 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});



$().ready(function() {
  $('#skiEquip')
    //.jqDrag('.jqDrag')
    //.jqResize('.jqResize')
    .jqm({
      trigger:'a.skiEquip',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF'); 
		h.w.css('width','640px');
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); } 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});
 
$().ready(function() {
  $('#snbdEquip')
    //.jqDrag('.jqDrag')
    //.jqResize('.jqResize')
    .jqm({
      trigger:'a.snbdEquip',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF'); 
		h.w.css('width','640px');
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); } 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});
$().ready(function() {
  $('#helmetEquip')
    //.jqDrag('.jqDrag')
    //.jqResize('.jqResize')
    .jqm({
      trigger:'a.helmetEquip',
      overlay: 68,
      onShow: function(h) {
        /* callback executed when a trigger click. Show notice */
        h.w.css('opacity',100).slideDown();
		h.w.css('background-color','#FFFFFF'); 
		h.w.css('width','640px');
        },
      onHide: function(h) {
        /* callback executed on window hide. Hide notice, overlay. */
       //h.w.fadeOut(5000,function() { if(h.o) h.o.remove(); }); } 
	   h.w.slideUp(450,function() { if(h.o) h.o.remove(); }); }
      });
});

//  LIVE BINDING
jQuery().ready(function($){
 
  // initialize modal,
  // load the container with a remote return based on the 'href'
  //    attribute of triggering element(s)
 
  //$('#skiEquip').jqm({ajax:'@href'});
  $("a.skiEquip").jqmAddTrigger(".jqModal");
 
  // open the modal whenever anchor links on the page are clicked
   $('.skiEquip').live('click',function(){
      $('#skiEquip').jqmShow();
  });
 
 
});

jQuery().ready(function($){
 
  // initialize modal,
  // load the container with a remote return based on the 'href'
  //    attribute of triggering element(s)
 
  //$('#skiEquip').jqm({ajax:'@href'});
  $("a.snbdEquip").jqmAddTrigger(".jqModal");
 
  // open the modal whenever anchor links on the page are clicked
   $('.snbdEquip').live('click',function(){
      $('#snbdEquip').jqmShow();
  });
 
 
});

jQuery().ready(function($){
 
  // initialize modal,
  // load the container with a remote return based on the 'href'
  //    attribute of triggering element(s)
 
  //$('#skiEquip').jqm({ajax:'@href'});
  $("a.helmetEquip").jqmAddTrigger(".jqModal");
 
  // open the modal whenever anchor links on the page are clicked
   $('.helmetEquip').live('click',function(){
      $('#helmetEquip').jqmShow();
  });
 
 
});


$('.gallery').jqm({ajax:'@href',modal:true, trigger: 'a.triggerLink'});


    <!---EMAIL LIST FORM SUBMIT AND CLOSE  --->

   function submitEmailList() {
	   //alert('tadaCNT.');
       var firstnameemaillist = document.getElementById("firstnameemaillist").value;
       var lastnameemaillist = document.getElementById("lastnameemaillist").value;
	   var emailemaillist = document.getElementById("emailemaillist").value;
	   var zipemaillist = document.getElementById("zipemaillist").value;
	  
      //Employ Mr. T error handling
      if(firstnameemaillist == '') { alert('Please enter your first name'); return false; }
      if(lastnameemaillist == '') { alert('Please enter your last name'); return false; }
	  if(emailemaillist == '') { alert('Please enter your email address'); return false; }
	  if(zipemaillist == '') { alert('Please enter your message'); return false; }
	  //if(emailcont == '') { 
//	  alert('Please enter your email.');
//	  document.getElementById('emailFlagskipat').style.visibility = 'visible';  
//	  return false; 
//	  }
//	  if(messageskiskischool == '') { 
//	  alert('Please enter your message.');
//	  document.getElementById('messageFlagskischool').style.visibility = 'visible'; 
 //     return false; 
//	  }
	 // alert('tada two');
	 ColdFusion.navigate('doEmailList.cfm','emailListResult',mycallBack,myerrorhandler,'post','emaillistform');
	  
	    // ColdFusion.Ajax.submitForm('newcontactform', 'doContactGeneral.cfm', mycallBack,myerrorhandler);
	  //document.getElementById('emailListStart').innerHTML = '';
	  //alert('tada three');
	  document.getElementById('emailListStart').style.visibility = 'hidden';
	  document.getElementById('emailListResult').style.visibility = 'visible';
	  // alert('Email submitted successfully');
      return false;
  }
  
  
  


  

    <!---CONTACT FORM SUBMIT AND CLOSE  --->

   function submitGeneral() {
	   //alert('tadaCNT.');
       var firstnamecont = document.getElementById("firstnamecont").value;
       var lastnamecont = document.getElementById("lastnamecont").value;
	   var emailcont = document.getElementById("emailcont").value;
	   var messagecont = document.getElementById("messagecont").value;
	  
      //Employ Mr. T error handling
      if(firstnamecont == '') { alert('Please enter your first name'); return false; }
      if(lastnamecont == '') { alert('Please enter your last name'); return false; }
	  if(emailcont == '') { alert('Please enter your email address'); return false; }
	  if(messagecont == '') { alert('Please enter your message'); return false; }
	  //if(emailcont == '') { 
//	  alert('Please enter your email.');
//	  document.getElementById('emailFlagskipat').style.visibility = 'visible';  
//	  return false; 
//	  }
//	  if(messageskiskischool == '') { 
//	  alert('Please enter your message.');
//	  document.getElementById('messageFlagskischool').style.visibility = 'visible'; 
 //     return false; 
//	  }
	 // alert('tada two');
	 ColdFusion.navigate('doContactGeneral.cfm','contResult',mycallBack,myerrorhandler,'post','newcontactform');
	  document.getElementById('contStart').style.visibility = 'hidden';
	  document.getElementById('contResult').style.visibility = 'visible';
      return false;
  }
  
      <!---SKI PATROL CONTACT FORM SUBMIT AND CLOSE  --->

  function contactSPform() {
      var firstnameskipat = document.getElementById("firstnameskipat").value;
      var lastnameskipat = document.getElementById("lastnameskipat").value;
	  var emailskipat = document.getElementById("emailskipat").value;
	  var messageskipat = document.getElementById("messageskipat").value;
	  
      //Employ Mr. T error handling
      if(firstnameskipat == '') { alert('Please enter your first name'); return false; }
      if(lastnameskipat == '') { alert('Please enter your last name'); return false; }
	  if(emailskipat == '') { 
	  alert('Please enter your email.');
	  document.getElementById('emailFlag').style.visibility = 'visible';  
	  return false; 
	  }
	  if(messageskipat == '') { 
	  alert('Please enter your message.');
	  document.getElementById('messageFlag').style.visibility = 'visible'; 
	  return false; 
	  }
	  
	  ColdFusion.navigate('doContactSkiPatrol.cfm','contactSPResult',mycallBack,myerrorhandler,'post','contactformsp');
	  //document.getElementById('contactStart').innerHTML = '';
	  document.getElementById('contactStart').style.visibility = 'hidden';
	   //ColdFusion.Ajax.submitForm('addcontactform', 'doContact.cfm', mycallBack,myerrorhandler);
	   //alert('Email submitted successfully');
      return false;
  }
  
   function submitContactSkiSchool() {
	   //alert('tada.');
      var firstnameskischool = document.getElementById("firstnameskischool").value;
      var lastnameskischool = document.getElementById("lastnameskischool").value;
	  var emailskischool = document.getElementById("emailskischool").value;
	  var messageskischool = document.getElementById("messageskischool").value;
	  
      //Employ Mr. T error handling
      if(firstnameskischool == '') { alert('Please enter your first name'); return false; }
      if(lastnameskischool == '') { alert('Please enter your last name'); return false; }
	  //if(emailskischool == '') { 
//	  alert('Please enter your email.');
//	  document.getElementById('emailFlagskischool').style.visibility = 'visible';  
//	  return false; 
//	  }
//	  if(messageskiskischool == '') { 
//	  alert('Please enter your message.');
//	  document.getElementById('messageFlagskischool').style.visibility = 'visible'; 
//	  return false; 
//	  }
	  
	  ColdFusion.navigate('doContactSkiSchool.cfm','contactSkiSchoolResult',mycallBack,myerrorhandler,'post','contactsskiform');
	  //document.getElementById('contactStart').innerHTML = '';
	  document.getElementById('contactSkiSchoolStart').style.visibility = 'hidden';
	   //ColdFusion.Ajax.submitForm('addcontactform', 'doContact.cfm', mycallBack,myerrorhandler);
	   //alert('Email submitted successfully');
      return false;
  }
  
     function submitTpComment() {
	   //alert('tada.');
      var nametp = document.getElementById("nametp").value;
      var emailtp = document.getElementById("emailtp").value;
	  var textarea1tp = document.getElementById("textarea1tp").value;
	  
      //Employ Mr. T error handling
      if(nametp == '') { alert('Please enter your name'); return false; }
	  if(emailtp == '') { 
	  alert('Please enter your email.');
	  document.getElementById('emailFlag').style.visibility = 'visible';  
	  return false; 
	  }
	  if(textarea1tp == '') { 
	  alert('Please enter your message.');
	  document.getElementById('messageFlag').style.visibility = 'visible'; 
	  return false; 
	  }
	  
	  ColdFusion.navigate('doTpComment.cfm','tpcommentConfirm',mycallBack,myerrorhandler,'post','tpPost');
	  //document.getElementById('contactStart').innerHTML = '';
	  document.getElementById('tpcommentStart').style.visibility = 'hidden';
	   //ColdFusion.Ajax.submitForm('addcontactform', 'doContact.cfm', mycallBack,myerrorhandler);
	   //alert('Email submitted successfully');
      return false;
  }



