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 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_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); 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 clearDefault(el) {
	if (el.defaultValue==el.value) el.value = ""
}


// clears default values on forms, onfocus
function clearDefault(el) {
	if (el.defaultValue==el.value) el.value = ""
}

var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'images/home/hdr01.jpg'
theImages[1] = 'images/home/hdr02.jpg'
theImages[2] = 'images/home/hdr03.jpg'
theImages[3] = 'images/home/hdr04.jpg'
theImages[4] = 'images/home/hdr05.jpg'
theImages[5] = 'images/home/hdr06.jpg'
theImages[6] = 'images/home/hdr07.jpg'
theImages[7] = 'images/home/hdr07.jpg'
theImages[8] = 'images/home/hdr08.jpg'
theImages[9] = 'images/home/hdr09.jpg'
theImages[10] = 'images/home/hdr10.jpg'
theImages[11] = 'images/home/hdr11.jpg'
theImages[12] = 'images/home/hdr12.jpg'
theImages[13] = 'images/home/hdr13.jpg'
theImages[14] = 'images/home/hdr14.jpg'
theImages[15] = 'images/home/hdr16.jpg'
theImages[16] = 'images/home/hdr17.jpg'
theImages[17] = 'images/home/hdr18.jpg'
theImages[18] = 'images/home/hdr19.jpg'
theImages[19] = 'images/home/hdr20.jpg'
theImages[20] = 'images/home/hdr21.jpg'

// do not edit anything below this line

var j = 0
var p = theImages.length;
/*var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}*/
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'" alt="Digital Sports - All Kids. All Sports. All Activities.">');
}

var theImagessmall = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImagessmall[0] = 'images/interior/hdr01.jpg'
theImagessmall[1] = 'images/interior/hdr02.jpg'
theImagessmall[2] = 'images/interior/hdr03.jpg'
theImagessmall[3] = 'images/interior/hdr04.jpg'
theImagessmall[4] = 'images/interior/hdr05.jpg'
theImagessmall[5] = 'images/interior/hdr06.jpg'
theImagessmall[6] = 'images/interior/hdr07.jpg'
theImagessmall[7] = 'images/interior/hdr08.jpg'
theImagessmall[8] = 'images/interior/hdr09.jpg'
theImagessmall[9] = 'images/interior/hdr10.jpg'
theImagessmall[10] = 'images/interior/hdr11.jpg'
theImagessmall[11] = 'images/interior/hdr12.jpg'
theImagessmall[12] = 'images/interior/hdr13.jpg'

// do not edit anything below this line

var j = 0
var p = theImagessmall.length;
/*var preBuffersmall = new Array()
for (i = 0; i < p; i++){
   preBuffersmall[i] = new Image()
   preBuffersmall[i].src = theImagessmall[i]
}*/
var whichImagesmall = Math.round(Math.random()*(p-1));
function showImagesmall(){
document.write('<img src="'+theImagessmall[whichImagesmall]+'">');
}

var lmImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

lmImages[0] = 'images/lm_menu/lm_header1.jpg'
lmImages[1] = 'images/lm_menu/lm_header2.jpg'
lmImages[2] = 'images/lm_menu/lm_header3.jpg'
lmImages[3] = 'images/lm_menu/lm_header4.jpg'
lmImages[4] = 'images/lm_menu/lm_header5.jpg'
/*
lmImages[0] = 'images/lm_menu/hdr_lm_01.jpg'
lmImages[1] = 'images/lm_menu/hdr_lm_02.jpg'
lmImages[2] = 'images/lm_menu/hdr_lm_03.jpg'
lmImages[3] = 'images/lm_menu/hdr_lm_04.jpg'
*/
// do not edit anything below this line

var j = 0
var p = lmImages.length;
/*var preBufferLM = new Array()
for (i = 0; i < p; i++){
   preBufferLM[i] = new Image()
   preBufferLM[i].src = lmImages[i]
}*/
var whichLMImage = Math.round(Math.random()*(p-1));
function showLeagueMinderImage(){
document.write('<img src="'+lmImages[whichLMImage]+'">');
}

// Custom validation functions
function fnCheckFieldEmptiness(field)
{
	if (field != null)
	{
		if (field.value == null || field.value.length == 0)
		{
			return false;
		}
		return true;
	}
	return false;
}

function fnCheckEmailAddressValidity(field)
{
	if (field != null)
	{
		if (field.value == null || field.value.length == 0 || field.value.indexOf("@") == -1)
		{
			return false;
		}
		return true;
	}
	return false;
}