// JavaScript Document

<!-- preload images
if (document.images)
{
  	pic1= new Image(); 
  pic1.src="golf/images/01-VRW-hole.jpg"; 
  
    pic2= new Image(); 
  pic2.src="golf/images/02-VRW-hole.jpg"; 
  
    pic3= new Image(); 
  pic3.src="golf/images/03-VRW-hole.jpg"; 
  
    pic4= new Image(); 
  pic4.src="golf/images/04-VRW-hole.jpg"; 
  
    pic5= new Image(); 
  pic5.src="golf/images/05-VRW-hole.jpg"; 
  
    pic6= new Image(); 
  pic6.src="golf/images/06-VRW-hole.jpg"; 
  
    pic7= new Image(); 
  pic7.src="golf/images/07-VRW-hole.jpg"; 
  
    pic8= new Image(); 
  pic8.src="golf/images/08-VRW-hole.jpg"; 
  
    pic9= new Image(); 
  pic9.src="golf/images/09-VRW-hole.jpg"; 
  
    pic10= new Image(); 
  pic10.src="golf/images/10-VRW-hole.jpg"; 
  
    pic11= new Image(); 
  pic11.src="golf/images/11-VRW-hole.jpg"; 
  
    pic12= new Image(); 
  pic12.src="golf/images/12-VRW-hole.jpg"; 
  
    pic13= new Image(); 
  pic13.src="golf/images/13-VRW-hole.jpg"; 
  
    pic14= new Image(); 
  pic14.src="golf/images/14-VRW-hole.jpg"; 
  
    pic15= new Image(); 
  pic15.src="golf/images/15-VRW-hole.jpg"; 
  
    pic16= new Image(); 
  pic16.src="golf/images/16-VRW-hole.jpg"; 
  
	pic17= new Image(); 
  pic17.src="golf/images/17-VRW-hole.jpg"; 
  
	pic18= new Image(); 
  pic18.src="golf/images/18-VRW-hole.jpg"; 
}
//-->

currimage = 0;
mousedover = false;

//define all pictures and descriptions

var imgsrc= new Array()
imgsrc[0]="golf/images/01-VRW-hole.jpg";
imgsrc[1]="golf/images/02-VRW-hole.jpg";
imgsrc[2]="golf/images/03-VRW-hole.jpg";
imgsrc[3]="golf/images/04-VRW-hole.jpg";
imgsrc[4]="golf/images/05-VRW-hole.jpg";
imgsrc[5]="golf/images/06-VRW-hole.jpg";
imgsrc[6]="golf/images/07-VRW-hole.jpg";
imgsrc[7]="golf/images/08-VRW-hole.jpg";
imgsrc[8]="golf/images/09-VRW-hole.jpg";
imgsrc[9]="golf/images/10-VRW-hole.jpg";
imgsrc[10]="golf/images/11-VRW-hole.jpg";
imgsrc[11]="golf/images/12-VRW-hole.jpg";
imgsrc[12]="golf/images/13-VRW-hole.jpg";
imgsrc[13]="golf/images/14-VRW-hole.jpg";
imgsrc[14]="golf/images/15-VRW-hole.jpg";
imgsrc[15]="golf/images/16-VRW-hole.jpg";
imgsrc[16]="golf/images/17-VRW-hole.jpg";
imgsrc[17]="golf/images/18-VRW-hole.jpg";

var desc= new Array()
desc[0]="<div align='center' style='font-weight: bold;'>-- HOLE 1 --</div><br><br> Your choice of two tee shot locations on this double fairway, long par 4. Pick your poison: challenge the right side and be rewarded with a better shot angle to an elevated green or play left to the larger landing area and face a long shot over a deep diagonal bunker protecting the green complex.  Par is an excellent score if you can avoid the “cyclops” fairway bunker.";
desc[1]="<div align='center' style='font-weight: bold;'>-- HOLE 2 --</div><br><br> A mid-length par 4 with a tee shot out of a chute.  Favor a shot to the right side of the fairway challenging the bunker.  Be conservative on your approach shot as trouble in the form of a pond lurks on the right.  Beware the “eyebrow” bunkers short and long of the “punchbowl” green.";
desc[2]="<div align='center' style='font-weight: bold;'>-- HOLE 3 --</div><br><br> Visually intimidating – many have asked if they should photograph this hole or play it.  Distance control is critical as there is a full carry over the pond and an “Arnold Palmer” beach bunker.  A bail out area is to the left of the green.  Wind conditions and pin placement will determine the severity of the hole on a given day.";
desc[3]="<div align='center' style='font-weight: bold;'>-- HOLE 4 --</div><br><br> This lengthy, 3 shot, par 5 requires a long, straight drive.  The accomplished player may try to reach the green in two, but this requires a daunting second shot over the gaping waste bunker on the left.  Or lay up right of the waste area and make par - a good score here.";
desc[4]="<div align='center' style='font-weight: bold;'>-- HOLE 5 --</div><br><br> This short, par 3 requires you to hit the green or suffer the consequences, featuring an island green surrounded by a necklace of treacherous bunkers.  This is definitely one of the most difficult contoured greens on the course, so make sure you are on the correct level or a three putt is a certainty.";
desc[5]="<div align='center' style='font-weight: bold;'>-- HOLE 6 --</div><br><br> This is a demanding 3 shot, long par 5.  Enjoy your tee shot as it flies over the large diagonal waste area on this cape-style hole to a wide fairway.  The conservative player should lay up the second shot short of the “bottleneck” created by vineyards on the right and waste area and pond on the left.  For the adventurous, successfully challenge the bottleneck and find yourself set up for a birdie opportunity.  As you enter the breathtaking green setting meandering through grapevines, allow yourself to relish the essence of true vineyard golf.";
desc[6]="<div align='center' style='font-weight: bold;'>-- HOLE 7 --</div><br><br> Vineyard golf at its best - a visually exciting right to left hole that emphasizes strategy.  There is no one correct way to play this hole, but taming it requires awareness of yardage, proper club selection, and precise execution of shots.  Spectacular views abound from the floating tees overlooking vineyards, ponds, and rolling terrain.";
desc[7]="<div align='center' style='font-weight: bold;'>-- HOLE 8 --</div><br><br> This breathtaking hole speaks for itself.  A classic risk/reward theme allows the faint of heart to bail out right.  A second shot must carry the severely contoured false front in order to hold the green.  The opportunity exists to challenge the left side waste area and come in from the left to a much more accommodating “bump and run” shot.  Or be a hero and play straight away, however, your drive will have to carry 260 yards.  But beware, this hole could spoil many a great round.";
desc[8]="<div align='center' style='font-weight: bold;'>-- HOLE 9 --</div><br><br> Mackenzie-inspired” tough dogleg right to left featuring diagonal carry bunkers and wide fairway landing areas that will test your physical and mental golfing skills.  This hole challenges you to carry as much of the bunkers as you dare for the best angle into this very narrow green.  The mirage bunker appears to be greenside, but is actually 40 yards short of the green.  With a green bunkered left and right, there is no bail out area.  It is only fitting that this strong par 4 sets the stage for the back nine at the vineyards.";
desc[9]="<div align='center' style='font-weight: bold;'>-- HOLE 10 --</div><br><br> A  hole that combines most of the strategic elements encountered throughout the Vineyards.  Challenging the bunkers on the left side rewards you with the best-shot angle to this two-tiered green.  Left of the green, a “Donald Ross style” bentgrass hollow may swallow you up.";
desc[10]="<div align='center' style='font-weight: bold;'>-- HOLE 11 --</div><br><br> One really strong par 4.  This straight ahead uphill hole with an amphitheatre green emphasizes power and strategy.  Positioning your tee ball to the right of the fairway will give you the best angle into the green complex.  Be sure to take one extra club in order to carry the tier approximately 20 yards short of the green.";
desc[11]="<div align='center' style='font-weight: bold;'>-- HOLE 12 --</div><br><br> From its soaring 31-foot elevation, this classic par 4 offers panoramic views of the vineyards, orchards, and Tuscany House Hotel.  With your choice of two tees shots, this hole takes you back to the origins of classic golf.  Choose to challenge the ominous diagonal bunkers and be rewarded with a shorter open shot to the tiered green set perilously close to a pond.";
desc[12]="<div align='center' style='font-weight: bold;'>-- HOLE 13 --</div><br><br> One of the prettiest holes at the Vineyards.  Relish the view as you hit off the bluff overlooking the pond into the left to right sloping green.  For the conservative player, the bail out area on the left may carry balls towards the green.  Or challenge the pond to a back right pin position that may result in a birdie.";
desc[13]="<div align='center' style='font-weight: bold;'>-- HOLE 14 --</div><br><br> This truly spectacular dogleg right may be the toughest hole on the course and will challenge you to hit two excellent shots in order to make par.  Favor the right side of the fairway for the shortest shot to this runaway green.  The second shot dictates a bump and run “Scottish style” shot that may require less club.";
desc[14]="<div align='center' style='font-weight: bold;'>-- HOLE 15 --</div><br><br> Relax and enjoy this scenic, tree-lined, reachable par 5 that can produce a birdie.  Avoid the bunkers on the right and out of bounds on the left as you hit your tee shot to the large fairway landing area and you have successfully completed the first step towards hitting this hole in two.  If you lay up, the third shot to a swale green puts a premium on accuracy.";
desc[15]="<div align='center' style='font-weight: bold;'>-- HOLE 16 --</div><br><br> What you see is what you get on this attractive, mid-length par 3.  Shot selection into the two-tiered green is vital.  This large green could also cause problems for even the best of putters.  Par is a good score here.";
desc[16]="<div align='center' style='font-weight: bold;'>-- HOLE 17 --</div><br><br> This reachable par 4 short birdie hole will reward the smart shot.  Lured by an unusually wide landing area for its length the big hitter may try to drive the green, but beware of the quarry fescue area on the right.  The distance is deceptive, requiring pinpoint accuracy and yardage control from every golfer.  A short, delicate second shot may not be as easy as it appears – watch out for the falloff left and heavily bunkered pin position on the right.  A definite birdie opportunity, but beware or the “bogey man” might grab you.";
desc[17]="<div align='center' style='font-weight: bold;'>-- HOLE 18 --</div><br><br> This tough, double dogleg, mid-length par 5 features vineyards, bunkers, ponds, and rolling terrain.  Options abound as a tee shot favoring the left side of the fairway will leave you with visually intimidating alternatives for the second shot.  For the brave or foolish, hit the green in two; for the more conservative, lay up short of the pond or hit into the progressively narrowing neck.  Two shot swings will be a common occurrence here.";


// on rollover tell slideshow to stop, on rollout tell slideshow to start again at the rolled over image
function hitme(type, where) {

where = parseInt(where);

	if (type == "over") {
	
		clearTimeout(timer);
		mousedover = true;
		document.getElementById("lgimage").innerHTML = "<img src='" + imgsrc[where] + "' />" ;
		document.getElementById("desc").innerHTML = desc[where];
		currimage = where ;
	
	}

	
	if (type == "out") {
	
		mousedover = false;
		slideshow();
	
	}

}

// slideshow function
function slideshow() {
	
	// only run slideshow if user doesnot have a thumnail mouseover
	if (mousedover != true) {
	
		document.getElementById("lgimage").innerHTML = "<img src='" + imgsrc[currimage] + "' />" ;
		document.getElementById("desc").innerHTML = desc[currimage];
		
		currimage = currimage + 1 ;
		
		if (currimage == 18) {
		
			currimage = 0;
		
		}
		
		timer = setTimeout("slideshow()", 3000)
		
	}
		
}

//start slideshow onload

function addLoadEvent(func)
{
	var oldonload = window.onload;
	if (typeof window.onload != 'function')
	{
		window.onload = func;
	}
	else
	{
		window.onload = function()
		{
			oldonload();
			func();
		}
	}
}

addLoadEvent(slideshow);