/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();

dojo.addOnLoad(
	function(){
		var flashvars = {
			appPath: '/static/cms_workspace/flash-deploy/snake/'
		};
		var params = {
			wmode: 'transparent'
		};
		var attributes = {};
		swfobject.embedSWF("/static/cms_workspace/flash-deploy/snake/snake.swf", "sn", "100%", "595", "9.0.0","expressInstall.swf", flashvars, params, attributes);
	}
);

window.location.querystring = (function() {
	// by Chris O'Brien, prettycode.org
	var collection = {};
	// Gets the query string, starts with '?'
	var querystring = window.location.search;
	// Empty if no query string
	if (!querystring) {
		return { toString: function() { return ""; } };
	}
	// Decode query string and remove '?'
	querystring = decodeURI(querystring.substring(1));
	// Load the key/values of the return collection
	var pairs = querystring.split("&");
	for (var i = 0; i < pairs.length; i++) {
		// Empty pair (e.g. ?key=val&&key2=val2)
		if (!pairs[i]) {
			continue;
		}
		// Don't use split("=") in case value has "=" in it
		var seperatorPosition = pairs[i].indexOf("=");
		if (seperatorPosition == -1) {
			collection[pairs[i]] = "";
		}
		else {
			collection[pairs[i].substring(0, seperatorPosition)]
				= pairs[i].substr(seperatorPosition + 1);
		}
	}
	// toString() returns the key/value pairs concatenated
	collection.toString = function() {
		return "?" + querystring;
	};
	return collection;
})();

function urldecode (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 (http://brett-zamir.me)
	// +	  input by: travc
	// +	  input by: Brett Zamir (http://brett-zamir.me)
	// +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
	// +   improved by: Lars Fischer
	// +	  input by: Ratheous
	// +   improved by: Orlando
	// +	  reimplemented by: Brett Zamir (http://brett-zamir.me)
	// +	  bugfixed by: Rob
	// %		note 1: info on what encoding functions to use from: http://xkr.us/articles/javascript/encode-compare/
	// %		note 2: Please be aware that this function expects to decode from UTF-8 encoded strings, as found on
	// %		note 2: pages served as UTF-8
	// *	 example 1: urldecode('Kevin+van+Zonneveld%21');
	// *	 returns 1: 'Kevin van Zonneveld!'
	// *	 example 2: urldecode('http%3A%2F%2Fkevin.vanzonneveld.net%2F');
	// *	 returns 2: 'http://kevin.vanzonneveld.net/'
	// *	 example 3: urldecode('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');
	// *	 returns 3: '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'
	
	return decodeURIComponent(str.replace(/\+/g, '%20'));
}


var mapData = Array();
mapData.push({ 	type: "engineering", 
				name: "Methode Electronics, Inc. World Headquarters",
				address: "7401 West Wilson Avenue, Chicago, IL 60706", 
				desc: "Methode’s global corporate headquarters is also a design and engineering center that offers design, engineering, sales, customer support and manufacturing services.",
				coords: { lat: 41.963392, lng: -87.812301 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode Power Solutions Group",
				address: "1700 Hicks Road, Rolling Meadows, IL 60008", 
				desc: "A design, engineering and manufacturing campus, this facility provides full design, engineering, sales, support and manufacturing services for the Americas. This facility manufactures power distribution solutions including bus bars, power cable, power interconnect, and thermal management components and subsystems assembly.",
				coords: { lat: 42.09125, lng: -88.034129 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode Power Solutions Group",
				address: "1750 Junction Avenue, San Jose, CA 95112", 
				desc: "A design and engineering center, this facility provides design, development, engineering, sales and support for power cables, power interconnects, PowerRail™ and power system assemblies.",
				coords: { lat: 37.376372, lng: -121.905384 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode - Magneto-Elastic Technology Group",
				address: "7401 West Wilson Avenue, Chicago, IL 60706", 
				desc: "A design and engineering center, this facility provides development, design, engineering and sales and support services for non-contact sensing solutions.",
				coords: { lat: 41.963392, lng: -87.812301 }
});
mapData.push({ 	type: "engineering", 
				name: "North America Transportation",
				address: "24585 Evergreen Road, Southfield, MI 48075", 
				desc: "A design and engineering center, this facility provides design, engineering, sales and support services for automotive solutions and biometric sensing.",
				coords: { lat: 42.469153, lng: -83.240499 }
});
mapData.push({ 	type: "engineering", 
				name: "TouchSensor Technologies",
				address: "203 North Gables Boulevard, Wheaton, IL 60187", 
				desc: "A design and engineering center, this facility provides design, engineering, sales and customer-support services for application-specific field-effect sensor solutions. In addition, standard and custom liquid- and material-level sensing solutions, digital design, engineering, sales and support services are provided.",
				coords: { lat: 41.865782, lng: -88.121172 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode Development Company",
				address: "7401 West Wilson Avenue, Chicago, IL 60706", 
				desc: "A design, engineering and manufacturing center, this facility offers full-service design, engineering, manufacturing, sales and support of standard analog fluid-level and fuel-level sensing solutions. In addition, development of conductive and resistive ink and carbon-fiber heating element technology is supported by this operation.",
				coords: { lat: 41.963392, lng: -87.812301 }
});
mapData.push({ 	type: "engineering", 
				name: "Connectivity Technologies (ConTech)",
				address: "1111 Digital Drive, Suite 150, Richardson, TX 75081", 
				desc: "A design and engineering center, this facility manufactures infrastructure solutions and provides design, engineering, and installation services, sales and support.",
				coords: { lat: 32.973342, lng: -96.70555 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode dataMate Products",
				address: "7401 West Wilson Avenue, Chicago, IL 60706", 
				desc: "A design and engineering center, this facility provides design, engineering, and installation services, sales and support and also manufactures high-speed over copper data components and subsystem solutions.",
				coords: { lat: 41.963392, lng: -87.812301 }
});
mapData.push({ 	type: "engineering", 
				name: "Trace Laboratories, Inc.",
				address: "1150 West Euclid Avenue, Palatine, IL 60067", 
				desc: "An independent, internationally accredited test laboratory, this facility provides full testing and certification services.",
				coords: { lat: 42.085161, lng: -88.075229 }
});
mapData.push({ 	type: "engineering", 
				name: "Trace Laboratories, Inc.",
				address: "5 North Park Drive, Hunt Valley, MD 21030", 
				desc: "An independent, internationally accredited test laboratory, this facility provides full testing and certification services.",
				coords: { lat: 39.497368, lng: -76.649485 }
});
mapData.push({ 	type: "engineering", 
				name: "Trace Automated Test Equipment",
				address: "111 West Buchanan Street, Carthage, IL 62321", 
				desc: "A design and engineering test laboratory, this facility designs, develops and manufactures automation test-equipment solutions.",
				coords: { lat: 40.416265, lng: -91.144991 }
});
mapData.push({ 	type: "engineering", 
				name: "Trace Laboratories, Inc.",
				address: "Denver Office, PO Box 370736, Denver, CO 80237", 
				desc: "A design and engineering test services and support office, this facility provides technical support and sales for our laboratories.",
				coords: { lat: 39.638545, lng: -104.899749 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode Electronics Ireland, Ltd.",
				address: "Unit H, Crossagalla Business Park, Ballysimon Road, Limerick, Ireland", 
				desc: "A design and engineering center, this facility provides design and engineering and sales and support services.",
				coords: { lat: 52.64915, lng: -8.582544 }
});
mapData.push({ 	type: "engineering", 
				name: "OPTOKON Co. Ltd.",
				address: "Cerveny Kriz 250, 586 02 Jihlava, Czech Republic", 
				desc: "A design and engineering center, this facility manufactures fiber-optic components and systems-equipment solutions and provides design and engineering, sales and support services.",
				coords: { lat: 49.457648, lng: 15.609627 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode Electronics International GmbH",
				address: "Rhein Strasse 48, 55435 Gau-Algesheim, Germany", 
				desc: "A design and engineering center, this facility provides design and engineering and sales and support services.",
				coords: { lat: 49.969349, lng: 8.021022 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode Electronics Malta Ltd.",
				address: "Mriehel Industrial Estate, Mriehel, Malta QRM09", 
				desc: "A full-service design, engineering and manufacturing campus, this facility manufactures automotive component and subsystem solutions, power distribution and sensing solutions and provides design, engineering, sales and support services.",
				coords: { lat: 35.902088, lng: 14.44812 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode Electronics UK Ltd.",
				address: "Prestige Park Active Way, Burnley, Lancashire, England BB11 1BS", 
				desc: "A design and engineering center, this facility provides design and engineering and sales and support services.",
				coords: { lat: 53.78801, lng: -2.243809 }
});
mapData.push({ 	type: "engineering", 
				name: "OPTOKON Polska Sp. z o.o.",
				address: "ul.Pilchowicka 9/11, 02-175 Warszaw, Poland", 
				desc: "A distribution, sales and customer-support office that offers OPTOKON engineered fiber-optic equipment solutions.",
				coords: { lat: 52.185631, lng: 20.959171 }
});
mapData.push({ 	type: "engineering", 
				name: "OPTOKON d.o.o.",
				address: "Tržaška 215, Ljubljana, Slovenia", 
				desc: "A distribution, sales and customer-support office that offers OPTOKON engineered fiber-optic equipment solutions.",
				coords: { lat: 46.051248, lng: 14.503063 }
});
mapData.push({ 	type: "engineering", 
				name: "OPTOKON Ukraina LLC.",
				address: "Bulvar Kolcova 13, Kyjev, Ukrajina", 
				desc: "A distribution, sales and customer-support office that offers OPTOKON engineered fiber-optic equipment solutions.",
				coords: { lat: 50.44138, lng: 30.52249 }
});
mapData.push({ 	type: "engineering", 
				name: "OPTOKON Co., Ltd",
				address: "Str. Barsei no.8,PC 41, ap10, Oradea, Bihor, Romania", 
				desc: "A distribution, sales and customer-support office that offers OPTOKON engineered fiber-optic equipment solutions.",
				coords: { lat: 47.603165, lng: 22.195231 }
});
mapData.push({ 	type: "engineering", 
				name: "SIA OPTOKON BALTIC",
				address: "Maza Kandavas iela 9, RIGA, LV-1083, Latvia", 
				desc: "A distribution, sales and customer-support office that offers OPTOKON engineered fiber-optic equipment solutions.",
				coords: { lat: 56.946, lng: 24.114905 }
});
mapData.push({ 	type: "engineering", 
				name: "OPTOKON Co., Ltd.",
				address: "Karlstrasse 11, 71384 Weinstadt, Germany", 
				desc: "A distribution, sales and customer-support office that offers OPTOKON engineered fiber-optic equipment solutions.",
				coords: { lat: 48.801353, lng: 9.385134 }
});
mapData.push({ 	type: "engineering", 
				name: "Optokon Co., Ltd. Prague Office",
				address: "Venušina 1149/3, Prague 10, Czech Republic", 
				desc: "A distribution, sales and customer-support office that offers OPTOKON engineered fiber-optic equipment solutions.",
				coords: { lat: 51.01627, lng: 15.03114 }
});
mapData.push({ 	type: "engineering", 
				name: "OPTOKON   Serbia Representative Office",
				address: "Dobropoljska br. 59-61 (lokal br. 10), 11 000 Beograd, Srbija", 
				desc: "A distribution, sales and customer-support office that offers OPTOKON engineered fiber-optic equipment solutions.",
				coords: { lat: 44.816916, lng: 20.468645 }
});
mapData.push({ 	type: "engineering", 
				name: "OPTOKON Saudi Arabia",
				address: "PO Box 52838, Riyadh 11573, Saudi Arabia", 
				desc: "A distribution, sales and customer-support office that offers OPTOKON engineered fiber-optic equipment solutions.",
				coords: { lat: 24.64732, lng: 46.714581 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode Electronics Far East Pte Ltd.",
				address: "60 Alexandra Terrace, #02-09A The Comtech, Singapore 118502", 
				desc: "A design and engineering center, this facility provides design, engineering, sales and support for Methode UI, Power, Data and Sensor & Switch Solution Groups.",
				coords: { lat: 1.28297, lng: 103.785751 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode Electronics (Shanghai) Co. Ltd.",
				address: "No. 40B (T40B-7) No. 1765 Chuan Qiao Road, Jin Qiao Export Processing Zone, Pudong Shanghai 201206, People's Republic of China", 
				desc: "A design, engineering and manufacturing campus, this facility provides design, engineering, manufacturing, sales and support.",
				coords: { lat: 31.259331, lng: 121.651459 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode Power Solutions Group - China",
				address: "211 Qin Qiao Road, Building T71-5 East, Jin Qiao Export Processing Zone, Pudong Shanghai 201206, People's Republic of China", 
				desc: "A design, engineering and manufacturing campus, this facility provides design, engineering, manufacturing, sales and support.",
				coords: { lat: 31.259331, lng: 121.651459 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode Electronics India Private Limited",
				address: "Raj Driva, 99/A, 3rd Floor, 5th Block, KHB Colony, Koramangala, Bangalore, India 560095", 
				desc: "A design and engineering center, this facility provides design and engineering support services.",
				coords: { lat: 12.93411, lng: 77.623283 }
});
mapData.push({ 	type: "engineering", 
				name: "Trace Laboratories (Shanghai) Co., Ltd.",
				address: "T71-5 East, No.211 Qinqiao Road, Jinqiao Export Processing Zone, Shanghai, 201206, People's Republic of China", 
				desc: "A test laboratory, this facility provides testing services for China and the Far East.",
				coords: { lat: 24.98653, lng: 121.568893 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode Electronics Int. Inc.",
				address: "Kuramae Saka Building 5F, No. 3-15-7 Kuramae Taito Ku, Tokyo 111, Japan", 
				desc: "A sales and support facility that provides sales engineering support and services for Japanese customers.",
				coords: { lat: 35.702518, lng: 139.791504 }
});
mapData.push({ 	type: "manufacturing", 
				name: "Methode Electronics, Inc.",
				address: "7401 West Wilson Avenue, Chicago, IL 60706", 
				desc: "Methode’s global corporate headquarters is also a manufacturing center that offers design and engineering, sales and support and manufacturing services.",
				coords: { lat: 41.963392, lng: -87.812301 }
});
mapData.push({ 	type: "manufacturing", 
				name: "Methode Power Solutions Group",
				address: "1700 Hicks Road, Rolling Meadows, IL 60008", 
				desc: "A design, engineering and manufacturing campus, this facility provides full design, engineering, sales, support and manufacturing services for the Americas. This facility manufactures power distribution solutions including bus bars, power cable, power interconnect, and thermal management components and provides subsystems assembly.",
				coords: { lat: 42.09125, lng: -88.034079 }
});
mapData.push({ 	type: "manufacturing", 
				name: "TouchSensor Technologies",
				address: "203 North Gables Boulevard, Wheaton, IL 60187", 
				desc: "A design, engineering and manufacturing center, this facility manufactures field-effect sensors, standard and custom digital liquid- and material-level sensing solutions and provides design and engineering, sales and support services.",
				coords: { lat: 41.865782, lng: -88.121122 }
});
mapData.push({ 	type: "manufacturing", 
				name: "Methode Development Company",
				address: "7401 West Wilson Avenue, Chicago, IL 60706", 
				desc: "A design, engineering and manufacturing facility that manufactures standard analog fluid- and fuel-level sensing solutions, conductive and resistive inks and carbon-fiber heating elements and provides design and engineering, sales and support services.",
				coords: { lat: 41.963392, lng: -87.812301 }
});
mapData.push({ 	type: "manufacturing", 
				name: "Connectivity Technologies (ConTech)",
				address: "1111 Digital Drive, Suite 150, Richardson, TX 75081", 
				desc: "A design, engineering and manufacturing center, this facility manufactures infrastructure solutions and provides design, engineering, and installation services, sales and support.",
				coords: { lat: 32.973342, lng: -96.70555 }
});
mapData.push({ 	type: "manufacturing", 
				name: "Methode dataMate Products",
				address: "7401 West Wilson Avenue, Chicago, IL 60706", 
				desc: "A design, engineering and manufacturing center, this facility manufactures high-speed over copper data products and solutions and provides design and engineering services, sales and support.",
				coords: { lat: 41.963392, lng: -87.812301 }
});
mapData.push({ 	type: "manufacturing", 
				name: "Trace Automated Test Equipment",
				address: "111 West Buchanan Street, Carthage, IL 62321", 
				desc: "An independent, internationally accredited test laboratory, this facility provides sales and support for testing services.",
				coords: { lat: 40.416265, lng: -91.144941 }
});
mapData.push({ 	type: "manufacturing", 
				name: "Methode - Magneto-Elastic Technology Group",
				address: "111 West Buchanan Street, Carthage, IL 62321", 
				desc: "This facility is a Methode solutions manufacturing center.",
				coords: { lat: 40.416265, lng: -91.144891 }
});
mapData.push({ 	type: "manufacturing", 
				name: "Methode Electronics Mexico",
				address: "Calle Spectrum #200 Suite D, Parque Industrial FINSA Monterrey, Apodaca, Nuevo Leon C.P. 66600 Mexico", 
				desc: "This facility is a Methode solutions manufacturing center.",
				coords: { lat: 25.774238, lng: -100.183232 }
});
mapData.push({ 	type: "manufacturing", 
				name: "OPTOKON Co. Ltd.",
				address: "Cerveny Kriz 250, 586 02 Jihlava, Czech Republic", 
				desc: "A design, engineering and manufacturing center, this facility manufactures fiber-optic components and systems equipment and provides design and engineering and sales and support services.",
				coords: { lat: 49.457648, lng: 15.609677 }
});
mapData.push({ 	type: "manufacturing", 
				name: "Methode Electronics Malta Ltd.",
				address: "Mriehel Industrial Estate, Mriehel, Malta QRM09", 
				desc: "A design, engineering and manufacturing campus, this facility manufactures automotive products, user inferface, power distribution and sensor and switch solutions and provides design, development, engineering and sales and support services.",
				coords: { lat: 35.902088, lng: 14.44762 }
});
mapData.push({ 	type: "manufacturing", 
				name: "Methode Electronics Far East Pte Ltd.",
				address: "60 Alexandra Terrace, #02-09A The Comtech, Singapore 118502", 
				desc: "A design, engineering and sales and support office, this facility provides design and engineering, sales and support for power, sensor, user interface and testing solutions.",
				coords: { lat: 1.28297, lng: 103.785701}
});
mapData.push({ 	type: "manufacturing", 
				name: "Methode Electronics (Shanghai) Co. Ltd.",
				address: "No. 40B (T40B-7) No. 1765 Chuan Qiao Road, Jin Qiao Export Processing Zone, Pudong Shanghai 201206, People's Republic of China", 
				desc: "A design, engineering and manufacturing campus, this facility provides design and engineering, sales and support and manufacturing services for insert molded lead-frames, interconnects and other products.",
				coords: { lat: 31.259331, lng: 121.651459 }
});
mapData.push({ 	type: "manufacturing", 
				name: "Methode Power Solutions Group - China",
				address: "211 Qin Qiao Road, Building T71-5 East, Jin Qiao Export Processing Zone, Pudong Shanghai 201206, People's Republic of China", 
				desc: "A design, engineering and manufacturing campus, this facility provides design and engineering, sales and support and manufacturing services for power products.",
				coords: { lat: 31.259331, lng: 121.651459 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Electronics, Inc.",
				address: "7401 West Wilson Avenue, Chicago, IL 60706", 
				desc: "Methode’s global corporate headquarters is also a manufacturing center that offers design and engineering, sales and support and manufacturing services.",
				coords: { lat: 41.963392, lng: -87.812301 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Power Solutions Group",
				address: "1700 Hicks Road, Rolling Meadows, IL 60008", 
				desc: "A design and engineering center, this facility manufactures bus bar and thermal-management power distribution solutions and provides design and engineering and sales and support services.",
				coords: { lat: 42.09125, lng: -88.034029 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Power Solutions Group",
				address: "1750 Junction Avenue, San Jose, CA 95112", 
				desc: "A design and engineering center, this facility provides design, development, engineering, sales and support for power cables, power interconnects, PowerRail™ and power system assemblies.",
				coords: { lat: 37.376372, lng: -121.905384 }
});
mapData.push({ 	type: "engineering", 
				name: "Methode - Magneto-Elastic Technology Group",
				address: "7401 West Wilson Avenue, Chicago, IL 60706", 
				desc: "A design and engineering center, this facility provides design and engineering and sales and support for non-contact sensing solutions.",
				coords: { lat: 41.963392, lng: -87.812301 }
});
mapData.push({ 	type: "sales", 
				name: "North American Transportation",
				address: "24585 Evergreen Road, Southfield, MI 48075", 
				desc: "A design and engineering center, this facility provides design, development, engineering and sales and support for automotive, user interface and biometric sensing solutions.",
				coords: { lat: 42.469153, lng: -83.240449 }
});
mapData.push({ 	type: "sales", 
				name: "TouchSensor Technologies",
				address: "203 North Gables Boulevard, Wheaton, IL 60187", 
				desc: "A design and engineering center, this facility provides design, development, engineering and sales and service for field-effect sensor solutions.",
				coords: { lat: 41.865782, lng: -88.121072 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Development Company",
				address: "7401 West Wilson Avenue, Chicago, IL 60706", 
				desc: "A design and engineering center, this facility provides sales and support for fluid- and fuel-level analog sensing solutions, conductive and resistive inks and carbon-fiber heating element products.",
				coords: { lat: 41.963392, lng: -87.812301 }
});
mapData.push({ 	type: "sales", 
				name: "Connectivity Technologies (ConTech)",
				address: "1111 Digital Drive, Suite 150, Richardson, TX 75081", 
				desc: "A design and engineering center, this facility provides sales, customer support and design and engineering services for data center infrastructure, optical and copper interconnect solutions.",
				coords: { lat: 32.973342, lng: -96.70555 }
});
mapData.push({ 	type: "sales", 
				name: "Methode dataMate Products",
				address: "7401 West Wilson Avenue, Chicago, IL 60706", 
				desc: "A design and engineering center, this facility manufactures high-speed copper data transfer solutions and provides design and engineering and sales and support services.",
				coords: { lat: 41.963392, lng: -87.812301 }
});
mapData.push({ 	type: "sales", 
				name: "Trace Laboratories, Inc.",
				address: "1150 West Euclid Avenue, Palatine, IL 60067", 
				desc: "An internationally accredited test laboratory, this facility provides full testing services.",
				coords: { lat: 42.085161, lng: -88.075229 }
});
mapData.push({ 	type: "sales", 
				name: "Trace Laboratories, Inc.",
				address: "5 North Park Drive, Hunt Valley, MD 21030", 
				desc: "An internationally accredited test laboratory, this facility provides full testing services.",
				coords: { lat: 39.497368, lng: -76.649485 }
});
mapData.push({ 	type: "sales", 
				name: "Trace Automated Test Equipment",
				address: "111 West Buchanan Street, Carthage, IL 62321", 
				desc: "A testing laboratory, this facility manufactures automation test equipment and provides customer support.",
				coords: { lat: 40.416265, lng: -91.144841 }
});
mapData.push({ 	type: "sales", 
				name: "Trace Laboratories, Inc.",
				address: "Denver Office, PO Box 370736, Denver, CO 80237", 
				desc: "A sales and customer support office for Trace Laboratories.",
				coords: { lat: 39.638545, lng: -104.899699 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Electronics Ireland, Ltd.",
				address: "Unit H, Crossagalla Business Park, Ballysimon Road, Limerick, Ireland", 
				desc: "A design and engineering center, this facility provides design and engineering and sales and support services.",
				coords: { lat: 52.64915, lng: -8.582494 }
});
mapData.push({ 	type: "sales", 
				name: "OPTOKON Co. Ltd.",
				address: "Cerveny Kriz 250, 586 02 Jihlava, Czech Republic", 
				desc: "A design and engineering center, this facility manufactures fiber-optic equipment and provides design and engineering and sales and support services.",
				coords: { lat: 49.457648, lng: 15.609677 }
});
mapData.push({ 	type: "sales", 
				name: "OPTOKON   Serbia Representative Office",
				address: "Dobropoljska br. 59-61 (lokal br. 10), 11 000 Beograd, Srbija", 
				desc: "A distribution, sales and customer-support office that offers OPTOKON engineered fiber-optic equipment solutions.",
				coords: { lat: 44.816916, lng: 20.468595 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Electronics International GmbH",
				address: "Rhein Strasse 48, 55435 Gau-Algesheim, Germany", 
				desc: "A design and engineering center, this facility provides design and engineering and sales and support services.",
				coords: { lat: 49.969349, lng: 8.020972 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Electronics Malta Ltd.",
				address: "Mriehel Industrial Estate, Mriehel, Malta QRM09", 
				desc: "A design, engineering and manufacturing center, this facility provides design and engineering, sales and support, and manufacturing for automotive products, user interface , power distribution and sensor solutions.",
				coords: { lat: 35.902088, lng: 14.44812 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Electronics UK Ltd.",
				address: "Prestige Park Active Way, Burnley, Lancashire, England BB11 1BS", 
				desc: "A design and engineering center, this facility provides design and engineering and sales and support services.",
				coords: { lat: 53.78801, lng: -2.243759 }
});
mapData.push({ 	type: "sales", 
				name: "OPTOKON Polska Sp. z o.o.",
				address: "ul.Pilchowicka 9/11, 02-175 Warszaw, Poland", 
				desc: "A distribution, sales and support office for OPTOKON fiber-optic equipment.",
				coords: { lat: 52.185631, lng: 20.959121 }
});
mapData.push({ 	type: "sales", 
				name: "OPTOKON d.o.o.",
				address: "Tržaška 215, Ljubljana, Slovenia", 
				desc: "A distribution, sales and support office for OPTOKON fiber-optic equipment.",
				coords: { lat: 46.051248, lng: 14.503013 }
});
mapData.push({ 	type: "sales", 
				name: "OPTOKON Ukraina LLC.",
				address: "Bulvar Kolcova 13, Kyjev, Ukrajina", 
				desc: "A distribution, sales and support office for OPTOKON fiber-optic equipment.",
				coords: { lat: 50.44138, lng: 30.52199 }
});
mapData.push({ 	type: "sales", 
				name: "OPTOKON Co., Ltd",
				address: "Str. Barsei no.8,PC 41, ap10, Oradea, Bihor, Romania", 
				desc: "A distribution, sales and support office for OPTOKON fiber-optic equipment.",
				coords: { lat: 47.052055, lng: 21.938805 }
});
mapData.push({ 	type: "sales", 
				name: "SIA OPTOKON BALTIC",
				address: "Maza Kandavas iela 9, RIGA, LV-1083, Latvia", 
				desc: "A distribution, sales and support office for OPTOKON fiber-optic equipment.",
				coords: { lat: 56.946541, lng: 24.104851 }
});
mapData.push({ 	type: "sales", 
				name: "OPTOKON Co., Ltd.",
				address: "Karlstrasse 11, 71384 Weinstadt, Germany", 
				desc: "A distribution, sales and support office for OPTOKON fiber-optic equipment.",
				coords: { lat: 48.798141, lng: 9.38878 }
});
mapData.push({ 	type: "sales", 
				name: "OPTOKON Prague Office",
				address: "Venušina 1149/3, Prague 10, Czech Republic", 
				desc: "A distribution, sales and support office for OPTOKON fiber-optic equipment.",
				coords: { lat: 50.110165, lng: 14.58365 }
});
mapData.push({ 	type: "sales", 
				name: "OPTOKON Saudi Arabia",
				address: "PO Box 52838, Riyadh 11573, Saudi Arabia", 
				desc: "A distribution, sales and support office for OPTOKON fiber-optic equipment.",
				coords: { lat: 24.64732, lng: 46.714531 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Electronics Far East Pte Ltd.",
				address: "60 Alexandra Terrace, #02-09A The Comtech, Singapore 118502", 
				desc: "A design and engineering center, this facility provides design and engineering, sales and support for user interface, data, power, sensor and testing solutions.",
				coords: { lat: 1.28297, lng: 103.785651 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Electronics (Shanghai) Co. Ltd.",
				address: "No. 40B (T40B-7) No. 1765 Chuan Qiao Road, Jin Qiao Export Processing Zone, Pudong Shanghai 201206, People's Republic of China", 
				desc: "A design, engineering and manufacturing campus, this facility provides design and engineering, sales and support, and manufacturing.",
				coords: { lat: 31.259331, lng: 121.651459 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Power Solutions Group - China",
				address: "211 Qin Qiao Road, Building T71-5 East, Jin Qiao Export Processing Zone, Pudong Shanghai 201206, People's Republic of China", 
				desc: "A design, engineering and manufacturing campus, this facility designs, engineers and manufactures power solutions and provides sales and support services.",
				coords: { lat: 31.259331, lng: 121.651459 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Electronics India Private Limited",
				address: "Raj Driva, 99/A, 3rd Floor, 5th Block, KHB Colony, Koramangala, Bangalore, India 560095", 
				desc: "A design and engineering center, this facility provides design and engineering support services.",
				coords: { lat: 12.93411, lng: 77.623233 }
});
mapData.push({ 	type: "sales", 
				name: "Trace Laboratories (Shanghai) Co., Ltd.",
				address: "T71-5 East, No.211 Qinqiao Road, Jinqiao Export Processing Zone, Shanghai, 201206, People's Republic of China", 
				desc: "A test laboratory, this facility provides testing and support services.",
				coords: { lat: 24.98653, lng: 121.568843 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Electronics Int. Inc.",
				address: "Kuramae Saka Building 5F, No. 3-15-7 Kuramae Taito Ku, Tokyo 111, Japan", 
				desc: "A design and engineering center, this facility provides design and engineering and sales and support services.",
				coords: { lat: 35.702518, lng: 139.791454 }
});
mapData.push({ 	type: "sales", 
				name: "Methode Electronics Far East",
				address: "Unit 502, Fullerton Center, 19 Hung To Road, Kwun Tong, Kwun Tong, Kowloon, Hong Kong", 
				desc: "This facility provides sales and support services.",
				coords: { lat: 22.31093, lng: 114.22528 }
});
var mapInit = function(){
	var canvas = getElementsByClassName("map_canvas")[0];
	if (canvas) {
		GMap_Methode = new GMap_initialize({ containerObj: canvas, markers: mapData, mapCenter: { lat: 30.301761, lng: 19.396362 }, mapZoom: 1 });
	}
};

dojo.addOnLoad(
	function(){
		mapInit();
	}
);

dojo.connect(window, "onunload", GUnload);

function GMap_initialize(ArgsObj) {
	/* Argument Defaults */
	var NewArguments = {
		containerObj: false,
		mapObj: false,
		markers: false,
		mapCenter: { lat: 40.912559, lng: -77.768741 },
		mapZoom: 8,
		polyOverlays: false
	};
	/* Replace Default Args with New Args */
	for (var argName in ArgsObj) {
		NewArguments[argName] = ArgsObj[argName];
	}
	/* Set Properties with Latest Arguments */
	var self = this;
	self.containerObj = NewArguments.containerObj;
	self.mapObj = NewArguments.containerObj;
	self.markers = NewArguments.markers;
	self.mapCenter = NewArguments.mapCenter;
	self.mapZoom = NewArguments.mapZoom;
	self.polyOverlays = NewArguments.polyOverlays;

	/* More Properties */
	self.markerObjs = [ ];

	//console.log("GMap_initialize() running... self.containerObj %o self.markers %o, self.polyOverlays %o",self.containerObj,self.markers,self.polyOverlays);

	self.doClustering = function() {
		var clusterIcon = self.createClusterMarker();
		self.cluster = new ClusterMarker(self.GMapObj, { markers: self.markerObjs, clusterMarkerIcon: clusterIcon } );
		self.cluster.fitMapToMarkers();
		
		self.GMapObj.savePosition(); //  enables the large map control centre button to return the map to initial view
		
		/*
		//  add an HtmlControl to enable toggling of the ClusterMarker cluster function
		//  see http://googlemapsapi.martinpearman.co.uk/htmlcontrol for more info on HtmlControl
		var html='<div class="htmlControl" style="padding:0px 3px 3px 3px">Enable clustering: <input type="checkbox" checked="checked" onclick="toggleClustering()" /></div>';
		var control=new HtmlControl(html);
		map.addControl(control, new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7,7)));
		
		function toggleClustering() {
		cluster.clusteringEnabled=!cluster.clusteringEnabled;
		cluster.refresh(true);	//	true required to force a full update of the markers - otherwise the update would occur next time that the map is zoomed or the active markers change
		}
		*/
	}
	self.addMarkers = function() {
		for (i=0, j=self.markers.length; i<j; i++) {
			var markerObj = self.createMarker(self.markers[i]);
			self.markerObjs.push(markerObj);
		}
	}
	self.createClusterMarker = function() {
		var marker = new GIcon();
		marker.image="/static/dk_methodedotcom/_stylesheets/_images/style.400.cluster.png";
		marker.transparent = "/static/dk_methodedotcom/_stylesheets/_images/style.400.cluster.explorerClickArea.png";
		marker.iconSize=new GSize(22, 13);
		marker.iconAnchor=new GPoint(11, 13);
		//marker.infoWindowAnchor=new GPoint(15, 13);
		marker.shadow = "/static/dk_methodedotcom/_stylesheets/_images/style.400.cluster.shadow.png";
		marker.shadowSize=new GSize(27, 18);
		return marker;
	}
	self.createMarker = function(marker) {
		//console.log("createMarker: have marker %o",marker);
		var baseIcon = new GIcon(G_DEFAULT_ICON);
		baseIcon.image = "/static/dk_methodedotcom/_stylesheets/_images/style.400.pin.cyan.png";
		baseIcon.iconSize = new GSize(16, 34);

		// define click area for standards browsers
		//baseIcon.imageMap = [ 2,0, 7,0, 10,4, 10,7, 7,10, 7,24, 4,24, 4,10, 0,7, 0,4 ];
		baseIcon.imageMap = [ 3,3, 6,0, 9,0, 13,2, 16,7, 16,9, 13,13, 10,15, 10,33, 6,33, 6,15, 1,12, 0,8, 0,6 ];

		// define click area for IE6
		baseIcon.transparent = "/static/dk_methodedotcom/_stylesheets/_images/style.400.pin.explorerClickArea.png";

		// shadow
		baseIcon.shadow = "/static/dk_methodedotcom/_stylesheets/_images/style.400.pin.shadow.png";
		baseIcon.shadowSize = new GSize(35, 35);

		baseIcon.iconAnchor = new GPoint(6, 26);
		baseIcon.infoWindowAnchor = new GPoint(-2, 7);

		var customIcon = new GIcon(baseIcon);
		switch(marker.type) {
			case "sales":
				customIcon.image = "/static/dk_methodedotcom/_stylesheets/_images/style.400.pin.orange.png";
				break;
			case "engineering":
				customIcon.image = "/static/dk_methodedotcom/_stylesheets/_images/style.400.pin.cyan.png";
				break;
			case "manufacturing":
				customIcon.image = "/static/dk_methodedotcom/_stylesheets/_images/style.400.pin.green.png";
				break;
		}

		// Set up GLatLong Obj
		var point = new GLatLng(marker.coords.lat,marker.coords.lng);

		// Set up GMarkerOptions object
		var markerOptions = { icon:customIcon };
		var markerObj = new GMarker(point, markerOptions);
		var bubbleHTML = createWindowHTML(marker); 
		self.extInfoWindowEvent(markerObj, bubbleHTML);

		return markerObj;
	}
	self.extInfoWindowEvent = function(markerObj,bubbleHTML) {
		var mapID = "map-1";
		GEvent.addListener(markerObj, 'click', function(){ 
			markerObj.openExtInfoWindow(
				self.GMapObj,
				"extWindow",
				bubbleHTML,
				{ beakOffset: 3, cssClassName: "gmaps_bubble", layoutContextId: mapID, avoidMapControls: true  }
			); 
		});
	}
	self.doPolygons = function() {
		//console.log("GMap: doPolygons()...",this.polyOverlays);
		for (var i=0, j=this.polyOverlays.length; i<j; i++) {
			var overlay = this.polyOverlays[i];
			var transCoords = [ ];
			if (overlay.dataService) {
				self.addGGeoXmlPoly(overlay);
			} else {
				for (var m=0, n=overlay.coords.length; m<n; m++) {
					var Gpt = new GLatLng(overlay.coords[m].lat,overlay.coords[m].lng)
					transCoords.push(Gpt);
				}
				var poly = new GPolygon(transCoords, "#ff0000", 1, 0.36, "#ee3342", 0.2);

				/* set center of map based on first overlay */
				var center = this.polyOverlays[0].center;
				var zoom = this.polyOverlays[0].zoom;
				var Gcenter = new GLatLng(center.lat,center.lng);
				self.GMapObj.setCenter(Gcenter, zoom);
				self.addPoly(poly);
			}
		}
	}
	self.addPoly = function(poly) {
			/* add polygon overlay */
			self.GMapObj.addOverlay(poly);
	}
	self.addGGeoXmlPoly = function(overlay) {
		//console.log("addGeoRSSPoly(): overlay %o...",overlay);
		self.geoXml = new GGeoXml(overlay.dataService,self.addGeoXmlComplete);
	}
	self.addGeoXmlComplete = function() {
	/*DEBUG
		console.log("addGeoXmlComplete, self.geoXml %o...",self.geoXml);
		console.log("self.geoXml.hasLoaded() %o",self.geoXml.hasLoaded());
		console.log("self.geoXml.loadedCorrectly() %o",self.geoXml.loadedCorrectly());
		console.log("self.geoXml.isHidden() %o",self.geoXml.isHidden());
		console.log("self.geoXml.getDefaultCenter() %o",self.geoXml.getDefaultCenter());
		console.log("self.geoXml.getDefaultBounds() %o",self.geoXml.getDefaultBounds());
		*/
		self.GMapObj.setCenter(self.geoXml.getDefaultCenter());
		//console.log("self.mapCenter %o, self.mapZoom %o",self.mapCenter,self.mapZoom);
		//var center = new GLatLng(self.mapCenter.lat,self.mapCenter.lng);
		//self.GMapObj.setCenter(center,self.zoom);
		self.geoXml.gotoDefaultViewport(self.GMapObj);
		self.addPoly(self.geoXml);
	}
	self.getPolyDataError = function(transport) {
		//console.log("getPolyDataError()...");
		//console.log("data as \n",transport.responseXML);
	}
	if ((typeof GBrowserIsCompatible === "function") && (GBrowserIsCompatible()) && (self.containerObj)) {
		var width = self.mapObj.offsetWidth;
		var height = self.mapObj.offsetHeight;
		//console.log("have self.mapObj as %o",self.mapObj);
		self.GMapObj = new GMap2(self.mapObj, { size: new GSize(width,height) });

		// markers 
		if (self.markers) {
			self.addMarkers();
		}
		// polygonal overlays
		//console.log(self.polyOverlays);
		if (self.polyOverlays) {
			self.doPolygons();
		}
		// add standard controls with maps.google.com behaviors
		var customUI = self.GMapObj.getDefaultUI();
		//customUI.controls.scalecontrol = false;
		self.GMapObj.setUI(customUI);

		// add Terrain map type and switch to it
		self.GMapObj.addMapType(G_PHYSICAL_MAP);
  		//self.GMapObj.setMapType(G_PHYSICAL_MAP);
		//map.removeMapType(G_SATELLITE_MAP); per Etool #100, client request
		self.GMapObj.removeMapType(G_HYBRID_MAP);

		// marker clustering
		if (self.markerObjs.length) {
			self.doClustering();
		}
		// center & zoom map
		self.GMapObj.setCenter(new GLatLng(self.mapCenter.lat, self.mapCenter.lng), self.mapZoom);
	}
}


var createWindowHTML = function(marker) {
	var plantType = marker.type.toLowerCase().split(' ')[0];
	var bubbleElements = Array();
	bubbleElements.push('<div class="mapBubble">');
	bubbleElements.push('   <div class="content">');
	bubbleElements.push('	   <p class="title">'+marker.name+'</p>');
	bubbleElements.push('	   <p class="address">'+marker.address+'</p>');
	bubbleElements.push('	   <p class="description">'+marker.desc+'</p>');
	bubbleElements.push('	</div>');
	bubbleElements.push('</div>');
	var HTML = bubbleElements.join("\n");

	return HTML;
};

/*
	Developed by Robert Nyman, http://www.robertnyman.com
	Code/licensing: http://code.google.com/p/getelementsbyclassname/
*/	
var getElementsByClassName = function (className, tag, elm){
	if (document.getElementsByClassName) {
		getElementsByClassName = function (className, tag, elm) {
			elm = elm || document;
			var elements = elm.getElementsByClassName(className),
				nodeName = (tag)? new RegExp("\\b" + tag + "\\b", "i") : null,
				returnElements = [],
				current;
			for(var i=0, il=elements.length; i<il; i+=1){
				current = elements[i];
				if(!nodeName || nodeName.test(current.nodeName)) {
					returnElements.push(current);
				}
			}
			return returnElements;
		};
	}
	else if (document.evaluate) {
		getElementsByClassName = function (className, tag, elm) {
			tag = tag || "*";
			elm = elm || document;
			var classes = className.split(" "),
				classesToCheck = "",
				xhtmlNamespace = "http://www.w3.org/1999/xhtml",
				namespaceResolver = (document.documentElement.namespaceURI === xhtmlNamespace)? xhtmlNamespace : null,
				returnElements = [],
				elements,
				node;
			for(var j=0, jl=classes.length; j<jl; j+=1){
				classesToCheck += "[contains(concat(' ', @class, ' '), ' " + classes[j] + " ')]";
			}
			try	{
				elements = document.evaluate(".//" + tag + classesToCheck, elm, namespaceResolver, 0, null);
			}
			catch (e) {
				elements = document.evaluate(".//" + tag + classesToCheck, elm, null, 0, null);
			}
			while ((node = elements.iterateNext())) {
				returnElements.push(node);
			}
			return returnElements;
		};
	}
	else {
		getElementsByClassName = function (className, tag, elm) {
			tag = tag || "*";
			elm = elm || document;
			var classes = className.split(" "),
				classesToCheck = [],
				elements = (tag === "*" && elm.all)? elm.all : elm.getElementsByTagName(tag),
				current,
				returnElements = [],
				match;
			for(var k=0, kl=classes.length; k<kl; k+=1){
				classesToCheck.push(new RegExp("(^|\\s)" + classes[k] + "(\\s|$)"));
			}
			for(var l=0, ll=elements.length; l<ll; l+=1){
				current = elements[l];
				match = false;
				for(var m=0, ml=classesToCheck.length; m<ml; m+=1){
					match = classesToCheck[m].test(current.className);
					if (!match) {
						break;
					}
				}
				if (match) {
					returnElements.push(current);
				}
			}
			return returnElements;
		};
	}
	return getElementsByClassName(className, tag, elm);
};

/*
* ExtInfoWindow Class, v1.0 
*  Copyright (c) 2007, Joe Monahan (http://www.seejoecode.com)
* 
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* 
*	   http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This class lets you add an info window to the map which mimics GInfoWindow
* and allows for users to skin it via CSS.  Additionally it has options to
* pull in HTML content from an ajax request, triggered when a user clicks on
* the associated marker.
*/


/**
 * Creates a new ExtInfoWindow that will initialize by reading styles from css
 *
 * @constructor
 * @param {GMarker} marker The marker associated with the info window
 * @param {String} windowId The DOM Id we will use to reference the info window
 * @param {String} html The HTML contents
 * @param {Object} opt_opts A contianer for optional arguments:
 *	{String} ajaxUrl The Url to hit on the server to request some contents 
 *	{Number} paddingX The padding size in pixels that the info window will leave on 
 *					the left and right sides of the map when panning is involved.
 *	{Number} paddingY The padding size in pixels that the info window will leave on 
 *					the top and bottom sides of the map when panning is involved.
 *	{Number} beakOffset The repositioning offset for when aligning the beak element. 
 *					This is used to make sure the beak lines up correcting if the 
 *					info window styling containers a border.
 */
function ExtInfoWindow(marker, windowId, html, opt_opts) {
  this.html_ = html;
  this.marker_ = marker;
  this.infoWindowId_ = windowId;

  this.options_ = opt_opts == null ? {} : opt_opts;
  this.ajaxUrl_ = this.options_.ajaxUrl == null ? null : this.options_.ajaxUrl;
  this.callback_ = this.options_.ajaxCallback == null ? null : this.options_.ajaxCallback;
  
  this.maxContent_ = this.options_.maxContent == null ? null : this.options_.maxContent;
  this.maximizeEnabled_ = this.maxContent_ == null ? false : true;
  this.isMaximized_ = false;

  this.borderSize_ = this.options_.beakOffset == null ? 0 : this.options_.beakOffset;
  this.paddingX_ = this.options_.paddingX == null ? 0 + this.borderSize_ : this.options_.paddingX + this.borderSize_;
  this.paddingY_ = this.options_.paddingY == null ? 0 + this.borderSize_ : this.options_.paddingY + this.borderSize_;
  
  /* Dk modification: optionally use classNames to drive UI
	 for compatibility with multiple maps on same page */
  this.baseClass_ = this.options_.cssClassName == null ? null : this.options_.cssClassName;
  this.layoutContextId_ = this.options_.layoutContextId == null ? null : this.options_.layoutContextId;
  if ((this.baseClass_) && (this.layoutContextId_)) {
	this.infoWindowId_ = this.layoutContextId_ + "_" + this.infoWindowId_;
	//console.log("ExtInfoWindow: override this.infoWindowId_ so as to be multiple-instance-safe, now as '%s'",this.infoWindowId_);
  }
  /* --end Dk modification */

  /* Dk modification: optionally avoid map Controls, assume left and top, default sizes */
  this.avoidMapControls_ = this.options_.avoidMapControls == null ? null : this.options_.avoidMapControls;
  /* --end Dk modification */


  this.map_ = null;

  this.container_ = document.createElement('div');
  this.container_.style.position = 'relative';
  this.container_.style.display = 'none';

  this.contentDiv_ = document.createElement('div');
  this.contentDiv_.id = this.infoWindowId_ + '_contents';
  /* Dk modification: also assign className if option cssClassName */
  if (this.baseClass_) {
	this.contentDiv_.className = this.baseClass_+ '_contents';
  }
  /* --end Dk modification */
  this.contentDiv_.innerHTML = this.html_;
  this.contentDiv_.style.display = 'block';
  this.contentDiv_.style.visibility = 'hidden';

  this.wrapperDiv_ = document.createElement('div');
};

//use the GOverlay class
ExtInfoWindow.prototype = new GOverlay();

/**
 * Called by GMap2's addOverlay method.  Creates the wrapping div for our info window and adds
 * it to the relevant map pane.  Also binds mousedown event to a private function so that they
 * are not passed to the underlying map.  Finally, performs ajax request if set up to use ajax
 * in the constructor.
 * @param {GMap2} map The map that has had this extInfoWindow is added to it.
 */
ExtInfoWindow.prototype.initialize = function(map) {
  this.map_ = map;

  if( this.maximizeEnabled_ ){
	this.maxWidth_ = this.map_.getSize().width * 0.9;
	this.maxHeight_ = this.map_.getSize().height * 0.9;
  }

  this.defaultStyles = {
	containerWidth: this.map_.getSize().width / 2,
	borderSize: 1
  };

  this.wrapperParts = {
	tl:{t:0, l:0, w:0, h:0, domElement: null},
	t:{t:0, l:0, w:0, h:0, domElement: null},
	tr:{t:0, l:0, w:0, h:0, domElement: null},
	l:{t:0, l:0, w:0, h:0, domElement: null},
	r:{t:0, l:0, w:0, h:0, domElement: null},
	bl:{t:0, l:0, w:0, h:0, domElement: null},
	b:{t:0, l:0, w:0, h:0, domElement: null},
	br:{t:0, l:0, w:0, h:0, domElement: null},
	beak:{t:0, l:0, w:0, h:0, domElement: null},
	close:{t:0, l:0, w:0, h:0, domElement: null}
  };
  if( this.maximizeEnabled_ ){
	this.wrapperParts.max = {t:0, l:0, w:0, h:0, domElement: null}
	this.wrapperParts.min = {t:0, l:0, w:0, h:0, domElement: null}
  }

  for (var i in this.wrapperParts ) {
	var tempElement = document.createElement('div');
	tempElement.id = this.infoWindowId_ + '_' + i;
	//tempElement.id = this.infoWindowId_ + '_temp_' + i;
	/* Dk modification: add className if using cssClassName option */
	if (this.baseClass_) {
		tempElement.className = this.baseClass_ + '_' + i;
	}
	/* --end Dk modification */
	tempElement.style.visibility = 'hidden';
	tempElement.style.display = '';

	/* Dk modification: use different layout target if using Dk layouts
	   Without proper CSS context these elements won't get right dims */
	var wrapper;
	if (DkWrapper = document.getElementById("wrapper")) {
		wrapper = DkWrapper;
	} else {
		wrapper = document.body;
	}
	//document.body.appendChild(tempElement);
	wrapper.appendChild(tempElement);

	tempElement = document.getElementById(this.infoWindowId_ + '_' + i);
	//tempElement = document.getElementById(this.infoWindowId_ + '_temp_' + i);
	var tempWrapperPart = this.wrapperParts[i];	
	tempWrapperPart.w = parseInt(this.getStyle_(tempElement, 'width'), 10);
	tempWrapperPart.h = parseInt(this.getStyle_(tempElement, 'height'), 10);
	//console.log('working with tempWrapperPart %o, width = "%s", height = "%s", from tempElement %o, whereas retrieving offsetWidth directly shows "%s", window width "%s"',tempWrapperPart,tempWrapperPart.w,tempWrapperPart.h,tempElement,tempElement.offsetWidth,$('body').width());

	//document.body.removeChild(tempElement);
	wrapper.removeChild(tempElement);
  }
  for (var i in this.wrapperParts) {
	if (i == 'close' ) {
	  //first append the content so the close button is layered above it
	  this.wrapperDiv_.appendChild(this.contentDiv_);
	}
	var wrapperPartsDiv = null;
	if (this.wrapperParts[i].domElement == null) {
	  wrapperPartsDiv = document.createElement('div');
	  this.wrapperDiv_.appendChild(wrapperPartsDiv);
	} else {
	  wrapperPartsDiv = this.wrapperParts[i].domElement;
	}
	wrapperPartsDiv.id = this.infoWindowId_ + '_' + i;
	/* Dk modification: also assign className if option cssClassName */
	if (this.baseClass_) {
		wrapperPartsDiv.className = this.baseClass_ + '_' + i;
	}
	/* --end Dk modification */
	wrapperPartsDiv.style.position = 'absolute';
	wrapperPartsDiv.style.width = this.wrapperParts[i].w + 'px';
	wrapperPartsDiv.style.height = this.wrapperParts[i].h + 'px';
	wrapperPartsDiv.style.top = this.wrapperParts[i].t + 'px';
	wrapperPartsDiv.style.left = this.wrapperParts[i].l + 'px';
	this.wrapperParts[i].domElement = wrapperPartsDiv;
  }
  
  this.map_.getPane(G_MAP_FLOAT_PANE).appendChild(this.container_);
  this.container_.id = this.infoWindowId_;
  /* Dk modification: also assign className if option cssClassName */
  if (this.baseClass_) {
	  this.container_.className = this.baseClass_;
  }
  /* --end Dk modification */
  var containerWidth  = this.getStyle_(document.getElementById(this.infoWindowId_), 'width');
  this.container_.style.width = (containerWidth == null ? this.defaultStyles.containerWidth : containerWidth);

  this.map_.getContainer().appendChild(this.contentDiv_);
  this.contentWidth = this.getDimensions_(this.container_).width;
  this.contentDiv_.style.width = this.contentWidth + 'px';
  this.contentDiv_.style.position = 'absolute';

  this.container_.appendChild(this.wrapperDiv_);
  
  if( this.maximizeEnabled_ ){
	this.minWidth_ = this.getDimensions_(this.container_).width;
	//console.log(this.minWidth_);
  }
  
  if (this.maximizeEnabled_) {
	thisMap = this.map_;
	thisMaxWidth = this.maxWidth_;
	thisMaxHeight = this.maxHeight_;
	thisContainer = this.container_;
	thisMaxContent = this.maxContent_;
	if(this.marker_) {
	  GEvent.trigger(this.marker_, 'extinfowindowbeforeclose'); 
	}

	thisMinWidth = this.container_.style.width;
	thisMinHeight = this.container_.style.height;
	//add event handler for maximize and minimize icons
	GEvent.addDomListener(this.wrapperParts.max.domElement, 'click', 
	  function() {
		var infoWindow = thisMap.getExtInfoWindow();
		infoWindow.container_.style.width = thisMaxWidth + 'px';
		infoWindow.ajaxRequest_(thisMaxContent);

	if(this.marker_) {
	  GEvent.trigger(this.marker_, 'extinfowindowclose');
	}
		infoWindow.isMaximized_ = true;
		infoWindow.redraw(true);
	  
		//swap min/max icons
		infoWindow.toggleMaxMin_();
	  }
	);
	GEvent.addDomListener(this.wrapperParts.min.domElement, 'click', 
	  function() {
		var infoWindow = thisMap.getExtInfoWindow();
		infoWindow.container_.style.width = thisMinWidth;
		infoWindow.container_.style.height = thisMinHeight;
		if (infoWindow.ajaxUrl_ != null ) {
		   infoWindow.ajaxRequest_(this.ajaxUrl_);
		}else{
		  infoWindow.contentDiv_.innerHTML = infoWindow.html_;
		}
		
		infoWindow.isMaximized_ = false;
		infoWindow.redraw(true);
		infoWindow.resize();

		//swap min/max icons
		infoWindow.toggleMaxMin_();
	  }
	);
	
	this.toggleMaxMin_();
	
  }

  var stealEvents = ['mousedown', 'dblclick', 'DOMMouseScroll'];
  for( i=0; i < stealEvents.length; i++ ){
	GEvent.bindDom(this.container_, stealEvents[i], this, this.onClick_);
  }

  GEvent.trigger(this.map_, 'extinfowindowopen');
  if (this.ajaxUrl_ != null ) {
	this.ajaxRequest_(this.ajaxUrl_);
  }
};

/**
 * Private function to steal mouse click events to prevent it from returning to the map.
 * Without this links in the ExtInfoWindow would not work, and you could click to zoom or drag 
 * the map behind it.
 * @private
 * @param {MouseEvent} e The mouse event caught by this function
 */
ExtInfoWindow.prototype.onClick_ = function(e) {
  if(navigator.userAgent.toLowerCase().indexOf('msie') != -1 && document.all) {
	window.event.cancelBubble = true;
	window.event.returnValue = false;
  } else {
	//e.preventDefault();
	e.stopPropagation();
  }
};

/**
 * Remove the extInfoWindow container from the map pane. 
 */
ExtInfoWindow.prototype.remove = function() {
  if (this.map_.getExtInfoWindow() != null) {
	GEvent.trigger(this.map_, 'extinfowindowbeforeclose');
	
	GEvent.clearInstanceListeners(this.container_);
	if (this.container_.outerHTML) {
	  this.container_.outerHTML = ''; //prevent pseudo-leak in IE
	}
	if (this.container_.parentNode) {
	  this.container_.parentNode.removeChild(this.container_);
	}
	this.container_ = null;
	GEvent.trigger(this.map_, 'extinfowindowclose');
	this.map_.setExtInfoWindow_(null);
  }
};

/**
 * Return a copy of this overlay, for the parent Map to duplicate itself in full. This
 * is part of the Overlay interface and is used, for example, to copy everything in the 
 * main view into the mini-map.
 * @return {GOverlay}
 */
ExtInfoWindow.prototype.copy = function() {
  return new ExtInfoWindow(this.marker_, this.infoWindowId_, this.html_, this.options_);
};

/**
 * Draw extInfoWindow and wrapping decorators onto the map.  Resize and reposition
 * the map as necessary. 
 * @param {Boolean} force Will be true when pixel coordinates need to be recomputed.
 */
ExtInfoWindow.prototype.redraw = function(force) {
  if (!force || this.container_ == null) return;
  
  //set the content section's height, needed so  browser font resizing does not affect the window's dimensions
  var contentHeight = this.contentDiv_.offsetHeight;
  this.contentDiv_.style.height = contentHeight + 'px';
  
  this.contentWidth = this.getDimensions_(this.container_).width;
  this.contentDiv_.style.width = this.container_.style.width;

  //reposition contents depending on wrapper parts.
  //this is necessary for content that is pulled in via ajax
  this.contentDiv_.style.left = this.wrapperParts.l.w + 'px';
  this.contentDiv_.style.top = this.wrapperParts.tl.h + 'px';
  this.contentDiv_.style.visibility = 'visible';

  //Finish configuring wrapper parts that were not set in initialization
  this.wrapperParts.tl.t = 0;
  this.wrapperParts.tl.l = 0;
  this.wrapperParts.t.l = this.wrapperParts.tl.w;
  this.wrapperParts.t.w = (this.wrapperParts.l.w + this.contentWidth + this.wrapperParts.r.w) - this.wrapperParts.tl.w - this.wrapperParts.tr.w;
  this.wrapperParts.t.h = this.wrapperParts.tl.h;
  this.wrapperParts.tr.l = this.wrapperParts.t.w + this.wrapperParts.tl.w;
  this.wrapperParts.l.t = this.wrapperParts.tl.h;
  this.wrapperParts.l.h = contentHeight;
  this.wrapperParts.r.l = this.contentWidth + this.wrapperParts.l.w;
  this.wrapperParts.r.t = this.wrapperParts.tr.h;
  this.wrapperParts.r.h = contentHeight;
  this.wrapperParts.bl.t = contentHeight + this.wrapperParts.tl.h;
  this.wrapperParts.b.l = this.wrapperParts.bl.w;
  this.wrapperParts.b.t = contentHeight + this.wrapperParts.tl.h;
  this.wrapperParts.b.w = (this.wrapperParts.l.w + this.contentWidth + this.wrapperParts.r.w) - this.wrapperParts.bl.w - this.wrapperParts.br.w;
  this.wrapperParts.b.h = this.wrapperParts.bl.h;
  this.wrapperParts.br.l = this.wrapperParts.b.w + this.wrapperParts.bl.w;
  this.wrapperParts.br.t = contentHeight + this.wrapperParts.tr.h;
  this.wrapperParts.beak.l = this.borderSize_ + (this.contentWidth / 2) - (this.wrapperParts.beak.w / 2);
  this.wrapperParts.beak.t = this.wrapperParts.bl.t + this.wrapperParts.bl.h - this.borderSize_;
  this.wrapperParts.close.l = this.wrapperParts.tr.l +this.wrapperParts.tr.w - this.wrapperParts.close.w - this.borderSize_;
  this.wrapperParts.close.t = this.borderSize_;
  if( this.maximizeEnabled_ ){
	this.wrapperParts.max.l = this.wrapperParts.close.l - this.wrapperParts.max.w - 5;
	this.wrapperParts.max.t = this.wrapperParts.close.t;
	this.wrapperParts.min.l = this.wrapperParts.max.l;
	this.wrapperParts.min.t = this.wrapperParts.max.t;
  }

  //create the decoration wrapper DOM objects
  //append the styled info window to the container
  for (var i in this.wrapperParts) {
	if (i == 'close' ) {
	  //first append the content so the close button is layered above it
	  this.wrapperDiv_.insertBefore(this.contentDiv_, this.wrapperParts[i].domElement);
	}
	var wrapperPartsDiv = null;
	if (this.wrapperParts[i].domElement == null) {
	  wrapperPartsDiv = document.createElement('div');
	  this.wrapperDiv_.appendChild(wrapperPartsDiv);
	} else {
	  wrapperPartsDiv = this.wrapperParts[i].domElement;
	}
	wrapperPartsDiv.id = this.infoWindowId_ + '_' + i;
	/* Dk modification: also assign className if option cssClassName */
	if (this.baseClass_) {
		wrapperPartsDiv.className = this.baseClass_ + '_' + i;
	}
  /* --end Dk modification */
	wrapperPartsDiv.style.position='absolute';
	wrapperPartsDiv.style.width = this.wrapperParts[i].w + 'px';
	wrapperPartsDiv.style.height = this.wrapperParts[i].h + 'px';
	wrapperPartsDiv.style.top = this.wrapperParts[i].t + 'px';
	wrapperPartsDiv.style.left = this.wrapperParts[i].l + 'px';
	this.wrapperParts[i].domElement = wrapperPartsDiv;
  }

  //add event handler for the close icon
  var currentMarker = this.marker_;
  var thisMap = this.map_;
  GEvent.addDomListener(this.wrapperParts.close.domElement, 'click', 
	function() {
	  thisMap.closeExtInfoWindow();
	}
  );
  
  
  
  //position the container on the map, over the marker
  var pixelLocation = this.map_.fromLatLngToDivPixel(this.marker_.getPoint());
  this.container_.style.position = 'absolute';
  var markerIcon = this.marker_.getIcon();
  this.container_.style.left = (pixelLocation.x 
	- (this.contentWidth / 2) 
	- markerIcon.iconAnchor.x 
	+ markerIcon.infoWindowAnchor.x
  ) + 'px';

  this.container_.style.top = (pixelLocation.y
	- this.wrapperParts.bl.h
	- contentHeight
	- this.wrapperParts.tl.h
	- this.wrapperParts.beak.h
	- markerIcon.iconAnchor.y
	+ markerIcon.infoWindowAnchor.y
	+ this.borderSize_
  ) + 'px';

  this.container_.style.display = 'block';

  if(this.map_.getExtInfoWindow() != null) {
	this.repositionMap_();
  }
};

ExtInfoWindow.prototype.toggleMaxMin_ = function(){
  if( this.wrapperParts.max.domElement != null && this.wrapperParts.min.domElement != null ){
	if (this.isMaximized_) {
	  this.wrapperParts.max.domElement.style.display = 'none';
	  this.wrapperParts.min.domElement.style.display = 'block';
	}else{
	  this.wrapperParts.max.domElement.style.display = 'block';
	  this.wrapperParts.min.domElement.style.display = 'none';
	}
  }
}

/**
 * Determine the dimensions of the contents to recalculate and reposition the 
 * wrapping decorator elements accordingly.
 */
ExtInfoWindow.prototype.resize = function(){
  
  //Create temporary DOM node for new contents to get new height
  //This is done because if you manipulate this.contentDiv_ directly it causes visual errors in IE6
  var tempElement = this.contentDiv_.cloneNode(true);
  tempElement.id = this.infoWindowId_ + '_tempContents';
  tempElement.style.visibility = 'hidden';	
  tempElement.style.height = 'auto';
  document.body.appendChild(tempElement);
  tempElement = document.getElementById(this.infoWindowId_ + '_tempContents');
  var contentHeight = tempElement.offsetHeight;
  document.body.removeChild(tempElement);

  //Set the new height to eliminate visual defects that can be caused by font resizing in browser
  this.contentDiv_.style.height = contentHeight + 'px';

  var contentWidth = this.container_.offsetWidth;
  var pixelLocation = this.map_.fromLatLngToDivPixel(this.marker_.getPoint());

  var oldWindowHeight = this.wrapperParts.t.domElement.offsetHeight + this.wrapperParts.l.domElement.offsetHeight + this.wrapperParts.b.domElement.offsetHeight;	
  var oldWindowPosTop = this.wrapperParts.t.domElement.offsetTop;

  //resize info window to look correct for new height
  this.wrapperParts.l.domElement.style.height = contentHeight + 'px';
  this.wrapperParts.r.domElement.style.height = contentHeight + 'px';
  var newPosTop = this.wrapperParts.b.domElement.offsetTop - contentHeight;
  this.wrapperParts.l.domElement.style.top = newPosTop + 'px';
  this.wrapperParts.r.domElement.style.top = newPosTop + 'px';
  this.contentDiv_.style.top = newPosTop + 'px';
  windowTHeight = parseInt(this.wrapperParts.t.domElement.style.height, 10);
  newPosTop -= windowTHeight;
  this.wrapperParts.close.domElement.style.top = newPosTop + this.borderSize_ + 'px';
  this.wrapperParts.tl.domElement.style.top = newPosTop + 'px';
  this.wrapperParts.t.domElement.style.top = newPosTop + 'px';
  this.wrapperParts.tr.domElement.style.top = newPosTop + 'px';

  this.repositionMap_();
};

/**
 * Check to see if the displayed extInfoWindow is positioned off the viewable 
 * map region and by how much.  Use that information to pan the map so that 
 * the extInfoWindow is completely displayed.
 * @private
 */
ExtInfoWindow.prototype.repositionMap_ = function(){
  //pan if necessary so it shows on the screen
  var mapNE = this.map_.fromLatLngToDivPixel(
	this.map_.getBounds().getNorthEast()
  );
  var mapSW = this.map_.fromLatLngToDivPixel(
	this.map_.getBounds().getSouthWest()
  );
  var markerPosition = this.map_.fromLatLngToDivPixel(
	this.marker_.getPoint()
  );

  var panX = 0;
  var panY = 0;
  var paddingX = this.paddingX_;
  var paddingY = this.paddingY_;
  var infoWindowAnchor = this.marker_.getIcon().infoWindowAnchor;
  var iconAnchor = this.marker_.getIcon().iconAnchor;

  //test top of screen	
  var windowT = this.wrapperParts.t.domElement;
  var windowL = this.wrapperParts.l.domElement;
  var windowB = this.wrapperParts.b.domElement;
  var windowR = this.wrapperParts.r.domElement;
  var windowBeak = this.wrapperParts.beak.domElement;

  var offsetTop = markerPosition.y - ( -infoWindowAnchor.y + iconAnchor.y +  this.getDimensions_(windowBeak).height + this.getDimensions_(windowB).height + this.getDimensions_(windowL).height + this.getDimensions_(windowT).height + this.paddingY_);
  /* Dk modification: optionally avoid map Controls, assume default control sizes */
  var yCompareTop = this.avoidMapControls_ ? mapNE.y + 25 : mapNE.y;
  //if (offsetTop < mapNE.y) {
  if (offsetTop < yCompareTop) {
	//panY = mapNE.y - offsetTop;
	panY = yCompareTop - offsetTop;
  /* --end Dk modification */
  } else {
	//test bottom of screen
	var offsetBottom = markerPosition.y + this.paddingY_;
	/* Dk modification: optionally avoid map Controls, assume control sizes */
	var yCompareBottom = this.avoidMapControls_ ? offsetBottom + 100 : offsetBottom;
	//if (offsetBottom >= mapSW.y) {
	if (yCompareBottom >= mapSW.y) {
	  //panY = -(offsetBottom - mapSW.y);
	  panY = -(yCompareBottom - mapSW.y);
	/* --end Dk modification */
	}
  }

  //test right of screen
  /* Dk modification: include static marker width safety margin */
  //var offsetRight = Math.round(markerPosition.x + this.getDimensions_(this.container_).width/2 + this.getDimensions_(windowR).width + this.paddingX_ + infoWindowAnchor.x - iconAnchor.x);
  var markerWidth = this.avoidMapControls_ ? 30 : 0;
  var offsetRight = Math.round(markerWidth + markerPosition.x + this.getDimensions_(this.container_).width/2 + this.getDimensions_(windowR).width + this.paddingX_ + infoWindowAnchor.x - iconAnchor.x);
  if (offsetRight > mapNE.x) {
	panX = -( offsetRight - mapNE.x);
  } else {
	//test left of screen
	var offsetLeft = - (Math.round( (this.getDimensions_(this.container_).width/2 - this.marker_.getIcon().iconSize.width/2) + this.getDimensions_(windowL).width + this.borderSize_ + this.paddingX_) - markerPosition.x - infoWindowAnchor.x + iconAnchor.x);
  /* Dk modification: optionally avoid map Controls, assume control sizes */
  var xCompareLeft = this.avoidMapControls_ ? mapSW.x + 70 : mapSW.x;
	//if( offsetLeft < mapSW.x) {
	if( offsetLeft < xCompareLeft) {
	  //panX = mapSW.x - offsetLeft;
	  panX = xCompareLeft - offsetLeft;
  /* --end Dk modification */
	}
  }

  if (panX != 0 || panY != 0 && this.map_.getExtInfoWindow() != null ) {
	this.map_.panBy(new GSize(panX,panY));
  }
};

/**
 * Private function that handles performing an ajax request to the server.  The response
 * information is assumed to be HTML and is placed inside this extInfoWindow's contents region.
 * Last, check to see if the height has changed, and resize the extInfoWindow accordingly.
 * @private
 * @param {String} url The Url of where to make the ajax request on the server
 */
ExtInfoWindow.prototype.ajaxRequest_ = function(url){
  var thisMap = this.map_;
  var thisCallback = this.callback_;
  GDownloadUrl(url, function(response, status){
	if (thisMap.getExtInfoWindow() !== null) {
	  var infoWindow = document.getElementById(thisMap.getExtInfoWindow().infoWindowId_ + '_contents');
	  if (response == null || status == -1 ) {
		infoWindow.innerHTML = '<span class="error">ERROR: The Ajax request failed to get HTML content from "' + url + '"</span>';
	  } else {
		infoWindow.innerHTML = response;
	  }
	  if (thisCallback != null ) {
		thisCallback();
	  }
	  thisMap.getExtInfoWindow().resize();
	}
	GEvent.trigger(thisMap, 'extinfowindowupdate');
  });
};

/**
 * Private function derived from Prototype.js to get a given element's
 * height and width
 * @private
 * @param {Object} element The DOM element that will have height and 
 *					width will be calculated for it.
 * @return {Object} Object with keys: width, height
 */
ExtInfoWindow.prototype.getDimensions_ = function(element) {
  var display = this.getStyle_(element, 'display');
  if (display != 'none' && display != null) { // Safari bug
	return {width: element.offsetWidth, height: element.offsetHeight};
  }

  // All *Width and *Height properties give 0 on elements with display none,
  // so enable the element temporarily
  var els = element.style;
  var originalVisibility = els.visibility;
  var originalPosition = els.position;
  var originalDisplay = els.display;
  els.visibility = 'hidden';
  els.position = 'absolute';
  els.display = 'block';
  var originalWidth = element.clientWidth;
  var originalHeight = element.clientHeight;
  els.display = originalDisplay;
  els.position = originalPosition;
  els.visibility = originalVisibility;
  return {width: originalWidth, height: originalHeight};
};

/**
 * Private function derived from Prototype.js to get a given element's
 * value that is associated with the passed style
 * @private
 * @param {Object} element The DOM element that will be checked.
 * @param {String} style The style name that will be have it's value returned.
 * @return {Object}
 */
ExtInfoWindow.prototype.getStyle_ = function(element, style) {
  var found = false;
  //console.log("getStyle(%o,%s)",element,style);
  style = this.camelize_(style);
  if (element.id == this.infoWindowId_ && style == 'width' && element.style.display == 'none') {
	//console.log("getStyle(): for width property, normally set style.display = '' and visibility = 'hidden'...");
  	  element.style.visibility = 'hidden';
	  element.style.display = '';
  }
  var value = element.style[style];
  //console.log('have value as "%s"',value);
  if (!value) {
	if (document.defaultView && document.defaultView.getComputedStyle) {
	  var css = document.defaultView.getComputedStyle(element, null);
	  value = css ? css[style] : null;
	} else if (element.currentStyle) {
	  value = element.currentStyle[style];
	}
  }
  if((value == 'auto') && (style == 'width' || style == 'height') && (this.getStyle_(element, 'display') != 'none')) {
	if( style == 'width' ) {
	  value = element.offsetWidth;
	  //console.log('getStyle: got width val as "%s"',value);
	}else {
	  value = element.offsetHeight;
	  //console.log('getStyle: got height val as "%s"',value);
	}
  }
  if (element.id == this.infoWindowId_ && style == 'width' && element.style.display != 'none') {
  	element.style.display = 'none';
  	element.style.visibility = 'visible';	
  }
  //console.log('have value as "%s"',value);
  return (value == 'auto') ? null : value;
};

/**
 * Private function pulled from Prototype.js that will change a hyphened
 * style name into camel case.
 * @private
 * @param {String} element The string that will be parsed and made into camel case
 * @return {String}
 */
ExtInfoWindow.prototype.camelize_ = function(element) {
  var parts = element.split('-'), len = parts.length;
  if (len == 1) return parts[0];
  var camelized = element.charAt(0) == '-'
	? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
	: parts[0];

  for (var i = 1; i < len; i++) {
	camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
  }
  return camelized;
};

GMap.prototype.ExtInfoWindowInstance_ = null;
GMap.prototype.ClickListener_ = null;
GMap.prototype.InfoWindowListener_ = null;

/**
 * Creates a new instance of ExtInfoWindow for the GMarker.  Register the newly created 
 * instance with the map, ensuring only one window is open at a time. If this is the first
 * ExtInfoWindow ever opened, add event listeners to the map to close the ExtInfoWindow on 
 * zoom and click, to mimic the default GInfoWindow behavior.
 *
 * @param {GMap} map The GMap2 object where the ExtInfoWindow will open
 * @param {String} cssId The id we will use to reference the info window
 * @param {String} html The HTML contents
 * @param {Object} opt_opts A contianer for optional arguments:
 *	{String} ajaxUrl The Url to hit on the server to request some contents 
 *	{Number} paddingX The padding size in pixels that the info window will leave on 
 *					the left and right sides of the map when panning is involved.
 *	{Number} paddingX The padding size in pixels that the info window will leave on 
 *					the top and bottom sides of the map when panning is involved.
 *	{Number} beakOffset The repositioning offset for when aligning the beak element. 
 *					This is used to make sure the beak lines up correcting if the 
 *					info window styling containers a border.
 */
GMarker.prototype.openExtInfoWindow = function(map, cssId, html, opt_opts) {
  if (map == null) {
	throw 'Error in GMarker.openExtInfoWindow: map cannot be null';
	return false;
  }
  if (cssId == null || cssId == '') {
	throw 'Error in GMarker.openExtInfoWindow: must specify a cssId';
	return false;
  }
  
  map.closeInfoWindow();
  if (map.getExtInfoWindow() != null) {
	map.closeExtInfoWindow();
  }
  if (map.getExtInfoWindow() == null) {
	map.setExtInfoWindow_( new ExtInfoWindow(
	  this,
	  cssId,
	  html,
	  opt_opts
	) );
	if (map.ClickListener_ == null) {
	  //listen for map click, close ExtInfoWindow if open
	  map.ClickListener_ = GEvent.addListener(map, 'click',
	  function(event) {
		  if( !event && map.getExtInfoWindow() != null ){
			map.closeExtInfoWindow();
		  }
		}
	  );
	}
	if (map.InfoWindowListener_ == null) {
	  //listen for default info window open, close ExtInfoWindow if open
	  map.InfoWindowListener_ = GEvent.addListener(map, 'infowindowopen', 
	  function(event) {
		  if (map.getExtInfoWindow() != null) {
			map.closeExtInfoWindow();
		  }
		}
	  );
	}
	map.addOverlay(map.getExtInfoWindow());
  }
};

/**
 * Remove the ExtInfoWindow instance
 * @param {GMap2} map The map where the GMarker and ExtInfoWindow exist
 */
GMarker.prototype.closeExtInfoWindow = function(map) {
  if( map.getExtInfoWindow() != null ){
	map.closeExtInfoWindow();
  }
};

/**
 * Get the ExtInfoWindow instance from the map
 */
GMap2.prototype.getExtInfoWindow = function(){
  return this.ExtInfoWindowInstance_;
};
/**
 * Set the ExtInfoWindow instance for the map
 * @private
 */
GMap2.prototype.setExtInfoWindow_ = function( extInfoWindow ){
  this.ExtInfoWindowInstance_ = extInfoWindow;
}
/**
 * Remove the ExtInfoWindow from the map
 */
GMap2.prototype.closeExtInfoWindow = function(){
  if( this.getExtInfoWindow() != null ){
	this.ExtInfoWindowInstance_.remove();
  }
};




/*
 * ClusterMarker Version 1.3.2
 * A marker manager for the Google Maps API													  *
 * http://googlemapsapi.martinpearman.co.uk/clustermarker										*
 *																							   *
 * This program 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.										*
 * This program 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.										  */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('f h(a,b){2.5=a;2.k=[];2.C=[];2.F=[];2.S=[];4(D(b)===\'N\'){b={}}2.T=(b.T)?b.T:24;2.1c=(b.1c===o)?o:r;4(b.O){2.O=b.O}4(b.s){2.s=b.s}G{2.s=m 25();2.s.26=\'1z://27.1A.1B/1C/28.1D\';2.s.H=m 1E(1F,1G);2.s.1H=m I(9,1I);2.s.29=m I(9,1I);2.s.2a=\'1z://2b.1A.1B/2c/2d/1C/2e.1D\';2.s.2f=m 1E(1F,1G)}2.U=(b.U)?b.U:\'2g 2h 2i 1J 2j 2k %1K 1d\';4(b.J){2.J=b.J}2.v=(b.v)?b.v:0;4(b.1d){2.1L(b.1d)}K.1e(2.5,\'2l\',2,2.1M);K.1e(2.5,\'2m\',2,2.1N);K.1e(2.5,\'2n\',2,2.1O)}h.l.1L=f(a){n i;4(!a[0]){n b=[];g(i 1J a){b.w(a[i])}a=b}g(i=a.8-1;i>=0;i--){a[i].A=o;a[i].t=o;a[i].z=o}2.k=2.k.2o(a)};h.l.1P=f(d){f $1Q(a,b,c){1f m 2p(a,{2q:b,2r:c})}n e=m 1g(),i,$u,$V=[],$3,$2=2,$6=2.k;g(i=d.8-1;i>=0;i--){$3=$6[d[i]];$3.2s=d[i];e.W($3.B());$V.w($3)}$u=$1Q(e.1R(),2.s,2.U.2t(/%1K/2u,d.8));$u.1S=e;2.S.w(K.2v($u,\'1T\',f(){4(D $2.5.X==="f"){$2.5.X()}$2.O({u:$u,V:$V})}));$u.1h=d;g(i=d.8-1;i>=0;i--){$6[d[i]].1i=$u}1f $u};h.l.O=f(a){2.5.Y(a.u.B(),2.5.1U(a.u.1S))};h.l.1V=f(){n a=2.T,$7=2.5.Z(),$P=2.5.10().1W(),$11,$1j,$1k,$12,$1l,$1m,$E=2.5.2w(),i,$3,$p=[],$1n,$6=2.k,$q=2.C;4(a){$11=$P.1o($E.2x(),$7);$1j=m I($11.x-a,$11.y+a);$1k=$P.13($1j,$7);$12=$P.1o($E.2y(),$7);$1l=m I($12.x+a,$12.y-a);$1m=$P.13($1l,$7);$E.W($1k);$E.W($1m)}2.Q=o;4(D($q[$7])===\'N\'){2.C[$7]=[];2.Q=r;g(i=$6.8-1;i>=0;i--){$3=$6[i];$3.t=$E.1X($3.B())?r:o;$3.z=$3.t;4($3.t){$p.w(i)}}}G{g(i=$6.8-1;i>=0;i--){$3=$6[i];$1n=$3.t;$3.t=$E.1X($3.B())?r:o;$3.z=$3.t;4(!2.Q&&$1n!==$3.t){2.Q=r}4($3.t&&D($q[$7][i])===\'N\'){$p.w(i)}}}1f $p};h.l.1Y=f(){n a,i,j,$7=2.5.Z(),$6=2.k,$q=2.C;g(i=$6.8-1;i>0;i--){4($6[i].z){a=[];g(j=i-1;j>=0;j--){4($6[j].z&&$q[$7][i].1Z($q[$7][j])){a.w(j)}}4(a.8!==0){a.w(i);g(j=a.8-1;j>=0;j--){$6[a[j]].z=o}2.F.w(2.1P(a))}}}};h.l.2z=f(){n a=2.k,$14=m 1g(),i;g(i=a.8-1;i>=0;i--){$14.W(a[i].B())}n b=2.5.1U($14);4(2.J&&b>2.J){b=2.J}2.5.Y($14.1R(),b);2.R()};h.l.1O=f(){2.R(r)};h.l.1M=f(){4(!2.1p){2.R()}G{2.1p=o}};h.l.15=f(a,b){n c=2.5.10().1W(),i,$3,$H,$L,$M,$1q,$1r,$1s,$1t,$v=2.v,$6=2.k;g(i=a.8-1;i>=0;i--){$3=$6[a[i]];$H=$3.20().H;$L=c.1o($3.B(),b);$M=$3.20().1H;$1q=m I($L.x-$M.x-$v,$L.y-$M.y+$H.2A+$v);$1r=m I($L.x-$M.x+$H.2B+$v,$L.y-$M.y-$v);$1s=c.13($1q,b);$1t=c.13($1r,b);2.C[b][a[i]]=m 1g($1s,$1t)}};h.l.R=f(a){n i,$3,$1u=2.5.Z(),$p=2.1V();4(2.Q||a){2.1v();4(2.1c&&$1u<2.5.10().21()){4($p.8>0){2.15($p,$1u)}2.1Y()}g(i=2.F.8-1;i>=0;i--){2.5.22(2.F[i])}g(i=2.k.8-1;i>=0;i--){$3=2.k[i];4(!$3.A&&$3.z){2.5.22($3);$3.A=r}4($3.A&&!$3.z){2.5.1w($3);$3.A=o}}}};h.l.1v=f(){n i,j,$16=2.5,$1x=2.S,$17=2.F,$18,$6=2.k;g(i=$17.8-1;i>=0;i--){$18=$17[i].1h;g(j=$18.8-1;j>=0;j--){19 $6[$18[j]].1i}$16.1w($17[i])}g(i=$1x.8-1;i>=0;i--){K.2C($1x[i])}2.F=[];2.S=[]};h.l.2D=f(){n i,$6=2.k,$16=2.5;g(i=$6.8-1;i>=0;i--){4($6[i].A){$16.1w($6[i])}19 $6[i].A;19 $6[i].t;19 $6[i].z}2.1v();2.k=[];2.C=[]};h.l.1y=f(a){n b=2.k[a];4(b.A){K.2E(b,\'1T\')}G 4(b.t){n c=b.1i.1h,$1a=r,$p,i,$7=2.5.Z(),$1b,$q=2.C,$23=2.5.10().21();2F($1a&&$7<$23){$1a=o;$7++;4(D($q[$7])===\'N\'){$q[$7]=[];2.15(c,$7)}G{$p=[];g(i=c.8-1;i>=0;i--){4(D($q[$7][c[i]])===\'N\'){$p.w(c[i])}}4($p.8>=1){2.15($p,$7)}}g(i=c.8-1;i>=0;i--){$1b=c[i];4($1b!==a&&$q[$7][$1b].1Z($q[$7][a])){$1a=r;2G}}};2.5.Y(b.B(),$7);2.1y(a)}G{2.5.Y(b.B());2.1y(a)}};h.l.1N=f(){4(D 2.5.X==="f"){2.5.X()}2.1p=r;2.R(r)};',62,167,'||this|marker|if|_map|mapMarkers|mapZoomLevel|length|||||||function|for|ClusterMarker|||_mapMarkers|prototype|new|var|false|uncachedIconBoundsIndexes|iconBounds|true|clusterMarkerIcon|_isActive|clusterMarker|intersectPadding|push|||_makeVisible|_isVisible|getLatLng|_iconBounds|typeof|activeAreaBounds|_clusterMarkers|else|iconSize|GPoint|fitMapMaxZoom|GEvent|iconAnchorPoint|iconAnchorPointOffset|undefined|clusterMarkerClick|mapProjection|_activeMarkersChanged|refresh|_eventListeners|borderPadding|clusterMarkerTitle|clusteredMarkers|extend|closeExtInfoWindow|setCenter|getZoom|getCurrentMapType|mapPointSw|mapPointNe|fromPixelToLatLng|markersBounds|_preCacheIconBounds|map|clusterMarkers|childIndexes|delete|intersectDetected|clusteredMarkerIndex|clusteringEnabled|markers|bind|return|GLatLngBounds|_childIndexes|_parentCluster|activeAreaPointSw|activeAreaLatLngSw|activeAreaPointNe|activeAreaLatLngNe|oldState|fromLatLngToPixel|_cancelMoveEnd|iconBoundsPointSw|iconBoundsPointNe|iconBoundsLatLngSw|iconBoundsLatLngNe|zoomLevel|_removeClusterMarkers|removeOverlay|eventListeners|triggerClick|http|google|com|mapfiles|png|GSize|39|34|iconAnchor|31|in|count|addMarkers|_moveEnd|_zoomEnd|_mapTypeChanged|_clusterMarker|newClusterMarker|getCenter|clusterGroupBounds|click|getBoundsZoomLevel|_filterActiveMapMarkers|getProjection|containsLatLng|_filterIntersectingMapMarkers|intersects|getIcon|getMaximumResolution|addOverlay|mapMaxZoomLevel|256|GIcon|image|maps|arrow|infoWindowAnchor|shadow|www|intl|en_us|arrowshadow|shadowSize|Click|to|zoom|and|see|moveend|zoomend|maptypechanged|concat|GMarker|icon|title|index|replace|gi|addListener|getBounds|getSouthWest|getNorthEast|fitMapToMarkers|height|width|removeListener|removeMarkers|trigger|while|break'.split('|'),0,{}))


