//<script language="JavaScript">

function causeway(followthrough){
	switch (followthrough){
		//------------------state links------------------
		case "courselist":
			document.location = "/ggpl/courselist.asp";
			break;
		case "courselistback":
			document.location = "/ggpl/";
			break;
		case "presslistback":
			document.location = "/ggpl/pressreleases.asp";
			break;
		case "preleaselistback":
			document.location = "/ggpl/";
			break;


		//------------------menu------------------
		case "logout":
			document.location = "/ggpl/logout.asp?lo=283547";
			break;
		case "close":
			document.location = "/ggpl/logout.asp?lo=283547";
			break;	
		case "home":
			document.location = "/ggpl/profile/home.asp";
			break;
		case "tee":
			document.location = "/ggpl/teepv/reservationstep01.asp";
			break;
		case "courses":
			document.location = "/ggpl/courses.asp";
			break;
		case "profile":
			document.location = "/ggpl/profile/home.asp";
			break;
		case "contact":
			document.location = "/ggpl/contact.asp";
			break;
		case "login":
			submitlogin();
			break;
		case "menulogin":
			document.location = "/ggpl/profile/home.asp";
			break;
		case "help":
			window.open("/ggpl/nttrshelpfiles/pga/privatelabel.htm","_new","",true);
			break;
		
		//------------------reservation------------------
		case "reservationstep01":
			validateStep01();
			break;
		case "reservationstep02":
			validateStep02();
			break;
		case "reservationstep03":
			submitformStep03(followthrough);
			break;
		case "reservationstep04":
			checkFormStep04();
			break;
		case "reservationstepUP":
			submitform();
			break;	
		
		//------------------subdata------------------
		case "aboutteetimes":
			document.location = "/ggpl/aboutTeetimes.asp";
			break;
		case "aboutgolfgopher":
			document.location = "/ggpl/knowledge.asp";
			break;
		case "press":
			document.location = "/ggpl/pressreleases.asp";
			break;
		case "gophertechpapers":
			document.location = "/ggpl/gophertech.asp";
			break;
		case "handicap":
			window.open("http://www.freegolfinfo.com/gametrack/index2.asp","_new","",true);
			break;
		case "weather":
			window.open("http://www.travelforecast.com/","_new","",true);
			break;
		
		//------------------press releases------------------
		case "press032003":
			document.location = "/ggpl/presstext.asp?pno=press032003";
			break;
		case "press022403":
			document.location = "/ggpl/presstext.asp?pno=press022403";
			break;
		case "press011703":
			document.location = "/ggpl/presstext.asp?pno=press011703";
			break;
		case "press112502":
			document.location = "/ggpl/presstext.asp?pno=press112502";
			break;
		case "press101802":
			document.location = "/ggpl/presstext.asp?pno=press101802";
			break;
		case "press101602":
			document.location = "/ggpl/presstext.asp?pno=press101602";
			break;
		case "press093002":
			document.location = "/ggpl/presstext.asp?pno=press093002";
			break;
		case "press073102":
			document.location = "/ggpl/presstext.asp?pno=press073102";
			break;
		case "press062602":
			document.location = "/ggpl/presstext.asp?pno=press062602";
			break;
		case "press041902":
			document.location = "/ggpl/presstext.asp?pno=press041902";
			break;
		case "press022102":
			document.location = "/ggpl/presstext.asp?pno=press022102";
			break;
		case "press012202":
			document.location = "/ggpl/presstext.asp?pno=press012202";
			break;
		case "press101801":
			document.location = "/ggpl/presstext.asp?pno=press101801";
			break;
		case "press051801":
			document.location = "/ggpl/presstext.asp?pno=press051801";
			break;
										
		//------------------footer------------------
		case "knowledgeteetimes":
			document.location = "/ggpl/knowledge.asp";
			break;
		case "knowledgegolfgopher":
			document.location = "/ggpl/";
			break;
		case "sps":
			window.open("http://www.gosps.com/","_new","",true);
			break;
		case "privacy":
			//document.location = "/ggpl/Legal/PrivacyStatement.asp";
			window.open("/Legal/PL PrivacyStatement.asp","_new","",true);
			break;
		case "termsconditions":
			//document.location = "/ggpl/Legal/TermsAndConditions.asp";
			window.open("/Legal/PL TermsAndConditions.asp","_new","",true);
			break;
		case "termsofuse":
			//document.location = "/ggpl/Legal/TermsAndConditions.asp";
			//window.open("/Legal/termscond.htm","","",true);
			//document.location = "/legal/termscond.asp";
			window.open("/legal/termscond.asp","_new2","",true);
			break;
		case "privacypolicy":
			//document.location = "/ggpl/Legal/TermsAndConditions.asp";
			//window.open("/Legal/termscond.htm","","",true);
			//document.location = "/legal/privacy.asp";
			window.open("/legal/privacy.asp","_new2","",true);
			break;
		case "useragreement":
			//document.location = "/ggpl/Legal/TermsAndConditions.asp";
			//window.open("/Legal/termscond.htm","","",true);
			document.location = "/";
			break;
		
		//------------------contact------------------
		case "sendcontact":
			submitContact();
			break;
		
		//------------------password------------------
		case "sendpassword":
			submitPassword();
			break;
		
		//------------------become a member------------------
		case "becomeamember":
			document.location = "/ggpl/profile/signup01.asp";
			break;
		case "becomeamembercont":
			document.location = "/ggpl/profile/signup01.asp?eflthu=3124587";
			break;
		case "becomeamemberpath":
			document.location = "/ggpl/teepv/reservationstep02c.asp?eflthu=9083478";
			break;
		case "returntores":
			document.location = "/ggpl/teepv/reservationstep02b.asp?eflthu=150957";
			break;
		case "registermemberstep01":
			CreateADusers();
			break;
		case "registermemberstep01cont":
			CreateADusers();
			break;
		case "registermemberstep02":
			submitMemberForm();
			break;
		case "registermemberstep02cont":
			submitMemberForm();
			break;
		case "resetform":
			resetRegistrationForm();
			break;
		
		//------------------profile------------------
		case "refercourse":
			
			break;
		case "reservations":
			document.location = "/ggpl/profile/reservations.asp";
			break;
		case "currentreservations":
			
			break;
		case "reservationhistory":
			
			break;
		case "updateprofile":
			document.location = "/ggpl/profile/update.asp";
			break;
		case "changepassword":
			document.location = "/ggpl/profile/changepassword.asp";
			break;
		case "trackhandicap":
			
			break;
		case "loyalityprofile":
			document.location = "/ggpl/profile/loyaltypts.asp";
			break;	
		case "clubprofile":
			document.location = "/ggpl/profile/clubaccpayment.asp";
			break;	
		
		//------------------portal reservation links - featured course------------------
		case "featuredcourse":
			window.open ("http://www.golfgopher.com/default.asp?scid=00112&tkn=45","_new","",true);
			break;
		
		//------------------portal reservation links - state------------------
		case "state-al":
			document.location = "/ggpl/courselist.asp?gloc=al";
			break;
		case "state-ca":
			document.location = "/ggpl/courselist.asp?gloc=ca";
			break;
		case "state-fl":
			document.location = "/ggpl/courselist.asp?gloc=fl";
			break;
		case "state-ga":
			document.location = "/ggpl/courselist.asp?gloc=ga";
			break;
		case "state-il":
			document.location = "/ggpl/courselist.asp?gloc=il";
			break;
		case "state-ma":
			document.location = "/ggpl/courselist.asp?gloc=ma";
			break;
		case "state-md":
			document.location = "/ggpl/courselist.asp?gloc=md";
			break;
		case "state-mi":
			document.location = "/ggpl/courselist.asp?gloc=mi";
			break;
		case "state-ms":
			document.location = "/ggpl/courselist.asp?gloc=ms";
			break;
		case "state-nc":
			document.location = "/ggpl/courselist.asp?gloc=nc";
			break;
		case "state-nh":
			document.location = "/ggpl/courselist.asp?gloc=nh";
			break;
		case "state-nj":
			document.location = "/ggpl/courselist.asp?gloc=nj";
			break;
		case "state-pa":
			document.location = "/ggpl/courselist.asp?gloc=pa";
			break;
		case "state-sc":
			document.location = "/ggpl/courselist.asp?gloc=sc";
			break;
		case "state-tx":
			document.location = "/ggpl/courselist.asp?gloc=tx";
			break;
		case "state-ut":
			document.location = "/ggpl/courselist.asp?gloc=ut";
			break;
		case "state-va":
			document.location = "/ggpl/courselist.asp?gloc=va";
			break;
		case "state-vt":
			document.location = "/ggpl/courselist.asp?gloc=vt";
			break;
		case "state-wi":
			document.location = "/ggpl/courselist.asp?gloc=wi";
			break;
		case "state-wv":
			document.location = "/ggpl/courselist.asp?gloc=wv";
			break;
		case "state-wy":
			document.location = "/ggpl/courselist.asp?gloc=wy";
			break;
		//------------------portal reservation links - province------------------
		case "province-qc":
			document.location = "/ggpl/courselist.asp?gloc=qc";
			break;
		
		//------------------generic------------------
		case "print":
			print();
			break;
		
		//------------------default------------------(use to pass a link directly through)
		default:
			document.location = followthrough;
			break;
	}//end switch
}
function FormatNumberJSV(num,decimalNum,bolLeadingZero,bolParens,bolCommas){
/**********************************************************************
	IN:
		NUM - the number to format
		decimalNum - the number of decimal places to format the number to
		bolLeadingZero - true / false - display a leading zero for
										numbers between -1 and 1
		bolParens - true / false - use parenthesis around negative numbers
		bolCommas - put commas as number separators.
 
	RETVAL:
		The formatted number!
 **********************************************************************/
        //if (isNaN(parseInt(num))) return "NaN";
        if (isNaN(parseFloat(num))) return "NaN";

	var tmpNum = num;
	var iSign = num < 0 ? -1 : 1;		// Get sign of number
	
	// Adjust number so only the specified number of numbers after
	// the decimal point are shown.
	tmpNum *= Math.pow(10,decimalNum);
	tmpNum = Math.round(Math.abs(tmpNum))
	tmpNum /= Math.pow(10,decimalNum);
	tmpNum *= iSign;					// Readjust for sign
	
	
	// Create a string object to do our formatting on
	var tmpNumStr = new String(tmpNum);

	// See if we need to strip out the leading zero or not.
	if (!bolLeadingZero && num < 1 && num > -1 && num != 0)
		if (num > 0)
			tmpNumStr = tmpNumStr.substring(1,tmpNumStr.length);
		else
			tmpNumStr = "-" + tmpNumStr.substring(2,tmpNumStr.length);
		
	// See if we need to put in the commas
	if (bolCommas && (num >= 1000 || num <= -1000)) {
		var iStart = tmpNumStr.indexOf(".");
		if (iStart < 0)
			iStart = tmpNumStr.length;

		iStart -= 3;
		while (iStart >= 1) {
			tmpNumStr = tmpNumStr.substring(0,iStart) + "," + tmpNumStr.substring(iStart,tmpNumStr.length)
			iStart -= 3;
		}		
	}

	// See if we need to use parenthesis
	if (bolParens && num < 0)
		tmpNumStr = "(" + tmpNumStr.substring(1,tmpNumStr.length) + ")";

	return tmpNumStr;		// Return our formatted string!
}


//</script>
