function loadFancyBoxControls(){
  		$(document).ready(function() {

			$("#rank-link").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic'
			});
			if(isDraftManager == 1) {
			  $(".playercell").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'none'
			});
			}
        });
}


function validatePwd() {
var invalid = " "; // Invalid character is a space
var minLength = 4; // Minimum length
var maxLength = 16; // Max length
var pw1 = document.xdraftform.password.value;
var pw2 = document.xdraftform.password2.value;
// check for a value in both fields.
if (pw1 == '' || pw2 == '') {
alert('Please enter your password twice.');
return false;
}
// check for minimum length
if (document.xdraftform.password.value.length < minLength) {
alert('Your password must be at least ' + minLength + ' characters long. Try again.');
return false;
}
// check for max length
if (document.xdraftform.password.value.length > maxLength) {
alert('The max password length is ' + maxLength + '.');
return false;
}
// check for spaces
if (document.xdraftform.password.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
else {
if (pw1 != pw2) {
alert ("Make sure your passwords match!.");
return false;
}
else {
return true;
      }
   }
}
