var bEnableMouseOver = true;
var bPreLoaded = false;
var imgs, previmgs, nextimgs;
function preLoadImgs() {
	imgs = new Object();
	previmgs = new Object();
	nextimgs = new Object();
	buttons_hi = new Object();
	imgs.off = new Image();
	imgs.off.src = '/thetahealing/images/1pix.png';

	imgs.introduction = new Image();
	imgs.introduction.src = '/thetahealing/images/nav_introduction_on.png';
	previmgs.introduction = new Image();
	previmgs.introduction.src = '/thetahealing/images/nav_introduction_prevon.png';
	imgs.courses = new Image();
	imgs.courses.src = '/thetahealing/images/nav_courses_on.png';
	nextimgs.courses = new Image();
	nextimgs.courses.src = '/thetahealing/images/nav_courses_nexton.png';
	previmgs.courses = new Image();
	previmgs.courses.src = '/thetahealing/images/nav_courses_prevon.png';
	imgs.shop = new Image();
	imgs.shop.src = '/thetahealing/images/nav_shop_on.png';
	nextimgs.shop = new Image();
	nextimgs.shop.src = '/thetahealing/images/nav_shop_nexton.png';
	previmgs.shop = new Image();
	previmgs.shop.src = '/thetahealing/images/nav_shop_prevon.png';
	imgs.more = new Image();
	imgs.more.src = '/thetahealing/images/nav_more_on.png';
	nextimgs.more = new Image();
	nextimgs.more.src = '/thetahealing/images/nav_more_nexton.png';
	previmgs.more = new Image();
	previmgs.more.src = '/thetahealing/images/nav_more_prevon.png';
	imgs.aboutus = new Image();
	imgs.aboutus.src = '/thetahealing/images/nav_aboutus_on.png';
	nextimgs.aboutus = new Image();
	nextimgs.aboutus.src = '/thetahealing/images/nav_aboutus_nexton.png';
	previmgs.aboutus = new Image();
	previmgs.aboutus.src = '/thetahealing/images/nav_aboutus_prevon.png';
	imgs.testimonials = new Image();
	imgs.testimonials.src = '/thetahealing/images/nav_testimonials_on.png';
	nextimgs.testimonials = new Image();
	nextimgs.testimonials.src = '/thetahealing/images/nav_testimonials_nexton.png';
	buttons_hi.small_purple2 = new Image();
	buttons_hi.small_purple2.src = '/thetahealing/images/button_small_purple2_hi.jpg';
	buttons_hi.small_bluegrey = new Image();
	buttons_hi.small_bluegrey.src = '/thetahealing/images/button_small_bluegrey_hi.jpg';
	buttons_hi.small_pink = new Image();
	buttons_hi.small_pink.src = '/thetahealing/images/button_small_pink_hi.jpg';
	buttons_hi.small_midgreen = new Image();
	buttons_hi.small_midgreen.src = '/thetahealing/images/button_small_midgreen_hi.jpg';
	bPreLoaded = true;
}
var imgsOn = new Object();
function imgOn(img) {
	if (!bPreLoaded || !bEnableMouseOver) {
		return;
	}
	var prev = "off";
	var next = "off";
	var bNext = false;
	for (var sectionid in imgs) {
		if (bNext) {
			next = sectionid;
			break;
		}
		if (img == sectionid) {
			bNext = true;
		} else {
			prev = sectionid;
		}
	}
	
	imgsOn = new Object();
	
	document[img].src = imgs[img].src;
	imgsOn[img] = 1;
	
	if (prev != "off") {
		document[prev].src = previmgs[prev].src;
		imgsOn[prev] = 1;
	}
	if (next != "off") {
		document[next].src = nextimgs[next].src;
		imgsOn[next] = 1;
	}
}
function imgOff() {
	for (var img in imgsOn) {
		document[img].src = imgs.off.src;
	}
}
if (navigator.appName == "Opera") {
	document.onmousedown=function(e) {
		return e.target.tagName != null && e.target.tagName.search("^(INPUT|TEXTAREA|SELECT)$") != -1;
	}
}

function checkCids(fm) {
	for (var i = 0; i < fm['cids2[]'].length; i++) {
		if (fm['cids2[]'][i].checked) {
			return true;
		}
	}
	alert('Please tick the boxes next to the ones you wish to book/purchase.');
	return false;
}