function checkblank() {
	searchterm = document.getElementById('s').value;
	if (searchterm == null || searchterm == "") {
		alert("Please enter something to search for.");
		return false;
	} else {
		return true;
	}
}

function goToByScroll(id){
     	$('html,body').animate({scrollTop: $("#"+id).offset().top},'slow');
}

function swapmap(region) {
var themap = document.getElementById('mapmap');
themap.src='/wp-content/themes/qaihc/images/map-'+region+'.jpg';
}

$(document).ready(function() {
	$("a.fancybox").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'padding'	:	0,
		'opacity'	:	true
	});
});

function subscribe() {
var yournameid = document.getElementById('yourname');
var youremailid = document.getElementById('youremail');
if (yournameid.value != '' && youremailid.value != '') {
$.fancybox({ 
'width'			: 450,
'height'		: 260,
'padding'		: 0,
'centerOnScroll'	: true,
'overlayOpacity'	: 0.3,
'overlayColor'		: '#111',
'opacity'		: true,
'autoScale'		: false,
'transitionIn'		: 'elastic',
'transitionOut'		: 'elastic',
'href'		: '/js/createsend/Subscriber.Add.php?name='+yournameid.value+'&email='+youremailid.value,
'type'			: 'iframe'
});
} else {
alert('Please enter a valid name and email.');
}
}

