	var Walking;	var Zoomed=1;	var Bgsnd=1;	var Ctrl = new Array();	var w,h;	var drag = false;	var dragtime = 0;	var ie7 = (navigator.appVersion.indexOf('MSIE 7.')!=-1);	var ie = (navigator.appVersion.indexOf('MSIE')!=-1);	var hmw = new Array();	var map = -1;	var help = -1;		function el(id)	{		return document.getElementById(id);	}		function YaamiWalk(wlkx, wlky)	{		window.clearInterval(Walking);		window.scrollBy(wlkx*2, wlky*2);		Walking = window.setInterval(function() { window.scrollBy(wlkx*2, wlky*2); }, 10);	}	function YaamiStop()	{		window.clearInterval(Walking);	}		function ScrollMouse(v)	{		for(c=0;c<12;c++)		{			if(ie) Ctrl[c].style.filter='progid:DXImageTransform.Microsoft.Alpha(Opacity='+(v?'40':'1')+');';			else Ctrl[c].style.opacity=(v?'0.4':'0.01');		}		return false;	}		function Play()	{		e = el('bgsndply');		if(!Bgsnd){Bgsnd=1;el('bgsnd').play();e.innerHTML='<div id="icobgsnd" style="background-position:-32px 0px"></div>Mute';}		else {Bgsnd=0;el('bgsnd').pause();e.innerHTML='<div id="icobgsnd" style="background-position:-48px 0px"></div>Play';}	}		function Zoom()	{		e = el('zoom');		m = el('mrkt');		mi = el('mapimg');		if(Zoomed){Zoomed=0; mi.style.zoom = '0.5'; m.style.zoom = '0.5'; e.innerHTML='<div id="icozm" style="background-position:-80px 0px"></div>Zoom In'; }		else {Zoomed=1; mi.style.zoom = '1'; m.style.zoom = '1'; e.innerHTML='<div id="icozm" style="background-position:-64px 0px"></div>Zoom Out'; }	}	function Help()	{		HideHMWindow();		ShowHMWindow('<iframe src="/help"></iframe>', 'hmw1');		return false;	}	function Map()	{		HideHMWindow();		ShowHMWindow('<iframe src="/map"></iframe>', 'hmw2');	}	function ThisWeek()	{		HideHMWindow();		ShowHMWindow(-1, 'thisweek');	}	function Item(id)	{		HideHMWindow();		ShowHMWindow('<iframe src="/'+id+'.html"></iframe>', 'hmw0');		return false;	}	function Stall(id)	{		HideHMWindow();		ShowHMWindow('<iframe src="/'+id+'.html"></iframe>', 'hmw0');		return false;	}	function Shop(id)	{		HideHMWindow();		ShowHMWindow('<iframe src="/'+id+'.html"></iframe>', 'hmw1');		return false;	}	function Tooltip(e,s)	{		el('tooltip').innerHTML = (s?e.sTitle+'<div>Click for more info...</div>':'');		el('tooltip').style.visibility = (s?'visible':'hidden');		var pos = document.getAbsolutePosition(e);		el('tooltip').style.left=(pos.x-10)+'px';		el('tooltip').style.top=(pos.y+80)+'px';		return false;	}		function ShowHMWindow(content, win)	{		hmw[win].style.visibility = 'visible';		if(content != -1) hmw[win].getElementsByTagName('div')[3].innerHTML = content;		el('navi').style.visibility = 'hidden';		el('lgo').style.visibility = 'hidden';		el('ctrll').style.visibility = 'hidden';		el('ctrlt').style.visibility = 'hidden';		el('ctrlr').style.visibility = 'hidden';		el('ctrlb').style.visibility = 'hidden';		el('mapimg').style.visibility = 'hidden';	}		function HideHMWindow()	{		for(var w1 in hmw) hmw[w1].style.visibility = 'hidden';		el('navi').style.visibility = 'visible';		el('lgo').style.visibility = 'visible';		el('ctrll').style.visibility = 'visible';		el('ctrlt').style.visibility = 'visible';		el('ctrlr').style.visibility = 'visible';		el('ctrlb').style.visibility = 'visible';		el('mapimg').style.visibility = 'visible';	}		function Init()	{hmw['hmw0'] = el('hmw0');hmw['hmw1'] = el('hmw1');hmw['hmw2'] = el('hmw2');hmw['thisweek'] = el('thisweek');hmw['hmw3'] = el('hmw3');		for(var w1 in hmw)		{			hmw[w1].getElementsByTagName('div')[1].firstChild.onclick = function() { HideHMWindow(); };		}				if(typeof(window.innerWidth) == 'number'){w=window.innerWidth; h=window.innerHeight;}		else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){w=document.documentElement.clientWidth;h=document.documentElement.clientHeight;}		else if(document.body && (document.body.clientWidth || document.body.clientHeight)){w=document.body.clientWidth;h=document.body.clientHeight;}		if(ie7)		{			el('world').style.width=w-60+'px';			el('world').style.height=h-60+'px';			el('ctrll').style.height=(h-60)+'px';			el('ctrlr').style.height=(h-60)+'px';			el('ctrll1').style.height=(h-262)+'px';			el('ctrlr1').style.height=(h-262)+'px';		}		if(!document.location.hash) window.scrollTo(800, 1100);		for(y=0;y<3;y++)		{			for(x=0;x<3;x++)			{				if(x == 1 && y == 1) continue;				e = el('navi'+x+y);				e.navix=(x?(x==1?0:10):-10);				e.naviy=(y?(y==1?0:10):-10);				e.onmousedown = function() { YaamiWalk(this.navix, this.naviy); return false; };				e.onmouseup = function() { YaamiStop(); return false; };				e.onclick = function() { return false; };				e.onmouseout = function() { YaamiStop(); return false; };								e = new Array();				if(x == 0) { Ctrl.push(el('ctrll'+y)); e.push(el('ctrll'+y)); }				if(x == 2) { Ctrl.push(el('ctrlr'+y)); e.push(el('ctrlr'+y)); }				if(y == 0) { Ctrl.push(el('ctrlt'+x)); e.push(el('ctrlt'+x)); }				if(y == 2) { Ctrl.push(el('ctrlb'+x)); e.push(el('ctrlb'+x)); }				for(c=0;c<e.length;c++)				{					e[c].navix=(x?(x==1?0:10):-10);					e[c].naviy=(y?(y==1?0:10):-10);					e[c].onmousedown = function() { ScrollMouse(true); YaamiWalk(this.navix, this.naviy); };					e[c].onmouseup = function() { YaamiStop(); };					e[c].onmouseout = function() { ScrollMouse(false); };				}			}		}		document.mouseDiffX = 0;		document.mouseDiffY = 0;		document.oldMouseX = 0;		document.oldMouseY = 0;				el('drag').mouseDownHandler = function(e)		{			if(!e)var e=window.event;			if(e.pageX == undefined){e.pageX=e.clientX+document.body.scrollLeft;e.pageY=e.clientY+document.body.scrollTop;}			var pos = document.getAbsolutePosition(this);			document.mouseDiffX = e.screenX-(e.pageX - pos.x);			document.mouseDiffY = e.screenY-(e.pageY - pos.y);			document.oldMouseX = e.pageX - pos.x;			document.oldMouseY = e.pageY - pos.y;			el('mapimg').style.cursor = 'url(/media/grabbing.cur),pointer';			el('drag').style.cursor = 'url(/media/grabbing.cur),pointer';			if(ie){e.cancelBubble=true;e.returnValue=false;}			else{e.preventDefault();e.stopPropagation();}			document.onmousemove = document.mouseDragHandler;			document.onmouseup = document.mouseUpHandler;		};		document.mouseDragHandler = function(e)		{			if(!e)var e=window.event;			var realx = e.screenX - this.mouseDiffX;			var realy = e.screenY - this.mouseDiffY;			window.scrollBy(this.oldMouseX-realx, this.oldMouseY-realy);			this.oldMouseX = realx;			this.oldMouseY = realy;		};				document.mouseUpHandler = function(e)		{			el('mapimg').style.cursor = 'url(/media/grab.cur),pointer';			el('drag').style.cursor = 'url(/media/grab.cur),pointer';			this.onmousemove = null;			this.onmouseup = null;		};				document.getAbsolutePosition = function(element)		{			var r = { x: element.offsetLeft, y: element.offsetTop };			if (element.offsetParent) {				var tmp = this.getAbsolutePosition(element.offsetParent);				r.x += tmp.x;				r.y += tmp.y;			}			return r;		};		document.onselectstart = function() { return false; };		el('drag').onmousedown = el('drag').mouseDownHandler;				el('lgo').style.left='45px';		el('lgo').style.top='0px';		el('lgo').style.margin='0px';		el('lgo').style.visibility = 'hidden';		el('load').style.visibility='hidden';		var bnch=[0,1,2];		bnch.sort(function(){return 0.5-Math.random()});		for(b=0;b<3;b++) el('bnch'+b).style.backgroundPosition='0px '+(bnch[b]*205)+'px';				LoadStores();		LoadShoppers();				var fwp=0;		var fwpa = new Array(523,1124,380,1217,265,1381,206,1570,227,1736,322,1835,452,1836,596,1740,712,1577,768,1388,747,1222,654,1122,504,1132,364,1234,253,1402,204,1593,235,1754,335,1840,471,1828,616,1723,723,1552,772,1362,738,1204,639,1117,494,1134,354,1245,247,1416,204,1606,239,1761,342,1842,481,1825,623,1713,728,1539,771,1351,734,1195,629,1115,486,1141,347,1254,244,1430,204,1618,245,1771,353,1843,490,1821,631,1703,734,1527,769,1339,730,1185,625,1115,472,1146,336,1267,237,1443,205,1629,251,1777,360,1845,502,1816,641,1692,738,1512,772,1327,725,1180,615,1113,466,1151,328,1275,236,1452,206,1641,257,1785,374,1845,516,1809,650,1683,745,1500,774,1321,720,1171,607,1111,456,1157,322,1287,231,1467,207,1653,265,1793,374,1845,520,1797,656,1669,747,1488,766,1305,712,1168,598,1112,443,1165,313,1299,226,1481,210,1665,265,1797,388,1850,532,1795,665,1661,752,1474,766,1293,707,1159,586,1110,435,1171,304,1308,222,1493,210,1674,274,1804,421,1845,542,1789,676,1651,755,1461,763,1282,701,1153,579,1111,427,1176,298,1319,219,1504,212,1685,280,1810,414,1845,553,1787,688,1637,758,1449,762,1271,694,1148,570,1111,417,1182,292,1331,216,1519,214,1695,288,1816,416,1845,565,1775,694,1624,761,1437,761,1260,686,1140,562,1113,409,1189,283,1343,213,1532,216,1707,297,1823,424,1846,571,1772,696,1613,765,1423,759,1252,680,1136,550,1113,400,1198,278,1356,212,1545,221,1716,302,1825,433,1841,579,1758,701,1602,764,1410,755,1240,673,1132,540,1118,388,1208,270,1369,210,1555,222,1726,310,1831,443,1840,589,1753,707,1592,768,1397,750,1231,665,1129,531,1121);		function FerrisWheel()		{			for(c=0;c<12;c++)			{				if(fwp==0)				{					el('frswhlc'+c)._fwp++;					if(el('frswhlc'+c)._fwp>11)el('frswhlc'+c)._fwp=0;				}				el('frswhlc'+c).style.left=(fwpa[(fwp*24)+(el('frswhlc'+c)._fwp*2)])+'px';				el('frswhlc'+c).style.top=(fwpa[(fwp*24)+(el('frswhlc'+c)._fwp*2)+1])+'px';			}			el('frswhlf').style.backgroundPosition='0px '+(fwp*996)+'px';			el('frswhlb').style.backgroundPosition='0px '+(fwp*950)+'px';			fwp++;			if(fwp>13)fwp=0;		}				for(c=0;c<12;c++){el('frswhlc'+c)._fwp=c;el('frswhlc'+c).style.background='url(/media/frswhlc0.png) 0px '+(c*162)+'px';}		el('frswhlf').style.background='url(/media/frswhlaf.png)';		el('frswhlb').style.background='url(/media/frswhlab.png)';		setInterval(FerrisWheel,300);		if(!ie){el('bgsnd').src='/media/bgsnd.mp3';el('bgsnd').play();}el('bldngx0').innerHTML='<div class="shpsgn" style="left:82px;top:303px;background-position:0px -0px"></div>';el('bldngx1').innerHTML='<div class="shpsgn" style="left:218px;top:377px;background-position:0px -86px"></div>			<div class="shpsgn" style="left:82px;top:447px;background-position:0px -172px"></div>';el('bldngx2').innerHTML='<div class="shpsgn" style="left:218px;top:521px;background-position:0px -258px"></div>			<div class="shpsgn" style="left:82px;top:591px;background-position:0px -344px"></div>';el('bldngx3').innerHTML='<div class="shpsgn" style="left:225px;top:669px;background-position:0px -430px"></div>';el('bldngx4').innerHTML='<div class="shpsgn" style="left:163px;top:669px;background-position:0px -516px"></div>			<div class="shpsgn" style="left:63px;top:619px;background-position:0px -602px"></div>';el('bldngx5').innerHTML='<div class="shpsgn" style="left:82px;top:1023px;background-position:0px -688px"></div>';el('bldngx6').innerHTML='<div class="shpsgn" style="left:218px;top:1097px;background-position:0px -774px"></div>			<div class="shpsgn" style="left:82px;top:1167px;background-position:0px -860px"></div>';el('bldngx7').innerHTML='<div class="shpsgn" style="left:218px;top:1241px;background-position:0px -946px"></div>			<div class="shpsgn" style="left:82px;top:1311px;background-position:0px -1032px"></div>';el('bldngx8').innerHTML='<div class="shpsgn" style="left:225px;top:1389px;background-position:0px -1118px"></div>';el('bldngy0').innerHTML='<div class="shpsgn" style="left:-15px;top:241px;background-position:84px -0px"></div>';el('bldngy1').innerHTML='<div class="shpsgn" style="left:43px;top:238px;background-position:84px -86px"></div>			<div class="shpsgn" style="left:163px;top:183px;background-position:84px -172px"></div>';el('bldngy2').innerHTML='<div class="shpsgn" style="left:-17px;top:522px;background-position:84px -258px"></div>			<div class="shpsgn" style="left:123px;top:597px;background-position:84px -344px"></div>';el('bldngy3').innerHTML='<div class="shpsgn" style="left:-17px;top:666px;background-position:84px -430px"></div>			<div class="shpsgn" style="left:123px;top:741px;background-position:84px -516px"></div>';el('bldngy4').innerHTML='<div class="shpsgn" style="left:-17px;top:810px;background-position:84px -602px"></div>			<div class="shpsgn" style="left:123px;top:885px;background-position:84px -688px"></div>';el('bldngy5').innerHTML='<div class="shpsgn" style="left:-15px;top:961px;background-position:84px -774px"></div>';el('bldngy6').innerHTML='<div class="shpsgn" style="left:-17px;top:1098px;background-position:84px -860px"></div>			<div class="shpsgn" style="left:123px;top:1173px;background-position:84px -946px"></div>';el('bldngy7').innerHTML='<div class="shpsgn" style="left:-17px;top:1242px;background-position:84px -1032px"></div>			<div class="shpsgn" style="left:123px;top:1317px;background-position:84px -1118px"></div>';}