<!--
function OKCancel(question) {
	if (confirm(question)) {
		return true;
	} else {
		return false;
	}
}

function builde(x, linkwords, classname, subject) {
	var e, dom, td;
	dom = 'smartprocoaching';
	td = 'com';
	e = x + '@' + dom + '.' + td;
	
	if (subject == ''){
		subject = 'Enquiry from Website'
	}
	
	if (linkwords != '') {
		document.write('<a href="mailto:' + e + '?subject=' + subject + '" class="' + classname + '">' + linkwords + '</a>');
	} else {
		document.write('<a href="mailto:' + e + '?subject=' + subject + '" class="' + classname + '">' + e + '</a>');
	}
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function textCounter(field,cntfield,maxlimit) {
	if (field.value.length > maxlimit)
		field.value = field.value.substring(0, maxlimit);
	else
		cntfield.value = maxlimit - field.value.length;
	}

function submitForm(i) {
	document.forms[i].submit();
}

function checkSubmit(btnPressed) {
	if (btnPressed == "Pay") {
		if (document.forms['CartForm'].ConfirmReadTC.checked == 1) {
			return true;
		} else {
			alert("Please tick the box to acknowledge you have read and accept our Terms and Conditions.");
			return false;
		}
	} else {
		return false;
	}
}

function confirmThis(i, gotoPage) {
	var message=new Array();
	message[0]="If you navigate away from this page now, your changes won\'t be saved.\nYou can always create your Groups after saving your current changes.\n\nClick OK to Add a Group now, or Cancel to stay on this page.";
	message[1]="Are you sure you want to delete this record?";
	message[2]="Are you sure you want to send this email?";
	message[3]="This will immediately place a voice call to Smartpro Coaching\nif you have Skype installed and running.\n\nDo you want to continue?";
	message[4]="Suspending this Player\'s logon works by erasing their password.\n\nTo allow them back on to the system again at a later date, you will need to send the Player a new password.\n\nDo you want to continue?";
	message[5]="If you navigate away from this page now, your changes won\'t be saved.\nYou can always create your Smart Sheet Groups after saving your current changes.\n\nClick OK to Add a Smart Sheet Group now, or Cancel to stay on this page.";
	message[6]="If you navigate away from this page now, any changes you\'ve made won\'t be saved.\n\nClick OK to Continue, or Cancel to stay on this page.";
	message[7]="You are about to delete this person completely from the system."
	message[7] = message[7] + "\n\n"
	message[7] = message[7] + "Please note that the delete will fail if the system still has other data, such as Smart Sheets, attached to this person.";
	message[7] = message[7] + "\n\n"
	message[7] = message[7] + "ARE YOU SURE YOU WANT TO CONTINUE?"
	message[7] = message[7] + "\n\n"
	message[7] = message[7] + "Click OK to Continue, or Cancel to abort the delete.";

	var r=confirm(message[i]);
		if (r==true) {
			window.location = gotoPage;
		} else {
			return false;
		}
	}

function showHide(shID) {
	if (document.getElementById(shID)) {
		if (document.getElementById(shID+'-show').style.display != 'none') {
			document.getElementById(shID+'-show').style.display = 'none';
			document.getElementById(shID).style.display = 'block';
		}
		else {
			document.getElementById(shID+'-show').style.display = 'inline';
			document.getElementById(shID).style.display = 'none';
		}
	}
}
function showHide2(shID) {
	if (document.getElementById(shID)) {
		if ((document.getElementById(shID).style.display == 'none') || (document.getElementById(shID).style.display == '')) {
			document.getElementById(shID).style.display = 'block';
		} else {
			document.getElementById(shID).style.display = 'none';
		}
	}
}
function showBlock(shID) {
	if (document.getElementById(shID)) {
			document.getElementById(shID).style.display = 'block';
	}
}
function hideBlock(shID) {
	if (document.getElementById(shID)) {
			document.getElementById(shID).style.display = 'none';
	}
}

//CSS PopUp
function toggle_window(div_id) {
	var el = document.getElementById(div_id);
	if ( el.style.display == 'none' ) {	el.style.display = 'block';}
	else {el.style.display = 'none';}
}
function blanket_size(popUpDivVar) {
	if (typeof window.innerWidth != 'undefined') {
		viewportheight = window.innerHeight;
	} else {
		viewportheight = document.documentElement.clientHeight;
	}
	if ((viewportheight > document.body.parentNode.scrollHeight) && (viewportheight > document.body.parentNode.clientHeight)) {
		blanket_height = viewportheight;
	} else {
		if (document.body.parentNode.clientHeight > document.body.parentNode.scrollHeight) {
			blanket_height = document.body.parentNode.clientHeight;
		} else {
			blanket_height = document.body.parentNode.scrollHeight;
		}
	}
	var blanket = document.getElementById('blanket');
	blanket.style.height = blanket_height + 'px';
	var popUpDiv = document.getElementById(popUpDivVar);
	popUpDiv_height=blanket_height/2-150;//150 is half popup's height
	popUpDiv.style.top = popUpDiv_height + 'px';
}
function window_pos(popUpDivVar) {
	if (typeof window.innerWidth != 'undefined') {
		viewportwidth = window.innerHeight;
	} else {
		viewportwidth = document.documentElement.clientHeight;
	}
	if ((viewportwidth > document.body.parentNode.scrollWidth) && (viewportwidth > document.body.parentNode.clientWidth)) {
		window_width = viewportwidth;
	} else {
		if (document.body.parentNode.clientWidth > document.body.parentNode.scrollWidth) {
			window_width = document.body.parentNode.clientWidth;
		} else {
			window_width = document.body.parentNode.scrollWidth;
		}
	}
	var popUpDiv = document.getElementById(popUpDivVar);
	window_width=window_width/2-150;//150 is half popup's width
	popUpDiv.style.left = window_width + 'px';
}
function popup(windowname) {
	blanket_size(windowname);
	window_pos(windowname);
	toggle_window('blanket');
	toggle_window(windowname);		
}
//-->
