
// Content slider functionality (homepage)
function formatText(index, panel) {
		  return index + "";
	    }
    
        $(function () {
        
            $('.anythingSlider').anythingSlider({
                easing: "linear",        // Anything other than "linear" or "swing" requires the easing plugin -- easeInOutExpo
                autoPlay: false,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 3000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 75,             // How long the slide transition takes
                hashTags: false,                 // Should links change the hashtag in the URL?
                buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: false,             // If true, and autoPlay is enabled, the show will pause on hover
        		startText: "Go",             // Start text
		        stopText: "Stop",               // Stop text
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump1").click(function(){
                $('.anythingSlider').anythingSlider(1);
            });
			$("#slide-jump1b").click(function(){
                $('.anythingSlider').anythingSlider(1);
            });
			$("#slide-jump1c").click(function(){
                $('.anythingSlider').anythingSlider(1);
            });


            $("#slide-jump2").click(function(){
                $('.anythingSlider').anythingSlider(2);
            });
			$("#slide-jump2b").click(function(){
                $('.anythingSlider').anythingSlider(2);
            });
			$("#slide-jump2c").click(function(){
                $('.anythingSlider').anythingSlider(2);
            });


            $("#slide-jump3").click(function(){
                $('.anythingSlider').anythingSlider(3);
            });
            $("#slide-jump3b").click(function(){
                $('.anythingSlider').anythingSlider(3);
            });			
            $("#slide-jump3c").click(function(){
                $('.anythingSlider').anythingSlider(3);
            });		
			
        });


// Show/Hide div layers functionality

function toggleLayer( whichLayer1, whichLayer2 )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer1 );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer1];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer1];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';

  var elem2, vis2;
  if( document.getElementById ) // this is the way the standards work
    elem2 = document.getElementById( whichLayer2 );
  else if( document.all ) // this is the way old msie versions work
      elem2 = document.all[whichLayer2];
  else if( document.layers ) // this is the way nn4 works
    elem2 = document.layers[whichLayer2];
  vis2 = elem2.style;
  // if the style.display value is blank we try to figure it out here
  if(vis2.display==''&&elem2.offsetWidth!=undefined&&elem2.offsetHeight!=undefined)
    vis2.display = (elem2.offsetWidth!=0&&elem2.offsetHeight!=0)?'block':'none';
  vis2.display = (vis2.display==''||vis2.display=='block')?'none':'block';
 
}

function validateForm(form) { //This is the name of the function

if (form.name.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Name field"); //Informs user of empty field
   form.name.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form.org.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Organization field"); //Informs user of empty field
   form.org.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
if (form.email.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Email field"); //Informs user of empty field
   form.email.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
if (form.phone.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Phone field"); //Informs user of empty field
   form.phone.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
}

function validateFormR(form) { //This is the name of the function

if (form.nameR.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Name field"); //Informs user of empty field
   form.nameR.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form.orgR.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Organization field"); //Informs user of empty field
   form.orgR.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
if (form.emailR.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Email field"); //Informs user of empty field
   form.emailR.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
if (form.phoneR.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Phone field"); //Informs user of empty field
   form.phoneR.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
}

function validateFormM(form) { //This is the name of the function

if (form.nameM.value == "Enter your name") { //This checks to make sure the field is not empty
   alert("Please fill in the Name field"); //Informs user of empty field
   form.nameM.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form.emailM.value == "Enter your email address") { //This checks to make sure the field is not empty
   alert("Please fill in the Email field"); //Informs user of empty field
   form.emailM.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
}

function validateWall(form) { //This is the name of the function

if (form.NameW.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Name field"); //Informs user of empty field
   form.NameW.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form.EmailW.value == "" || form.EmailW.value.indexOf("@") == -1 || form.EmailW.value.indexOf(".") == -1) { //This checks to make sure the field is not empty
   alert("Please fill in a valid Email address"); //Informs user of empty field
   form.EmailW.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form.OrgW.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Organization field"); //Informs user of empty field
   form.OrgW.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
}


function validateFormDO(form) { //This is the name of the function

if (form.nameDO.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Name field"); //Informs user of empty field
   form.nameDO.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form.orgDO.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Casino Name field"); //Informs user of empty field
   form.orgDO.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
if (form.emailDO.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Email field"); //Informs user of empty field
   form.emailDO.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
if (form.phoneDO.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Phone field"); //Informs user of empty field
   form.phoneDO.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
if (form.TablesDO.value == "") { //This checks to make sure the field is not empty
   alert("Please fill in the Number of Tables field"); //Informs user of empty field
   form.TablesDO.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
   
}




function doClear(theText) {
     if (theText.value == theText.defaultValue) {
         theText.value = ""
     }
 }

