	function initialize(a,b) {
			
		var latlng = new google.maps.LatLng(a,b);
		var myOptions = {
		      zoom: 10,
			  center: latlng,
			  mapTypeId: google.maps.MapTypeId.HYBRID
			};
		var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
			
		}
		
		function sortlatlng() {
			
		var time = document.getElementById('my_twitter_status_time').innerHTML;
		var text = document.getElementById('lastposition').innerHTML;
		var pos1e = text.indexOf('lat:') + 4;
		var pos2s = text.indexOf('lng:'); 		//
		var pos2e = pos2s + 4;
		
		
		lat = text.slice(pos1e, pos2s-1);
		lng = text.slice(pos2e);
		
		initialize(lat,lng);
		}
		
		function loadXMLDoc(url){
			if (window.XMLHttpRequest)
				{// code for IE7+, Firefox, Chrome, Opera, Safari
				xhttp=new XMLHttpRequest();
				}
				else
				{// code for IE6, IE5
				xhttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				xhttp.open("GET",url,false);
				xhttp.send("");
				xmlDoc = xhttp.responseXML;
				//document.write('Yeah!!');
				
				var curpos = 0;
				var result;
				var i = 0;
				
				if(curpos === 0){
					while (curpos != 1){
						result=xmlDoc.getElementsByTagName("text")[i].childNodes[0].nodeValue;
						document.getElementById("lastposition").innerHTML= result;
						if(result.match("curpos")){
							curpos = 1;
							sortlatlng();
						}
						else {
							curpos = 0;
							i++;
						};
						//console.log(curpos + "%%" + result);
					};
				};
			};	
		
		function loadTimeXMLDoc(url) {
			if (window.XMLHttpRequest) {							// code for IE7+, Firefox, Chrome, Opera, Safari
				xmltimedoc = new XMLHttpRequest();
			}
			else {													// code for IE6, IE5
				xmltimedoc = new ActiveXObject("Microsoft.XMLHTTP");
		    }
		    xmltimedoc.open("GET", url, true);
			xmltimedoc.onreadystatechange = useHTTPResponse;
			xmltimedoc.send(null);				
		}
		
		function useHTTPResponse() {
		
			if (xmltimedoc.readyState == 4) {
				if(xmltimedoc.status == 200) {
					var currentxmlTime = xmltimedoc.responseXML.getElementsByTagName("currenttime")[0]; 
					document.getElementById('time').innerHTML = currentxmlTime.childNodes[0].nodeValue;
				}
			} 
			else {
				document.getElementById('time').innerHTML = "Waiting";
			}
		}
		
		
		function loadDoc(url)
			{
			if (window.XMLHttpRequest)
			  {// code for IE7+, Firefox, Chrome, Opera, Safari
			  xmlhttp=new XMLHttpRequest();
			  }
			else
			  {// code for IE6, IE5
			  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
			  }
			xmlhttp.open("GET",url, false);
			xmlhttp.send(null);
			document.getElementById('test').innerHTML=xmlhttp.responseText;
		}
		/*		
		$(document).ready(function(){
			$('#task').live('click', function(eve){
				eve.preventDefault();
				$.get('/johnboy/index.php/home/task', function(html){
				if(parseFloat(html)){
					$('#task').after('Task Complete ' +html+ ' Records Updated');
					$('#task').text('success').hide();
				}
				else{
					$('#task').text('you lose, loser. try again');
				}
				});
			});
		});
		*/

