function addLoadEvent(func) {    var oldonload = window.onload;    if (typeof window.onload != 'function') { window.onload = func; }    else {    	window.onload = function() {			if (oldonload) {				oldonload();            	}			func();        	}    	}	}addLoadEvent(function() {	/*	var depts	if ((depts = document.getElementById('depts'))) {		depts.style.display = 'none'		deptSwitch = document.getElementById('depts_switch')		deptSwitch.onclick = openDepts		deptSwitch.departments = depts		}	*/	})function openDepts() {	this.style.backgroundColor = '#a5a5bf'	this.style.color = '#a5a5bf'	this.style.backgroundImage = 'none'	this.departments.style.display = 'block'	}function mapInfo() {	var tempDiv	if ((tempDiv = document.getElementById('sessionForm'))) {		this.myDiv = tempDiv		}	if ((tempDiv = document.getElementById('bramptonMap'))) {		this.myLat = '54.944129'		this.myLong = '-2.735682'		this.descr = '<div>Brampton Community Centre, <br>The Irthing Centre, <br>Union Lane, <br>Brampton CA8 1BX</div>'		this.myDiv = tempDiv		}	if ((tempDiv = document.getElementById('houghtonMap'))) {		this.myLat = '54.92581'		this.myLong = '-2.925239'		this.descr = '<div>The Village Hall, <br>Houghton, <br>Carlisle CA3 0LD</div>'		this.myDiv = tempDiv		}	if ((tempDiv = document.getElementById('mortonMap'))) {		this.myLat = '54.89178'		this.myLong = '-2.952576'		this.descr = '<div>Wigton Road Methodist Church, <br>Wigton Road, <br>Carlisle CA2 7ES</div>'		this.myDiv = tempDiv		}	if ((tempDiv = document.getElementById('stanwixMap'))) {		this.myLat = '54.904683'		this.myLong = '-2.935109'		this.descr = '<div>St Michael\'s Parish Centre, <br>St Michael\'s Church, Stanwix, <br>Carlisle CA3 9DJ</div>'		this.myDiv = tempDiv		}	}addLoadEvent(function() {		var myMapInfo = new mapInfo()		if (document.getElementById("map_canvas")) {		var map = new GMap2(		document.getElementById("map_canvas"));		map.setCenter(		new GLatLng(myMapInfo.myLat,myMapInfo.myLong), 15);		map.addControl(new GLargeMapControl());		map.addControl(new GMapTypeControl());		var lsc = new google.maps.LocalSearch();		map.addControl(new google.maps.LocalSearch());		function createMarker(point, text, title) {			var marker =			new GMarker(point,{title:title});			GEvent.addListener(				marker, "click", function() {					marker.openInfoWindowHtml(text);					});			return marker;			}        		var marker = createMarker(			new GLatLng(myMapInfo.myLat,myMapInfo.myLong),        	myMapInfo.descr,        	'Venue'        	);		map.addOverlay(marker);		}		})addLoadEvent(function() {		var movieName, elementName, mwidth, mheight		if ((document.getElementById('index'))) {		movieName = 'newIntro.swf'		elementName = 'head'		mwidth = '460'		mheight = '100'		}	else {		movieName = 'introSmallAlt.swf'		elementName = 'head'		mwidth = '240'		mheight = '48'		}	var flashvars = {};	var params = {};	params.wmode = "transparent";	var attributes = {};	swfobject.embedSWF(movieName,elementName,mwidth,mheight,'5.0.0',false,flashvars,params,attributes);		if ((document.getElementById('emsphp'))) {		movieName = 'http://www.youtube.com/v/Ro8YWMnTHPM&hl=en&fs=1'		elementName = 'pgMovie'		mwidth = '320'		mheight = '240'		params.allowscriptaccess = 'always'		params.allowfullscreen = 'true'		swfobject.embedSWF(movieName,elementName,mwidth,mheight,'5.0.0',false,flashvars,params,attributes);		}		})addLoadEvent(function() {        var myParent    var MyPara = {}    var MyContacts = myContacts()	var MyDomain = myDomain()        if ((myParent = document.getElementById('e-contact'))) {    	var myImages = myParent.getElementsByTagName('img')    	for (i in MyContacts) {    		MyPara[i] = document.createElement('p');    		MyPara[i].appendChild(document.createTextNode(MyContacts[i][0]));    		if (MyContacts[i][1] == 1) MyPara[i].appendChild(document.createElement('br'));    		var myLink = document.createElement('a');    		var myEmailAddress = MyContacts[i][2] + '@' + MyDomain[i];    		var myCompleteEmail = 'mailto:' + myEmailAddress;    		myLink.setAttribute('href',myCompleteEmail);    		myLink.appendChild(document.createTextNode(myEmailAddress));    		MyPara[i].appendChild(myLink);    		MyPara[i].appendChild(document.createTextNode(MyContacts[i][3]));    		myParent.appendChild(MyPara[i]);    		myImages[i].style.display = 'none';    		}    	}			})	addLoadEvent(function() {	var myLinks	if ((myLinks = document.getElementsByTagName('a'))) {		var myWinLink;		var MyLink;		for (i in myLinks) {			if (isInteger(i)) {				MyLink = myLinks[i]				var linkClassObject = myLinks[i].getAttributeNode('class');				if (linkClassObject != null) {					myWinLink = linkClassObject.value;					var urlClassObject = myLinks[i].getAttributeNode('href');					if (urlClassObject != null) myWinURL = urlClassObject.value;					MyLink.item = winLinks(myWinLink,myWinURL);					MyLink.onclick = newWindow;					}				}			}		}		})function myWindow(myURL,myWidth,myHeight,myNav,myRelative) {	this.myURL = myURL;	this.myWidth = myWidth;	this.myHeight = myHeight;	this.myNav = myNav;	this.myRelative = myRelative;	}function winLinks(myClass,myURL) {	var myLinks = {}	myLinks['iWindow'] = new myWindow(myURL,340,620,'no','child')	myLinks['fullWindow'] = new myWindow(myURL,800,600,'no','child')	var myNewWindow = myLinks[myClass];	return  myNewWindow	}	function newWindow() {	var thisWin;	var myWin = this.item;	if (myWin) {		if (myWin.myRelative == 'parent') {			updateParent(myWin.myURL);			window.close();			}		else {			thisWin = window.open(myWin.myURL,'popup','toolbar=' + myWin.myNav + ',location=' +  myWin.myNav + ',scrollbars=yes,resizable=yes,width=' + myWin.myWidth + ',height=' + myWin.myHeight);			thisWin.focus();			return false;			}		}	}function myContacts() {	var MyContacts = [    		['',0,'helen','']    	]	return MyContacts	}function myDomain() {	var MyDomain = [		'musicmakers-cumbria.co.uk'		]	return MyDomain	}function updateParent(newURL) {	opener.document.location = newURL	}function isInteger(s) {	return (s.toString().search(/^-?[0-9]+$/) == 0);	}