// Modernizr v1.7  www.modernizr.com
window.Modernizr=function(a,b,c){function G(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=!!(a[b]in l);return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return!!E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c&&(!b||b(a[d],j)))return!0}function D(a,b){return(""+a).indexOf(b)!==-1}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="1.7",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v,w=function(a){var c=b.createElement("style"),d=b.createElement("div"),e;c.textContent=a+"{#modernizr{height:3px}}",h.appendChild(c),d.id="modernizr",g.appendChild(d),e=d.offsetHeight===3,c.parentNode.removeChild(c),d.parentNode.removeChild(d);return!!e},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div");var f=(d="on"+d)in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y=({}).hasOwnProperty,z;C(y,c)||C(y.call,c)?z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)}:z=function(a,b){return y.call(a,b)},r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return a.getContext&&a.getContext("2d")},r.canvastext=function(){return e.canvas&&C(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return"ontouchstart"in a||w("@media ("+o.join("touch-enabled),(")+"modernizr)")},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b<c;){var d=p[b].toLowerCase();if(a[d+"_indexedDB"]||a[d+"IndexedDB"])return!0}return!1},r.hashchange=function(){return x("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return !!(a.history&&history.pushState)},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){return"WebSocket"in a},r.rgba=function(){A("background-color:rgba(150,255,150,.5)");return D(k.backgroundColor,"rgba")},r.hsla=function(){A("background-color:hsla(120,40%,100%,.5)");return D(k.backgroundColor,"rgba")||D(k.backgroundColor,"hsla")},r.multiplebgs=function(){A("background:url(//:),url(//:),red url(//:)");return(new RegExp("(url\\s*\\(.*?){3}")).test(k.background)},r.backgroundsize=function(){return F("backgroundSize")},r.borderimage=function(){return F("borderImage")},r.borderradius=function(){return F("borderRadius","",function(a){return D(a,"orderRadius")})},r.boxshadow=function(){return F("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){B("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return F("animationName")},r.csscolumns=function(){return F("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";A((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return D(k.backgroundImage,"gradient")},r.cssreflections=function(){return F("boxReflect")},r.csstransforms=function(){return!!E(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!E(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=w("@media ("+o.join("transform-3d),(")+"modernizr)"));return a},r.csstransitions=function(){return F("transitionProperty")},r.fontface=function(){var a,c,d=h||g,e=b.createElement("style"),f=b.implementation||{hasFeature:function(){return!1}};e.type="text/css",d.insertBefore(e,d.firstChild),a=e.sheet||e.styleSheet;var i=f.hasFeature("CSS2","")?function(b){if(!a||!b)return!1;var c=!1;try{a.insertRule(b,0),c=/src/i.test(a.cssRules[0].cssText),a.deleteRule(a.cssRules.length-1)}catch(d){}return c}:function(b){if(!a||!b)return!1;a.cssText=b;return a.cssText.length!==0&&/src/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(b.split(" ")[0])===0};c=i('@font-face { font-family: "font"; src: url(data:,); }'),d.removeChild(e);return c},r.video=function(){var a=b.createElement("video"),c=!!a.canPlayType;if(c){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return c},r.audio=function(){var a=b.createElement("audio"),c=!!a.canPlayType;c&&(c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;"));return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webWorkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c<d)e=a[c],(b=e.media||b)!="screen"&&f.push(p(e.imports,b),e.cssText);return f.join("")}function o(a){var b=-1;while(++b<e)a.createElement(d[b])}var c="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",d=c.split("|"),e=d.length,f=new RegExp("(^|\\s)("+c+")","gi"),g=new RegExp("<(/*)("+c+")","gi"),h=new RegExp("(^|[^\\n]*?\\s)("+c+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),i=b.createDocumentFragment(),j=b.documentElement,k=j.firstChild,l=b.createElement("body"),m=b.createElement("style"),n;o(b),o(i),k.insertBefore(m,k.firstChild),m.media="print",a.attachEvent("onbeforeprint",function(){var a=-1,c=p(b.styleSheets,"all"),k=[],o;n=n||b.body;while((o=h.exec(c))!=null)k.push((o[1]+o[2]+o[3]).replace(f,"$1.iepp_$2")+o[4]);m.styleSheet.cssText=k.join("\n");while(++a<e){var q=b.getElementsByTagName(d[a]),r=q.length,s=-1;while(++s<r)q[s].className.indexOf("iepp_")<0&&(q[s].className+=" iepp_"+d[a])}i.appendChild(n),j.appendChild(l),l.className=n.className,l.innerHTML=n.innerHTML.replace(g,"<$1font")}),a.attachEvent("onafterprint",function(){l.innerHTML="",j.removeChild(l),j.appendChild(n),m.styleSheet.cssText=""})}(a,b),e._enableHTML5=f,e._version=d,g.className=g.className.replace(/\bno-js\b/,"")+" js "+u.join(" ");return e}(this,this.document)

	_scalendar_days = new Array('Su', 'M', 'Tu', 'W', 'Th', 'F', 'Sa');
	_scalendar_full_days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
	_scalendar_months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
	_scalendar_short_months = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');

	_scalendar_start_day = 1;

	_scalendar_selected = new Array();
	_scalendar_dates = new Array();


	function scalendar_draw_month ( month, year, name ) {
		// draws a scalendar month html
		// ----------------------------
		// function takes in the actual month number (1-12)
		// but then all date references further from this use the javascript version of the month (0-11)

		if (!name) {
			var name = 'scalendar';
		}
		if (!array_key_exists(name, _scalendar_dates)) {
			_scalendar_dates[name] = new Array();
		}
		if (!array_key_exists(name, _scalendar_selected)) {
			_scalendar_selected[name] = new Array();
		}

		// first work out month data	

		// get first day of month
		var first = new Date(year, month-1, 1); // (javascript months are from 0 to 11)
		// work out start day
		var fday = first.getDay();
		// days in month
		var cdays = scalendar_days_in_month(first)


		// work out previous month values
		var pdays = 0;

		// is previous month needed on table?
		if (fday != _scalendar_start_day) {
			//alert('previous month required');

			// how many days are required?
			pdays = fday - _scalendar_start_day;
			if (pdays < 0) {
				pdays += 7;
			}

			// what day of previous month to start at
			var pmonth = scalendar_get_previous_month(first);
			pmonth.setDate(scalendar_days_in_month(pmonth) - pdays + 1); // days in month - required slots + 1

			//alert('starting at '+pmonth.toString()+' for '+pdays+' days');
		}


		// work out next month values
		var ndays = 0;

		// work out _scalendar_end_day
		var _scalendar_end_day = _scalendar_start_day - 1;
		if (_scalendar_end_day < 0) {
			_scalendar_end_day = 6;
		}

		// work out last day of current month
		var last = new Date(year, month-1, cdays);
		var lday = last.getDay();

		// is next month needed on table?
		if (lday != _scalendar_end_day) {
			//alert('next month required');

			// how many days are required
			ndays = _scalendar_end_day - lday;
			if (ndays < 0) {
				ndays += 7;
			}

			// get next month object to start at
			var nmonth = scalendar_get_next_month(first);
			nmonth.setDate(1);

			//alert('starting at '+nmonth.toString()+' for '+ndays+' days');
		}


		// now that we have the required month data, we can draw the scalendar!
		var d = '';

		// cell counters
		var column = 0;
		var row = 0;
		var dow = _scalendar_start_day;

		// get name to use for this calendar
		var cname = year+'-'+(month-1);

		// header
		d += '<div class="title">'+_scalendar_months[month-1]+' '+year+'</div>';
		d += '	<table><tr><td class="outer"><div class="outer">';
		d += '		<table class="scalendar">';
		d += '			<tr class="days">';

		// day headings
		var i = _scalendar_start_day;
		while (true) {
			d += '<th';
			if (i == 6 || i == 0) {
				d += ' class="th-w"';
			}
			d += '>'+_scalendar_days[i]+'</th>';
			if (i == _scalendar_end_day) {
				break;
			}
			i++;
			if (i > 6) {
				i = 0;
			}
		}

		d += '			</tr>';
		d += '			<tr>';

		// go through previous month?
		if (pdays > 0) {
			for (var i = pmonth.getDate(); i < pmonth.getDate()+pdays; i++) {
				d += scalendar_draw_cell(name, i, dow, false, cname, pmonth.getFullYear()+'-'+pmonth.getMonth()+'-'+i);
				column++;
				dow++;
				if (dow == 7) {
					dow = 0;
				}
			}
		}

		// go through current month
		for (var i = 1; i <= cdays; i++) {
			d += scalendar_draw_cell(name, i, dow, true, cname, year+'-'+(month-1)+'-'+i);
			column++;
			if (column == 7) {
				d += '			</tr>';
				d += '			</tr>';
				column = 0;
				row++;
			}
			dow++;
			if (dow == 7) {
				dow = 0;
			}
		}

		// go through next month?
		if (ndays > 0) {
			for (var i = 1; i <= ndays; i++) {
				d += scalendar_draw_cell(name, i, dow, false, cname, nmonth.getFullYear()+'-'+nmonth.getMonth()+'-'+i);
				column++;
				dow++;
				if (dow == 7) {
					dow = 0;
				}
			}
		}

		// footer
		d += '			</tr>';
		d += '		</table>';
		d += '	</div></td></tr></table>';

		document.write(d);

	}


	// function for drawing a cell
	function scalendar_draw_cell ( name, i, dow, thismonth, cname, cdate ) {
		// work out class
		var c = '';
		if (!thismonth) {
			c += 'p';
		}
		if (dow == 0 || dow == 6) {
			c += 'w';
		}
		// is selected?
		var s = '';
		if (array_in_array(cdate, _scalendar_selected) != -1) {
			s = 's';
		}
		// add cell to array
		if (!array_key_exists(cdate, _scalendar_dates[name])) {
			_scalendar_dates[name][cdate] = new Array();
		}
		if (!array_key_exists(cname, _scalendar_dates[cdate])) {
			_scalendar_dates[name][cdate][cname] = new Array();
		}
		_scalendar_dates[name][cdate][cname]['class'] = c;
		// draw cell
		return '<td id="'+name+'_'+cname+'_'+cdate+'" class="disableselect '+s+c+'" onmouseover="scalendar_cell_over(this);" onclick="scalendar_cell_click(this);" onselectstart="return false;">'+i+'</td>';
	}



	// functions for handling cell overs and outs
	function scalendar_cell_over ( obj ) {
		var a = obj.id.split('_');
		if (array_in_array(a[2], _scalendar_selected[a[0]]) != -1) { return; }
		var c = _scalendar_dates[a[0]][a[2]][a[1]]['class'];
		var fc = '#e7cfcf';
		var col = '#ffffff';
		if (c == 'p' || c == 'pw') {
			fc = '#eadede';
		}
		if (c == 'w' || c == 'pw') {
			col = '#fef7d8';
		}
		if ($(obj).is(':animated')) {
			$(obj).stop();
		}
		$(obj).css('background-color', fc);
		$(obj).animate({backgroundColor: col}, 300);
	}


	// function for handling cell click
	function scalendar_cell_click ( obj ) {
		var a = obj.id.split('_');
		var c = '';
		var k = array_in_array(a[2], _scalendar_selected[a[0]]);
		if (k == -1) {
			// is unselected, now select
			_scalendar_selected[a[0]][_scalendar_selected[a[0]].length] = a[2];
			c = 's';
		} else {
			// is selected, now unselect
			_scalendar_selected[a[0]].splice(k, 1);
		}
		// loop through all instances of date and change class
		for (var i in _scalendar_dates[a[0]][a[2]]) {
			if (typeof(_scalendar_dates[a[0]][a[2]][i]) != 'object') { continue; }
			if (!document.getElementById(a[0]+'_'+i+'_'+a[2])) { continue; }
			var td = $('#'+a[0]+'_'+i+'_'+a[2]);
			if (td.is(':animated')) {
				td.stop();
			}
			var c = _scalendar_dates[a[0]][a[2]][i]['class'];
			if (k == -1) {
				var col = '#fbde5a';
				if (c == 'p' || c == 'pw') {
					col = '#f2e194';
				}
			} else {
				var col = '#ffffff';
				if (c == 'w' || c == 'pw') {
					col = '#fef7d8';
				}
			}
			td.animate({backgroundColor: col}, 200);

		}
		// write dates to form
		scalendar_write_dates_to_form(a[0]);
	}



	// function for updating form with dates
	function scalendar_write_dates_to_form ( name ) {
		var v = '';
		var h = '';
		if (_scalendar_selected[name].length > 0) {
			var aa = new Array();
			for (var i = 0; i < _scalendar_selected[name].length; i++) {
				var ab = _scalendar_selected[name][i].split('-');
				var ac = new Date(ab[0], ab[1], ab[2]);
				aa[aa.length] = ac.getTime();
			}
			aa.sort();
			var o = new Array();
			var p = new Array();
			for (var i = 0; i < aa.length; i++) {
				var a = new Date(aa[i]);
				o[o.length] = scalendar_proper_date(a);
				p[p.length] = scalendar_display_date(a);
			}
			v = o.join(',');
			h = p.join('<br />');
		}
		document.getElementById('scalendar-form-dates_'+name).value = v;
		var d = $('#scalendar-display-dates_'+name);
		if (h == '') {
			d.css('color', '#b12b1a');
			d.css('font-style', 'italic');
			d.html('show all');
		} else {
			d.css('color', 'black');
			d.css('font-style', 'normal');
			d.html(h);
		}
	}


	// function for use onload for selecting dates already in form
	function scalendar_get_dates_from_form ( name ) {
		if (!document.getElementById('scalendar-form-dates_'+name)) { return; }
		var a = document.getElementById('scalendar-form-dates_'+name).value;
		a = a.split(',');
		for (var j = 0; j < a.length; j++) {

			// skip if blank
			if (a[j] == '') { continue; }

			// get js version of date
			var d = scalendar_js_date(a[j]);

			// add to selected array if not already there
			if (array_in_array(d, _scalendar_selected[name]) == -1) {
				_scalendar_selected[name][_scalendar_selected[name].length] = d;
			}

			// loop through all instances of date and change class
			for (var i in _scalendar_dates[name][d]) {
				if (typeof(_scalendar_dates[name][d][i]) != 'object') { continue; }
				if (!document.getElementById(name+'_'+i+'_'+d)) { continue; }
				var c = _scalendar_dates[name][d][i]['class'];
				var col = '#fbde5a';
				if (c == 'p' || c == 'pw') {
					col = '#f2e194';
				}
				document.getElementById(name+'_'+i+'_'+d).style.backgroundColor = col;
			}

		}
		scalendar_write_dates_to_form(name);
	}

	// function for clearing the scalendar form (used on initial load)
	function scalendar_clear_form () {
		if (document.getElementById('scalendar-form-dates')) {
			if (document.getElementById('scalendar-keep-dates')) {
				document.getElementById('scalendar-form-dates').value = '';
			}
		}
	}

	// scalendar's onload function
	function scalendar_load () {
		scalendar_flush(true);
	}

	// function for getting calendar data from input field
	// it's run once at document ready, but with clearing turned off
	// and then run again on final load with clearing enabled
	function scalendar_flush ( clear ) {
		for (var i in _scalendar_dates) {
			if (document.getElementById('scalendar-form-dates_'+i)) {
				if (document.getElementById('scalendar-keep-dates_'+i)) {
					scalendar_get_dates_from_form(i);
				} else {
					if (clear) {
						document.getElementById('scalendar-form-dates_'+i).value = '';
					}
				}
			}
		}
	}


	// function for returning the previous month object of a date object
	function scalendar_get_previous_month ( d ) {
		var month = d.getMonth();
		var year = d.getFullYear();
		var day = d.getDate();
		month--;
		if (month < 0) {
			month = 11;
			year--;
		}
		var a = new Date(year, month, day);
		return a;
	}

	// function for returning the next month object of a date object
	function scalendar_get_next_month ( d ) {
		var month = d.getMonth();
		var year = d.getFullYear();
		var day = d.getDate();
		month++;
		if (month > 11) {
			month = 0;
			year++;
		}
		var a = new Date(year, month, day);
		return a;
	}


	// function to work out how many days in the month of a date object
	function scalendar_days_in_month ( d ) {
		var month = d.getMonth();
		var year = d.getYear();
		var m = [31,28,31,30,31,30,31,31,30,31,30,31];
		if (month != 1) return m[month];
		if (year%4 != 0) return m[1];
		if (year%100 == 0 && year%400 != 0) return m[1];
		return m[1] + 1;
	} 

	// function to turn a mysql date in to a javascript format date
	function scalendar_js_date ( d ) {
		var a = d.split('-');
		var m = (a[1] * 1) - 1;
		return a[0]+'-'+m+'-'+(a[2]*1);
	}

	// function to turn a scalendar date in to a proper mysql format date
	function scalendar_proper_date ( b ) {
		var m = (b.getMonth() * 1) + 1;
		return b.getFullYear()+'-'+number_2_digits(m)+'-'+number_2_digits(b.getDate());
	}

	// function to turn a scalendar date in to a human readable date
	function scalendar_display_date ( b ) {
		var e = b.getDate() + '';
		var n = e.substr(e.length-1,1);
		if (b.getDate() > 10 && b.getDate() < 20) {
			e += 'th';
		} else if (n == '1') {
			e += 'st';
		} else if (n == '2') {
			e += 'nd';
		} else if (n == '3') {
			e += 'rd';
		} else {
			e += 'th';
		}
		return _scalendar_full_days[b.getDay()]+' '+e+' '+_scalendar_short_months[b.getMonth()];
	}

	// function to prepend 0 if needs be
	function number_2_digits ( n ) {
		n = n + '';
		if (n.length < 2) {
			return '0'+n;
		}
		return n;
	}


	// array functions
	function array_key_exists ( key, arr ) {
		for (var i in arr) {
			if (i == key) { return true; }
		}
		return false;
	}
	function array_in_array ( val, arr ) {
		for (var i in arr) {
			if (arr[i] == val) { return i; }
		}
		return -1;
	}


_leftmap_order = new Array('scotland', 'ireland', 'ni', 'southwest', 'south', 'east', 'home', 'northeast', 'northwest', 'wales', 'midlands', 'london');

_leftmap_data = new Array();

_leftmap_data['map'] = new Array();
_leftmap_data['map']['left'] = 43;

_leftmap_data['heading'] = new Array();
_leftmap_data['heading']['left'] = 60;

_leftmap_data['scotland'] = new Array();
_leftmap_data['scotland']['name'] = 'Scotland';
_leftmap_data['scotland']['count'] = 26;
_leftmap_data['scotland']['left'] = 64;

_leftmap_data['ireland'] = new Array();
_leftmap_data['ireland']['name'] = 'Ireland';
_leftmap_data['ireland']['count'] = 3;
_leftmap_data['ireland']['left'] = 43;

_leftmap_data['ni'] = new Array();
_leftmap_data['ni']['name'] = 'Northern Ireland';
_leftmap_data['ni']['count'] = 5;
_leftmap_data['ni']['left'] = 43;

_leftmap_data['southwest'] = new Array();
_leftmap_data['southwest']['name'] = 'South West';
_leftmap_data['southwest']['count'] = 6;
_leftmap_data['southwest']['left'] = 57;

_leftmap_data['south'] = new Array();
_leftmap_data['south']['name'] = 'South';
_leftmap_data['south']['count'] = 3;
_leftmap_data['south']['left'] = 134;

_leftmap_data['east'] = new Array();
_leftmap_data['east']['name'] = 'East Anglia';
_leftmap_data['east']['count'] = 5;
_leftmap_data['east']['left'] = 164;

_leftmap_data['home'] = new Array();
_leftmap_data['home']['name'] = 'Home Counties';
_leftmap_data['home']['count'] = 3;
_leftmap_data['home']['left'] = 141;

_leftmap_data['northeast'] = new Array();
_leftmap_data['northeast']['name'] = 'North East';
_leftmap_data['northeast']['count'] = 7;
_leftmap_data['northeast']['left'] = 135;

_leftmap_data['northwest'] = new Array();
_leftmap_data['northwest']['name'] = 'North West';
_leftmap_data['northwest']['count'] = 9;
_leftmap_data['northwest']['left'] = 117;

_leftmap_data['wales'] = new Array();
_leftmap_data['wales']['name'] = 'Wales';
_leftmap_data['wales']['count'] = 9;
_leftmap_data['wales']['left'] = 75;

_leftmap_data['midlands'] = new Array();
_leftmap_data['midlands']['name'] = 'Midlands';
_leftmap_data['midlands']['count'] = 8;
_leftmap_data['midlands']['left'] = 117;

_leftmap_data['london'] = new Array();
_leftmap_data['london']['name'] = 'London';
_leftmap_data['london']['count'] = 1;
_leftmap_data['london']['left'] = 161;
_leftmap_data['london']['url'] = 'christmas-parties-london';

leftmap_europe_height = 160;

function leftmap_draw_header () {
	document.write('<div id="leftmap" class="leftmap" onmouseover="leftmap_area_over();" onmouseout="leftmap_area_out();" style="height: '+(401+leftmap_europe_height)+'px;">');
}

function leftmap_draw_footer () {
	var letters = new Array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
	document.write('<div id="leftmap_map" class="map"></div>');
	for (var i = 0; i < _leftmap_order.length; i++) {
		document.write('<div id="leftmap_'+_leftmap_order[i]+'" class="'+_leftmap_order[i]+'-over"></div>');
	}
	document.write('<div id="leftmap_heading" class="heading"><table class="set"><tr><td class="set"><table class="content"><tr><td class="text"><nobr id="leftmap_text">Select a region</nobr></td><td class="icon"><div id="leftmap_icon" class="icon"></div></td></tr></table></td></tr></table></div>');
	document.write('<div id="leftmap_browse"></div>');
	document.write('<div id="leftmap_container_left" class="container-left" style="height: '+(451+leftmap_europe_height)+'px;"><div></div></div><div class="container-topleft"></div><div id="leftmap_container_bottomleft" class="container-bottomleft" style="margin-top: '+(354+leftmap_europe_height)+'px;"></div><div class="container-top"></div><div id="leftmap_container_bottom" class="container-bottom" style="margin-top: '+(391+leftmap_europe_height)+'px;"></div>');
	document.write('<div id="leftmap_europe_title" class="leftmap-europe-title"></div>');
	document.write('<div id="leftmap_clickarea" class="clickarea">');
	for (var i = 0; i < _leftmap_order.length; i++) {
		for (var c = 0; c < _leftmap_data[_leftmap_order[i]]['count']; c++) {
			document.write('<span class="'+_leftmap_order[i]+'-'+letters[c]+'" onclick="leftmap_click(this);" onmouseover="leftmap_over(this);" onmouseout="leftmap_out();"></span>');
		}
	}
	document.write('</div>');
	document.write('</div><div id="leftmap_whitecover" class="leftmap-whitecover" style="margin-top: '+(0-405-leftmap_europe_height)+'px; height: '+(420+leftmap_europe_height)+'px;"></div>');
}




oc = {};

function ge ( id ) {
	return document.getElementById(id);
}

function draw_preloader () {
	document.write('<div style="position: absolute; left: -9999px; top: 0px;"><img src="design/core/bg-2011-08-16.jpg" style="position: absolute;" /><img src="design/core/sprite-2011-08-16.jpg" style="position: absolute;" /><img src="design/search/sprite-2011-08-10b.gif" style="position: absolute;" /><img src="design/grouplogin/sprite.gif" style="position: absolute;" /><img src="design/leftmap/sprite.gif" style="position: absolute;" /><img src="design/footer/bg.jpg" style="position: absolute;" /><img src="design/footer/sprite.jpg" style="position: absolute;" /><img src="design/menu/sprite.gif" style="position: absolute;" /><img src="design/listing/sprite.jpg" style="position: absolute;" /><img src="design/listing/sprite.gif" style="position: absolute;" /></div>');
}

function draw_grouplogin () {
	document.write('<div id="grouplogin-back" class="png"><div id="grouplogin-back-loading"></div><div id="grouplogin-back-error"><div>Invalid details</div></div><div id="grouplogin-back-inner"><form action="." method="post" id="grouplogin-form"><table>	<tr><th>Group ID</th><td><div class="inputpad"><input id="grouplogin-id" type="text" /></div></td></tr></table><table><tr><th>Access Code *</th><td><div class="inputpad"><input id="grouplogin-code" type="password" /></div></td></tr></table><a id="grouplogin-submit" class="button flashfade-sprite flashfade-bgpos--135px_-129px" href="#" onclick="return false;"></a><div class="note">* usually the first<br />three letters of your<br />company name</div></form></div></div><div id="grouplogin-hider"></div><div id="grouplogin-cover" class="png"><div id="grouplogin-cover-over"></div></div><div id="grouplogin-cover-over-bit"></div><div id="grouplogin-title"><div id="grouplogin-title-over"></div></div><div id="grouplogin-clickhere">&gt;&gt; Click Here &lt;&lt;</div><div id="grouplogin-clickhere-over">&gt;&gt; Click Here &lt;&lt;</div><div id="grouplogin-overarea"></div>');
}

function draw_quick_search () {
	document.write('<div id="tpbar" class="noprint"><h2 class="nostyle">Search Parties</h2><form id="tpbar-form" action="search" method="get" onsubmit="oc.search.tpbar_submit(); return false;"><div id="tpbar-focused"></div><input id="tpbar-input" name="q" value="enter town / postcode" /><a href="#" id="tpbar-button" class="flashfade-sprite flashfade-bgpos--23px_-141px" onclick="oc.search.tpbar_submit(); return false;"></a><input type="hidden" name="source" value="bar" /></form></div>');
}

function draw_searchleft_calendar () {
	document.write('<div><div id="sl-calendar-overflow"><div id="sl-calendar3" class="sl-calendar sl-calendar-big"><div class="sl-calendar-inner"><div class="scalendar">');
	scalendar_draw_month(01, 2012, 'left');
	document.write('</div></div></div><div id="sl-calendar2" class="sl-calendar"><div class="link"></div><div class="sl-calendar-inner"><div class="scalendar">');
	scalendar_draw_month(12, 2011, 'left');
	document.write('</div></div></div><div id="sl-calendar1" class="sl-calendar"><div class="link"></div><div class="sl-calendar-inner"><div class="scalendar">');
	scalendar_draw_month(11, 2011, 'left');
	document.write('</div></div></div><div id="sl-calendar-cover"></div><div id="sl-cal-note"><div>Please note: <span>You can select multiple dates</span></div></div></div></div>');
}

function draw_searchleft_form ( filter, dates ) {
	var d = '<div id="searchleft"><form id="searchleft-form" action="search" method="get"><div class="arrow"></div><div class="heading">Town / Postcode</div><div class="input-holder"><div class="input input-input"><input id="searchleft-location" type="text" name="q" value="enter location" /></div></div><div class="arrow"></div><div class="heading">Shared / Exclusive</div><div class="input-holder"><div class="input"><select id="searchleft-type" name="type"><option class="first" value="">show all</option><option value="">Shared &amp; Exclusive</option><option value="shared"';
	if (filter == 'shared') { d += ' selected="selected"'; }
	d += '>Only Shared</option><option value="exclusive"';
	if (filter == 'exclusive') { d += ' selected="selected"'; }
 	d+= '>Only Exclusive</option></select></div></div><div class="arrow"></div><div class="heading">Available Date(s)</div><input type="hidden" name="dates" id="scalendar-form-dates_left" value="'+dates+'" /><div id="scalendar-keep-dates_left"></div><div class="input-holder"><div class="input"><div id="searchleft-datediv-holder"><div id="searchleft-date-link"></div><div id="scalendar-display-dates_left-icon"></div><div id="scalendar-display-dates_left">show all</div></div></div></div><a id="searchleft-submit" href="#" class="flashfade-sprite" onclick="oc.search.sl_submit(); return false;"><span>search</span></a><input type="hidden" name="source" value="left" /></form></div>';
	document.write(d);
}

/* urlencode */

function urlencode( str ) {
    // http://kevin.vanzonneveld.net
    // +   original by: Philip Peterson
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +      input by: AJ
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Brett Zamir
    // %          note: info on what encoding functions to use from: http://xkr.us/articles/javascript/encode-compare/
    // *     example 1: urlencode('Kevin van Zonneveld!');
    // *     returns 1: 'Kevin+van+Zonneveld%21'
    // *     example 2: urlencode('http://kevin.vanzonneveld.net/');
    // *     returns 2: 'http%3A%2F%2Fkevin.vanzonneveld.net%2F'
    // *     example 3: urlencode('http://www.google.nl/search?q=php.js&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a');
    // *     returns 3: 'http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3Dphp.js%26ie%3Dutf-8%26oe%3Dutf-8%26aq%3Dt%26rls%3Dcom.ubuntu%3Aen-US%3Aunofficial%26client%3Dfirefox-a'
                             
    var histogram = {}, tmp_arr = [];
    var ret = str.toString();
    
    var replacer = function(search, replace, str) {
        var tmp_arr = [];
        tmp_arr = str.split(search);
        return tmp_arr.join(replace);
    };
    
    // The histogram is identical to the one in urldecode.
    histogram["'"]   = '%27';
    histogram['(']   = '%28';
    histogram[')']   = '%29';
    histogram['*']   = '%2A';
    histogram['~']   = '%7E';
    histogram['!']   = '%21';
    histogram['%20'] = '+';
    
    // Begin with encodeURIComponent, which most resembles PHP's encoding functions
    ret = encodeURIComponent(ret);
    
    for (search in histogram) {
        replace = histogram[search];
        ret = replacer(search, replace, ret) // Custom replace. No regexing
    }
    
    // Uppercase for full PHP compatibility
    return ret.replace(/(\%([a-z0-9]{2}))/g, function(full, m1, m2) {
        return "%"+m2.toUpperCase();
    });
    
    return ret;
}

function urldecode ( utftext ) {
		utftext = unescape(utftext);
		utftext = utftext.split('+').join(' ');

		var string = "";
		var i = 0;
		var c = c1 = c2 = 0;
 
		while ( i < utftext.length ) {
 
			c = utftext.charCodeAt(i);
 
			if (c < 128) {
				string += String.fromCharCode(c);
				i++;
			}
			else if((c > 191) && (c < 224)) {
				c2 = utftext.charCodeAt(i+1);
				string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
				i += 2;
			}
			else {
				c2 = utftext.charCodeAt(i+1);
				c3 = utftext.charCodeAt(i+2);
				string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
				i += 3;
			}
 
		}
 
		return string;
}


/* html entities */

function htmlentities (string, quote_style) {
    // Convert all applicable characters to HTML entities  
    // 
    // version: 1008.1718
    // discuss at: http://phpjs.org/functions/htmlentities    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: nobbler
    // +    tweaked by: Jack
    // +   bugfixed by: Onno Marsman    // +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +    bugfixed by: Brett Zamir (http://brett-zamir.me)
    // +      input by: Ratheous
    // -    depends on: get_html_translation_table
    // *     example 1: htmlentities('Kevin & van Zonneveld');    // *     returns 1: 'Kevin &amp; van Zonneveld'
    // *     example 2: htmlentities("foo'bar","ENT_QUOTES");
    // *     returns 2: 'foo&#039;bar'
    var hash_map = {}, symbol = '', tmp_str = '', entity = '';
    tmp_str = string.toString();    
    if (false === (hash_map = get_html_translation_table('HTML_ENTITIES', quote_style))) {
        return false;
    }
    hash_map["'"] = '&#039;';    for (symbol in hash_map) {
        entity = hash_map[symbol];
        tmp_str = tmp_str.split(symbol).join(entity);
    }
        return tmp_str;
}

function get_html_translation_table (table, quote_style) {
    // Returns the internal translation table used by htmlspecialchars and htmlentities  
    // 
    // version: 1008.1718
    // discuss at: http://phpjs.org/functions/get_html_translation_table    // +   original by: Philip Peterson
    // +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   bugfixed by: noname
    // +   bugfixed by: Alex
    // +   bugfixed by: Marco    // +   bugfixed by: madipta
    // +   improved by: KELAN
    // +   improved by: Brett Zamir (http://brett-zamir.me)
    // +   bugfixed by: Brett Zamir (http://brett-zamir.me)
    // +      input by: Frank Forte    // +   bugfixed by: T.Wild
    // +      input by: Ratheous
    // %          note: It has been decided that we're not going to add global
    // %          note: dependencies to php.js, meaning the constants are not
    // %          note: real constants, but strings instead. Integers are also supported if someone    // %          note: chooses to create the constants themselves.
    // *     example 1: get_html_translation_table('HTML_SPECIALCHARS');
    // *     returns 1: {'"': '&quot;', '&': '&amp;', '<': '&lt;', '>': '&gt;'}
    
    var entities = {}, hash_map = {}, decimal = 0, symbol = '';    var constMappingTable = {}, constMappingQuoteStyle = {};
    var useTable = {}, useQuoteStyle = {};
    
    // Translate arguments
    constMappingTable[0]      = 'HTML_SPECIALCHARS';    constMappingTable[1]      = 'HTML_ENTITIES';
    constMappingQuoteStyle[0] = 'ENT_NOQUOTES';
    constMappingQuoteStyle[2] = 'ENT_COMPAT';
    constMappingQuoteStyle[3] = 'ENT_QUOTES';
     useTable       = !isNaN(table) ? constMappingTable[table] : table ? table.toUpperCase() : 'HTML_SPECIALCHARS';
    useQuoteStyle = !isNaN(quote_style) ? constMappingQuoteStyle[quote_style] : quote_style ? quote_style.toUpperCase() : 'ENT_COMPAT';
 
    if (useTable !== 'HTML_SPECIALCHARS' && useTable !== 'HTML_ENTITIES') {
        throw new Error("Table: "+useTable+' not supported');        // return false;
    }
 
    entities['38'] = '&amp;';
    if (useTable === 'HTML_ENTITIES') {        entities['160'] = '&nbsp;';
        entities['161'] = '&iexcl;';
        entities['162'] = '&cent;';
        entities['163'] = '&pound;';
        entities['164'] = '&curren;';        entities['165'] = '&yen;';
        entities['166'] = '&brvbar;';
        entities['167'] = '&sect;';
        entities['168'] = '&uml;';
        entities['169'] = '&copy;';        entities['170'] = '&ordf;';
        entities['171'] = '&laquo;';
        entities['172'] = '&not;';
        entities['173'] = '&shy;';
        entities['174'] = '&reg;';        entities['175'] = '&macr;';
        entities['176'] = '&deg;';
        entities['177'] = '&plusmn;';
        entities['178'] = '&sup2;';
        entities['179'] = '&sup3;';        entities['180'] = '&acute;';
        entities['181'] = '&micro;';
        entities['182'] = '&para;';
        entities['183'] = '&middot;';
        entities['184'] = '&cedil;';        entities['185'] = '&sup1;';
        entities['186'] = '&ordm;';
        entities['187'] = '&raquo;';
        entities['188'] = '&frac14;';
        entities['189'] = '&frac12;';        entities['190'] = '&frac34;';
        entities['191'] = '&iquest;';
        entities['192'] = '&Agrave;';
        entities['193'] = '&Aacute;';
        entities['194'] = '&Acirc;';        entities['195'] = '&Atilde;';
        entities['196'] = '&Auml;';
        entities['197'] = '&Aring;';
        entities['198'] = '&AElig;';
        entities['199'] = '&Ccedil;';        entities['200'] = '&Egrave;';
        entities['201'] = '&Eacute;';
        entities['202'] = '&Ecirc;';
        entities['203'] = '&Euml;';
        entities['204'] = '&Igrave;';        entities['205'] = '&Iacute;';
        entities['206'] = '&Icirc;';
        entities['207'] = '&Iuml;';
        entities['208'] = '&ETH;';
        entities['209'] = '&Ntilde;';        entities['210'] = '&Ograve;';
        entities['211'] = '&Oacute;';
        entities['212'] = '&Ocirc;';
        entities['213'] = '&Otilde;';
        entities['214'] = '&Ouml;';        entities['215'] = '&times;';
        entities['216'] = '&Oslash;';
        entities['217'] = '&Ugrave;';
        entities['218'] = '&Uacute;';
        entities['219'] = '&Ucirc;';        entities['220'] = '&Uuml;';
        entities['221'] = '&Yacute;';
        entities['222'] = '&THORN;';
        entities['223'] = '&szlig;';
        entities['224'] = '&agrave;';        entities['225'] = '&aacute;';
        entities['226'] = '&acirc;';
        entities['227'] = '&atilde;';
        entities['228'] = '&auml;';
        entities['229'] = '&aring;';        entities['230'] = '&aelig;';
        entities['231'] = '&ccedil;';
        entities['232'] = '&egrave;';
        entities['233'] = '&eacute;';
        entities['234'] = '&ecirc;';        entities['235'] = '&euml;';
        entities['236'] = '&igrave;';
        entities['237'] = '&iacute;';
        entities['238'] = '&icirc;';
        entities['239'] = '&iuml;';        entities['240'] = '&eth;';
        entities['241'] = '&ntilde;';
        entities['242'] = '&ograve;';
        entities['243'] = '&oacute;';
        entities['244'] = '&ocirc;';        entities['245'] = '&otilde;';
        entities['246'] = '&ouml;';
        entities['247'] = '&divide;';
        entities['248'] = '&oslash;';
        entities['249'] = '&ugrave;';        entities['250'] = '&uacute;';
        entities['251'] = '&ucirc;';
        entities['252'] = '&uuml;';
        entities['253'] = '&yacute;';
        entities['254'] = '&thorn;';        entities['255'] = '&yuml;';
    }
 
    if (useQuoteStyle !== 'ENT_NOQUOTES') {
        entities['34'] = '&quot;';    }
    if (useQuoteStyle === 'ENT_QUOTES') {
        entities['39'] = '&#39;';
    }
    entities['60'] = '&lt;';    entities['62'] = '&gt;';
 
 
    // ascii decimals to real symbols
    for (decimal in entities) {        symbol = String.fromCharCode(decimal);
        hash_map[symbol] = entities[decimal];
    }
    
    return hash_map;
}


/* cookie stuff */

_cookiedata = new Array();

function cookiedata_onload () {
	var c = readCookie('oc_cookiedata');
	if (c == null) { return; }
	c = c.split(' ');
	for (var i = 0; i < c.length; i++) {
		var d = c[i].split(':');
		_cookiedata[d[0]] = urldecode(d[1]);
	}
}

function cookiedata_update ( obj ) {
	var n = obj.name;
	var v = obj.value;
	if (_cookiedata[n] != v) {
		_cookiedata[n] = v;
		cookiedata_write();
	}
}

function cookiedata_write () {
	var ar = new Array();
	for (var k in _cookiedata) {
		ar[ar.length] = k + ':' + urlencode(_cookiedata[k]);
	}
	createCookie('oc_cookiedata', ar.join(' '), 1095);
}



function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}



cookiedata_onload();


/* 
 * flowplayer.js 3.2.6. The Flowplayer API
 * 
 * Copyright 2009-2011 Flowplayer Oy
 * 
 * This file is part of Flowplayer.
 * 
 * Flowplayer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Flowplayer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Flowplayer.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * Date: 2011-02-04 05:45:28 -0500 (Fri, 04 Feb 2011)
 * Revision: 614 
 */
(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p<r&&q.call(s,p,s)!==false;s=t[++p]){}}return t}function c(o){return document.getElementById(o)}function i(q,p,o){if(typeof p!="object"){return q}if(q&&p){m(p,function(r,s){if(!o||typeof s!="function"){q[r]=s}})}return q}function n(s){var q=s.indexOf(".");if(q!=-1){var p=s.slice(0,q)||"*";var o=s.slice(q+1,s.length);var r=[];m(document.getElementsByTagName(p),function(){if(this.className&&this.className.indexOf(o)!=-1){r.push(this)}});return r}}function f(o){o=o||window.event;if(o.preventDefault){o.stopPropagation();o.preventDefault()}else{o.returnValue=false;o.cancelBubble=true}return false}function j(q,o,p){q[o]=q[o]||[];q[o].push(p)}function e(){return"_"+(""+Math.random()).slice(2,10)}var h=function(t,r,s){var q=this,p={},u={};q.index=r;if(typeof t=="string"){t={url:t}}i(this,t,true);m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var v="on"+this;if(v.indexOf("*")!=-1){v=v.slice(0,v.length-1);var w="onBefore"+v.slice(2);q[w]=function(x){j(u,w,x);return q}}q[v]=function(x){j(u,v,x);return q};if(r==-1){if(q[w]){s[w]=q[w]}if(q[v]){s[v]=q[v]}}});i(this,{onCuepoint:function(x,w){if(arguments.length==1){p.embedded=[null,x];return q}if(typeof x=="number"){x=[x]}var v=e();p[v]=[x,w];if(s.isLoaded()){s._api().fp_addCuepoints(x,r,v)}return q},update:function(w){i(q,w);if(s.isLoaded()){s._api().fp_updateClip(w,r)}var v=s.getConfig();var x=(r==-1)?v.clip:v.playlist[r];i(x,w,true)},_fireEvent:function(v,y,w,A){if(v=="onLoad"){m(p,function(B,C){if(C[0]){s._api().fp_addCuepoints(C[0],r,B)}});return false}A=A||q;if(v=="onCuepoint"){var z=p[y];if(z){return z[1].call(s,A,w)}}if(y&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v)!=-1){i(A,y);if(y.metaData){if(!A.duration){A.duration=y.metaData.duration}else{A.fullDuration=y.metaData.duration}}}var x=true;m(u[v],function(){x=this.call(s,A,y,w)});return x}});if(t.onCuepoint){var o=t.onCuepoint;q.onCuepoint.apply(q,typeof o=="function"?[o]:o);delete t.onCuepoint}m(t,function(v,w){if(typeof w=="function"){j(u,v,w);delete t[v]}});if(r==-1){s.onCuepoint=this.onCuepoint}};var l=function(p,r,q,t){var o=this,s={},u=false;if(t){i(s,t)}m(r,function(v,w){if(typeof w=="function"){s[v]=w;delete r[v]}});i(this,{animate:function(y,z,x){if(!y){return o}if(typeof z=="function"){x=z;z=500}if(typeof y=="string"){var w=y;y={};y[w]=z;z=500}if(x){var v=e();s[v]=x}if(z===undefined){z=500}r=q._api().fp_animate(p,y,z,v);return o},css:function(w,x){if(x!==undefined){var v={};v[w]=x;w=v}r=q._api().fp_css(p,w);i(o,r);return o},show:function(){this.display="block";q._api().fp_showPlugin(p);return o},hide:function(){this.display="none";q._api().fp_hidePlugin(p);return o},toggle:function(){this.display=q._api().fp_togglePlugin(p);return o},fadeTo:function(y,x,w){if(typeof x=="function"){w=x;x=500}if(w){var v=e();s[v]=w}this.display=q._api().fp_fadeTo(p,y,x,v);this.opacity=y;return o},fadeIn:function(w,v){return o.fadeTo(1,w,v)},fadeOut:function(w,v){return o.fadeTo(0,w,v)},getName:function(){return p},getPlayer:function(){return q},_fireEvent:function(w,v,x){if(w=="onUpdate"){var z=q._api().fp_getPlugin(p);if(!z){return}i(o,z);delete o.methods;if(!u){m(z.methods,function(){var B=""+this;o[B]=function(){var C=[].slice.call(arguments);var D=q._api().fp_invoke(p,B,C);return D==="undefined"||D===undefined?o:D}});u=true}}var A=s[w];if(A){var y=A.apply(o,v);if(w.slice(0,1)=="_"){delete s[w]}return y}return o}})};function b(q,G,t){var w=this,v=null,D=false,u,s,F=[],y={},x={},E,r,p,C,o,A;i(w,{id:function(){return E},isLoaded:function(){return(v!==null&&v.fp_play!==undefined&&!D)},getParent:function(){return q},hide:function(H){if(H){q.style.height="0px"}if(w.isLoaded()){v.style.height="0px"}return w},show:function(){q.style.height=A+"px";if(w.isLoaded()){v.style.height=o+"px"}return w},isHidden:function(){return w.isLoaded()&&parseInt(v.style.height,10)===0},load:function(J){if(!w.isLoaded()&&w._fireEvent("onBeforeLoad")!==false){var H=function(){u=q.innerHTML;if(u&&!flashembed.isSupported(G.version)){q.innerHTML=""}if(J){J.cached=true;j(x,"onLoad",J)}flashembed(q,G,{config:t})};var I=0;m(a,function(){this.unload(function(K){if(++I==a.length){H()}})})}return w},unload:function(J){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent)){if(J){J(false)}return w}if(u.replace(/\s/g,"")!==""){if(w._fireEvent("onBeforeUnload")===false){if(J){J(false)}return w}D=true;try{if(v){v.fp_close();w._fireEvent("onUnload")}}catch(H){}var I=function(){v=null;q.innerHTML=u;D=false;if(J){J(true)}};setTimeout(I,50)}else{if(J){J(false)}}return w},getClip:function(H){if(H===undefined){H=C}return F[H]},getCommonClip:function(){return s},getPlaylist:function(){return F},getPlugin:function(H){var J=y[H];if(!J&&w.isLoaded()){var I=w._api().fp_getPlugin(H);if(I){J=new l(H,I,w);y[H]=J}}return J},getScreen:function(){return w.getPlugin("screen")},getControls:function(){return w.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return w.getPlugin("logo")._fireEvent("onUpdate")}catch(H){}},getPlay:function(){return w.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(H){return H?k(t):t},getFlashParams:function(){return G},loadPlugin:function(K,J,M,L){if(typeof M=="function"){L=M;M={}}var I=L?e():"_";w._api().fp_loadPlugin(K,J,M,I);var H={};H[I]=L;var N=new l(K,null,w,H);y[K]=N;return N},getState:function(){return w.isLoaded()?v.fp_getState():-1},play:function(I,H){var J=function(){if(I!==undefined){w._api().fp_play(I,H)}else{w._api().fp_play()}};if(w.isLoaded()){J()}else{if(D){setTimeout(function(){w.play(I,H)},50)}else{w.load(function(){J()})}}return w},getVersion:function(){var I="flowplayer.js 3.2.6";if(w.isLoaded()){var H=v.fp_getVersion();H.push(I);return H}return I},_api:function(){if(!w.isLoaded()){throw"Flowplayer "+w.id()+" not loaded when calling an API method"}return v},setClip:function(H){w.setPlaylist([H]);return w},getIndex:function(){return p},_swfHeight:function(){return v.clientHeight}});m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var H="on"+this;if(H.indexOf("*")!=-1){H=H.slice(0,H.length-1);var I="onBefore"+H.slice(2);w[I]=function(J){j(x,I,J);return w}}w[H]=function(J){j(x,H,J);return w}});m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled").split(","),function(){var H=this;w[H]=function(J,I){if(!w.isLoaded()){return w}var K=null;if(J!==undefined&&I!==undefined){K=v["fp_"+H](J,I)}else{K=(J===undefined)?v["fp_"+H]():v["fp_"+H](J)}return K==="undefined"||K===undefined?w:K}});w._fireEvent=function(Q){if(typeof Q=="string"){Q=[Q]}var R=Q[0],O=Q[1],M=Q[2],L=Q[3],K=0;if(t.debug){g(Q)}if(!w.isLoaded()&&R=="onLoad"&&O=="player"){v=v||c(r);o=w._swfHeight();m(F,function(){this._fireEvent("onLoad")});m(y,function(S,T){T._fireEvent("onUpdate")});s._fireEvent("onLoad")}if(R=="onLoad"&&O!="player"){return}if(R=="onError"){if(typeof O=="string"||(typeof O=="number"&&typeof M=="number")){O=M;M=L}}if(R=="onContextMenu"){m(t.contextMenu[O],function(S,T){T.call(w)});return}if(R=="onPluginEvent"||R=="onBeforePluginEvent"){var H=O.name||O;var I=y[H];if(I){I._fireEvent("onUpdate",O);return I._fireEvent(M,Q.slice(3))}return}if(R=="onPlaylistReplace"){F=[];var N=0;m(O,function(){F.push(new h(this,N++,w))})}if(R=="onClipAdd"){if(O.isInStream){return}O=new h(O,M,w);F.splice(M,0,O);for(K=M+1;K<F.length;K++){F[K].index++}}var P=true;if(typeof O=="number"&&O<F.length){C=O;var J=F[O];if(J){P=J._fireEvent(R,M,L)}if(!J||P!==false){P=s._fireEvent(R,M,L,J)}}m(x[R],function(){P=this.call(w,O,M);if(this.cached){x[R].splice(K,1)}if(P===false){return false}K++});return P};function B(){if($f(q)){$f(q).getParent().innerHTML="";p=$f(q).getIndex();a[p]=w}else{a.push(w);p=a.length-1}A=parseInt(q.style.height,10)||q.clientHeight;E=q.id||"fp"+e();r=G.id||E+"_api";G.id=r;t.playerId=E;if(typeof t=="string"){t={clip:{url:t}}}if(typeof t.clip=="string"){t.clip={url:t.clip}}t.clip=t.clip||{};if(q.getAttribute("href",2)&&!t.clip.url){t.clip.url=q.getAttribute("href",2)}s=new h(t.clip,-1,w);t.playlist=t.playlist||[t.clip];var I=0;m(t.playlist,function(){var K=this;if(typeof K=="object"&&K.length){K={url:""+K}}m(t.clip,function(L,M){if(M!==undefined&&K[L]===undefined&&typeof M!="function"){K[L]=M}});t.playlist[I]=K;K=new h(K,I,w);F.push(K);I++});m(t,function(K,L){if(typeof L=="function"){if(s[K]){s[K](L)}else{j(x,K,L)}delete t[K]}});m(t.plugins,function(K,L){if(L){y[K]=new l(K,L,w)}});if(!t.plugins||t.plugins.controls===undefined){y.controls=new l("controls",null,w)}y.canvas=new l("canvas",null,w);u=q.innerHTML;function J(L){var K=w.hasiPadSupport&&w.hasiPadSupport();if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(F[0].url)&&!K){return true}if(!w.isLoaded()&&w._fireEvent("onBeforeClick")!==false){w.load()}return f(L)}function H(){if(u.replace(/\s/g,"")!==""){if(q.addEventListener){q.addEventListener("click",J,false)}else{if(q.attachEvent){q.attachEvent("onclick",J)}}}else{if(q.addEventListener){q.addEventListener("click",f,false)}w.load()}}setTimeout(H,0)}if(typeof q=="string"){var z=c(q);if(!z){throw"Flowplayer cannot access element: "+q}q=z;B()}else{B()}}var a=[];function d(o){this.length=o.length;this.each=function(p){m(o,p)};this.size=function(){return o.length}}window.flowplayer=window.$f=function(){var p=null;var o=arguments[0];if(!arguments.length){m(a,function(){if(this.isLoaded()){p=this;return false}});return p||a[0]}if(arguments.length==1){if(typeof o=="number"){return a[o]}else{if(o=="*"){return new d(a)}m(a,function(){if(this.id()==o.id||this.id()==o||this.getParent()==o){p=this;return false}});return p}}if(arguments.length>1){var t=arguments[1],q=(arguments.length==3)?arguments[2]:{};if(typeof t=="string"){t={src:t}}t=i({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:false},t);if(typeof o=="string"){if(o.indexOf(".")!=-1){var s=[];m(n(o),function(){s.push(new b(this,k(t),k(q)))});return new d(s)}else{var r=c(o);return new b(r!==null?r:o,t,q)}}else{if(o){return new b(o,t,q)}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var e=typeof jQuery=="function";var i={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(e){jQuery.tools=jQuery.tools||{};jQuery.tools.flashembed={version:"1.0.4",conf:i}}function j(){if(c.done){return false}var l=document;if(l&&l.getElementsByTagName&&l.getElementById&&l.body){clearInterval(c.timer);c.timer=null;for(var k=0;k<c.ready.length;k++){c.ready[k].call()}c.ready=null;c.done=true}}var c=e?jQuery:function(k){if(c.done){return k()}if(c.timer){c.ready.push(k)}else{c.ready=[k];c.timer=setInterval(j,13)}};function f(l,k){if(k){for(key in k){if(k.hasOwnProperty(key)){l[key]=k[key]}}}return l}function g(k){switch(h(k)){case"string":k=k.replace(new RegExp('(["\\\\])',"g"),"\\$1");k=k.replace(/^\s?(\d+)%/,"$1pct");return'"'+k+'"';case"array":return"["+b(k,function(n){return g(n)}).join(",")+"]";case"function":return'"function()"';case"object":var l=[];for(var m in k){if(k.hasOwnProperty(m)){l.push('"'+m+'":'+g(k[m]))}}return"{"+l.join(",")+"}"}return String(k).replace(/\s/g," ").replace(/\'/g,'"')}function h(l){if(l===null||l===undefined){return false}var k=typeof l;return(k=="object"&&l.push)?"array":k}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function b(k,n){var m=[];for(var l in k){if(k.hasOwnProperty(l)){m[l]=n(k[l])}}return m}function a(r,t){var q=f({},r);var s=document.all;var n='<object width="'+q.width+'" height="'+q.height+'"';if(s&&!q.id){q.id="_"+(""+Math.random()).substring(9)}if(q.id){n+=' id="'+q.id+'"'}if(q.cachebusting){q.src+=((q.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(q.w3c||!s){n+=' data="'+q.src+'" type="application/x-shockwave-flash"'}else{n+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}n+=">";if(q.w3c||s){n+='<param name="movie" value="'+q.src+'" />'}q.width=q.height=q.id=q.w3c=q.src=null;for(var l in q){if(q[l]!==null){n+='<param name="'+l+'" value="'+q[l]+'" />'}}var o="";if(t){for(var m in t){if(t[m]!==null){o+=m+"="+(typeof t[m]=="object"?g(t[m]):t[m])+"&"}}o=o.substring(0,o.length-1);n+='<param name="flashvars" value=\''+o+"' />"}n+="</object>";return n}function d(m,p,l){var k=flashembed.getVersion();f(this,{getContainer:function(){return m},getConf:function(){return p},getVersion:function(){return k},getFlashvars:function(){return l},getApi:function(){return m.firstChild},getHTML:function(){return a(p,l)}});var q=p.version;var r=p.expressInstall;var o=!q||flashembed.isSupported(q);if(o){p.onFail=p.version=p.expressInstall=null;m.innerHTML=a(p,l)}else{if(q&&r&&flashembed.isSupported([6,65])){f(p,{src:r});l={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};m.innerHTML=a(p,l)}else{if(m.innerHTML.replace(/\s/g,"")!==""){}else{m.innerHTML="<h2>Flash version "+q+" or greater is required</h2><h3>"+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"</h3>"+(m.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");if(m.tagName=="A"){m.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}}}}if(!o&&p.onFail){var n=p.onFail.call(this);if(typeof n=="string"){m.innerHTML=n}}if(document.all){window[p.id]=document.getElementById(p.id)}}window.flashembed=function(l,m,k){if(typeof l=="string"){var n=document.getElementById(l);if(n){l=n}else{c(function(){flashembed(l,m,k)});return}}if(!l){return}if(typeof m=="string"){m={src:m}}var o=f({},i);f(o,m);return new d(l,o,k)};f(window.flashembed,{getVersion:function(){var m=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var l=navigator.plugins["Shockwave Flash"].description;if(typeof l!="undefined"){l=l.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var n=parseInt(l.replace(/^(.*)\..*$/,"$1"),10);var r=/r/.test(l)?parseInt(l.replace(/^.*r(.*)$/,"$1"),10):0;m=[n,r]}}else{if(window.ActiveXObject){try{var p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(q){try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");m=[6,0];p.AllowScriptAccess="always"}catch(k){if(m[0]==6){return m}}try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(o){}}if(typeof p=="object"){l=p.GetVariable("$version");if(typeof l!="undefined"){l=l.replace(/^\S+\s+(.*)$/,"$1").split(",");m=[parseInt(l[0],10),parseInt(l[2],10)]}}}}return m},isSupported:function(k){var m=flashembed.getVersion();var l=(m[0]>k[0])||(m[0]==k[0]&&m[1]>=k[1]);return l},domReady:c,asString:g,getHTML:a});if(e){jQuery.fn.flashembed=function(l,k){var m=null;this.each(function(){m=flashembed(this,l,k)});return l.api===false?this:m}}})();oc.video = {};
(function(me){

	me.home_theming = function () {
		document.getElementById('home-video-theming').innerHTML = '<a href="video/video-theming.flv" style="display:block;width:279px;height:189px" id="player-theming"></a>';
						flowplayer('player-theming', document.getElementsByTagName('base')[0].href+'video/flowplayer.commercial-3.2.7.swf', {
							key: '#$9bcf4758dbabbcc4069',
							clip: {
								autoPlay: true,
								autoBuffering: false,
								scaling: 'fit',
								eventCategory: 'video_theming'
							},
							plugins: {
								controls: {
									time: false
								},
								gatracker: {
			            url: document.getElementsByTagName('base')[0].href+'video/flowplayer.analytics-3.2.2.swf',
			            accountId: "UA-1823527-1"
				        }				
							}
						});
	};

	me.home_about = function ( type ) {

		if (type == 'normal') {
			var src = 'about-small.flv';
			document.getElementById('home-video-about-li-normal').innerHTML = 'Watch in Normal Quality';
			document.getElementById('home-video-about-li-high').innerHTML = '<a href="#" onclick="oc.video.home_about(\'high\'); return false;">Watch in High Definition</a>';
		} else {
			var src = 'about-medium.flv';
			document.getElementById('home-video-about-li-normal').innerHTML = '<a href="#" onclick="oc.video.home_about(\'normal\'); return false;">Watch in Normal Quality</a>';
			document.getElementById('home-video-about-li-high').innerHTML = 'Watch in High Definition';
		}

						document.getElementById('home-video-about').innerHTML = '<a href="video/'+src+'" style="display:block;width:352px;height:185px" id="player-about"></a>';
						flowplayer('player-about', document.getElementsByTagName('base')[0].href+'video/flowplayer.commercial-3.2.7.swf', {
							key: '#$9bcf4758dbabbcc4069',
							clip: {
								autoPlay: true,
								autoBuffering: false,
								scaling: 'fit',
								eventCategory: 'video_about'
							},
							plugins: {
								controls: {
									time: false
								},
								gatracker: {
			            url: document.getElementsByTagName('base')[0].href+'video/flowplayer.analytics-3.2.2.swf',
			            accountId: "UA-1823527-1"
				        }
							}
						});
	};


}(oc.video));
function tpgrid_over ( obj, type ) {
	obj.style.backgroundImage = 'url('+document.getElementsByTagName('base')[0].href+'design/old/tpgrid-bgover-'+type+'.jpg)';
}
function tpgrid_out ( obj, type ) {
	obj.style.backgroundImage = 'url('+document.getElementsByTagName('base')[0].href+'design/old/tpgrid-bg-'+type+'.jpg)';
}

function newsbar_email_input () {
	var e = document.getElementById('newsbar_email');
	if (e.value == 'enter email address') {
		e.value = '';
	}
	e.style.color = 'black';
	e.style.fontStyle = 'normal';
}

function newsbar_submit () {
	var e = document.getElementById('newsbar_email');
	if (e.value == '' || e.value == 'enter email address') {
		alert('Please enter your email address and try again');
	} else {
		document.getElementById('newsbar_form').submit();
	}
}

function newsbar_load () {
	if (document.getElementById('newsbar_email')) {
		var e = document.getElementById('newsbar_email');
		if (e.value != 'enter email address') {
			newsbar_email_input();
		}
	}
}

newsbar_load();

function chunkybutton_over ( obj ) {
	obj.style.backgroundPosition = 'right -50px';
	obj.style.color = '#f46a1f';
}

function chunkybutton_out ( obj ) {
	obj.style.backgroundPosition = 'right 0px';
	obj.style.color = '#b12b19';
}

_hotelhover_current = '';

function hotelhover_over ( id ) {
	if (_hotelhover_current != '') {
		ge('hotelhover_'+_hotelhover_current).style.display = 'none';
	} else {
		ge('hotelhover_default').style.display = 'none';
	}
	ge('hotelhover_'+id).style.display = 'block';
	_hotelhover_current = id;
}
function hotelhover_out () {
	if (_hotelhover_current != '') {
		ge('hotelhover_'+_hotelhover_current).style.display = 'none';
	}
	ge('hotelhover_default').style.display = 'block';
	_hotelhover_current = '';
}

function dateselect ( d ) {
  var s = document.getElementById('dateselect');
	for (var i = 0; i < s.options.length; i++) {
		if (s.options[i].value == d) {
			s.selectedIndex = i;
		}
	}
}

function locationselect ( l ) {
  var s = document.getElementById('locationselect');
	for (var i = 0; i < s.options.length; i++) {
		if (s.options[i].value == l) {
			s.selectedIndex = i;
		}
	}
}

_datetable_keys = new Array();

function datetable_switch ( name , y ) {

	var years = _datetable_keys[name];

	for (var i = 0; i < years.length; i++) {
		if (years[i] == y) {
			var div = 'show';
			var td = 'on';
		} else {
			var div = 'hide';
			var td = 'off';
		}
		ge('dt_'+name+'_div_'+years[i]).className = 'datetable-'+div;
		ge('dt_'+name+'_td_'+years[i]).className = 'datetable-'+td;
	}

}


function multimap_addzoom( name ) {
  if (ge('multimap-'+name+'-form').zoom.value >= 9) {
    return;
  }
  ge('multimap-'+name+'-form').zoom.value++;
  multimap_draw(name);
}

function multimap_subzoom( name ) {
  if (ge('multimap-'+name+'-form').zoom.value <= 0) {
    return;
  }
  ge('multimap-'+name+'-form').zoom.value--;
  multimap_draw(name);
}

function multimap_setzoom( name, z ) {
  ge('multimap-'+name+'-form').zoom.value = z;
  multimap_draw(name);
}

function multimap_refreshbars( name ) {
  for (c=0;c<10;c++) {
    if (ge('multimap-'+name+'-form').zoom.value != c) {
      ge('multimap-'+name+'-z-' + c).style.display = 'inline';
      ge('multimap-'+name+'-z-' + c + '-on').style.display = 'none';
    } else {
      ge('multimap-'+name+'-z-' + c).style.display = 'none';
      ge('multimap-'+name+'-z-' + c + '-on').style.display = 'inline';
    }
  }
}

function multimap_recenter( name ) {
  ge('multimap-'+name+'-form').panx.value=0;
  ge('multimap-'+name+'-form').pany.value=0;
  multimap_draw(name);
}

function multimap_east( name ) {
  ge('multimap-'+name+'-form').panx.value++;
  multimap_draw(name);
}
function multimap_west( name ) {
  ge('multimap-'+name+'-form').panx.value--;
  multimap_draw(name);
}
function multimap_north( name ) {
  ge('multimap-'+name+'-form').pany.value++;
  multimap_draw(name);
}
function multimap_south( name ) {
  ge('multimap-'+name+'-form').pany.value--;
  multimap_draw(name);
}

function multimap_draw( name ) {
	var form = ge('multimap-'+name+'-form');
  ge('multimap-'+name+'-image').innerHTML='<img class="multimap" src="http://www.multimap.com/clients/gif.cgi?client=eclipse_01&'+form.areacode.value+'&height='+form.picheight.value+'&width='+form.picwidth.value+'&ds='+form.zoom.value+'&panx='+form.panx.value+'&pany='+form.pany.value+'" width="'+form.picwidth.value+'" height="'+form.picheight.value+'" alt="Map" />';
  multimap_refreshbars(name);
}



