$(document).ready(function() {

	/**
 	*  	Cufon
	*/
	
	Cufon.replace('h1');
	Cufon.replace('h2');
	Cufon.replace('h3');
	Cufon.replace('h4');
	Cufon.replace('h5');
	Cufon.replace('#tabs li');
	Cufon.now();
	
	/**
 	*  	Tabs    
	*/

	$( "#tabs" ).tabs({ selected: 1 });
	$(function() {
		$('#tabs').tabs({ fx: [{
			opacity:'toggle',
			height: 'toggle',
			duration:'medium'
	}, {
			opacity:'toggle',
			height:'toggle',
			duration:'fast'
			
			}]
		});
	});	
	
	/**
 	*  	Accordion    
	*/
	$(function() {
		var icons = {
			header: "ui-icon-circle-n",
			headerSelected: "ui-icon-circle-a"
		};
		$( "#accordion" ).accordion({
			collapsible: true,
                        animated: false,
			icons: icons,
			autoHeight: false
		});
	});
	

	
	
	/**
 	*  	Image Display    
	*/
	//Show the paging and activate its first link
	$(".paging").show();
	$(".paging a:nth-child(2)").addClass("active");
	
	//Get size of the image, how many images there are, then determin the size of the image reel.
	var imageWidth = $(".window").width();
	var imageSum = $(".image-reel img").size();
	var imageReelWidth = (imageWidth * imageSum)-0;
	
	//Adjust the image reel to its new size
	$(".image-reel").css({'width' : imageReelWidth});
	
	//Paging  and Slider Function
	rotate = function(){
	    var triggerID = $active.attr("rel") - 1; //Get number of times to slide
	    var image_reelPosition = triggerID * imageWidth; //Determines the distance the image reel needs to slide
	
	    $(".paging a").removeClass('active'); //Remove all active class
	    $active.addClass('active'); //Add active class (the $active is declared in the rotateSwitch function)
	
	    //Slider Animation
	    if(triggerID != -1)
	    $(".image-reel").animate({
	        left: -image_reelPosition
	    }, 0 ); // change 0 to 500
	}; 

	//Rotation  and Timing Event
	rotateSwitch = function(){
	    play = setInterval(function(){ //Set timer - this will repeat itself every 7 seconds
	        $active = $('.paging a.active:not(:has(.trigger))').next(); //Move to the next paging
	        if ( $active.length === 0) { //If paging reaches the end...
	            $active = $('.paging a:nth-child(2)'); //go back to first
	        }
	        rotate(); //Trigger the paging and slider function
	    }, 5000); //Timer speed in milliseconds (7 seconds)
	};
	rotateSwitch(); //Run function on launch
	
	//On Hover
	$(".image-reel a").hover(function() {
	    clearInterval(play); //Stop the rotation
	}, function() {
	    rotateSwitch(); //Resume rotation timer
	});	
	
	//On Click
	$(".paging a").click(function() {
	    $active = $(this); //Activate the clicked paging
	    //Reset Timer
	    clearInterval(play); //Stop the rotation
	    rotate(); //Trigger rotation immediately
	    rotateSwitch(); // Resume rotation timer
	    return false; //Prevent browser jump to link anchor
	});

	// Paging Slide Toggle	
	$( "a.trigger" ).toggle(
			function() {
				var imageRealWidth = $(".paging").width();
				$( ".paging" ).animate({
					right: -(imageRealWidth)
				}, 500, function() {
					$('a.trigger').addClass('active');
				});
			},
			function() {
				$( ".paging" ).animate({
					right: 0 
				}, 500, function() {
					$('a.trigger').removeClass('active');
				});
			}
		);


/* IE PNG fix multiple filters */
(function ($) {
    if (!$) return;
    $.fn.extend({
    	fixPNG: function(sizingMethod, forceBG) {
    		if (!($.browser.msie)) return this;
    		var emptyimg = "empty.gif"; //Path to empty 1x1px GIF goes here
    		sizingMethod = sizingMethod || "scale"; //sizingMethod, defaults to scale (matches image dimensions)
    		this.each(function() {
    			var isImg = (forceBG) ? false : jQuery.nodeName(this, "img"),
    				imgname = (isImg) ? this.src : this.currentStyle.backgroundImage,
    				src = (isImg) ? imgname : imgname.substring(5,imgname.length-2);
    			this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='" + sizingMethod + "')";
    			if (isImg) this.src = emptyimg;
    			else this.style.backgroundImage = "url(" + emptyimg + ")";
    		});
    		return this;
    	}
    });
})(jQuery);


$('.lightbox_generic').fancybox({
			'width'				: 700,
			'scrolling'			: 'no',
			'height'			: 500,
			'autoScale'			: false,
		//	'transitionIn'		: 'elastic',
			'transitionOut'		: 'none',
			'speedIn'			: 300, 
			'speedOut'			: 0, 
			'showNavArrows'		: 'no',
			'hideOnContentClick': true,
			'type'				: 'iframe'
	});
	
$('.lightbox_video').fancybox({
			'width'				: 733,
			'scrolling'			: 'no',
			'height'			: 637,
			'autoScale'			: false,
		//	'transitionIn'		: 'elastic',
			'transitionOut'		: 'none',
			'speedIn'			: 300, 
			'speedOut'			: 0, 
			'showNavArrows'		: 'no',
			'hideOnContentClick': true,
			'type'				: 'iframe'
	});		
	
$('.lightbox_pricebox').fancybox({
			'width'				: 811,
			'scrolling'			: 'no',
			'height'			: 480,
			'autoScale'			: false,
		//	'transitionIn'		: 'elastic',
			'transitionOut'		: 'none',
			'speedIn'			: 300, 
			'speedOut'			: 0, 
			'showNavArrows'		: 'no',
			'hideOnContentClick': true,
                        'showCloseButton' : false,
			'type'				: 'iframe'
	});

	
$('.lightbox_wide').fancybox({
			'width'				: 900,
			'scrolling'			: 'no',
			'height'			: 600,
			'autoScale'			: false,
		//	'transitionIn'		: 'elastic',
			'transitionOut'		: 'none',
			'speedIn'			: 300, 
			'speedOut'			: 0, 
			'showNavArrows'		: 'no',
			'hideOnContentClick': true,
                        'showCloseButton' : false,
			'type'				: 'iframe'
	});


$('.lightbox_sitemap').fancybox({
			'width'				: 900,
			'scrolling'			: 'no',
			'height'			: 650,
			'autoScale'			: false,
		//	'transitionIn'		: 'elastic',
			'transitionOut'		: 'none',
			'speedIn'			: 300, 
			'speedOut'			: 0, 
			'showNavArrows'		: 'no',
			'hideOnContentClick': true,
                        'showCloseButton' : false,
			'type'				: 'iframe'
	});

});



function daysInMonth(iMonth, iYear)
{
	return 32 - new Date(iYear, iMonth, 32).getDate();
}


function BookaMeetingRoom(){
document.write("<DIV style=\"margin-left:4px; font-size:13px;font-weight:bold;\">Book a Meeting Room<\/DIV>");
document.write("                ");
document.write("               ");
document.write("               ");
document.write("               <FORM  NAME=\"DateForm2\" ACTION=\"https:\/\/www.wybostonlakesbookings.co.uk\/EventsBooking\/daymeetings\/daymeetings.aspx\" METHOD=\"get\" style=\"margin-top:8px;\" >");
document.write("                 <table width=\"228\" border=\"0\" cellspacing=\"7\" cellpadding=\"3\" style=\"margin-left:-8px;\">");
document.write("  <tr>");
document.write("    <td width=\"39\" scope=\"col\" style=\"padding:3px;\"> <strong>Date<\/strong><\/td>");
document.write("    <td scope=\"col\" colspan=\"2\"><select name=\"month1\" style=\"font-size:11px; width:45px;\">");
document.write("      <option value=01>Jan<\/option>");
document.write("      <option value=02>Feb<\/option>");
document.write("      <option value=03>Mar<\/option>");
document.write("      <option value=04>Apr<\/option>");
document.write("      <option value=05>May<\/option>");
document.write("      <option value=06>Jun<\/option>");
document.write("      <option value=07 >Jul<\/option>");
document.write("      <option value=08>Aug<\/option>");
document.write("      <option value=09>Sep<\/option>");
document.write("      <option value=10>Oct<\/option>");
document.write("      <option value=11>Nov<\/option>");
document.write("      <option value=12>Dec<\/option>");
document.write("    <\/select>");
document.write("    <SELECT name=\"day\" style=\"font-size:11px; width:38px;\">");
document.write("<OPTION value=01>1<\/OPTION>");
document.write("<OPTION value=02>2<\/OPTION>");
document.write("<OPTION value=03>3<\/OPTION>");
document.write("<OPTION value=04>4<\/OPTION>");
document.write("<OPTION value=05>5<\/OPTION>");
document.write("<OPTION value=06>6<\/OPTION>");
document.write("<OPTION value=07>7<\/OPTION>");
document.write("<OPTION value=08>8<\/OPTION>");
document.write("<OPTION value=09>9<\/OPTION>");
document.write("<OPTION value=10>10<\/OPTION>");
document.write(" ");
document.write("<OPTION value=11>11<\/OPTION>");
document.write("<OPTION value=12>12<\/OPTION>");
document.write("<OPTION value=13>13<\/OPTION>");
document.write("<OPTION value=14>14<\/OPTION>");
document.write("<OPTION value=15>15<\/OPTION>");
document.write("<OPTION value=16>16<\/OPTION>");
document.write("<OPTION value=17>17<\/OPTION>");
document.write("<OPTION value=18>18<\/OPTION>");
document.write("<OPTION value=19>19<\/OPTION>");
document.write(" ");
document.write("<OPTION value=20>20<\/OPTION>");
document.write("<OPTION value=21>21<\/OPTION>");
document.write("<OPTION value=22>22<\/OPTION>");
document.write("<OPTION value=23>23<\/OPTION>");
document.write("<OPTION value=24>24<\/OPTION>");
document.write("<OPTION value=25>25<\/OPTION>");
document.write("<OPTION value=26 >26<\/OPTION>");
document.write("<OPTION value=27>27<\/OPTION>");
document.write("<OPTION value=28>28<\/OPTION>");
document.write(" ");
document.write("<OPTION value=29>29<\/OPTION>");
document.write("<OPTION value=30>30<\/OPTION>");
document.write("<OPTION value=31>31<\/OPTION>");
document.write("        <\/SELECT>");
document.write("    <span style=\"height:20px;\">");
document.write("    <select name=\"year\" onchange=\"ChgADate(DateForm.ARVDate, DateForm.ArvMM, DateForm.ArvDD, DateForm.ArvYY, DateForm.ArvWD, 0)\" style=\"font-size:11px; width:48px;\">");
document.write(" ");
document.write("    <option value=2012 >2012<\/option>");
document.write("      <option value=2013 >2013<\/option>");
document.write("  <\/select>");
document.write("    <\/span><\/td>");
document.write("  <\/tr>");
document.write(" ");
document.write("  <tr>");
document.write("    <td valign=\"middle\"style=\"padding:3px;\"><strong>Package<\/strong><\/td>");
document.write("    <td colspan=\"2\"><select name=\"package\" style=\" font-size:11px; width:106px;\" onchange=\"groups()\" >");
document.write("      <option value=\"1\" >full day<\/option>");
document.write("      <option value=\"2\">half day<\/option>");
document.write("      <option value=\"3\">half day (with lunch)<\/option>");
document.write("      <option value=\"4\">evening<\/option>");
document.write("    <option value=\"5\">breakfast<\/option>");
document.write("    <\/select>    <\/td>");
document.write("  <tr>");
document.write("    <td valign=\"middle\"style=\"padding:3px;\"> <strong>Layout<\/strong><\/td>");
document.write("    <td colspan=\"2\">                                ");
document.write("  <SELECT NAME=\"layout\" style=\" font-size:11px; width:106px;\" onChange=\"rooms()\" >");
document.write("<OPTION value=\"BOARD\">Boardroom<\/OPTION>");
document.write("<OPTION value=\"TH\">Theatre<\/OPTION>");
document.write("<OPTION value=\"CAB\">Cabaret<\/OPTION>");
document.write("<OPTION value=\"CIRCLE\">Circle<\/OPTION>");
document.write("<OPTION value=\"US\">U-Shape<\/OPTION>");
document.write("<\/SELECT><\/td>");
document.write("  <\/tr>");
document.write("  <tr>");
document.write("    <td valign=\"middle\"style=\"padding:3px;\"><strong>Adults<\/strong><\/td>");
document.write("    <td width=\"73\"><select name=\"adults\"  style=\"font-size:11px; width:106px;\">");
document.write("        <option value=\"02\">2<\/option>");
document.write("        <option value=\"03\">3<\/option>");
document.write("        <option value=\"04\">4<\/option>");
document.write("        <option value=\"05\">5<\/option>");
document.write("        <option value=\"06\">6<\/option>");
document.write("        <option value=\"07\">7<\/option>");
document.write("        <option value=\"08\">8<\/option>");
document.write("        <option value=\"09\">9<\/option>");
document.write("        <option value=\"10\">10<\/option>");
document.write("        <option value=\"11\">11<\/option>");
document.write("        <option value=\"12\">12<\/option>");
document.write("        <option value=\"13\">13<\/option>");
document.write("        <option value=\"14\">14<\/option>");
document.write("        <option value=\"15\">15<\/option>");
document.write("        <option value=\"16\">16<\/option>");
document.write("        <option value=\"17\">17<\/option>");
document.write("        <option value=\"18\">18<\/option>");
document.write("        <option value=\"19\">19<\/option>");
document.write("        <option value=\"20\">20<\/option>");
document.write(" ");
document.write("      <\/select><\/td>");
document.write("<td width=\"104\"> <\/td>");
document.write("  <\/tr>");
document.write(" ");
document.write("    <\/tr>");
document.write("  <tr>");
document.write("    <td ><br\/><\/td>");
document.write("    <td colspan=\"1\">");
document.write("    ");
document.write("      <a href=\"#\" class=\"button\" style=\"margin-left:-10px;\" onclick=\"document.DateForm2.submit();\"><span>Book Now<\/span><\/a>");
document.write("    ");
document.write("    <\/td>");
document.write("  <TD>&nbsp;<\/TD>");
document.write("  <\/tr>");
document.write(" ");
document.write("<\/table>");
document.write("<\/form>");
document.write("");

document.write("<script type=\"text\/javascript\">");
document.write("	");
document.write("		var d = new Date();");
document.write("		var DateForm2 = document.DateForm2;");
document.write("		DateForm2.month1.selectedIndex = d.getMonth();");
document.write("		DateForm2.day.selectedIndex = d.getDate()+1;");

document.write("var noOfDays = daysInMonth(d.getMonth(),d.getYear());");
document.write("");
document.write("	if (d.getDate() > (noOfDays-2))");
document.write("	{");
document.write("	");
document.write("		DateForm2.month1.selectedIndex = d.getMonth()+1;");
document.write("		DateForm2.day.selectedIndex = d.getDate()-(noOfDays-1);");
document.write("	");
document.write("	}");


document.write("	");
document.write("<\/script>");

}




function BookaBedroom(){
document.write("<DIV style=\"margin-left:3px; font-size:13px;font-weight:bold;\">Book a Bedroom<\/DIV>");
document.write("                ");
document.write("               <div>");
document.write("               ");
document.write("<FORM NAME=DateForm ACTION=\"https:\/\/www.wybostonlakesbookings.co.uk\/v1webcontrols\/resvmain.aspx\"  onSubmit=\"pageTracker._linkByPost(this)\"  METHOD=\"get\"  ><br\/>");
document.write("<table  border=\"0\" cellspacing=\"6\" cellpadding=\"2\" style=\"margin-top:-10px;\">");
document.write("  <tr>");
document.write("    <td width=\"39\" scope=\"col\" style=\"padding:2px;width:39px;\"> <strong>Arrive<\/strong><\/td>");
document.write("    <td width=\"280\" scope=\"col\" colspan=\"2\" style=\"text-align:left;\"><select name=\"ArvMM\" onchange=\"ChgADate(DateForm.ARVDate, DateForm.ArvMM, DateForm.ArvDD, DateForm.ArvYY, DateForm.ArvWD, 0)\" style=\"font-size:11px; width:45px;\">");
document.write("      <option value=1>Jan<\/option>");
document.write("      <option value=2>Feb<\/option>");
document.write("      <option value=3>Mar<\/option>");
document.write("      <option value=4>Apr<\/option>");
document.write("      <option value=5>May<\/option>");
document.write("      <option value=6>Jun<\/option>");
document.write("      <option value=7 >Jul<\/option>");
document.write("      <option value=8>Aug<\/option>");
document.write("      <option value=9>Sep<\/option>");
document.write("      <option value=10>Oct<\/option>");
document.write("      <option value=11>Nov<\/option>");
document.write("      <option value=12>Dec<\/option>");
document.write("    <\/select>");
document.write("    <SELECT name=ArvDD onchange=\"ChgADate(DateForm.ARVDate, DateForm.ArvMM, DateForm.ArvDD, DateForm.ArvYY, DateForm.ArvWD, 0)\" style=\"font-size:11px; width:38px;\">");
document.write("               <OPTION value=1>1<\/OPTION>");
document.write(" ");
document.write("<OPTION value=2>2<\/OPTION>");
document.write("<OPTION value=3>3<\/OPTION>");
document.write("<OPTION value=4>4<\/OPTION>");
document.write("<OPTION value=5>5<\/OPTION>");
document.write("<OPTION value=6>6<\/OPTION>");
document.write("<OPTION value=7>7<\/OPTION>");
document.write("<OPTION value=8>8<\/OPTION>");
document.write("<OPTION value=9>9<\/OPTION>");
document.write("<OPTION value=10>10<\/OPTION>");
document.write(" ");
document.write("<OPTION value=11>11<\/OPTION>");
document.write("<OPTION value=12>12<\/OPTION>");
document.write("<OPTION value=13>13<\/OPTION>");
document.write("<OPTION value=14>14<\/OPTION>");
document.write("<OPTION value=15>15<\/OPTION>");
document.write("<OPTION value=16>16<\/OPTION>");
document.write("<OPTION value=17>17<\/OPTION>");
document.write("<OPTION value=18>18<\/OPTION>");
document.write("<OPTION value=19>19<\/OPTION>");
document.write(" ");
document.write("<OPTION value=20>20<\/OPTION>");
document.write("<OPTION value=21>21<\/OPTION>");
document.write("<OPTION value=22>22<\/OPTION>");
document.write("<OPTION value=23>23<\/OPTION>");
document.write("<OPTION value=24>24<\/OPTION>");
document.write("<OPTION value=25>25<\/OPTION>");
document.write("<OPTION value=26 >26<\/OPTION>");
document.write("<OPTION value=27>27<\/OPTION>");
document.write("<OPTION value=28>28<\/OPTION>");
document.write(" ");
document.write("<OPTION value=29>29<\/OPTION>");
document.write("<OPTION value=30>30<\/OPTION>");
document.write("<OPTION value=31>31<\/OPTION>");
document.write("        <\/SELECT>");
document.write("    <SELECT name=ArvYY onchange=\"ChgADate(DateForm.ARVDate, DateForm.ArvMM, DateForm.ArvDD, DateForm.ArvYY, DateForm.ArvWD, 0)\" style=\"font-size:11px; width:50px;\">");
document.write(" ");
document.write("          <OPTION value=2012 >2012<\/OPTION>");
document.write("            <option value=2013 >2013<\/option><\/SELECT><\/td>");
document.write(" ");
document.write("  <\/tr>");
document.write("  <tr>");
document.write("    <td valign=\"middle\" style=\"padding:2px;\"><strong>Nights<\/strong><\/td>");
document.write("    <td colspan=\"2\"><SELECT name=iNgts  style=\"font-size:11px; width:50px;\">");
document.write("        <option value=\"1\">1<\/option>");
document.write("        <option value=\"2\">2<\/option>");
document.write("        <option value=\"3\">3<\/option>");
document.write("        <option value=\"4\">4<\/option>");
document.write("        <option value=\"5\">5<\/option>");
document.write("        <option value=\"6\">6<\/option>");
document.write("        <option value=\"7\">7<\/option>");
document.write("        <option value=\"8\">8<\/option>");
document.write("        <option value=\"9\">9<\/option>");
document.write("        <option value=\"10\">10<\/option>");
document.write("        <option value=\"11\">11<\/option>");
document.write("        <option value=\"12\">12<\/option>");
document.write("        <option value=\"13\">13<\/option>");
document.write("        <option value=\"14\">14<\/option>");
document.write("        <option value=\"15\">15<\/option>");
document.write("        <option value=\"16\">16<\/option>");
document.write("        <option value=\"17\">17<\/option>");
document.write("        <option value=\"18\">18<\/option>");
document.write("        <option value=\"19\">19<\/option>");
document.write("        <option value=\"20\">20<\/option>");
document.write("        <option value=\"21\">21<\/option>");
document.write("        <option value=\"22\">22<\/option>");
document.write("        <option value=\"23\">23<\/option>");
document.write("        <option value=\"24\">24<\/option>");
document.write("        <option value=\"25\">25<\/option>");
document.write("        <option value=\"26\" >26<\/option>");
document.write("        <option value=\"27\">27<\/option>");
document.write("        <option value=\"28\">28<\/option>");
document.write(" ");
document.write(" ");
document.write("        <option value=\"29\">29<\/option>");
document.write("        <option value=\"30\">30<\/option>");
document.write("        <option value=\"31\">31<\/option>");
document.write("      <\/select><\/td>");
document.write(" ");
document.write("  <tr>");
document.write("    <td valign=\"middle\" style=\"padding:2px;\"> <strong>Rooms<\/strong><\/td>");
document.write("    <td colspan=\"2\">                                ");
document.write("  <SELECT NAME=iRooms style=\" font-size:11px; width:50px;\" onChange=\"rooms()\" ><OPTION value=1 >1<\/OPTION>");
document.write("<OPTION value=2>more<\/OPTION>");
document.write(" ");
document.write("<\/SELECT><input type=\"text\" name=\"CorpID\"   maxlength=\"7\"  style=\"background-image:none; border:1px solid #999999; padding:0px; margin-left:24px; width:50px;margin-top:0px;border-radius:0px;\" \/><\/td>");
document.write("  <\/tr>");
document.write("    ");
document.write("  <tr>");
document.write("    <td valign=\"middle\" style=\"padding:2px;\"><strong>Adults<\/strong><\/td>");
document.write("    <td width=\"73\">                       <SELECT NAME=iAdults style=\" font-size:11px; width:50px;\" onChange=\"groups()\" ><OPTION value=1 >1<\/OPTION>");
document.write("<OPTION value=2>2<\/OPTION>");
document.write("<OPTION value=3>3<\/OPTION>");
document.write("<OPTION value=4>more<\/OPTION>");
document.write(" ");
document.write("<\/SELECT>");
document.write(" &nbsp;&nbsp;&nbsp;&nbsp;<strong>Corporate ID<\/strong> <br/><span style=\"color:#333333\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(optional)<\/span>");
document.write(" <\/td>");
document.write(" ");
document.write("  <\/tr>");

document.write("  <tr>");
document.write("    <td colspan=\"3\">");
document.write("  <\/tr>");
document.write("    <\/tr>");
document.write("  ");
document.write("  <tr>");
document.write("    <td colspan=\"3\">");
document.write("<input type=\"hidden\" name=\"Bldg\" id=\"Bldg\"  value=\"C\" \/>");
document.write("      <a href=\"#\" class=\"button\" onclick=\"document.DateForm.submit();\"><span>Book Now<\/span><\/a><center><br/><a href=\"http://www.wybostonlakes.info/lightboxes/best/best3.aspx?green\" style=\"display:block;position:absolute;margin-top:-21px;text-decoration:underline;width:200px;margin-left:0px;\" id=\"best-deal-guarantee2\" class=\"lightbox_generic\">Best Deal Guarantee<\/a><\/center>");document.write("    <\/td>");
document.write("  <\/tr>");
document.write("<\/table>");
document.write("<\/form>");
document.write("                 ");
document.write("            <\/div>");
document.write("");


document.write("<script type=\"text\/javascript\">");
document.write("	");
document.write("	var d = new Date();");
document.write("		var DateForm = document.DateForm;");
document.write("		DateForm.ArvMM.selectedIndex = d.getMonth();");
document.write("		DateForm.ArvDD.selectedIndex = d.getDate()-1;");
document.write("		DateForm.iNgts.selectedIndex =0;");
document.write("		DateForm.iAdults.selectedIndex =0;");
document.write("		DateForm.iRooms.selectedIndex =0;");
document.write("		DateForm.ArvYY.selectedIndex=0;");
document.write("	");
document.write("<\/script>");
}



localURL = window.location;


function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")


}

function CallPrint()
{
var prtContent = document.getElementById('box-lrg');


var text = "<link rel='stylesheet' type='text/css' href='http://www.wybostonlakes.info/css/print.css' media='print' />" + prtContent.innerHTML;

var final =  text ;

var WinPrint =
window.open('','','left=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,status=0');


WinPrint.document.write(final);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
prtContent.innerHTML=strOldOne;
}




function generateCal1()
{
var x = (document.DateForm2.month1.selectedIndex + 1) + "/" + (document.DateForm2.day.selectedIndex + 1) + "/" + document.DateForm2.year.value;
 
  
 function handleSelect(type,args,obj) {   
     var dates = args[0];   
     var date = dates[0];   
     var year = date[0], month = date[1], day = date[2];   
   
   document.DateForm2.month1.selectedIndex = month -1 ;
   document.DateForm2.day.selectedIndex  = day -1 ;
   document.DateForm2.year.value = year ;
   
     document.getElementById('cal1Container').style.visibility = "hidden";
   
 }  
  
  function toggleVisibility()
  {
   
   if (document.getElementById('cal1Container').style.visibility == "")
   {
     document.getElementById('cal1Container').style.visibility = "visible";
   }
    else
    {
     document.getElementById('cal1Container').style.visibility = "hidden";
    }
  }

    YAHOO.namespace("example.calendar");
 
  
    var d11 = new Date();
  var minDt = parseInt(d11.getMonth()+1)+ "/"+ parseInt(d11.getDate()+2) +"/2012";
  // alert(minDt);
  
  
  
    YAHOO.example.calendar.init = function() {
        YAHOO.example.calendar.cal1 = new YAHOO.widget.Calendar("cal1","cal1Container",   
                                                                { pagedate: parseInt(d11.getMonth()+1)+"/2012"   ,
                                                           mindate: minDt,   
                                                                  selected: minDt}   
                                                         );  
                                                         
 
       YAHOO.util.Event.addListener("show2up", "click", YAHOO.example.calendar.cal1.show, YAHOO.example.calendar.cal1, true);
        YAHOO.example.calendar.cal1.render();
        YAHOO.example.calendar.cal1.selectEvent.subscribe(handleSelect, YAHOO.example.calendar.cal1, true);  
        YAHOO.example.calendar.cal1.date[2] = 6;
                }
 

    YAHOO.util.Event.onDOMReady(YAHOO.example.calendar.init);
 

}


function generateCal2()
{
var x = (document.DateForm.ArvMM.selectedIndex + 1) + "/" + (document.DateForm.ArvDD.selectedIndex + 1) + "/" + document.DateForm.ArvYY.value;
 
  
  
 function handleSelect2(type,args,obj) {   
     var dates = args[0];   
     var date = dates[0];   
     var year = date[0], month = date[1], day = date[2];   
   
   document.DateForm.ArvMM.selectedIndex = month -1 ;
   document.DateForm.ArvDD.selectedIndex  = day -1 ;
   document.DateForm.ArvYY.value = year ;
   
     document.getElementById('cal2Container').style.visibility = "hidden";
   
 }  
  
  function toggleVisibility()
  {
   
   if (document.getElementById('cal2Container').style.visibility == "")
   {
     document.getElementById('cal2Container').style.visibility = "visible";
   }
    else
    {
     document.getElementById('cal2Container').style.visibility = "hidden";
    }
  }

    YAHOO.namespace("example.calendar");
 
  
    var d11 = new Date();
  var minDt2 = parseInt(d11.getMonth()+1)+ "/"+ parseInt(d11.getDate()+0) +"/2012";
  //  alert(minDt);
  
  
  
    YAHOO.example.calendar.init2 = function() {
        YAHOO.example.calendar.cal2 = new YAHOO.widget.Calendar("cal2","cal2Container",   
                                                                { pagedate: parseInt(d11.getMonth()+1)+"/2012"   ,
                                                           mindate: minDt2,   
                                                           selected: minDt2}   
                                                         );  
                                                     
    
       YAHOO.util.Event.addListener("show3up", "click", YAHOO.example.calendar.cal2.show, YAHOO.example.calendar.cal2, true);
        YAHOO.example.calendar.cal2.render();
        YAHOO.example.calendar.cal2.selectEvent.subscribe(handleSelect2, YAHOO.example.calendar.cal2, true);  
        YAHOO.example.calendar.cal2.date[2] = 6;
                }
 

        YAHOO.util.Event.onDOMReady(YAHOO.example.calendar.init2);
 
  
}


