function ttt(){window.location.hash="main";}
function blurb(x){document.getElementById("blurb").innerHTML=x}



 
         
  	    function butstart() {
  document.getElementById("buttons").innerHTML="</span> &nbsp; <b>Drag a placemark onto your map: </b><a href=\"javascript:dn()\"><img border=0 src=\"mkb_whi.png\" onmousedown=\"addpmarkd()\"></a>"; 
//   document.getElementById("buttons").innerHTML="</span> &nbsp; <a href=\"javascript:addpmarkn()\"><b>Add a place to your map!</b></a><a href=\"javascript:dn()\"><img border=0 src=\"mkb_whi.png\" onmousedown=\"addpmarkd()\"></a>";       
  //      alert(highid)
        
 //  if ((highid==0)&&(frsql!="nomates'")) {  setTimeout('af()',300)}    /// not for not facebook version...
             
       };      
     
     
     	
	
	function jgh(){
	   map.closeInfoWindow() ;      	
	   if (hometp=="Satellite") {   map.setMapType(G_SATELLITE_MAP); } else  { if (hometp=="Hybrid")  { map.setMapType(G_HYBRID_MAP) }  else  {map.setMapType(G_NORMAL_MAP) }};  	
       var homezmp =  parseInt(homezm) ;   /// check this!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	   map.setZoom(homezmp);     	       
	   map.panTo(new GLatLng(homelat,homelng));                 ////////////check above really!!!!!!!!!!!!!
}
function picjgh(){
	jgh()
	evalAHAH('picuphm.php?ntryl='+ntryl+'&ptryl='+ptryl,'blurb','Home...')	
	}


	function whoaddu(){
   map.clearOverlays();		             		
	evalAHAH('whoaddu.php?ntryl='+ntryl+'&ptryl='+ptryl,'blurb','Loading....')		
  document.getElementById("contbut").innerHTML="";			      		
		}
	
	
	
	function contal(){    if (lgst=="nl"){blurb("You need to log in...");} else {  
	 clradd();  	    
// document.getElementById("rlist").innerHTML="<div id=\"sidebar\" style=\"overflow:auto; height:100px;\"></div> ";
   document.getElementById("contbut").innerHTML="<br><input type=\"submit\"  value=\"ADD/EDIT\" onClick=\"boxtext();\"><input type=\"submit\"  value=\"SEND MAIL\" onClick=\"sndml();\"><br>";
  
  if (conts!='none'){ 
  document.getElementById("sidebar").innerHTML = conts ; 
   map.clearOverlays();
 ca('contactmap.php?ntryl='+ntryl+'&ptryl='+ptryl,'blurb','Searching for friends...','contactlist='+conts)		//      +'&contactlist='+frch 
 blurb('Viewing contacts')
 cvwmd = 'cnt';
  
  }else{
  document.getElementById("sidebar").innerHTML = "<b><br>You can add a list of<br> friend's email addresses<br> here so you can quickly<br> share maps and photographs<br>  with them and stay in touch.<br><br>Click 'Add/Edit' to enter <br>email's, then save.</b>" }
   
 	 
	    }}

	
	    
	function clradd(){if (adding==1){  adding=0; mover=0; GEvent.clearListeners(map, "mousemove"); butback(); }    }   //need to rethink fb

		    	
    function yourmap(){cvwmd='umk';         
 // panzmt(homelat,homelng,homezm,'map','test')   ////   parseInt(homezm)
 //map.setZoom(parseInt(homezm));
 //map.setMapType(hometp);
 // map.setMapType('Satellite');
 
   if (hometp=="Satellite"){
	     map.setCenter(new GLatLng(homelat,homelng),homezm,G_SATELLITE_MAP );   
	   } else {
		    if (hometp=="Hybrid")  {
			  map.setCenter(new GLatLng(homelat,homelng),homezm,G_HYBRID_MAP); 
			      }  else  {				      
		        map.setCenter(new GLatLng(homelat,homelng),homezm,G_NORMAL_MAP );  			      
				      }}  
    placel()
     document.getElementById("blurb").innerHTML = " <b> &nbsp; Your Map </b>";   

    }	
    		
	function placel(){  clradd();   
	updatemlist();
document.getElementById("contbut").innerHTML="";	
//document.getElementById("rlist").innerHTML="<div id=\"sidebar\" style=\"overflow:auto; height:"+(innerht-150)+"px;\">"+marklist+"</div> ";	
//document.getElementById("rlist").innerHTML="<div id=\"sidebar\" style=\"overflow:auto; height:70px;\">"+marklist+"</div> ";

document.getElementById("sidebar").innerHTML = marklist
	
 //  cvwmd = 'umk';    /// ok take this out and return to public map if thats where we came from
 cvwmd = 'umk';       /// put it back for fb version, otherwise close window doesnt save new home or marker lock
 
     
	    map.clearOverlays();		             
  for (var i=1;i<=mkst;i++) {
		  if (mklnm[i]!="delete"){      ///alert(pmlat[i]) 	  	  
	    var point = new GLatLng(mklat[i],mklng[i]);  map.addOverlay(cLPMarker(point, mkhtm[i],i)); if (lck[i]!=1){ pmarker[i].enableDragging();}else{pmarker[i].disableDragging()}
	    
         }
	     }  blurb('&nbsp;<b> Your Map</b>')	 	    														
		}		
	

function mapl(){  alert ('map load test')
document.getElementById("contbut").innerHTML="";
//document.getElementById("rlist").innerHTML="<div id=\"sidebar\" style=\"overflow:auto; height:"+(innerht-150)+"px;\">"+mapvss+"</div> ";	
document.getElementById("rlist").innerHTML="<div id=\"sidebar\" style=\"overflow:auto; height:100px;\">"+mapvss+"</div> ";	 				
 				
//document.getElementById("sidebar").innerHTML = mapvss;  
blurb('Viewing your maps');

//alert(innerht)
}
				
	    
    function shcntmks(cntemail){   cvwmd = 'cntmk';
	document.getElementById("menu1").selectedIndex = 0;    
//    document.getElementById("contbut").innerHTML="<br>";		
//    document.getElementById("rlist").innerHTML="<div id=\"sidebar\" style=\"overflow:auto; height:290px;\"></div> ";   
   //    document.getElementById("blurb").innerHTML = cntemail; 	 
   	 evalAHAH('contmkld.php?ntryl='+ntryl+'&ptryl='+ptryl+'&cntemail='+cntemail,'blurb','Loading...'+cntemail)	         
	    }
	    
	    
    function shcntmkp(cntemail){   cvwmd = 'cntmk';
   	 evalAHAH('contmkldp.php?ntryl='+ntryl+'&ptryl='+ptryl+'&cntemail='+cntemail,'blurb','Loading...')	         
	    }

	    	    
	function logbox(){      // <a href=\"new.php\" id=\"nblurb3\">Register</a>
  //  document.getElementById("tleft").innerHTML = "";  		  
	document.getElementById("sidebar").innerHTML = "<b>Create your own free<br> Googlemap mashup with MassiveMap! </b><br><span id=\"logstuff\"><br></span><span id=\"logblb\"><b>Log in/Sign up</b></span><br> Email: <br>  <input type=\"text\" id=\"ntryl\" size=\"19\" maxlength=\"100\"> <br> Password: <br> <input type=\"password\" id=\"ptryl\" size=\"19\" maxlength=\"100\"><br><br><input type=\"submit\"  value=\"LOG IN\" onClick=\"trylogin();\";><input type=\"submit\"  value=\"SIGN UP!\" onClick=\"nu();\";><br><a href=\"http://www.massivemap.com/resetpass.php\" target=\"_blank\" >Forgotten password?</a> </span><br><br>...or log in using<br><a href='http://www.massivemap.com/fb/fp'>Facebook</a>  ";	  //<br><b>MassiveMap is completely free to use</b>
		}    
	
		function start(){    /// replace logbox
			
    }		
				
		function whadded(){
evalAHAH('whadded.php?ntryl='+ntryl+'&ptryl='+ptryl,'blurb','Searching..');	blurb('Contacts that added you')
			} 			
		function vconts(){						
ca('vconts.php?ntryl='+ntryl+'&ptryl='+ptryl,'blurb','Searching...','contactlist='+conts)
			} 	
		function vmarks(){						
evalAHAH('vmarks.php?ntryl='+ntryl+'&ptryl='+ptryl+'&lgst='+lgst,'blurb','Searching..');	
			} 
			
		function vmark(i){
evalAHAH('vmark.php?clem='+clem+'&clp='+clp+"&markid="+mkid[i]+'&lgst='+lgst,'blurb','Loading...');
			}
								
			
 function sndml(){
  contsar = conts.split(" ");  //reuse function later
 var contsout="";
 var re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/   ;
 var vi = 0;
 for (i=0;i<contsar.length;i++) {		 
	 if (re.test(contsar[i])) { 
	 if (vi!=0){contsout+=","}	
  contsout+=contsar[i];  vi++;}	 
}     		 
mailwin(contsout);
 }	 
 
 function clrmsg(){document.getElementById("mlmsg").innerHTML =	"";}	
 //function cnclml(){document.getElementById("contacts").innerHTML =	"";  // replaced by clsopt now
 //window.location.hash="thetop";}
 
 function mailwin(mlthem){
	 document.getElementById("options").innerHTML = "<br><br><br><br><br>"
	 document.getElementById("mkvw").innerHTML = "<br><table border=\"0\" cellpadding=\"7\" width=\"90%\" align=\"center\"><td><h3>Send Mail to Your Contacts</h3><textarea id=\"mlst\" rows=\"2\" cols=\"100\" wrap>"+mlthem+"</textarea><br><span id =\"msgblb\">Your message will automatically include a link to your map page, add any other information below</span><br><br><textarea id=\"mlmsg\" rows=\"9\" cols=\"100\" onclick=\"clrmsg();\" wrap>(Enter your Message Here)</textarea><br><input type=\"button\"  value=\"SEND MESSAGE\" onClick=\"gosnd();\"><input type=\"submit\"  value=\"CANCEL\" onClick=\"clsopt();\"><br><br></td></table> <br><br><br><br><br><br><br><br><br><br>";	
 window.location.hash="mkvw";  
 }
 
 
 
 			
function gosnd(){
                               
        var sendat = clem+'&ptryl='+clp+'&lng='+lng+"&lat="+lat+'&zm='+'&latlngc='+latlngc+'&zmonqm='+zmonqm; 
        var smsg = document.getElementById("mlmsg").value;
        var ems = document.getElementById("mlst").value;	       
	       
	      var bigvar="smsg="+smsg+"&ems="+ems;   
          ca('smsg.php?ntryl='+sendat,'msgblb', 'Sending Mail...',bigvar)		
        };	
       
function shmmp(smid,smlat,smlng,smzoom,smtp){
	
     mp = document.getElementById("mp"+smid);
     mp.style.height = innerht*.55+"px";      mp.style.width = "100%";  

     mapn = new GMap2(mp);  	
	 mapn.addControl(new GMapTypeControl());
	 mapn.disableDragging();
	 
	 var pnt = new GLatLng(smlat,smlng);

  function TextualZoomControl() {}
    TextualZoomControl.prototype = new GControl();	 
TextualZoomControl.prototype.initialize = function(mapn) {
  var container = document.createElement("div");
  var zoomInDiv = document.createElement("div");
  this.setButtonStyle_(zoomInDiv);
  container.appendChild(zoomInDiv);
  zoomInDiv.appendChild(document.createTextNode("Zoom In"));
  GEvent.addDomListener(zoomInDiv, "click", function() {
    mapn.zoomIn();  });
  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("Zoom Out"));
  GEvent.addDomListener(zoomOutDiv, "click", function() {
    mapn.zoomOut();});
  mapn.getContainer().appendChild(container);
  return container;}
TextualZoomControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7, 7));}
TextualZoomControl.prototype.setButtonStyle_ = function(button) {
  button.style.textDecoration = "underline";
  button.style.color = "#0000cc";
  button.style.backgroundColor = "white";
  button.style.font = "small Arial";
  button.style.border = "1px solid black";
  button.style.padding = "2px";
  button.style.marginBottom = "3px";
  button.style.textAlign = "center";
  button.style.width = "6em";
  button.style.cursor = "pointer";}
mapn.addControl(new TextualZoomControl());
	 	 	 
	    if (smtp=="Satellite") {
	     mapn.setCenter(pnt,smzoom,G_SATELLITE_MAP );   
	   } else {
		    if (smtp=="Hybrid")  {
			  mapn.setCenter(pnt,smzoom,G_HYBRID_MAP); 
			      }  else  {				      
		        mapn.setCenter(pnt,smzoom,G_NORMAL_MAP );  			      
				      }}; 
		      
         var markerp = new GMarker(pnt,{icon:G_DEFAULT_ICON});           
         mapn.addOverlay(markerp);
         
      GEvent.addListener(mapn, "click", function(marker, point) {       //////////////////////  maybe marker back late  think this is screwing ie
   if (marker) {mapn.removeOverlay(markerp);} else {mapn.removeOverlay(markerp); mapn.addOverlay(markerp);}
      });  
                 
    GEvent.addListener(mapn, "zoomend", function() {
            var nsmzm = mapn.getZoom();
            document.getElementById("smpzm"+smid).value = nsmzm; 
            }); 
    GEvent.addListener(mapn, "maptypechanged", function() {
          var nsmtp = mapn.getCurrentMapType().getName();
          document.getElementById("smptp"+smid).value = nsmtp; 
            });  
            
          document.getElementById("smbut"+smid).innerHTML = "<input type=\"submit\" value=\" SAVE ZOOM AND MAPTYPE \" onClick=\"uptpzm("+smid+");\">";                                      
           	}         	

           	           	
           	
           	function uptpzm(smid){
	        if (smid==""){    } else{   	/// not from veiw map, must be show all thingy
	  nsmtp = document.getElementById("smptp"+smid).value  ; 
      nsmzm = document.getElementById("smpzm"+smid).value  ; 	           		
	evalAHAH('uptpzm.php?ntryl='+ntryl+'&ptryl='+ptryl+'&smid='+smid+'&nsmzm='+nsmzm+'&nsmtp='+nsmtp,'smbut'+smid,'Updating...')		       			           	
           	}}
           	
           	function smpcup(smid){
	var smpclnk = document.getElementById("smpclnk"+smid).value  ; 	           		
 	evalAHAH('upsmpclnk.php?ntryl='+ntryl+'&ptryl='+ptryl+'&smid='+smid+'&smpclnk='+smpclnk,'smpcbut'+smid,'Updating...')		       			           		           	
	    	}
	    	
	    	function fpgup(smid){ 
	  var smtxt = bnltbr(document.getElementById("smtxt"+smid).value)  ; 
	  var thrlnk = document.getElementById("thrlnk"+smid).value  ; 
	  
	  for (var i=0;i<=mkst;i++){	  
		  if (mkid[i]==smid){ mkwww[i]=thrlnk;  } // bit clumsy but prob easiest
		  }	  
// 	  var kw1 = document.getElementById("kw1"+smid).value  ;  
//       var kw2 = document.getElementById("kw2"+smid).value  ;  
//       var kw3 = document.getElementById("kw3"+smid).value  ;  	 
	evalAHAH('fpgup.php?ntryl='+ntryl+'&ptryl='+ptryl+'&smid='+smid+'&thrlnk='+thrlnk+'&smtxt='+smtxt,'fpgbt'+smid,'Updating page...')		       		      	    	
		    	}
		
		    	
		    	
		    	
		    
	  
			
			
// 			function clsmkvw(){
// 	document.getElementById("mkvw").innerHTML = "";		
// 	document.getElementById("places").innerHTML = "";		
// 	    ttt(); 				
// 				}
				
			function clsopt(){
	document.getElementById("options").innerHTML = "";
	//document.getElementById("mkvw").innerHTML = "";		
	//document.getElementById("places").innerHTML = "";						
	     ttt();  				
				}
		
		function bnltbr(tx){
	    tx = tx.replace(/\r\n/g, "<br>");  tx = tx.replace(/\r/g, "<br>");  tx = tx.replace(/\n/g, "<br>") ;
	    return tx					
			}
			
		function brtnl(eid){  // trouble trying to do this from ahah
		txt = document.getElementById(eid).value
		txt = txt.replace(/<br>/g, "\n");
		document.getElementById(eid).value=txt
	        }
	        			
														

	
			function bnwrap(txt,wr,pic){  // wr=45    /// ha ha insert div here right!!!!!!!!!!!!
			
			txt = txt.replace(/#qtt#/g, "\"");	
			
	    if ((pic!='<img id="idpic" src="logo.jpg" height="120">')&&(pic!='')){     /// hmmm cant align pics now... or resize... sort it.
        var spic = pic+'<br>';	 
        }else{ var spic=''}

			
			l=txt.length;  var lines=1;
			if (l>wr+10){
			txout=""
			i=0
			while (i<l){
			j=txt.substr(i,wr+5).indexOf("<br>")
			if (j==-1){
			k=txt.substr(i+wr,l-i-wr).indexOf(" ")
			if (k==-1){
			txout+=txt.substr(i)
			i+=wr+500			
			}else{
			txout+=txt.substr(i,wr+k)+"<br>";    lines++ 
			i+=wr+k}
			 } else {
			txout+=txt.substr(i,j+4)			
			i+=j+4
		    }		    
	       }
	     //  return txout
       }             //   else {return txt}	  /// non fb: innerht/3.1  // scrW/4
       if (lines>=6){
	   var dtxt="<div id='inftx' style='height:"+parseInt(innerht/6)+"px; width:360px; overflow:auto'><span id='infpc'>"+spic+"</span>"+txt+"</div>"    
       }else{
       var dtxt="<div id='inftx' style='width:360px'><span id='infpc'>"+spic+"</span>"+txt+"</div>" }
       
//        if (lines>=6){
// 	   var dtxt="<div id='inftx' style='height:"+parseInt(innerht/6)+"px; width:"+parseInt(scrW/3.4)+"px; overflow:auto'><span id='infpc'>"+spic+"</span>"+txt+"</div>"    
//        }else{
//        var dtxt="<div id='inftx' style='width:"+parseInt(scrW/4)+"px'><span id='infpc'>"+spic+"</span>"+txt+"</div>" } //// non fb 
       
       
       
       //alert (dtxt)     
       return dtxt
       
       ////    decide how to mod hieght width and pic here // if lines > sommat
       //// determine width of widest line... to fix width
        
       /// add pic if not logo  ///
       
	}

			
	
        

function lnu(){ logbox(); nu();}                		
function nu(){ 	
document.getElementById("options").innerHTML = "<br><br><br><br><br><br><table border=\"0\" cellpadding=\"7\" width=\"90%\" align=\"center\"><h3>Please enter these details to create your free account...</h3><b>Your Name:</b><br><input id=\"nuname\" size=100><br><br><b>Your Email Address:</b><br><input id=\"nuemail\" size=100><br><br><b>Set a Password</b><br><input type=\"password\" id=\"nupass\" size=100><br><br><input type=submit onClick=\"gonu();\"  value=\"SUBMIT\">&nbsp; <b id=\"nublurb\"></b><br><br>MassiveMap will never under any circumstance disclose your email address to any third party without your consent.<br><br><a href=\"javascript:clsopt()\">Return to main map</a><br><br><br><br><br><br><br><br>";
	  window.location.hash="options"; 
      document.getElementById("nuemail").value =  document.getElementById("ntryl").value ; 	    			
	}				
				
function gonu(){
         var nun =  document.getElementById("nuname").value ; 	
         var nue =  document.getElementById("nuemail").value ; 
         var nup =  document.getElementById("nupass").value ; 
	 	 evalAHAH('nu.php?nue='+nue+'&nup='+nup+'&nun='+nun,'nublurb','Connecting...')		    	
}


function fbli(){
// evalAHAH('fbli.php?fbuser='+fbuser+'&fbname='+fbname,'blurb','Loading..')
 
  var bigvar="frsql="+frsql;
 
 ca('fbli.php?fbuser='+fbuser+'&fbname='+fbname,'blurb', ajs+'Loading Map...',bigvar)		 
            
// alert(fbuser)
// alert(fbname)	
	}

	
	
	function gfbfr(){   //  alert('hellooo')
map.clearOverlays();
 var bigvar="frsql="+frsql;     //// surprised dont need \" enclosing frsql
 
 ca('gfbfr.php?zzz=1','blurb', ajs+'Loading MassiveMap Friends',bigvar)	
		}			
		
		
		

	function gfbfrz(){  	
map.clearOverlays();
 var bigvar="frsql="+frsql;     //// surprised dont need \" enclosing frsql  
 ca('gfbfrz.php?zzz=1','blurb', ajs+'Loading Friends...',bigvar)		
		}					

	function geofrz(fz){
 var bigvar="frsql="+frsql;     //// surprised dont need \" enclosing frsql
 var fz1=fz+1;                     //// fz2=fz1+30;
 ca('geofrz.php?fz='+fz,'blurb',' &nbsp; &nbsp;<b>Friends Map</b> &nbsp; &nbsp;'+fz1,bigvar)		 /// need?var on ca
		
		}		
		
				
	function af(){       // mflist=''
	gclist=""; 
	  gfbfrz()
//	setTimeout('geofr()',800)		  		
   }	

   
   
   		
// 	function geofr(){			    /// is this still used at all?
// map.clearOverlays();
// document.getElementById("blurb").innerHTML = frsql
//  gclist="";
//  
//  var bigvar="frsql="+frsql;     //// surprised dont need \" enclosing frsql
//  
//  ca('geofr.php?zzz=1','blurb', 'Loading (please be patient)...',bigvar)		 /// need?var on ca
// 		
// 		}


function plotgeof(i){   //    alert(fbadd[i]+'   '+fbllz[i]+'    '+fbgfrn[i])   //// getting an undefined here check later

	if ((fbllz[i]=='geo')&&(fbadd[i]!='')){
    ggcode(i)		
 }else{
	  ni=i+1;  
      if(ni<zstop){  plotgeof(ni) } else { if (zstop<numfrn){ geofrz(zstop);  }else{geoup()   }   }
}
document.getElementById("blurb").innerHTML=' &nbsp;&nbsp; <b>Friends Map </b> &nbsp;'+ni  
}


function ggcode(i){     // alert(i+'!')
if (geocoder) {	
        geocoder.getLatLng(   
          fbadd[i],
          function(apnt) {
            if (!apnt) {
            } else {	            
	         //   apoint=point	                               //  alert('plotting')    
	         
	      var marker = createGCMarker(apnt,fbadd[i]+'<br><b>'+fbgfrn[i]+'</b>',i,"",fbgfrn[i]);  
           map.addOverlay(marker); 
           fbllz[i]='upd~'+apnt.lat()+'~'+apnt.lng()
           gclist=gclist+"<a href=\"javascript:gcclick("+i+")\">"+fbgfrn[i]+"</a><br>";
           document.getElementById("sidebar").innerHTML = mflist + gclist
            }
          ni=i+1;  
          if(ni<zstop){   setTimeout("plotgeof(ni)",120) } else { if (zstop<numfrn){ geofrz(zstop);  }else{geoup() }    }
          }
        ); 		
}}

       function geoup(){
	        var frdata="";	       
	   for (var i=0;i<numfrn;i++){
		     
		  frdata+=fbuar[i]+"~"; 
		  frdata+=fbllz[i]		  
		  frdata+="~~~x~~~";     
             }
   	      var bigvar="bv="+frdata;          
   ca('geoup.php?numfrn='+numfrn,'blurb','uploading geo',bigvar)		 /// need?var on ca  
           
	       }
       
				
        function createGCMarker(point,htm,i,piclink,quemail) {     
         var marker = new GMarker(point,{icon:ics_ora});    
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(htm);                                                            	
        });
        gcmarker[i] = marker;
        gchtm[i] = htm;
        return marker;
      }
      
        function gcclick(i) {    
        gcmarker[i].openInfoWindowHtml(gchtm[i]);        
      }
      
      
         function createFsMarker(point,htm,i,piclink,quemail) {  
    //    var marker = new GMarker(point,icon);
         var marker = new GMarker(point,{icon:ics_red});    
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(htm);                                                            	
        });
        fmarker[i] = marker;
        htmls[i] = htm;
    //  fpic[i] = piclink;
        quem[i] = quemail;
        return marker;
      }   
     

		
		function frsel(){
			
//evalAHAH('frsel.php?fbuser='+fbuser+'&frsql='+frsql,'blurb','Loading...')

var bigvar="frsql="+frsql;   
 
 ca('frsel.php?zzz=1','blurb', 'Loading...',bigvar)		 /// need?var on ca
						
		}
		
		
		
		function frmpv(fruser){
			
evalAHAH('frmpv.php?fruser='+fruser,'blurb','Loading...')

//document.getElementById("blurb").innerHTML = fruser; 					
		}
		
				
	  function dn(){}
				
	  function mouseupdrop(){
	  if((mover==1)&&(inmap==1)){dropmark()} 
	  inmap=-1   /// must be straight drag, otherwise win opens at annoying times
	  }
	      	      
	  function dropmark(){ adding=0;
 	  mover=0;
 //	  GEvent.clearListeners(map, "mouseup");    // not supported gmap2
 	  GEvent.clearListeners(map, "mouseout");   
      GEvent.clearListeners(map, "click");  //// trying instant add markers here..   
    //    if (cvwmd=='umk'){
          opinfwin()   
    //    }                   is ok if switxh mode after add mark start but not if add mark in wrong mode. must cancel on mode switch methinks
    }

        
     function showAddress(address) { //  address=document.getElementById("geoc").value;
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " not found");
            } else {
              map.setCenter(point, 13);
            //  var marker = new GMarker(point);
            //  map.addOverlay(marker);
            //  marker.openInfoWindowHtml(address);
            }
          }
        );
      }
    }		