function changeClass(object, newClass) {
	object.className = newClass;
}
function popUp(url,windowName,features) { 
	eval(windowName+"=window.open('"+url+"','"+windowName+"','"+features+"');");
	eval(windowName + ".focus();");
	return false;
}
function goUrl(gourl) { 
	document.location.href= gourl.options[gourl.selectedIndex].value;
}
function validateForm(form) {
	error = '';
	if (form.postcode.value == '') { error = 'You must enter your postcode' }
	if (form.postcode.town == '') { error = 'You must enter your town or city' }
	if (form.address.value == '') { error = 'You must enter your street address' }
	if (form.email.value.indexOf('@') == -1) { error = 'You must enter a valid email address' }
	if (form.surname.value == '') { error = 'You must enter your surname' }
	if (form.firstname.value == '') { error = 'You must enter your firstname' }
	if (error != '') {
		alert(error);
		return false;
	} else {
		return true;
	}
}
function setCurrentSlide(idNo) {
	if (idNo > 5) {
		idNo = 1;
	}
	index = 1;
	while (index <= 5) {
		id = 'homeSpecial' + index;
		if (index != idNo) {
			document.getElementById(id).style.visibility = 'hidden';
		} else {
			document.getElementById(id).style.visibility = 'visible';
		}	
		index++;
	}
	idNo++;
	setTimeout('setCurrentSlide(' + idNo + ')', 7000);
}
function animation(frameNo) {
	ie5  = (document.all && document.getElementById);
	ns6 = (!document.all && document.getElementById);
	for (var i = 2; i<=5; i++) {
		thisOpacity = (frameNo + 500) - (i * 500);
		if (thisOpacity > 500) {
			thisOpacity = 500 - (frameNo - (i * 500));
		}
		if (thisOpacity > 100) {
			thisOpacity = 100;
		}
		if (thisOpacity < 1) {
			thisOpacity = 0;
		}
		if ((frameNo <= 100) && (i = 5)) {
			thisOpacity = 100 - frameNo;
		}
		objectId = 'homeSpecial' + i;
		if (ie5) {
			document.getElementById(objectId).filters.alpha.opacity = thisOpacity;
		}
		if (ns6) {
			document.getElementById(objectId).style.MozOpacity = thisOpacity/100;
		}
		if (thisOpacity <= 0) {
			document.getElementById(objectId).style.visibility = 'hidden';
		} else {
			document.getElementById(objectId).style.visibility = 'visible';
		}
	}
	frameNo = frameNo + 10;
	if (frameNo > 2500) {
		frameNo = 0;
	}
	setTimeout('animation(' + frameNo + ')', 100);
}