function blockError(){return true;}
		window.onerror = blockError;



	function check2()
	{
 		if (document.formBook.name.value == "")
		{
			alert("Please insert your Name");
		   	document.formBook.name.focus();
		   	return (false);
		}
		if (document.formBook.age.value == "")
		{
			alert("Please insert your age");
		   	document.formBook.age.focus();
		   	return (false);
		}
		if ((!document.formBook.gender[0].checked) && (!document.formBook.gender[1].checked))
		{
			alert("Please choose your sex (male/female)");
		   	document.formBook.age.focus();
		   	return (false);
		}
		if (document.formBook.email.value == "")
		{
			alert("Please insert the Email");
		   	document.formBook.email.focus();
		   	return (false);
		}
		else
		{
			apos=document.formBook.email.value.indexOf("@");
			dotpos=document.formBook.email.value.lastIndexOf(".");
			lastpos=document.formBook.email.value.length-1;
			if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
			{
				alert("Please insert a Valid Email Address");
			    document.formBook.email.focus();
			    return (false);
			}
		}	
		if (document.formBook.friend1_name.value != "")
		{
			if ((document.formBook.friend1_email.value == "") || (document.formBook.friend1_age.value == "") || ((!document.formBook.friend1_gender[0].checked) && (!document.formBook.friend1_gender[1].checked)) || (document.formBook.friend1_email.value == ""))
			{
				alert("Please complete your friend details");
			    document.formBook.friend1_name.focus();
			    return (false);
			}
		}
		if (document.formBook.friend2_name.value != "")
		{
			if ((document.formBook.friend2_email.value == "") || (document.formBook.friend2_age.value == "") || ((!document.formBook.friend2_gender[0].checked) && (!document.formBook.friend2_gender[1].checked)) || (document.formBook.friend2_email.value == ""))
			{
				alert("Please complete your friend details");
			    document.formBook.friend2_name.focus();
			    return (false);
			}
		}
		if (document.formBook.friend3_name.value != "")
		{
			if ((document.formBook.friend3_email.value == "") || (document.formBook.friend3_age.value == "") || ((!document.formBook.friend3_gender[0].checked) && (!document.formBook.friend3_gender[1].checked)) || (document.formBook.friend3_email.value == ""))
			{
				alert("Please complete your friend details");
			    document.formBook.friend3_name.focus();
			    return (false);
			}
		}
		if (document.formBook.friend4_name.value != "")
		{
			if ((document.formBook.friend4_email.value == "") || (document.formBook.friend4_age.value == "") || ((!document.formBook.friend4_gender[0].checked) && (!document.formBook.friend4_gender[1].checked)) || (document.formBook.friend4_email.value == ""))
			{
				alert("Please complete your friend details");
			    document.formBook.friend4_name.focus();
			    return (false);
			}
		}
		document.formBook.submit()
		
	}	
	
	function check3()
	{
 		
		if (document.formBook.friend1_name.value != "")
		{
			if ((document.formBook.friend1_email.value == "") || (document.formBook.friend1_age.value == "") || ((!document.formBook.friend1_gender[0].checked) && (!document.formBook.friend1_gender[1].checked)) || (document.formBook.friend1_email.value == ""))
			{
				alert("Please complete your friend details");
			    document.formBook.friend1_name.focus();
			    return (false);
			}
		}
		if (document.formBook.friend2_name.value != "")
		{
			if ((document.formBook.friend2_email.value == "") || (document.formBook.friend2_age.value == "") || ((!document.formBook.friend2_gender[0].checked) && (!document.formBook.friend2_gender[1].checked)) || (document.formBook.friend2_email.value == ""))
			{
				alert("Please complete your friend details");
			    document.formBook.friend2_name.focus();
			    return (false);
			}
		}
		if (document.formBook.friend3_name.value != "")
		{
			if ((document.formBook.friend3_email.value == "") || (document.formBook.friend3_age.value == "") || ((!document.formBook.friend3_gender[0].checked) && (!document.formBook.friend3_gender[1].checked)) || (document.formBook.friend3_email.value == ""))
			{
				alert("Please complete your friend details");
			    document.formBook.friend3_name.focus();
			    return (false);
			}
		}
		if (document.formBook.friend4_name.value != "")
		{
			if ((document.formBook.friend4_email.value == "") || (document.formBook.friend4_age.value == "") || ((!document.formBook.friend4_gender[0].checked) && (!document.formBook.friend4_gender[1].checked)) || (document.formBook.friend4_email.value == ""))
			{
				alert("Please complete your friend details");
			    document.formBook.friend4_name.focus();
			    return (false);
			}
		}
		document.formBook.submit()
		
	}	


var timestamp = Number(new Date()); 

$(document).ready(function(){
    /* this should be the first line in jQuery script !! */
   /* do not add anything above this line !!! */
   var jQ = jQuery.noConflict();

   /* ease slider config */
   var $sld = jQ('#slider');
   //alert($sld.height());
   if ($sld.length > 0)
   {
       $sld.easySlider({
           controlsBefore: '<ul class="more_events"><li class="title">More Events</li><li class="links">',
           controlsAfter: '</li></ul>',
           vertical: true,
           continuous: true,
           speed: 800
       });
   }
   

   var $join_wait = jQ('a.waiting_list_link');
   $join_wait.click(function(){
       var $div = jQ('.event_content .main_content');
       if ($div.length > 0)
       {
           $div.prepend('<div class="join_waiting_list_alert"></div>');
           var $layer = jQ('.join_waiting_list_alert');
           $layer.load('../includes/join_waiting_list.asp');
       }
       return false;
   });
   
   jQ('input[type=submit]').css('cursor', 'pointer');
 
 
   var $book_layer = jQ('body').find('.event_description');
   if ($book_layer.length > 0)
   {
       $book_layer.load('../includes/event_description.asp');
     /*  $book_layer.load('../includes/book_now.asp', '', book_now_continue);*/
   };
   
   var $book_layer = jQ('body').find('.event_description2');
   if ($book_layer.length > 0)
   {
       $book_layer.load('../includes/event_description_02.asp');
      /* $book_layer.load('../includes/book_now.asp', '', book_now_continue);*/
   };
   
    var $book_layer = jQ('body').find('.event_description3');
   if ($book_layer.length > 0)
   {
       $book_layer.load('../includes/event_description_03.asp');
    /*   $book_layer.load('../includes/book_now.asp', '', book_now_continue);*/
   };
	
	
 /*  var $bnl = jQ('body').find('.book_now_link');
   $bnl.click(function(){
       	var $book_layer = jQ('body').find('.event_description');	
	   if ($book_layer.length > 0)
       {
	   
	       $book_layer.load('../includes/book_now.asp?ts='+timestamp, '', book_now_continue);
       };
       return false;
   });
   
*/
  /* var $bnl = jQ('body').find('.book_now_link');
   $bnl.click(function(){
   		var $book_layer = jQ('body').find('.event_description2');	
       if ($book_layer.length > 0)
       {
	       $book_layer.load('../includes/book_now.asp?ts='+timestamp, '', book_now_continue);
       };
       return false;
   });*/
   
 /*  var $book_layer = jQ('body').find('.event_description3');	
   var $bnl = jQ('body').find('.book_now_link');
   $bnl.click(function(){
   		var $book_layer = jQ('body').find('.event_description3');	
       if ($book_layer.length > 0)
       {
	       $book_layer.load('../includes/book_now.asp?ts='+timestamp, '', book_now_continue);
       };
       return false;
   });*/
   
   /*function book_now_continue()
   {
       var $bnc = jQ('#book_now_continue');
       $bnc.click(function(){
           $book_layer.load('../includes/payment.asp?ts='+timestamp);
           return false;
       });
       
       var $friends_counts = count_friend_tables();
       
       
       var $removeFriend = jQ('.remove_friend_button');
       var $addFriend = jQ('.add_friend_button');       
       $removeFriend.click(function(){
           //alert('remove');
           return false;
       });
       
       $addFriend.click(function(){
           //alert('add');
           create_friend_table();
           return false;
       });
       
       var $f_count = jQ('.friends_count');
       $f_count.text($friends_counts);
   }
   */
   function count_friend_tables()
   {
       var $friend_form = jQ('.book_now_layer .friends_form');
       var $count = $friend_form.find('.friend_item');
       return $count.length;
   }
   
   function create_friend_table()
   {
       var $friend_form = jQ('.book_now_layer .friends_form');
       
   }
   
   
   function book_now_confirmation()
   {
       var $button = jQ('.book_now_confirmation_button');
       button.click(function(){
           if ($book_layer.length > 0)
           {
               $book_layer.load('../includes/book_now_confirmation.asp?ts='+timestamp);
           };
           return false;
       });
   }
   
   
   /*
   var $tal = jQ('body').find('.button_tell_a_friend');
   $tal.click(function(){
   		var $book_layer = jQ('body').find('.event_description');	
       if ($book_layer.length > 0)
       {
           $book_layer.load('../includes/tellafriend.asp?ts='+timestamp, '', tellafriend_confirmation);
       };
       return false;
   });
   */
   /*
    var $tal = jQ('body').find('.button_tell_a_friend');
   $tal.click(function(){
   		var $book_layer = jQ('body').find('.event_description2');	
       if ($book_layer.length > 0)
       {
           $book_layer.load('../includes/tellafriend.asp?ts='+timestamp, '', tellafriend_confirmation);
       };
       return false;
   });
   
    var $tal = jQ('body').find('.button_tell_a_friend');
   $tal.click(function(){
   		var $book_layer = jQ('body').find('.event_description3');	
       if ($book_layer.length > 0)
       {
           $book_layer.load('../includes/tellafriend.asp?ts='+timestamp, '', tellafriend_confirmation);
       };
       return false;
   });
   */
   /*
   function tellafriend_confirmation()
   {
       var $button = jQ('.tell_a_friend_submit');
       $button.click(function(){
           if ($book_layer.length > 0)
           {
               $book_layer.load('../includes/tellafriend_confirmation.asp?ts='+timestamp);
           };
           return false;
       });
   }
   */
   
   
}); /* jQ end */
