// JavaScript Document

// BUTTONS --------->
// ABOUT BUTTON
homeon = new Image ();
homeon.src = "images/btn_home.jpg";
homeoff = new Image ();
homeoff.src = "images/btn_homer.jpg";

// ABOUT BUTTON
abouton = new Image ();
abouton.src = "images/btn_about.jpg";
aboutoff = new Image ();
aboutoff.src = "images/btn_aboutr.jpg";

// ABOUT BUTTON
scorecardon = new Image ();
scorecardon.src = "images/btn_scorecard.jpg";
scorecardoff = new Image ();
scorecardoff.src = "images/btn_scorecardr.jpg";

// ABOUT BUTTON
galleryon = new Image ();
galleryon.src = "images/btn_gallery.jpg";
galleryoff = new Image ();
galleryoff.src = "images/btn_galleryr.jpg";

// ABOUT BUTTON
tournamenton = new Image ();
tournamenton.src = "images/btn_tournament.jpg";
tournamentoff = new Image ();
tournamentoff.src = "images/btn_tournamentr.jpg";

// ABOUT BUTTON
rateson = new Image ();
rateson.src = "images/btn_rates.jpg";
ratesoff = new Image ();
ratesoff.src = "images/btn_ratesr.jpg";

// ABOUT BUTTON
updateson = new Image ();
updateson.src = "images/btn_updates.jpg";
updatesoff = new Image ();
updatesoff.src = "images/btn_updatesr.jpg";

// CONTACT BUTTON
contacton = new Image ();
contacton.src = "images/btn_contact.jpg";
contactoff = new Image ();
contactoff.src = "images/btn_contactr.jpg";

// junior BUTTON
junioron = new Image ();
junioron.src = "images/btn_junior.jpg";
junioroff = new Image ();
junioroff.src = "images/btn_juniorr.jpg";


// ROLLOVER / ROLLOUT
function roll (vName, TF) { 
	if (document.images) {
		if (TF == true) {
			img = eval (vName + "off.src");
		} else {
			img = eval (vName + "on.src");
		}
		document[vName].src = img;
	}		
}

function showWeather () {
	document.write ('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="180" height="151" id="weather050102" align="middle">\n');
	document.write ('<param name="allowScriptAccess" value="sameDomain" />\n');	
	document.write ('<param name="movie" value="flash/weather050103.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" />\n');	
	document.write ('<embed src="flash/weather050103.swf" quality="high" bgcolor="#000000" width="180" height="151" name="weather050102" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');	
	document.write ('</object>\n');	
}

function showBanner () {
	document.write ('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="739" height="177" id="header050101" align="middle">\n');
	document.write ('<param name="allowScriptAccess" value="sameDomain" />\n');	
	document.write ('<param name="movie" value="flash/header050101.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" />\n');	
	document.write ('<embed src="flash/header050101.swf" quality="high" bgcolor="#000000" width="739" height="177" name="header050101" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');	
	document.write ('</object>\n');	
}


// GALLERY CHANGE IMAGE
function changeImage (vName,vTarget) {
	if (document.images){
	aPic = vName.slice(5,7);
	aLink = ("images/gallery" + aPic + ".jpg");
	//alert (aLink);
	//nuPic = eval (vName + ".src");
	document [vTarget].src = aLink;
	}
}

// POPUP WINDOW
function vrWindow (myPage) {
	var myName = "HolePreview";
	var h = "240";
	var w = "320";
	var scroll = "no";
	var winl = ((screen.width - w) / 2);
	var wint = ((screen.height - h) / 2);
	winprops = 'height=' + h +',width=' + w + ',top=' + wint + ',left=' + winl + ',scrollbars=' + scroll + ',resizable=no';
	win = window.open (myPage, myName, winprops)
}