<!--

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 doNewsRegion(intRegion){
	document.location.href='/news.htm?region='+intRegion;
}

function doValidateEmail(objF) {
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(objF.email.value)){
			alert("Please enter a valid email address");
		objF.email.focus();
		return false;
	}
}

function openWindow(theURL,winName,features, myWidth, myHeight, isCenter){
	if(window.screen)if(isCenter)if(isCenter=="true"){
		var myLeft = (screen.width-myWidth)/2;
		var myTop = (screen.height-myHeight)/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
	}
	window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function doSwitchMemberService(strURL){
	document.location.href=strURL;
}

function doValidateFB(objF){
	var intChecked = new Array();
	for (i=0; i<objF.elements.length; i++){
		if(objF.elements[i].name.match(/m\_/) != null){
			if(objF.elements[i].type == "radio"){
				objTemp = eval('objF.'+objF.elements[i].name);
				intChecked[i] = 0;
				for (j=0; j<objTemp.length; j++){
					if(objTemp[j].checked){
						intChecked[i] = 1;
					}
				}
				if(intChecked[i] != 1){
					strFieldName = objF.elements[i].name.replace(new RegExp('^m\_|\_','g'),' ');
					alert("Please choose an appropriate option for: "+strFieldName);
					objF.elements[i].focus();
					return false;
				}
			}
			else{
				if(!objF.elements[i].value){
					strFieldName = objF.elements[i].name.replace(new RegExp('^m\_|\_','g'),' ');
					alert("Please fill in the following field: "+strFieldName);
					objF.elements[i].focus();
					return false;
				}
			}
		}
	}
}

function doValidateDonate(objF,intType){
	var c = 0;
	var intAmount = objF.varAmount.value;
	for (i=0; i<objF.elements.length; i++){
		if(objF.elements[i].type == "radio"){
			objTemp = eval('objF.'+objF.elements[i].name);
			for (j=0; j<objTemp.length; j++){
				if(objTemp[j].checked){
					c++;
					intAmount = objTemp[j].value;
				}
			}
		}
	}
	if(intType == 1){
		if((c == 0)&&(!objF.varAmount.value)){
			alert("Please specify a donation amount.");
			return false;
		}
		objF.amount.value=intAmount;
		intFullAmount = intAmount * 1;
	}
	else{
		if((c == 0)&&(!objF.varAmount.value)){
			alert("Please specify a donation amount.");
			return false;
		}
		if(!objF.intervalMult.value){
			alert("Please specify how often you wish to donate.");
			objF.intervalMult.focus();
			return false;
		}
		if(!objF.intervalUnit.value){
			alert("Please specify how often you wish to donate.");
			objF.intervalUnit.focus();
			return false;
		}
		objF.normalAmount.value=intAmount;
		if(objF.intervalUnit.value == 3){
			intMult = objF.intervalMult.value * 1;
			if(intMult <= 12){
				intFullAmount = intAmount * (12/intMult);
			}
			if(intFullAmount < 25){
				var conf = confirm("To receive our newsletters, you must donate at least £25.00 over 12 months.\nPress 'Cancel' if you wish to go back and increase your donation, or press 'OK' to continue with your current amount.");
				if(!conf){
					return false;
				}
			}
			
		}
		else{
			if(objF.intervalUnit.value == 4){
				intFullAmount = intAmount * 1;
			}
			if(intFullAmount < 25){
				var conf = confirm("To receive our newsletters, you must donate at least £25.00.\nPress 'Cancel' if you wish to go back and increase your donation, or press 'OK' to continue with your current amount.");
				if(!conf){
					return false;
				}
			}
		}
	}
}

function doSwitchAmount(intType){
	var objF = document.forms['dform'];
	if(intType == 1){
		objF.varAmount.value = '';
	}
	else{
		for (i=0; i<objF.elements.length; i++){
			if(objF.elements[i].type == "radio"){
				objTemp = eval('objF.'+objF.elements[i].name);
				for (j=0; j<objTemp.length; j++){
					objTemp[j].checked = false;
				}
			}
		}
	}
}

function doGreyRegions(intTask){
	objF = document.forms['regform'];
	for (i=0;i<objF.elements.length;i++){
		if(objF.elements[i].name.indexOf("temp_displayregion_") > -1){
			if(intTask == 2){
				objF.elements[i].checked = true;
				//objF.elements[i].disabled = true;
			}
			else{
				objF.elements[i].checked = false;
				//objF.elements[i].disabled = false;
			}
		}
	}
}

-->
