


function thisMovie(movieName) {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
};

function getQueryVariable(variable) {
            var query = window.location.search.substring(1);
            var vars = query.split("&");
            for (var i=0;i<vars.length;i++) {
                var pair = vars[i].split("=");
                if (pair[0] == variable) {
            return pair[1];
                }
            }
        }
        
function holebuttons()
{
        hole=getQueryVariable('hole');
           
            if (hole != undefined)
                {document.form1.currentHole.value=hole;}
            else
                {hole=document.form1.currentHole.value;}
                
            
            var holeint = parseInt(hole);
        var maxint = parseInt(document.form1.MaxHole.value);
            
            if (holeint == maxint)
            { nexthole = 1;}
            else
            {nexthole = holeint + 1;}
            
            if (holeint==1)
            {previoushole = maxint;}
            else
            {previoushole = holeint - 1;}
            document.write('<center>');
            document.write('<a href="badlands.aspx?hole='+ previoushole+'&fln=2~../../../../productions/golf/badlands/videos/hole'+ previoushole+'"><- Previous Hole </a>');
            document.write('&nbsp;&nbsp;&nbsp; <a href="badlands.aspx?hole='+nexthole+'&fln=2~../../../../productions/golf/badlands/videos/hole'+nexthole+'">Next Hole -></a>');
            document.write('</center>');

}

function initform() {
            hole=getQueryVariable('hole');
           
            if (hole != undefined)
                {document.form1.currentHole.value=hole;}
            else
                {hole=document.form1.currentHole.value;}
                
            
            var holeint = parseInt(hole);
            
            
                
            showholedetails(hole);
        }
        
function showholedetails(hole)
    {   maxhole= parseInt(document.form1.MaxHole.value)
           
         var holeint=parseInt(hole);    
        for (var x = 1; x <= maxhole; x++)
           {
           
            if (x==holeint)
               {document.getElementById('details_'+x).style.display = 'block';
               }
            else
                {document.getElementById('details_'+x).style.display = 'none';
                
                }
            
           }
           
           
           
            
            
      }