var linkText = new Array(6);
  linkText[0] = "Interactive Directory of Golf Courses offering savings with the Greens\' Fee Passport";
  linkText[1] = "Learn of the increadible Savings to be enjoyed with the Greens\' Fee Passport";
  linkText[2] = "Order your copy of the Greens\' Fee Passport Right Now!";
  linkText[3] = "Contact the Greens\' Fee Passport";
  linkText[4] = "See a list of Retailers associated with the Greens\' Fee Passport";
  linkText[5] = "Learn more about the Free Cart Program";
  linkText[6] = "Greens\' Fee Passport Home";
  linkText[7] = "Read what real people are saying about the Greens\' Fee Passport.";
  linkText[8] = "Click here to check for more offers now available in the Member\'s Club.";
defaultStatus = '';
var theDate;
var theTime;
function getNowTime(which) {
				 var d, numD, numM, Y
				 arrMonth = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
				 d = new Date();
				 numD = d.getDate();
				 numM = d.getMonth();
				 y = d.getFullYear();
				 ampm = "am";
				 tH = d.getHours();
				 if(tH>12) {
				 					 tH = tH-12;
									 ampm = "pm";
									 }
				 if(tH==12) {ampm = "pm"};
				 tM = d.getMinutes();
				 if(tM<10) {tM = "0"+tM+""};
				 theDate = arrMonth[numM]+" "+numD+", "+y+"";
				 theTime = tH+":"+tM+" "+ampm+"";
				 if (which=="date") {
				 				 return theDate;
				 } else if (which=="time") {
				 	 			 return theTime;
				 }
}
function MM_displayStatusMsg(msgStr)  { //v3.0
	status=msgStr; document.MM_returnValue = true;
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function hilite(Ordinal) {
  // this will only work for the superior css handling IE browers
	// DOWN WITH NETSCAPE!!@#$@#%$%&$^&*&$@#^@#$^%^%&*#^@%^#^$@#^@%
	Ordinal+=ordOffset;
  document.links[Ordinal].style.color = '669966';
}

function lowlite(Ordinal) {
  // this will only work for the superior css handling IE browers
	// DOWN WITH NETSCAPE!!@#$@#%$%&$^&*&$@#^@#$^%^%&*#^@%^#^$@#^@%
	Ordinal+=ordOffset;
  document.links[Ordinal].style.color ='';
}

function open_win(url, pName, pWidth, pHeight) {
	newWin = window.open(url,pName,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+pWidth+',height='+pHeight+',left=60,top=50');
	newWin.focus();
}

function open_info(url, pName, pWidth, pHeight) {
	newWin = window.open(url,pName,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+(pWidth+17)+',height='+pHeight+',left=60,top=50');
	newWin.focus();
}

function go_home() {
  window.location.href = "home.htm"
}

function open_order() {
  var theHeight = screen.availHeight-30;
  if (screen.availWidth<660) {
    var theWidth=screen.availWidth-10;
  } else {
    var theWidth=660;
  }
  var msg=open('https://secure1.brinkster.com/greensfee/order/index.asp','order','toolbar=no,height='+theHeight+',width='+theWidth+',directories=no,status=no,scrollbars=yes,resize=yes,menubar=no,top=0,left=0');
}

function open_special_order() {
  var theHeight = screen.availHeight-30;
  if (screen.availWidth<660) {
    var theWidth=screen.availWidth-10;
  } else {
    var theWidth=660;
  }
  var msg=open('https://secure1.brinkster.com/greensfee/index.asp','order','toolbar=no,height='+theHeight+',width='+theWidth+',directories=no,status=no,scrollbars=yes,resize=yes,menubar=no,top=0,left=0');
}

function open_code_order() {
  var theHeight = screen.availHeight-30, c = document.order_code.code.value, d = document.order_code.error ;
  if (screen.availWidth<660) {
    var theWidth=screen.availWidth-10;
  } else {
    var theWidth=660;
  }
  
  if (c.toUpperCase()=="MASTERS") {
	var msg=open('https://secure1.brinkster.com/greensfee/masters_order/index.asp','order','toolbar=no,height='+theHeight+',width='+theWidth+',directories=no,status=no,scrollbars=yes,resize=yes,menubar=no,top=0,left=0');
  	msg.focus();
  } else {
	d.value = "Sorry, double check the code that you've entered and try agian.";
  }
  return false
}

function check_code_order_error() {
	var t = document.location.href;
	t = t.split("&error=");
	var errorMessage="", tt = t[1];
	tt = tt.split("+");
	for (var i=0;i<tt.length;i++) {
		errorMessage = errorMessage + unescape(tt[i]) + " ";
	}
	var x = document.getElementById("errorMessage");
	if (x!=null) { x.innerHTML = errorMessage }
}

function check_search_name() {
  var obj = document.search_name;
  var svName = obj.what.value;
	if (svName=="") {
		 alert("Please enter some text criteria to seach against.");
	} else {
		 obj.submit();
	}
}

function open_basic(url) {
	myWin = window.open(url, "gfp_link");
	myWin.focus();
}

function open_members_club_win(url, pName, pWidth, pHeight) {
	var mytop=0, myleft=0, scollers="scrollbars=1,";
	//if (parseInt(pWidth)>screen.availWidth) {pWidth = (screen.availWidth);myleft=0;scollers="scrollbars=1,"}
	//if (parseInt(pHeight)>screen.availHeight) {pHeight = (screen.availHeight-34);mytop=0;pWidth=pWidth+17;scollers="scrollbars=1,"}
	pHeight = (screen.availHeight-34);
	pWidth = screen.availWidth;
	newWin = window.open(url+'?u_name=u&p_word=p',pName,scollers+'toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no,width='+pWidth+',height='+pHeight+',left='+myleft+',top='+mytop);
	newWin.focus();
}
function previewEvent(pWho) {
	var xx = screen.availWidth, yy = screen.availHeight, width = 760, height=585, x, y;
	x = (xx/2)-(width/2); y = (yy/2)-(height/2);
	var newWin = window.open('event_viewer.asp?id='+pWho,'events','scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no,width='+width+',height='+height+',left='+x+',top='+y);
	newWin.focus();
}