function event_load(obj_event) {
	js_cufon();
	//js_external_links();
	if (document.getElementById("carousel-2")) {		// if there's a second item in the gallery then we need to turn on the slideshow	
		gallery_start();
	} // end if
} // end function
window.onload = event_load;

/* cufon */
function js_cufon() {
	Cufon.replace('h1');
	Cufon.replace('span.title');
	Cufon.replace('strong.highlight');
	Cufon.replace('#social .title');
	Cufon.replace('#telephone');
} // end function

/* gallery */
var int_image_index = 1;
function gallery_update() {
	var obj_image;
	obj_image = document.getElementById("carousel-" + int_image_index);
	if (obj_image) {
		obj_image.style.display = "none";
	} // end if
	int_image_index ++;
	obj_image = document.getElementById("carousel-" + int_image_index);
	if (obj_image) {
		obj_image.style.display = "block";
	} else {
		int_image_index = 1;
		obj_image = document.getElementById("carousel-" + int_image_index);
		if (obj_image) {
			obj_image.style.display = "block";
		} // end if
	} // end if
	gallery_start();
} // end if
function gallery_start() {
	window.setTimeout("gallery_update()", 6000);
} // end function

/* external links */
function js_external_links() { 
	if (!document.getElementsByTagName) return; 
	if (document.location.href.indexOf('admintool.co.uk')<=0) {
		var arr_anchors = document.getElementsByTagName("a"); 
		for (var int_i=0; int_i < arr_anchors.length; int_i ++) { 
			var obj_anchor = arr_anchors[int_i]; 
			if (obj_anchor.getAttribute("href")) {
				if (obj_anchor.getAttribute("href").indexOf("http")>=0 || obj_anchor.getAttribute("href").indexOf(".pdf")>=0){
					obj_anchor.target = "_blank"; 
				} // end if
			} //end if 
		} // end for
	} // end if
} // end function 

