		var fullSize = false
		var firstLoad = true
		var mainuserID = ''
		var openid = false;
		var keepopen = false;
		var map = false;
		var WaitQuery = false;
		var venue = false;
		var loading = false
		var tmpmarker=[];
		var markerPadding = 35;
		var gCookie = [];

		var lastMapType = false;

		var lastBound = false;
		var lastZoom = false;		

		var pointObj=[];
		var pixelsObj = [];
		var pText = [];
		var Ppid = [];
		
		var groupPoints = [];
		var groupPixels = [];
		var grouppText = [];
		var groupMarkers = [];
		var groupPpid = [];		
		var groupLatLng = [];

	    var geocoder = new GClientGeocoder();		

      function EInsert(point, xhtm, size, basezoom, zindex) {
        this.point = point;
        this.xhtm = xhtm;
        this.size = size;
        this.basezoom = basezoom;
        this.zindex=zindex||0;
      } 
      EInsert.prototype = new GOverlay();

      EInsert.prototype.initialize = function(map) {
        
        var div = document.createElement("div");
        div.style.position = "absolute";
        div.style.zIndex=this.zindex;

		var shadow = document.createElement("IMG"); 

	
		shadow.src = '/my/img/shadow.png'; 
		shadow.width = 46; 
		shadow.height = 27; 
		shadow.style.position = 'absolute'; 
		map.getPane(G_MAP_FLOAT_PANE).appendChild(div);
		map.getPane(G_MAP_MARKER_SHADOW_PANE).appendChild(shadow); 

        this.map_ = map;
        this.div_ = div;
        this.shadow_ = shadow;
      }
      EInsert.prototype.remove = function() {
        this.div_.parentNode.removeChild(this.div_);
        this.shadow_.parentNode.removeChild(this.shadow_);        
      }

      EInsert.prototype.copy = function() {
        return new EInsert(this.point, this.xhtm, this.size, this.basezoom);
      }
      EInsert.prototype.redraw = function(force) {
       if (force) {
       if(lastMapType!=false)
       		if(lastMapType != map.getCurrentMapType().getName())
       			return false;
        var p = this.map_.fromLatLngToDivPixel(this.point);
        var z = this.map_.getZoom();
        var scale = Math.pow(2,(z - this.basezoom));
        var lpoint = p.x;
        var rpoint = p.y - 27;

        this.div_.style.left = this.shadow_.style.left = lpoint+"px";
        this.div_.style.top = this.shadow_.style.top =  rpoint+"px";
		this.div_.innerHTML = this.xhtm;
       } 
		return true
      }
		function removegeooverlay(toremove)
		{
			proper = toremove - 1
			map.closeInfoWindow();
			map.removeOverlay(tmpmarker[proper])
		}
		function addgeoloc(a)
		{
				var x = ((screen.width/2)-(a.length*4))-2;
				venue = new TextualZoomControl('<div style="background-color:#FEFFFF;padding:15px;border:2px solid black;text-align:center;display:block;"><b>'+a+'<\/b><br \/>The Worlds Edible Fruits</div>',x,5)
				map.addControl(venue);
				setTimeout("map.removeControl(venue)",5000)
		}
		function addAddressToMap(response) 
		{
			if (!response || response.Status.code != 200)
			{	
;//				alert("Please include more specific information like:\n\nSuburb Postcode State Country");
			} 
			else 
			{
				var place = response.Placemark[0];
				addgeoloc(place.address);
				var zmit=1;
				switch(place.AddressDetails.Accuracy)
				{
					case 1:
					case 2:
						zmit = 4;						
						break;
					case 3:
					case 4:
						zmit= 14;
						break;
					case 5:
					case 6:
						zmit= 16;
						break;
					case 7:
					case 8:
						zmit= 17;
						break;
					case 9:
					default:
						zmit=1;
				}
				map.setCenter(new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]),zmit)
			}
		}

		function showAddress(address) 
		{
			geocoder.getLocations(address, addAddressToMap);
			return false
		}
		function Display_Buttons(a,b,c,s,t,m)
		{
			if(s)
			{
				var searchbar = '<form action="#" id="sch" onsubmit="return showAddress(this.q.value)"><input onclick="if(this.value==\'Search for a location\')this.value=\'\'" type="text" name="q" size="20" value="Search for a location" /><input type="submit" value="Go" /></form>'
				tzoom = new TextualZoomControl(searchbar,86,30)
				map.addControl(tzoom);
			}
			if(t)
			{
				ttitle = new TextualZoomControl(t,0,-10)
				map.addControl(ttitle);
			}
			if(m)
			{
				Detailed = new GLargeMapControl();
				map.addControl(Detailed);
				typecont = new GMapTypeControl()
				map.addControl(typecont);
				map.addControl(new GScaleControl())
			}
			if(a)
			{
				markercontrol = new TextualZoomControl(a,6,30,G_ANCHOR_TOP_RIGHT,true,'Do Stuff','marker')
				map.addControl(markercontrol);
			}
			if(b)
			{
				drawline = new TextualZoomControl(b,6,55,G_ANCHOR_TOP_RIGHT,true,'Straight or Squiggly lines','draw')
				map.addControl(drawline);			
			}
			if(c!==false)
			{
				SaveMap = new TextualZoomControl(c,6,80,G_ANCHOR_TOP_RIGHT,true,'Query Y/N','save')
				map.addControl(SaveMap);					
			}

		}
		function TextualZoomControl(a,b,c,d,e,f,g)
		{
		this.xtext = a
		this.xwidth = b
		this.xheight = c
		this.xanchor = d ||G_ANCHOR_TOP_LEFT
		this.isbutton  = e || false;
		this.xtitle = f || '';
		this.xaction = g || false;
		}
		TextualZoomControl.prototype = new GControl(true,true);
		TextualZoomControl.prototype.initialize = function(map) {
		  var container = document.createElement("div");
		  if(this.isbutton)
		  {
				var zoomInDiv = document.createElement("div");  
				this.setButtonStyle_(zoomInDiv);  
				container.appendChild(zoomInDiv);
				zoomInDiv.appendChild(document.createTextNode(this.xtext)); 
				zoomInDiv.title = this.xtitle;
				switch(this.xaction)
				{
					case 'marker':
						GEvent.addDomListener(zoomInDiv, "click", function() {
						var mapA = document.getElementById('map')
						var mfull = document.getElementById('mapFull')
						if(!fullSize)
						{
							mfull.style.display = 'block'
							mfull.appendChild(mapA)
							document.getElementById('main').style.display = 'none'
							if(window.innerHeight==null&&window.innerHeight!=0) /*internet explorer*/
							var h=document.documentElement.clientHeight
							else /*firefox and opera*/
								var h=window.innerHeight
							h = h-10;
							mapA.style.height = h.toString()+'px'
							mapA.style.width='100%'
							map.checkResize()
							fullSize = true;
							map.removeControl(markercontrol)
							markercontrol = new TextualZoomControl('EXIT FULL SCREEN',6,30,G_ANCHOR_TOP_RIGHT,true,'Do Stuff','marker')
							map.addControl(markercontrol);

						}
						else
						{
							var msmall = document.getElementById('mapSmall')
							msmall.appendChild(mapA)
							mfull.style.display = 'none'
							document.getElementById('main').style.display = 'block'
							mapA.style.width = '400px'
							mapA.style.height = '400px'
							map.checkResize()
							fullSize = false;
							map.removeControl(markercontrol)
							markercontrol = new TextualZoomControl('FULL SCREEN',6,30,G_ANCHOR_TOP_RIGHT,true,'Do Stuff','marker')
							map.addControl(markercontrol);
						}
						});
						break;
					case 'draw':
						GEvent.addDomListener(zoomInDiv, "click", function() {map.clearOverlays();reDrawit();groupmarkers();});
						break;
					case 'save':
						GEvent.addDomListener(zoomInDiv, "click", function() {
						wind([0,document.getElementById('m0'),2])
						});
						break;
				}

		  }
		  else
			  container.innerHTML = this.xtext;
		  map.getContainer().appendChild(container);
		  return container;
		}
		TextualZoomControl.prototype.getDefaultPosition = function() {
		  return new GControlPosition(this.xanchor, new GSize(this.xwidth,this.xheight));
		}
		TextualZoomControl.prototype.setButtonStyle_ = function(button) 
		{  
			button.style.textDecoration = "none";  
			button.style.color = "white";  
			button.style.backgroundColor = "red";  
			button.style.font = "Small Arial";
			button.style.fontWeight = 'bolder';
			button.style.border = "1px solid black";  
			button.style.padding = "2px";  
			button.style.marginBottom = "3px";  
			button.style.textAlign = "center";  
			button.style.width = "8em";  
			button.style.cursor = "pointer";
		}
		function groupmarkers()
		{
			if(!pixelsObj.length)
			{
				return false;
			}
			clearGroupGlobals()
			var openProperty = false;
			if(openid==Ppid[0])
			{
				openProperty =0
			}	
			groupPixels[0] = pixelsObj[0];groupPoints[0]=pointObj[0];grouppText[0] = pText[0];groupPpid[0] = Ppid[0];groupLatLng[0] = pointObj[0].lat()+'|'+pointObj[0].lng()
			for(var i=1;i<pixelsObj.length;i++)
			{
				var z=0;
				flag = false;
				while((z<groupPixels.length) && flag==false) // check and see if it is close too close to an existing marker
				{
					di = Math.sqrt(Math.pow(Math.abs(pixelsObj[i].x-groupPixels[z].x),2)+Math.pow(Math.abs(pixelsObj[i].y-groupPixels[z].y),2))
					if(di<markerPadding)
					{
						grouppText[z] += ','+pText[i];
						groupPpid[z] += ','+Ppid[i].toString();
						groupLatLng[z] += ','+pointObj[i].lat()+'|'+pointObj[i].lng();
						flag=true
						if(openid==Ppid[i])
							openProperty = z;
					}
					z++
				}
				if(!flag) // this is the case that it was not too close to an existing marker.
				{
					if(openid==Ppid[i])
						openProperty = groupPpid.length;
					groupPixels.push(pixelsObj[i]);grouppText.push(pText[i]);groupPoints.push(pointObj[i]);groupPpid.push(Ppid[i]);groupLatLng.push(pointObj[i].lat()+'|'+pointObj[i].lng());
				}
			}
			var state = (groupPpid[0].match("[a-z]|[A-Z]"))?1:0;
			for(var i=0;i<groupPoints.length;i++) // add the grouped markers to the map
			{

				var marker = createMarkers(i,state)
				map.addOverlay(marker[0])
//				map.addOverlay(marker[1])				
			}
			if(openProperty!==false)
			{
//				alert('openProperty='+openProperty+"\nidlist="+groupPpid[openProperty]+"\nLooking For:"+openid)
				var PropArrayid = groupPpid[openProperty].split(',')
				var posxfr = false;
				for(var i=0;i<PropArrayid.length;i++)
					if(openid==PropArrayid[i])
						posxfr = i
				wind([openProperty,document.getElementById('m'+openProperty),posxfr])
			}
			else openid = false
			return false	
		}
		function getCookie(c_name)
		{
		if (document.cookie.length>0)
		  {
		  c_start=document.cookie.indexOf(c_name + "=")
		  if (c_start!=-1)
		    { 
		    c_start=c_start + c_name.length+1 
		    c_end=document.cookie.indexOf(";",c_start)
		    if (c_end==-1) c_end=document.cookie.length
		    return unescape(document.cookie.substring(c_start,c_end))
		    } 
		  }
		return false
		} 
		function setCookie(c_name,value,expiredays)
		{
			var exdate=new Date()
			exdate.setDate(exdate.getDate()+expiredays)
			document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
		}
		function GoTo(a)
		{
		    var purl = '/my/g/?q='+a[0]
		    if (window.XMLHttpRequest) {
		        req = new XMLHttpRequest();
		        req.onreadystatechange = function(){Done(a);}
		        req.open("GET", purl, true);
		        req.send(null);
		    // branch for IE/Windows ActiveX version
		    } else if (window.ActiveXObject) {
		        req = new ActiveXObject("Microsoft.XMLHTTP");
		        if (req) {
		            req.onreadystatechange = function(){Done(a);}
		            req.open("GET", purl, true);
		            req.send();
		        }
		    }
		    function Done(vv)
		    {
			    var ld = document.getElementById('load')
		    	if(req.readyState==1)
		    	{
		    		ld.innerHTML = 'Loading...'
		    		ld.className = 'l1'		    		
		    	}
				else if(req.readyState==4)
				{
					if(req.responseText=='0')
					{
						document.getElementById('sch').q.value = vv[3];
						showAddress(document.getElementById('sch').q.value)
					}
					else if(req.responseText)
					{
			    		ld.innerHTML = ''
			    		ld.className = 'l2'
				    	var adxx = req.responseText.split(',')
				    	if(!parseFloat(adxx[0]))
				    	{
				    		document.getElementById('mapHide').style.display = 'none'
				    		return false;
			    		}
						map.setCenter(new GLatLng(parseFloat(adxx[0]),parseFloat(adxx[1])),getZoom(adxx[2]))
						lastMapType = map.getCurrentMapType().getName()
					}
				}				
			}				
		}
		function stringCheck(a)
		{
			return (a.match(/^\D+$/))?true:false;
		}
		function z(a)
		{
		
			var ALoc = a.replace(/x\d+\/$/,'')
			var ALoc = ALoc.split('/')
			var ALocString = ''
			var m = a.replace(/\/x\d+\/$/,'/')
			if(m.match(/\/\d+\/\d+\/$/))
			{
				var start = 3;
				var extra = 'unit '
			}
			else
			{
				var start = 2
				var extra = ''
			}
			if(ALoc[0]&&ALoc[1]&&ALoc[2]&&ALoc[3]&&ALoc[4])
				ALoc[2] = '';
			for(var i=(ALoc.length-start);i>=0;i--)
			{
				var preAdd = ALoc[i].replace(/-/,' ')
				var preAdd = preAdd.replace(/\+/,'-')
				ALocString += preAdd+' '
			}
			GoTo([a,m,extra,ALocString])
			return false
		}
		function buy(a)
		{
			window.location = 'http://www.daleysfruit.com.au/Secure.php?ProductNum='+a+'&Qty=1&DropDown=Map&Nprev=1'	
			return false;
		}
		function uservy(a)
		{
			window.location = 'http://www.daleysfruit.com.au/my/'+a+'/'
			return false;
		}
		function DisplayOrchard(a)
		{
			var idArray = groupPpid[a[1]].split(',')
		    var purl = '/my/o/?q='+idArray[a[0]]
		    if (window.XMLHttpRequest) {
		        req = new XMLHttpRequest();
		        req.onreadystatechange = function(){Done(a);}
		        req.open("GET", purl, true);
		        req.send(null);
		    // branch for IE/Windows ActiveX version
		    } else if (window.ActiveXObject) {
		        req = new ActiveXObject("Microsoft.XMLHTTP");
		        if (req) {
		            req.onreadystatechange = function(){Done(a);}
		            req.open("GET", purl, true);
		            req.send();
		        }
		    }
		    function Done(a)
		    {
				if(req.readyState==4)
					if(req.responseText)
						DisplayNextProp(a,req.responseText)
			}
		}
		function ShowNextProp(k)
		{
			DisplayOrchard(k)
			return false
		}
		function DisplayNextProp(k,StringData)
		{
			var curid=k[0];var i=k[1];var firstTime=k[2];var returnData = k[3];
			var contentsArray = grouppText[i].split(',')
			var idArray = groupPpid[i].split(',')
			var latlngprop = groupLatLng[i].split(',')
			if(firstTime===true)
			{
				for(var x=0;x<idArray.length;x++)
					if(gCookie['p'+idArray[x]]!=true)
					{
						curid=x
						break;
					}
			}
			var next = parseInt(curid)+1;
			var prev = parseInt(curid)-1;

			if(gCookie['p'+idArray[curid]]==true)
			{
				var isVisited = '<div id="t'+i+'" class="yesVisit">';
			}
			else
			{
				var isVisited = '<div id="t'+i+'" class="noVisit">';
			}
			var pos = curid+1+' of '+idArray.length
			if(curid==0&&(contentsArray.length==1))
				var first = ''
			else if(curid==0)
				var first = '&lt;&lt;Previous '+pos+' <a href="#" onclick="return ShowNextProp(['+next+','+i+'])">Next&gt;&gt;</a>';
			else if(curid ==(contentsArray.length-1))
				var first = '<a href="#" onclick="return ShowNextProp(['+prev+','+i+'])">&lt;&lt;Previous</a> '+pos+' Next&gt;&gt;'
			else
				var first = '<a href="#" onclick="return ShowNextProp(['+prev+','+i+'])">&lt;&lt;Previous</a> '+pos+' <a href="#" onclick="return ShowNextProp(['+next+','+i+'])">Next&gt;&gt;</a>'

			
			if(gCookie['p'+idArray[curid]]!=true)
			{
				var oldcookie = getCookie('p')
				if(oldcookie!=false)
					setCookie('p',oldcookie+'-'+idArray[curid],365*20)				
				else
					setCookie('p',idArray[curid],365*20)
			}
			setCookieGlobal()
			if(document.getElementById('m'+i))
				document.getElementById('m'+i).className = getaClass(i)
			var setpage = isVisited+first+StringData+'<\/div>'
/////////////////////////////////////////////////////////////////////////////////////////////////
			openid = idArray[curid]
//			document.getElementById('msg').innerHTML = getCookie('p')
			if(returnData===true)
				openWindow(setpage,k[4],k[5])
			else
				document.getElementById('t'+i).innerHTML = setpage
			return false;
		}
		function getZoom(a)
		{
				switch(a)
				{
					case 1:
						zm = 2;
					case 2:
						zm = 3
						break;
					case 3:
					case 4:
						zm = 13
						break;
					case 5:
					case 6:
						zm = 15
						break;
					case 7:
					case 8:
						zm = 15
						break;
					case 9:
					case 10:
					case 11:
					case 12:
					case 13:
					case 14:
					case 15:
					case 16:
						zm = 15;
						break;
					default:
						zm=17;
						break;
				}
			return zm
		}
		function m(a)
		{
			var q = a[0].split('|')
			openid = a[1]
			map.setCenter(new GLatLng(parseFloat(q[0]),parseFloat(q[1])),getZoom(a[2]))
			return false;
		}
		function wind(q) // when someone clicks on a marker
		{
	        var p = map.fromLatLngToDivPixel(groupPoints[q[0]]);
			var pix = new GPoint(p.x+26,p.y-21);
			var point = map.fromDivPixelToLatLng(pix);
			var allpnts = groupPpid[q[0]].split(',');
			if((q[2]===0)||(q[2]>0))
				ShowNextProp([q[2],q[0],false,true,point,q])
			else
				ShowNextProp([0,q[0],true,true,point,q])
		}
		function openWindow(infoText,point,q)
		{
			map.openInfoWindowHtml(point,infoText);
			q[1].className = getaClass(q[0])
		}
		function setCookieGlobal()
		{
			if(getCookie('p')==false)
				return false
			var cookiepnts = getCookie('p').split('-');
//			alert(cookiepnts.length)
			gCookie = null; gCookie = [];
			if(cookiepnts.length)
			{
				gCookie['set'] = true;
				for(var b=0;b<cookiepnts.length;b++)
				{
					gCookie['p'+cookiepnts[b]] = true
//					alert('setglobals: p'+cookiepnts[b]+' --- >'+gCookie['p'+cookiepnts[b]])
				}
			}
			return true
		}
		function getaClass(i)
		{
			var mkr = 'visited' // assume it has been visited
			var gpoints = groupPpid[i].split(',')
			for(b=0;b<gpoints.length;b++)
				if(gCookie['p'+gpoints[b]]!=true)
					mkr = 'marker'; // the moment that a point has not been visited then say it has not been visited

			if(gpoints.length>1)
				mkr += 'group'
			return mkr;
		}
		function Format_Price(p)
		{
			if(!p[0])
				return false
			p[1]=true
			if(p[0]<1000)
				return p[0]
			if(p[0]<1000000)
			{
				var Summary = parseInt(p[0]/1000)
				if(p[1]===true)
					Summary = Summary.toString()+'K'
				else
					Summary = Summary
				return Summary				
			}
			else
			{
				var Summary = p[0]/1000000
				var regular = /^.{3}/
				var match = regular.exec(Summary)
				if(match&&match[9])
					Summary = match[0].replace(/\.$/,'&nbsp;')
				else if(Summary.length<3)
				{
					Summary = '&nbsp;&nbsp;'+Summary
				}
				if(p[1]===true)
					Summary = Summary.toString()+'M'
				else
					Summary = Summary
				return Summary				
			
			}
		}
		function createMarkers(i,state)
		{
			var tdet = grouppText[i].split(',')
			if(state)
			{
				var statedet = groupPpid[i].split(',');
				var markerText = (tdet.length==1)?groupPpid[i]+'<sub>'+grouppText[i]+'</sub>':statedet[0]+'<sub>'+tdet[0]+'</sub>';
			}
			else
			{
				var qtotals = 0;
				for(var j=0;j<tdet.length;j++)
				{
					var mqt = tdet[j].split('|')
					qtotals += parseInt(mqt[0])
				}
				var markerText = (tdet.length==1)?qtotals+'<sub>trees</sub>':tdet.length+'<sub>orchards</sub>'
			}
			var insert1 = new EInsert(new GLatLng(groupPoints[i].lat(),groupPoints[i].lng()), '<div id="m'+i+'" onclick="wind([\''+i+'\',this])" class="'+getaClass(i)+'">'+markerText+'</marker>', new GSize(145,233), map.getZoom());
			var marker = new GMarker(new GLatLng(groupPoints[i].lat(),groupPoints[i].lng()));
//			GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(grouppText[i]);})
			groupMarkers[i]=marker;
			return [insert1,marker];
		}
		function clearGlobals()
		{
			pointObj  = null;  pointObj=[];
			pixelsObj = null;  pixelsObj = [];
			pText	  = null;  pText = [];
			Ppid	  = null;  Ppid  = [];
			
		}
		function clearGroupGlobals()
		{
			groupPoints = null;	groupPoints = [];
			groupPixels = null;	groupPixels = [];
			grouppText  = null;	grouppText = [];
			groupPpid   = null; groupPpid = [];
			groupLatLng = null; groupLatLng = [];
		}
		function load_markers(lat,lng,pname,pid)
		{
			var curzoom = map.getZoom()
			var point = new GLatLng(lat,lng)
			var m = map.getCurrentMapType().getProjection().fromLatLngToPixel(point,curzoom)
			pointObj.push(point);
			pixelsObj.push(m);
			pText.push(pname);
			Ppid.push(pid.toString());
		}
		function reDrawit()
		{
			pixelsObj = null;
			pixelsObj = [];
			var curzoom = map.getZoom()
			for(var i=0;i<pointObj.length;i++)
			{
				var m = map.getCurrentMapType().getProjection().fromLatLngToPixel(pointObj[i],curzoom)
				pixelsObj[i] = m;
			}
		}
		function Require_Query()
		{
			if(WaitQuery==true)
				return false;
			if(lastBound===false)
				return true;
			var bounds = map.getBounds();
			if(lastBound.containsBounds(bounds))
				return false
			else
				return true
		}
		function GetProperties()
		{
			var bounds = map.getBounds();
			var ne = bounds.getNorthEast();
			var sw = bounds.getSouthWest();
			if(lastBound)
			{
				var latDist = Math.abs(ne.lat() - sw.lat())/2
				var lngDist = Math.abs(ne.lng() - sw.lng())/2
			}
			else
			{
				var latDist = 0
				var lngDist = 0
			}
			var northEast = new GLatLng(ne.lat() + latDist,ne.lng() + lngDist)
			var southWest = new GLatLng(sw.lat() - latDist,sw.lng() - lngDist)
			lastBound = new GLatLngBounds(southWest,northEast);
			lastZoom = map.getZoom();
//			document.getElementById('msg').innerHTML = lastZoom
			purl = '/my/x/?latLeft='+Math.round(northEast.lat()*100000)/100000+'&latRight='+Math.round(northEast.lng()*100000)/100000+'&lngLeft='+Math.round(southWest.lat()*100000)/100000+'&lngRight='+Math.round(southWest.lng()*100000)/100000+'&zm='+map.getZoom()
//			document.getElementById('tx').value += 'http://www.ibase.com.au'+purl+"\n"
		    if (window.XMLHttpRequest) {
		        req = new XMLHttpRequest();
		        req.onreadystatechange = Done;
		        req.open("GET", purl, true);
		        req.send(null);
		    // branch for IE/Windows ActiveX version
		    } else if (window.ActiveXObject) {
		        req = new ActiveXObject("Microsoft.XMLHTTP");
		        if (req) {
		            req.onreadystatechange = Done;
		            req.open("GET", purl, true);
		            req.send();
		        }
		    }
		    function Done()
		    {
			    var ld = document.getElementById('load')
		    	if(req.readyState==1)
		    	{
		    		ld.innerHTML = 'Loading...'
		    		ld.className = 'l1'		    		
		    	}
				else if(req.readyState==4)
				{
		    		ld.innerHTML = ''
		    		ld.className = 'l2'
					if(req.status=='200')
					{
//						alert(req.responseText)
						if(req.responseText)
						{
							clearGlobals()
							map.clearOverlays()
							var p = req.responseText.split('\n')
							var aboutQuery = p[0].split(',')
							if(parseInt(aboutQuery[1])==1)
								lastBound=false;
							for(var i=1;i<p.length;i++)
							{
								var qq = p[i].split(',')
								load_markers(qq[0],qq[1],qq[3],qq[2])
							}
							groupmarkers()
						}
					}
					else 
;//						alert('Could not Clear please tell correy if problem persists')
					keepopen = false
				}
		    }
		}
		function load2()
		{
		      if (GBrowserIsCompatible()) 
			  {
				setCookieGlobal();
				var mxp = document.getElementById("map")
				mxp.style.display = 'block'
				if(window.innerHeight==null&&window.innerHeight!=0) /*internet explorer*/
					var h=document.documentElement.clientHeight
				else /*firefox and opera*/
					var h=window.innerHeight
				h = h-10;
//				mxp.style.height = h.toString()+'px'
		        map = new GMap2(mxp,{mapTypes:[G_NORMAL_MAP,G_HYBRID_MAP,G_SATELLITE_MAP]});
				map.enableContinuousZoom()
				map.enableDoubleClickZoom();
					map.enableScrollWheelZoom();

//				Display_Buttons('Get Streets','Group Them','Query Y/N',true,'<h1>ibase.com.au</h1>',true)
				Display_Buttons('FULL SCREEN',false,false,true,false,true)
				loading = new TextualZoomControl('<div class="l2" id="load"></div>',0,0,G_ANCHOR_TOP_RIGHT,false,'Loading',false);					    
				map.addControl(loading)
				GEvent.addDomListener(map, "moveend", function() {lastMapType = map.getCurrentMapType().getName();});
				GEvent.addDomListener(map, "moveend", function() {
				keepopen = true
				if(Require_Query())
				{
					GetProperties()
				}
				else
				{
					if(lastZoom!=map.getZoom())
					{
						lastZoom = map.getZoom()
						map.clearOverlays();
						reDrawit();
						groupmarkers();
					}
					keepopen=false
				}
				});				
				GEvent.addListener(map, "infowindowclose", function() {if(!keepopen) openid=false})				

				loc = location.href.replace(/[^0-9]/g,'')
				openid = loc;
				z(loc)
			 }
		}
