
var submitmarkerx;
var iconObj = [];
var iconnamex = [];
var urlAddress = "http://www.travelmapia.com/index.html"; 
var pageName = "Travelmapia - Your Ultimate World Travel Guide"; 


var loginwidth;
var loginheight;

function addToFavorites() { 
if (window.external) { window.external.AddFavorite(urlAddress,pageName) 
} 
else { alert("Sorry! Your browser doesn't support this function."); 
} 


} 



function showwelcome()
{    
  
  
 //Close Min Legend window.
 document.getElementById("minilegendwindow").innerHTML =  '';
 document.getElementById("minilegendwindow").style.visibility = "hidden";
  
  

  
 document.getElementById("mapwindow").innerHTML =  '';
 document.getElementById("mapwindow").style.visibility = "visible";
 
 var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(6,85)); 
 pos.apply(document.getElementById("mapwindow")); 
 document.getElementById("map").appendChild(document.getElementById("mapwindow")); 
      
 var iconlegend = "";
 //var iconObj = [];
 var icondir = [];
 var xformat = "";
 var x=4; 
 var iconstring ="";
 var request = GXmlHttp.create();
 
 

      
           if(language=='english'){
          
         // alert(iconlegend);
          document.getElementById("mapwindow").innerHTML =  '<div id="legend"><div id="welcometop"><b>Welcome to TravelMapia</b><a  style="padding-left:140px" href="#" onclick="iLoveCookies();">Don\'t show on next visit</a><a style="padding-left:20px" href="#" onclick="closelegend();">Close</a></div><div style="float:left; font-family:helvetica;font-size:12px;width:470px;height:auto;margin-bottom:9px;">Explore the world with our interactive map featuring pictures and videos of different attractions, hotels, restaurant and resorts. Have a business? Then register and submit your location on our map for free. Start by selecting your destination on the right.</div><div style="float:left; width:470px;height:auto">Latest Submissions:</div><div style="float:left; width:470px;height:230px"><iframe frameborder=0 width=460 height=230 src="http://www.travelmapia.com/php/welcome.php"></iframe></div></div>';
          }
          
          else if(language=='espanol'){
          
           document.getElementById("mapwindow").innerHTML =  '<div style="padding-top:3px"><div align="right" style="padding-right:7px"><a href="#" onclick="closelegend();">Cerrar</a></div><b>Leyenda</b></div><span class=' + '"header"' + '">' + '<div style="overflow:scroll;float:left; width:150px;height:519px"><TABLE><TBODY><tr>' + iconlegend + '</tr></TBODY></TABLE></div>';
          
          
          }
 
}//Close function   






















function showlegend()
{    
  
  
 //Close Min Legend 
 document.getElementById("minilegendwindow").innerHTML =  '';
 document.getElementById("minilegendwindow").style.visibility = "hidden";
  
  

  
 document.getElementById("mapwindow").innerHTML =  '';
 document.getElementById("mapwindow").style.visibility = "visible";
 
 var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(6,85)); 
 pos.apply(document.getElementById("mapwindow")); 
 document.getElementById("map").appendChild(document.getElementById("mapwindow")); 
      
 var iconlegend = "";
 //var iconObj = [];
 var icondir = [];
 var xformat = "";
 var x=4; 
 var iconstring ="";
 var request = GXmlHttp.create();
 
 
 if(language=='english'){
 request.open("GET", "http://www.travelmapia.com/files/" + "english/" + "icons.xml", true);   
 }else if(language=='espanol'){
 request.open("GET", "http://www.travelmapia.com/files/" + "espanol/" + "icons.xml", true);   
 }
 
 request.onreadystatechange = function() 
 {
     if (request.readyState==4) 
        { //Removed for IE documentElement error.
          //var xmlDoc = request.responseXML;
          var xmlDoc = GXml.parse(request.responseText); 
          // obtain the array of markers and loop through it
          var markers = xmlDoc.documentElement.getElementsByTagName("marker");
           
          for (var i = 0; i < markers.length; i++) 
          {  // obtain the attribues of each marker
            iconObj[i] = new GIcon();
            iconObj[i].image = markers[i].getAttribute("icon");
            
            var iconstring = markers[i].getAttribute("icon");
            var iconlength = iconstring.length;
            var index = iconlength-4;
            var iconname = iconstring.substring(13,index);
                
            var iconname1 = iconname.toLowerCase();
             
            iconnamex[i] = String(iconname1 + '.png');
            
            
            //alert(iconname1);
            
            
            if(i==x)
            {
                      
             iconlegend += '<tr><td><a href="javascript:sqlajax_iconsearch('+i+')"><img border=0 src="http://www.travelmapia.com/' + iconObj[i].image + '"></img></a></td> <td Align=left vAlign=middle width="35"><a href="#" onclick="sqlajax_iconsearch('+i+');">' + iconname + '</a>&nbsp;' + '</td>' ;
             x = x + 4;   
            }
            else{
             iconlegend += '<td><a href="javascript:sqlajax_iconsearch('+i+')"><img border=0 src="http://www.travelmapia.com/' + iconObj[i].image + '"></img></a></td> <td Align=left vAlign=middle width="35"><a href="#" onclick="sqlajax_iconsearch('+i+');">' + iconname + '</a>&nbsp;' + '</td>' ;
            }
                
          }
          
          if(language=='english'){
          
         // alert(iconlegend);
          document.getElementById("mapwindow").innerHTML =  '<div id="legend"><div id="legendtop"><b>Legend</b><a  style="padding-left:320px" href="#" onclick="showminilegend();">Minimize</a><a style="padding-left:20px" href="#" onclick="closelegend();">Close</a></div><div style="overflow:scroll;float:left; width:470px;height:300px"><TABLE><TBODY><tr>' + iconlegend + '</tr></TBODY></TABLE></div></div>';
          }
          
          else if(language=='espanol'){
          
           document.getElementById("mapwindow").innerHTML =  '<div style="padding-top:3px"><div align="right" style="padding-right:7px"><a href="#" onclick="closelegend();">Cerrar</a></div><b>Leyenda</b></div><span class=' + '"header"' + '">' + '<div style="overflow:scroll;float:left; width:150px;height:519px"><TABLE><TBODY><tr>' + iconlegend + '</tr></TBODY></TABLE></div>';
          
          
          }
          
        }
                    
        }
      request.send(null); 
 
}//Close function   




function showminilegend()
{    
 
 
 document.getElementById("mapwindow").innerHTML =  '';
 document.getElementById("mapwindow").style.visibility = "hidden";
 
 
 document.getElementById("minilegendwindow").innerHTML =  '';
 document.getElementById("minilegendwindow").style.visibility = "visible";
 
 var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(6,85)); 
 pos.apply(document.getElementById("minilegendwindow")); 
 document.getElementById("map").appendChild(document.getElementById("minilegendwindow")); 
      
 var iconlegend = "";
 //var iconObj = [];
 var icondir = [];
 var xformat = "";
 var x=1; 
 var iconstring ="";
 var request = GXmlHttp.create();
 
 
 if(language=='english'){
 request.open("GET", "http://www.travelmapia.com/files/" + "english/" + "icons.xml", true);   
 }else if(language=='espanol'){
 request.open("GET", "http://www.travelmapia.com/files/" + "espanol/" + "icons.xml", true);   
 }
 
 request.onreadystatechange = function() 
 {
     if (request.readyState==4) 
        { //Removed for IE documentElement error.
          //var xmlDoc = request.responseXML;
          var xmlDoc = GXml.parse(request.responseText); 
          // obtain the array of markers and loop through it
          var markers = xmlDoc.documentElement.getElementsByTagName("marker");
           
          for (var i = 0; i < markers.length; i++) 
          {  // obtain the attribues of each marker
            iconObj[i] = new GIcon();
            iconObj[i].image = markers[i].getAttribute("icon");
            
            var iconstring = markers[i].getAttribute("icon");
            var iconlength = iconstring.length;
            var index = iconlength-4;
            var iconname = iconstring.substring(13,index);
                
            var iconname1 = iconname.toLowerCase();
             
            iconnamex[i] = String(iconname1 + '.png');
            
            
            //alert(iconname1);
            
            
            if(i==x)
            {
                      
             iconlegend += '<tr><td><a href="javascript:sqlajax_iconsearch('+i+')"><img border=0 src="http://www.travelmapia.com/' + iconObj[i].image + '"></img></a></td> <td Align=left vAlign=middle width="35"><a href="#" onclick="sqlajax_iconsearch('+i+');">' + iconname + '</a>&nbsp;' + '</td>' ;
             x = x + 1;   
            }
            else{
             iconlegend += '<td><a href="javascript:sqlajax_iconsearch('+i+')"><img border=0 src="http://www.travelmapia.com/' + iconObj[i].image + '"></img></a></td> <td Align=left vAlign=middle width="35"><a href="#" onclick="sqlajax_iconsearch('+i+');">' + iconname + '</a>&nbsp;' + '</td>' ;
            }
                
          }
          
          if(language=='english'){
          
         // alert(iconlegend);
          document.getElementById("minilegendwindow").innerHTML =  '<div id="legendmini"><div id="legendminitop"><b>Legend</b><a style="padding-left:9px" href="#" onclick="showlegend();">Maximize</a><a style="padding-left:6px" href="#" onclick="closeminilegend();">Close</a></div><div style="overflow:scroll;float:left; width:145px;height:300px"><TABLE><TBODY><tr>' + iconlegend + '</tr></TBODY></TABLE></div></div>';
          }
          
          else if(language=='espanol'){
          
           document.getElementById("minilegendwindow").innerHTML =  '<div style="padding-top:3px"><div align="right" style="padding-right:7px"><a href="#" onclick="closelegend();">Cerrar</a></div><b>Leyenda</b></div><span class=' + '"header"' + '">' + '<div style="overflow:scroll;float:left; width:150px;height:519px"><TABLE><TBODY><tr>' + iconlegend + '</tr></TBODY></TABLE></div>';
          
          
          }
          
        }
                    
        }
      request.send(null); 
 
}




function closeminilegend()
{
document.getElementById("minilegendwindow").style.visibility = "hidden";
document.getElementById("minilegendwindow").innerHTML =  '';

}



function closelegend()
{
document.getElementById("mapwindow").style.visibility = "hidden";
document.getElementById("mapwindow").innerHTML =  '';


}


function closemapwindow(){
document.getElementById("mapwindow").style.visibility = "hidden";
//document.getElementById("mapwindow").innerHTML =  '';
}


function closeadminwindow(){
document.getElementById("adminwindow").style.visibility = "hidden";
//document.getElementById("mapwindow").innerHTML =  '';
}


function loadvideos(xmlfile)
{ 
     i=0;
     // xmlfileused = "videos.xml"
      
      
      
   xmlfileused = xmlfile;
   var newxml = xmlfile; 
   
   var counttodelimeter = xmlfile.lastIndexOf('/'); //Count to delimeter
   
   language = xmlfileused.substring(0, counttodelimeter); //Get Language

  
   
   var xmlfilename = xmlfile.substring(counttodelimeter + 1,xmlfile.length);
   var newxmlfilelenght = xmlfilename.length;
   var stripxmlfile = newxmlfilelenght-4;
   map.clearOverlays();
   //document.getElementById("attractionsbutton").innerHTML = '<A title="See Belize Attractions" onclick="loadattractions(); return false;" href="#">Attractions</A>'; 
   //Clear Side Bar then populate with hotel info. 
   clearxml();
   
   
   if(language=='english'){
   
   language='english';
   
   document.getElementById("side_bartop").innerHTML = '<font size="1" face="Verdana"><b> ' + xmlfilename.substring(0,stripxmlfile) + '</b></font>';
     
      // document.getElementById("side_bartop").innerHTML = '<font size="2"><font size="1" face="Verdana"><b>Top Videos</b></font></font>';
      //side_bar_html = ["HOTELS "];  
      
     
    }
    
    else if(language=='espanol'){
    
    
    var translatedxml = translateesp(xmlfilename.substring(0,stripxmlfile));
    
    
    
    document.getElementById("side_bartop").innerHTML = '<font size="1" face="Verdana"><b> ' + translatedxml + '</b></font>';
   

    } 
     
      
      
      
   
    
      var request = GXmlHttp.create();
      request.open("GET", "files/"+xmlfile, true);   
      request.onreadystatechange = function() 
      {
       
        if (request.readyState == 4) 
        { //Removed for IE documentElement error.
          //var xmlDoc = request.responseXML;
          var xmlDoc = GXml.parse(request.responseText); 
          // obtain the array of markers and loop through it
          var markers = xmlDoc.documentElement.getElementsByTagName("marker");
           
          for (var i = 0; i < markers.length; i++) 
          {  // obtain the attribues of each marker
            var lat = parseFloat(markers[i].getAttribute("lat"));
            var lng = parseFloat(markers[i].getAttribute("lng"));
            var point = new GLatLng(lat,lng);
            var label = markers[i].getAttribute("label");   
           // var image = markers[i].getAttribute("image"); 
            var video = markers[i].getAttribute("video");
            
            var iconObj = new GIcon();
            iconObj.image = markers[i].getAttribute("icon");
            iconObj.iconSize = new GSize(23,33);
            iconObj.iconAnchor = new GPoint(5,33);
            iconObj.infoWindowAnchor = new GPoint(9, 2);
            
            var html = markers[i].getAttribute("html");
         // var htmlx = '<div style="padding-left:140px; padding-top:3px; font-size:14px; font-weight: bolder; color:#996633">' + label + '</DIV> <br><table border=0 cellPadding=6><tr><td><div style="width:200px; height:175px;border:thin solid; border-width:3px;border-color: #CC9E47"><img src="images/hotels/' + image + '" align="left" width=200 height=175></div></td><td width="250" valign=top>' + html + '</td></table><br><table border=1 cellPadding=2><tr><td width="150"><input type="button" value="See a close up view" onClick="setZM(18)"></td><td width="300" valign=top><a href="http://www.corozalbayinn.com">Link</a></td></table><br>' + '<IFRAME SRC='+jscriptads+' WIDTH=469 HEIGHT=75 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME>'
            var htmlx = '<div style="padding-left:1px; padding-top:3px; font-size:14px; font-weight: bolder; color:#996633">' + label + '</DIV><table border=0 cellPadding=0><tr><td width="280" valign=top>' + html + '</td><tr></table>' 
         // create the marker
            var marker = createvideoMarker(point,label,htmlx,iconObj,video);
            map.addOverlay(marker);
          }
          // put the assembled side_bar_html contents into the side_bar div
          document.getElementById("side_bar").innerHTML = side_bar_html;
          //document.getElementById("legend_bar").innerHTML = side_bar_html;
        }
      }
      request.send(null);   
         
}// A function to create the marker and set up the event window
function createvideoMarker(point,name,html,iconObj,video) 
{
var jscriptads = 'adbrite.html'
var jscriptadsvideo = 'adbritevideozone.html'
var loadingimage = 'loading.gif'
//'<IFRAME SRC='+jscriptadsvideo+' WIDTH=135 HEIGHT=205 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME>
var youtubevideoformat = '<table border=0 cellPadding=0><tr><div vAlign="Top" style="width:330px">' + html + '</div><div><object align="left" width="380" height="300"><param name="movie" value="http://www.youtube.com/v/' + video + '"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/' + video + '" type="application/x-shockwave-flash" wmode="transparent" width="380" height="300"></embed></object></div><tr></table>'

//<IFRAME SRC='+jscriptads+' WIDTH=480 HEIGHT=80 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME>'
var marker = new GMarker(point,iconObj); 
// === store the name so that the tooltip function can use it ===
marker.tooltip = '<div class="tooltip"><div id="tooltiptext">'+name+'</div></div>';
GEvent.addListener(marker, "click", function() {

document.getElementById("mapwindow").innerHTML =  '';

marker.openInfoWindowTabsHtml([new GInfoWindowTab("Video",youtubevideoformat)],{suppressMapPan:true});
map.savePosition();
	   
function subGPoints(a,b) 
{ 
 //returns the distance in pixels between point a and b 
return new GPoint(a.x-b.x, a.y-b.y); 
} 

//Pixel distance to the center of the map 
var CDivPixel = map.fromLatLngToDivPixel(map.getCenter()); 
//Pixel distance from the marker point 
var pointDivPixel = map.fromLatLngToDivPixel(point); 
//Difference between the above mentioned distances 
var fromCenter = subGPoints(pointDivPixel, CDivPixel); 
//Pan to the corrected location (the -40 and +215 sizes are the distances from my marker to the center of the infowindow 
map.panBy(new GSize(-fromCenter.x+8,-fromCenter.y+270)) 	                     
}
	                     );
      GEvent.addListener(map, "infowindowclose", function(){map.returnToSavedPosition()}); 
       // save the info we need to use later for the side_bar
       gmarkers[i] = marker;
	   htmls[i] = html;
	   youtubevideos[i] = youtubevideoformat;
	   // add a line to the side_bar html
	   //side_bar_html += '<a href="javascript:myclick(' + i + ')">' + name + '</a><br>';
	   //i++;
	  side_bar_html += '<a href="javascript:myvideoclick(' + i + ')" onmouseover="mymouseover('+i+')" onmouseout="mymouseout()">' + name + '</a><br>';
	  i++;
//  ======  The new marker "mouseover" and "mouseout" listeners  ======
      GEvent.addListener(marker,"mouseover", function() {showTooltip(marker);});        
      GEvent.addListener(marker,"mouseout", function() {tooltip.style.visibility="hidden"});  
      return marker;
       
}



function myvideoclick(i) 
{
     document.getElementById("mapwindow").innerHTML =  '';
     document.getElementById("adminwindow").innerHTML =  '';
     
     //gmarkers[i].openInfoWindowHtml(htmls[i]);
gmarkers[i].openInfoWindowTabsHtml([new GInfoWindowTab("Video",youtubevideos[i])]);
     
      
}  



function mypictureclick(i) 
{
   document.getElementById("mapwindow").innerHTML =  ''; 
   document.getElementById("adminwindow").innerHTML =  '';  
//gmarkers[i].openInfoWindowHtml(htmls[i]);
gmarkers[i].openInfoWindowTabsHtml([new GInfoWindowTab("Picture",pictures[i])]);
     
      
}  


function createpictureMarker(point,name,html,iconObj) 
{
var jscriptads = 'adbrite.html'
var jscriptadsvideo = 'adbritevideozone.html'
var loadingimage = 'loading.gif'
var pictureformat = '<table><tr><td>' + html + '</td></table>'

//<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=95 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME>'

var marker = new GMarker(point,iconObj); 
// === store the name so that the tooltip function can use it ===
	   marker.tooltip = '<div class="tooltip"><div id="tooltiptext">'+name+'</div></div>';
	   GEvent.addListener(marker, "click", function() {
	   
	   marker.openInfoWindowTabsHtml([new GInfoWindowTab("Picture",pictureformat)],{suppressMapPan:true});
	   
	   map.savePosition();
	   
function subGPoints(a,b) 
{ 
 //returns the distance in pixels between point a and b 
return new GPoint(a.x-b.x, a.y-b.y); 
} 


//Pixel distance to the center of the map 
var CDivPixel = map.fromLatLngToDivPixel(map.getCenter()); 
                
//Pixel distance from the marker point 
var pointDivPixel = map.fromLatLngToDivPixel(point); 
               
 //Difference between the above mentioned distances 
var fromCenter = subGPoints(pointDivPixel, CDivPixel); 
  
//Pan to the corrected location (the -40 and +215 sizes are the distances from my marker to the center of the infowindow 
map.panBy(new GSize(-fromCenter.x+8,-fromCenter.y+250)) 	                     
}
	                     );
       
      GEvent.addListener(map, "infowindowclose", function(){map.returnToSavedPosition()}); 
       
       
       // save the info we need to use later for the side_bar
       gmarkers[i] = marker;
	   htmls[i] = html;
	   pictures[i] = pictureformat;
	   // add a line to the side_bar html
	   //side_bar_html += '<a href="javascript:myclick(' + i + ')">' + name + '</a><br>';
	   //i++;
	  side_bar_html += '<a href="javascript:mypictureclick(' + i + ')" onmouseover="mymouseover('+i+')" onmouseout="mymouseout()">' + name + '</a><br>';
	  i++;
//  ======  The new marker "mouseover" and "mouseout" listeners  ======
      GEvent.addListener(marker,"mouseover", function() {showTooltip(marker);});        
      GEvent.addListener(marker,"mouseout", function() {tooltip.style.visibility="hidden"});  
      return marker;
       
}






function searchsiteclick(){

//document.getElementById("searchbox").innerHTML = '<table><table border="0" bgcolor="#ffffff" cellspacing="0" cellpadding="0" width="205"><tr><td nowrap="nowrap"><input type="hidden" name="domains" value="www.travelmapia.com"></input><input name="q" size="10" maxlength="255" id="sbi" style="float: left"></input><div id=searchbutton><input type="button" name="sa" value="Search" onclick="searchsite();" id="sbb"></input></div></td></tr><tr><td align=left><table width="160"><tr><td><input type="radio" onclick="searchwebclick();" name="sitesearch" value="" id="ss0"></input><label for="ss0" title="Search the Web"><font size="-1" color="#000000">Web</font></label></td><td align=left><input type="radio" checked onclick="searchsiteclick();" name="sitesearch" value="www.travelmapia.com" id="ss1"></input><label for="ss1" title="Search www.travelmapia.com"><font size="-1" color="#000000">this site</font></label></td></tr></table><input type="hidden" name="client" value=""></input><input type="hidden" name="forid" value="1"></input><input type="hidden" name="channel" value="1752352880"></input><input type="hidden" name="ie" value="ISO-8859-1"></input><input type="hidden" name="oe" value="ISO-8859-1"></input><input type="hidden" name="safe" value="active"></input><input type="hidden" name="flav" value="0000"></input><input type="hidden" name="sig" value="AOEy5iXUuffSTIsM"></input><input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:ffffff;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:282;L:http://www.corozalmapia.com/images/corozalmapialogomain.gif;S:http://www.corozalmapia.com;FORID:1"></input><input type="hidden" name="hl" value="en"></input></td></tr></table></table>'


document.getElementById("search").innerHTML = '<div id="googlesearch"><form style="margin:0" action="http://www.google.com/cse" id="cse-search-box" target="_blank"><div><input type="hidden" name="cx" value="partner-pub-7028995736219467:cq168e-yubc" /><input type="hidden" name="ie" value="ISO-8859-1" /><input type="text" name="q" size="15" /><input type="submit" name="sa" value="Search" /></div></form><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script></div><!--END GOOGLE SEARCH --><div id="searchoptions"><input type="radio" onclick="searchwebclick();" border=0 name="websearch" style="margin:0; border:0; background-color: #fff;" value="web" />The Web<input type="radio" onclick="searchsiteclick();" border=0 name="sitesearch" style="margin:0; border:0; background-color: #fff;" value="thissite" checked /> This Site</div>';


}
function searchwebclick(){

//document.getElementById("searchbox").innerHTML = '<form method="get" action="http://www.google.com.bz/custom" target="google_window"><table border="0" bgcolor="#ffffff" cellspacing="0" cellpadding="0" width="205"><tr><td nowrap="nowrap"><input type="hidden" name="domains" value="www.travelmapia.com"></input><input name="q" size="10" maxlength="255" id="sbi" style="float: left"></input><div id=searchbutton><input type="submit" name="sa" value="Search" id="sbb"></input></div></td></tr><tr><td nowrap="nowrap"><table width="160"><tr><td><input type="radio" onclick="searchwebclick();" name="sitesearch" value="" checked id="ss0"></input><label for="ss0" title="Search the Web"><font size="-1" color="#000000">Web</font></label></td><td width="87"><input type="radio" onclick="searchsiteclick();" name="sitesearch" value="www.travelmapia.com" id="ss1"></input><label for="ss1" title="Search www.travelmapia.com"><font size="-1" color="#000000">this site</font></label></td></tr></table><input type="hidden" name="client" value=""></input><input type="hidden" name="forid" value="1"></input><input type="hidden" name="channel" value="1752352880"></input><input type="hidden" name="ie" value="ISO-8859-1"></input><input type="hidden" name="oe" value="ISO-8859-1"></input><input type="hidden" name="safe" value="active"></input><input type="hidden" name="flav" value="0000"></input><input type="hidden" name="sig" value="AOEy5iXUuffSTIsM"></input><input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:ffffff;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:282;L:http://www.corozalmapia.com/images/corozalmapialogomain.gif;S:http://www.corozalmapia.com;FORID:1"></input><input type="hidden" name="hl" value="en"></input></td></tr></table></form>'

//document.getElementById("searchbox").innerHTML = '<form method="get" action="http://www.google.com/custom" target="google_window"><table border="0" bgcolor="#ffffff"><tr><td nowrap="nowrap" valign="top" align="left" height="32"><a href="http://www.google.com/"><img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a></td><td nowrap="nowrap"><input type="hidden" name="domains" value="www.travelmapia.com"></input><label for="sbi" style="display: none">Enter your search terms</label><input type="text" name="q" size="10" maxlength="255" value="" id="sbi"></input><label for="sbb" style="display: none">Submit search form</label><input type="submit" name="sa" value="Search" id="sbb"></input></td></tr><tr><td><input type="radio" name="sitesearch" value="" checked id="ss0"></input><label for="ss0" title="Search the Web"><font size="-1" color="#000000">Web</font></label></td><td nowrap="nowrap"><table><tr><td align="left"><input type="radio" onclick="searchsiteclick();" name="sitesearch" value="www.travelmapia.com" id="ss1"></input><label for="ss1" title="Search www.travelmapia.com"><font size="-1" color="#000000">place on this map</font></label></td></tr></table><input type="hidden" name="client" value="pub-7028995736219467"></input><input type="hidden" name="forid" value="1"></input><input type="hidden" name="channel" value="9588357430"></input><input type="hidden" name="ie" value="ISO-8859-1"></input><input type="hidden" name="oe" value="ISO-8859-1"></input><input type="hidden" name="safe" value="active"></input><input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:FFFFFF;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:84;L:http://www.travelmapia.com/images/travelmapialogomain.gif;S:http://www.travelmapia.com;FORID:1"></input><input type="hidden" name="hl" value="en"></input></td></tr></table></form>'

document.getElementById("search").innerHTML = '<div id="googlesearch"><form style="margin:0" action="http://www.google.com/cse" id="cse-search-box" target="_blank"><div><input type="hidden" name="cx" value="partner-pub-7028995736219467:k4vgtd-5xap" /><input type="hidden" name="ie" value="ISO-8859-1" /><input type="text" name="q" size="15" /><input type="submit" name="sa" value="Search" /></div></form><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script></div><!--END GOOGLE SEARCH --><div id="searchoptions"><input type="radio" onclick="searchwebclick();" border=0 name="websearch" style="margin:0; border:0; background-color: #fff;" value="web" checked />The Web<input type="radio" onclick="searchsiteclick();" border=0 name="sitesearch" style="margin:0; border:0; background-color: #fff;" value="thissite" /> This Site</div>';




}

function openadvancedsearch(){



var advancedsearcheng ='<div id="searchheader"></div><div id="closebutton"><span class="whitetext"><a href="#" onclick="parent.closemapwindow();">Close This Window</a></span></div><div id="searchcenter"><iframe frameborder=0 height=220 width=360 scrolling=no margin=0 src="http://www.travelmapia.com/advancedsearchform.htm"></iframe></div><div id="searchbottom"></div>';
var advancedsearchesp ='<div id="searchheader"></div><div id="closebutton"><span class="whitetext"><a href="#" onclick="parent.closemapwindow();">Close This Window</a></span></div><div id="searchcenter"><table align="center"><tr><td align="center"><span class="whitetext">Advanced Search :</span><input id="searchinputbox" type="text" size="21" maxlength="30" value=""><input id="searchbtn" type="button" onclick="searchsite();return false" value="Search"></td><td></td></tr></table></div><div id="searchbottom"></div>';

var w=document.getElementById("map").offsetWidth/2;
var h=document.getElementById("map").offsetHeight/2;


document.getElementById("mapwindow").innerHTML =  '';
//var cc = map.fromLatLngToDivPixel(map.getCenter()); 

var left = w - 150; 
var right = h - 180; 
 
document.getElementById("mapwindow").style.visibility = "visible";
 
var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(left,right)); 
pos.apply(document.getElementById("mapwindow")); 
document.getElementById("map").appendChild(document.getElementById("mapwindow"));

if (language=="english"){
document.getElementById("mapwindow").innerHTML = advancedsearcheng;
}
else{
document.getElementById("mapwindow").innerHTML = advancedsearchesp;
} 





}


function searchsite(poi){

//document.getElementById("loadingsearch").innerHTML = '<img src="http://www.travelmapia.com/loading.gif">';
var string = document.getElementById("searchinputbox").value;  //Assign Input value


if(string==""){

string = poi;


}



var xmlarray= new Array(4) 
xmlarray[0]= language + '/' + "attractions.xml"; 
xmlarray[1]= language + '/' + "hotels.xml"; 
xmlarray[2]= language + '/' + "restaurants.xml"; 
xmlarray[3]= language + '/' + "misc.xml"; 


var imagesarray= new Array(4)
imagesarray[0]="attractions";
imagesarray[1]="hotels";
imagesarray[2]="restaurants";
imagesarray[3]="misc";

i=0;
map.clearOverlays(); //Clear Side Bar then populate with hotel info. 
clearxml();
document.getElementById("side_bartop").innerHTML = 'Search Results';

//var x=0; 
for (x=0; x<4; x++) {
     
    // alert(x);

      
      var request = GXmlHttp.create();
      request.open("GET", "http://www.travelmapia.com/files/" + xmlarray[x], false);  
      request.onreadystatechange = function() 
      {
        if (request.readyState == 4) 
        { 
          var xmlDoc = GXml.parse(request.responseText); 
          var markers = xmlDoc.documentElement.getElementsByTagName("marker"); // obtain the array of markers and loop through it
          
          for (var i = 0; i < markers.length; i++) 
          {  // obtain the attribues of each marker
           var label = markers[i].getAttribute("label"); //Get labels from xml file
           var lowercaselabel = label.toLowerCase() //Convert to lower case for string search function
           var striplabelwhitespace = lowercaselabel.replace(/\s/g, "");
           var lowercasestring = string.toLowerCase() //Convert user input string to lowercase for search function compatability
           var stripstringwhitespace = lowercasestring.replace(/\s/g, "");

           var threecharacterstring = stripstringwhitespace.substring(0,4); //Cuts input for 3 char search.
          
           
           var RegularExpression  =  new RegExp(threecharacterstring); //convert label to lowercase, fix for loop done thanks
           var found = striplabelwhitespace.search(RegularExpression)
              
        
              
              
           if(string ==""){
           //If string entered is null display nothing found
           document.getElementById("side_bartop").innerHTML = 'Not Found';
           return;
           }
         
           if (found != -1)
           {
           
          //  xmlfileused= language+'/'+imagesarray[x] + 'html';
         //  alert(xmlfileused);
            
            // alert(found);
             var categoryx = markers[i].getAttribute("category");
             var addressx = markers[i].getAttribute("address");
             var phonex = markers[i].getAttribute("phone");
             var lat = parseFloat(markers[i].getAttribute("lat"));
             var lng = parseFloat(markers[i].getAttribute("lng"));
             var zoom = parseInt(markers[i].getAttribute("zoomlevel"));
             var countrycode = markers[i].getAttribute("countrycode");
             var phonex = markers[i].getAttribute("phone");
             var username = markers[i].getAttribute("username");
             var userlevel = markers[i].getAttribute("userlevel"); 
             var point = new GLatLng(lat,lng);
             var image = markers[i].getAttribute("image"); 
             var video = markers[i].getAttribute("video");
             var iconObj = new GIcon();
             iconObj.image = markers[i].getAttribute("icon");
             iconObj.iconSize = new GSize(23,33);
             iconObj.iconAnchor = new GPoint(5,33);
             iconObj.infoWindowAnchor = new GPoint(9, 2);
           //  var jscriptads = 'adbrite.html'        
             var html = markers[i].getAttribute("html");
             
             var url = markers[i].getAttribute("url");
              
            categoryx = categoryx.toLowerCase();
            countrycode = countrycode.toLowerCase();
             
             
            
             
           //  var htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div style="font-size:14px; font-weight: bolder; color:#996633">' + label + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + i + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;<a href="' + url + '" target="_blank"><IMG border=0 alt="Web Link" src="http://www.travelmapia.com/images/icons/weblink.gif"> Web Link</a>&nbsp;&nbsp;&nbsp;<IMG border=0 alt="Web Link" src="http://www.travelmapia.com/images/youtube.gif"><a href="#" onclick="see_video_click();"> Video</a></div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + imagesarray[x] + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></table></div>'  
            
             if(theadmin == undefined || theadmin == "")
             {
              htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div style="font-size:14px; font-weight: bolder; color:#996633">' + placename + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + countrycode + '/' + categoryx + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr><tr><td style="background-color:#ddd" align=center>Address:</td></tr><tr><td style="background-color:#eee" align=center>'+addressx+'</td></tr><tr><td style="background-color:#ddd" align=center>Phone:</td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center>Category:</td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center>Submitted By:</td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></div>';       
      
             }                       
              else if(theadmin == "admin" ){ //*******Needs to be session user fix!************
              //alert("Super Admin - Can Edit Everything");

              htmlx = '<div style="font-size:14px; font-weight: bolder; color:#996633">' + placename + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;<a href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif"> Edit</a></div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + countrycode + '/' + categoryx + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr><tr><td style="background-color:#ddd" align=center>Address:</td></tr><tr><td style="background-color:#eee" align=center>'+addressx+'</td></tr><tr><td style="background-color:#ddd" align=center>Phone:</td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center>Category:</td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center>Submitted By:</td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></div>';        

             }  
             else if(theadmin == username ){ //Need to Match Country Admin - Country == Admin Country IsCOuntry Admin in XML file. 3phase
    
              htmlx = '<div style="font-size:14px; font-weight: bolder; color:#996633">' + placename + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;<a href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif"> Edit</a></div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + countrycode + '/' + categoryx + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr><tr><td style="background-color:#ccc" align=center>Address:</td></tr><tr><td style="background-color:#eee" align=center>'+addressx+'</td></tr><tr><td style="background-color:#ddd" align=center>Phone:</td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center>Category:</td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center>Submitted By:</td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></div>';        
             }  
             else{
              htmlx = '<div style="font-size:14px; font-weight: bolder; color:#996633">' + placename + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + countrycode + '/' + categoryx + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr><tr><td style="background-color:#ddd" align=center>Address:</td></tr><tr><td style="background-color:#eee">'+addressx+'</td></tr><tr><td style="background-color:#ddd" align=center>Phone:</td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center>Category:</td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center>Submitted By:</td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></div>';       
             }
            
           
           
            var marker = createMarkerx(lat,lng,zoom,point,countrycode,placename,categoryx,image,htmlx,iconObj,video);// create the marker
             
           
             

          //  var marker = createMarker(lat,lng,point,label,image,htmlx,iconObj,video);
             map.addOverlay(marker);
           }//Close if  
          
           document.getElementById("side_bar").innerHTML = side_bar_html; // put the assembled side_bar_html contents into the side_bar div
           
          }//Close for
       
        }//Close If
        
       
      }
  request.send(null);  

}//Close For loop



//return false;
 
}






function sqlajax_placenamesearch(poi){

//var string = document.getElementById("searchinputbox").value;  //Assign Input value

//if(string==""){

//string = poi;

//}
  
  //poi = poi.replace(/\s/g, "");
 // poi = poi.toLowerCase();

 
 // alert(poi);

  document.getElementById("sidebarwrapper").innerHTML = '<div id="letterbar"><ul><li><A title="A" onclick="find(\'A\'); return false;" href="http://www.travelmapia.com/directory/index.html">A</A></li><li><A title="B" onclick="find(\'B\'); return false;" href="http://www.travelmapia.com/directory/index.html">B</A></li><li><A title="C" onclick="find(\'C\'); return false;" href="http://www.travelmapia.com/directory/index.html">C</A><li><A title="D" onclick="find(\'D\'); return false;" href="http://www.travelmapia.com/directory/index.html">D</A></li></li><li><A title="E" onclick="find(\'E\'); return false;" href="http://www.travelmapia.com/directory/index.html">E</A></li><li><A title="F" onclick="find(\'F\'); return false;" href="http://www.travelmapia.com/directory/index.html">F</A></li><li><A title="G" onclick="find(\'G\'); return false;" href="http://www.travelmapia.com/directory/index.html">G</A></li><li><A title="H" onclick="find(\'H\'); return false;" href="http://www.travelmapia.com/directory/index.html">H</A></li><li><A title="I" onclick="find(\'I\'); return false;" href="http://www.travelmapia.com/directory/index.html">I</A></li><li><A title="J" onclick="find(\'J\'); return false;" href="http://www.travelmapia.com/directory/index.html">J</A></li><li><A title="K" onclick="find(\'K\'); return false;" href="http://www.travelmapia.com/directory/index.html">K</A></li><li><A title="L" onclick="find(\'L\'); return false;" href="http://www.travelmapia.com/directory/index.html">L</A></li><li><A title="M" onclick="find(\'M\'); return false;" href="http://www.travelmapia.com/directory/index.html">M</A></li><li><A title="N" onclick="find(\'N\'); return false;" href="http://www.travelmapia.com/directory/index.html">N</A></li><li><A title="O" onclick="find(\'O\'); return false;" href="http://www.travelmapia.com/directory/index.html">O</A></li><li><A title="P" onclick="find(\'P\'); return false;" href="http://www.travelmapia.com/directory/index.html">P</A></li><li><A title="Q" onclick="find(\'Q\'); return false;" href="http://www.travelmapia.com/directory/index.html">Q</A></li><li><A title="R" onclick="find(\'R\'); return false;" href="http://www.travelmapia.com/directory/index.html">R</A></li><li><A title="S" onclick="find(\'S\'); return false;" href="http://www.travelmapia.com/directory/index.html">S</A></li><li><A title="T" onclick="find(\'T\'); return false;" href="http://www.travelmapia.com/directory/index.html">T</A></li><li><A title="U" onclick="find(\'U\'); return false;" href="http://www.travelmapia.com/directory/index.html">U</A></li><li><A title="V" onclick="find(\'V\'); return false;" href="http://www.travelmapia.com/directory/index.html">V</A></li><li><A title="W" onclick="find(\'W\'); return false;" href="http://www.travelmapia.com/directory/index.html">W</A></li><li><A title="X" onclick="find(\'X\'); return false;" href="http://www.travelmapia.com/directory/index.html">X</A></li><li><A title="Y" onclick="find(\'Y\'); return false;" href="http://www.travelmapia.com/directory/index.html">Y</A></li><li><A title="Z" onclick="find(\'Z\'); return false;" href="http://www.travelmapia.com/directory/index.html">Z</A></li></ul></div><!--END LETTERBAR--><div id="sidebarcontainer"><div id="side_bartop"> <a href="http://www.travelmapia.com/belize/attractions/index.html">Attractions</a></div><div id="side_bar"></div><!-- END side_bar--></div>';
  
  map.clearOverlays();//Clear markers
  clearpreviousxml();//Clear Side Bar then populate. 
  GDownloadUrl("http://www.travelmapia.com/php/phpsqlajax_search.php"+"?placename=" + poi , function(data) {
  
  //alert(data);
     
  var xml = GXml.parse(data);
  var markers = xml.documentElement.getElementsByTagName("marker");
  for (var i = 0; i < markers.length; i++) {
    
   
    var countrycode = markers[i].getAttribute("countrycode");
    var categoryx = markers[i].getAttribute("category");
    var placename = markers[i].getAttribute("placename");
    var placeid = markers[i].getAttribute("placeid");
    var addressx = markers[i].getAttribute("address");
    var phonex = markers[i].getAttribute("phone");
    var image = markers[i].getAttribute("image"); 
    var video = markers[i].getAttribute("video");
    var username = markers[i].getAttribute("username");
    var userlevel = markers[i].getAttribute("userlevel");
    var html = markers[i].getAttribute("html");
    var lat = markers[i].getAttribute("lat");
    var lng = markers[i].getAttribute("lng");
    var zoom = parseInt(markers[i].getAttribute("zoomlevel"));
    var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")));
    
    
  
    
    var iconObj = new GIcon();
    iconObj.image = markers[i].getAttribute("icon");
    iconObj.iconSize = new GSize(23,33);
    iconObj.iconAnchor = new GPoint(5,33);
    iconObj.infoWindowAnchor = new GPoint(9, 2);             
    
    categoryx = categoryx.toLowerCase();
    countrycode = countrycode.toLowerCase();

            
            var  jscriptads='http://www.travelmapia.com/googletextads.html';

           // alert(xmlfilename.substring(0,stripxmlfile) + '/' + image);

           if(theadmin == undefined || theadmin == "")
             {
              
              //htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div style="font-size:14px; font-weight: bolder; color:#996633">' + placename + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + countrycode + '/' + categoryx + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr><tr><td style="background-color:#ddd" align=center>Address:</td></tr><tr><td style="background-color:#eee" align=center>'+addressx+'</td></tr><tr><td style="background-color:#ddd" align=center>Phone:</td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center>Category:</td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center>Submitted By:</td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></div>';       
              
              if(video=="No Video Code"){
              
             // htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
               htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:see_video_click()"><img valign=bottom border=0 src="http://www.travelmapia.com/images/youtube.gif" width="32" height="13"> See Video</a>&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
             
              }
              else{
                
            //  htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:see_video_click()"><img valign=bottom border=0 src="http://www.travelmapia.com/images/youtube.gif" width="32" height="13"> See Video</a>&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
              
              htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:see_video_click()"><img valign=bottom border=0 src="http://www.travelmapia.com/images/youtube.gif" width="32" height="13"> See Video</a>&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
             
             
              }
              
              
              
              
             }                       
              else if(theadmin == "admin" ){ //*******Needs to be session user fix!************
              //alert("Super Admin - Can Edit Everything");

              
              if(video=="No Video Code"){
              
             
              htmlx = '<div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;<a class="win_text" href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif" width="14" height="15"> Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
              }
              else{
              //HERE  
              htmlx = '<div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:see_video_click()"><img valign=bottom border=0 src="http://www.travelmapia.com/images/youtube.gif" width="32" height="13"> See Video</a>&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;<a class="win_text" href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif" width="14" height="15"> Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
              }
              
              
             
              }  
             else if(theadmin == username ){ //Need to Match Country Admin - Country == Admin Country IsCOuntry Admin in XML file. 3phase
    
              if(video=="No Video Code"){
              
              htmlx = '<div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;<a class="win_text" href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif" width="14" height="15"> Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
              
              }
              else{
                
              htmlx = '<div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:see_video_click()"><img valign=bottom border=0 src="http://www.travelmapia.com/images/youtube.gif" width="32" height="13"> See Video</a>&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;<a class="win_text" href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif" width="14" height="15"> Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
             
             
              }
             
             
             }  
             
             
             
             else{
              
              
              // htmlx = '<div style="font-size:14px; font-weight: bolder; color:#996633">' + placename + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + countrycode + '/' + categoryx + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr><tr><td style="background-color:#ddd" align=center>Address:</td></tr><tr><td style="background-color:#eee">'+addressx+'</td></tr><tr><td style="background-color:#ddd" align=center>Phone:</td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center>Category:</td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center>Submitted By:</td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></div>';       
                  if(video=="No Video Code"){
              
              htmlx = '<div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;<a class="win_text" href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif" width="14" height="15"> Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
              
              }
              else{
                
              htmlx = '<div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:see_video_click()"><img valign=bottom border=0 src="http://www.travelmapia.com/images/youtube.gif" width="32" height="13"> See Video</a>&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;<a class="win_text" href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif" width="14" height="15"> Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
             
             
              }
             
             
             
             
             
             }

    //alert("Creating marker");
    
     var marker =  createMarkerx(lat,lng,zoom,point,countrycode,placename,categoryx,image,htmlx,iconObj,video)
     map.addOverlay(marker);
  }
  
   document.getElementById("side_bar").innerHTML = side_bar_html;// put the assembled side_bar_html contents into the side_bar div   
 
});




}



function sqlajax_iconsearch(poi){

//var string = document.getElementById("searchinputbox").value;  //Assign Input value

//if(string==""){

//string = poi;

//}
  
  //poi = poi.replace(/\s/g, "");
 // poi = poi.toLowerCase();



 

  document.getElementById("sidebarwrapper").innerHTML = '<div id="letterbar"><ul><li><A title="A" onclick="find(\'A\'); return false;" href="http://www.travelmapia.com/directory/index.html">A</A></li><li><A title="B" onclick="find(\'B\'); return false;" href="http://www.travelmapia.com/directory/index.html">B</A></li><li><A title="C" onclick="find(\'C\'); return false;" href="http://www.travelmapia.com/directory/index.html">C</A><li><A title="D" onclick="find(\'D\'); return false;" href="http://www.travelmapia.com/directory/index.html">D</A></li></li><li><A title="E" onclick="find(\'E\'); return false;" href="http://www.travelmapia.com/directory/index.html">E</A></li><li><A title="F" onclick="find(\'F\'); return false;" href="http://www.travelmapia.com/directory/index.html">F</A></li><li><A title="G" onclick="find(\'G\'); return false;" href="http://www.travelmapia.com/directory/index.html">G</A></li><li><A title="H" onclick="find(\'H\'); return false;" href="http://www.travelmapia.com/directory/index.html">H</A></li><li><A title="I" onclick="find(\'I\'); return false;" href="http://www.travelmapia.com/directory/index.html">I</A></li><li><A title="J" onclick="find(\'J\'); return false;" href="http://www.travelmapia.com/directory/index.html">J</A></li><li><A title="K" onclick="find(\'K\'); return false;" href="http://www.travelmapia.com/directory/index.html">K</A></li><li><A title="L" onclick="find(\'L\'); return false;" href="http://www.travelmapia.com/directory/index.html">L</A></li><li><A title="M" onclick="find(\'M\'); return false;" href="http://www.travelmapia.com/directory/index.html">M</A></li><li><A title="N" onclick="find(\'N\'); return false;" href="http://www.travelmapia.com/directory/index.html">N</A></li><li><A title="O" onclick="find(\'O\'); return false;" href="http://www.travelmapia.com/directory/index.html">O</A></li><li><A title="P" onclick="find(\'P\'); return false;" href="http://www.travelmapia.com/directory/index.html">P</A></li><li><A title="Q" onclick="find(\'Q\'); return false;" href="http://www.travelmapia.com/directory/index.html">Q</A></li><li><A title="R" onclick="find(\'R\'); return false;" href="http://www.travelmapia.com/directory/index.html">R</A></li><li><A title="S" onclick="find(\'S\'); return false;" href="http://www.travelmapia.com/directory/index.html">S</A></li><li><A title="T" onclick="find(\'T\'); return false;" href="http://www.travelmapia.com/directory/index.html">T</A></li><li><A title="U" onclick="find(\'U\'); return false;" href="http://www.travelmapia.com/directory/index.html">U</A></li><li><A title="V" onclick="find(\'V\'); return false;" href="http://www.travelmapia.com/directory/index.html">V</A></li><li><A title="W" onclick="find(\'W\'); return false;" href="http://www.travelmapia.com/directory/index.html">W</A></li><li><A title="X" onclick="find(\'X\'); return false;" href="http://www.travelmapia.com/directory/index.html">X</A></li><li><A title="Y" onclick="find(\'Y\'); return false;" href="http://www.travelmapia.com/directory/index.html">Y</A></li><li><A title="Z" onclick="find(\'Z\'); return false;" href="http://www.travelmapia.com/directory/index.html">Z</A></li></ul></div><!--END LETTERBAR--><div id="sidebarcontainer"><div id="side_bartop"> <a href="http://www.travelmapia.com/belize/attractions/index.html">Attractions</a></div><div id="side_bar"></div><!-- END side_bar--></div>';
  
  map.clearOverlays();//Clear markers
  clearpreviousxml();//Clear Side Bar then populate. 
  GDownloadUrl("http://www.travelmapia.com/php/phpsqlajax_iconsearch.php"+"?iconname=" + iconnamex[poi] , function(data) {
  

     
  var xml = GXml.parse(data);
  var markers = xml.documentElement.getElementsByTagName("marker");
  for (var i = 0; i < markers.length; i++) {
    
   
    var countrycode = markers[i].getAttribute("countrycode");
    var categoryx = markers[i].getAttribute("category");
    var placename = markers[i].getAttribute("placename");
    var placeid = markers[i].getAttribute("placeid");
    var addressx = markers[i].getAttribute("address");
    var phonex = markers[i].getAttribute("phone");
    var image = markers[i].getAttribute("image"); 
    var video = markers[i].getAttribute("video");
    var username = markers[i].getAttribute("username");
    var userlevel = markers[i].getAttribute("userlevel");
    var html = markers[i].getAttribute("html");
    var lat = markers[i].getAttribute("lat");
    var lng = markers[i].getAttribute("lng");
    var zoom = parseInt(markers[i].getAttribute("zoomlevel"));
    var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")));
    
    
  
    
    var iconObj = new GIcon();
    iconObj.image = markers[i].getAttribute("icon");
    iconObj.iconSize = new GSize(23,33);
    iconObj.iconAnchor = new GPoint(5,33);
    iconObj.infoWindowAnchor = new GPoint(9, 2);             
    
    var  jscriptads='http://www.travelmapia.com/googletextads.html';

            var html = markers[i].getAttribute("html");


     

      
             categoryx = categoryx.toLowerCase();
             countrycode = countrycode.toLowerCase();

    
             if(theadmin == undefined || theadmin == "")
             {
              
              //htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div style="font-size:14px; font-weight: bolder; color:#996633">' + placename + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + countrycode + '/' + categoryx + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr><tr><td style="background-color:#ddd" align=center>Address:</td></tr><tr><td style="background-color:#eee" align=center>'+addressx+'</td></tr><tr><td style="background-color:#ddd" align=center>Phone:</td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center>Category:</td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center>Submitted By:</td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></div>';       
              
              if(video=="No Video Code"){
              
             // htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
               htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:see_video_click()"><img valign=bottom border=0 src="http://www.travelmapia.com/images/youtube.gif" width="32" height="13"> See Video</a>&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
             
              }
              else{
                
            //  htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:see_video_click()"><img valign=bottom border=0 src="http://www.travelmapia.com/images/youtube.gif" width="32" height="13"> See Video</a>&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
              
              htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:see_video_click()"><img valign=bottom border=0 src="http://www.travelmapia.com/images/youtube.gif" width="32" height="13"> See Video</a>&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
             
             
              }
              
              
              
              
             }                       
              else if(theadmin == "admin" ){ //*******Needs to be session user fix!************
              //alert("Super Admin - Can Edit Everything");

              
              if(video=="No Video Code"){
              
             
              htmlx = '<div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;<a class="win_text" href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif" width="14" height="15"> Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
              }
              else{
              //HERE  
              htmlx = '<div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:see_video_click()"><img valign=bottom border=0 src="http://www.travelmapia.com/images/youtube.gif" width="32" height="13"> See Video</a>&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;<a class="win_text" href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif" width="14" height="15"> Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
              }
              
              
             
              }  
             else if(theadmin == username ){ //Need to Match Country Admin - Country == Admin Country IsCOuntry Admin in XML file. 3phase
    
              if(video=="No Video Code"){
              
              htmlx = '<div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;<a class="win_text" href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif" width="14" height="15"> Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
              
              }
              else{
                
              htmlx = '<div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:see_video_click()"><img valign=bottom border=0 src="http://www.travelmapia.com/images/youtube.gif" width="32" height="13"> See Video</a>&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;<a class="win_text" href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif" width="14" height="15"> Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
             
             
              }
             
             
             }  
             
             
             
             else{
              
              
              // htmlx = '<div style="font-size:14px; font-weight: bolder; color:#996633">' + placename + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + countrycode + '/' + categoryx + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr><tr><td style="background-color:#ddd" align=center>Address:</td></tr><tr><td style="background-color:#eee">'+addressx+'</td></tr><tr><td style="background-color:#ddd" align=center>Phone:</td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center>Category:</td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center>Submitted By:</td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></div>';       
                  if(video=="No Video Code"){
              
              htmlx = '<div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;<a class="win_text" href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif" width="14" height="15"> Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
              
              }
              else{
                
              htmlx = '<div id="win_container"><div id="win_container_head"><span class="header_text">' + placename + '</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp<a class="win_text" href="javascript:see_video_click()"><img valign=bottom border=0 src="http://www.travelmapia.com/images/youtube.gif" width="32" height="13"> See Video</a>&nbsp;&nbsp<a class="win_text" href="javascript:setZM(' + zoom + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0 width="14" height="12"> Zoom In</a>&nbsp;<a class="win_text" href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="http://www.travelmapia.com/images/icons/weblink.gif" width="14" height="15"> Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=0><tr><td><table cellpadding=0 width=130><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/'+countrycode+'/'+categoryx+'/'+image+'" align="left" width=125 height=100></div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Address:</span></td></tr><tr><td style="background-color:#eee" align=center><div style="width:130px">'+addressx+'</div></td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Phone:</span> </td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Category:</span></td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center><span class="win_text">Submitted By:</span></td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></td><td valign=top><table border=0 cellPadding=1><tr><td><iframe  style="margin-left:3px;height:54px;width:340px;" src="http://www.travelmapia.com/starrating/places.php?placeid='+placeid+'" width=340 height=54 scrolling=no frameborder=0 marginheight=0 marginwidth=0></iframe></td></tr><tr><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr></table></td></tr></table></div>';        
             
             
             
              }
             
             
             
             
             
             }
   
           
    //alert("Creating marker");
    
     var marker =  createMarkerx(lat,lng,zoom,point,countrycode,placename,categoryx,image,htmlx,iconObj,video)
     map.addOverlay(marker);
  }
  
   document.getElementById("side_bar").innerHTML = side_bar_html;// put the assembled side_bar_html contents into the side_bar div   
 
});




}












//Out DATED



function searchforpage(poi){

string = poi;


//alert(poi);

var xmlarray= new Array(4) 
xmlarray[0]= language + '/' + thecountry + "_attractions.xml"; 
//xmlarray[1]= language + '/' + thecountry + "_hotels.xml"; 
//xmlarray[2]= language + '/' + thecountry + "_restaurant.xml"; 
//xmlarray[3]= language + '/' + thecountry + "_realestate.xml"; 


var imagesarray= new Array(4)
imagesarray[0]="attractions";
//imagesarray[1]="hotels";
//imagesarray[2]="restaurants";
//imagesarray[3]="realestate";

i=0;
map.clearOverlays(); //Clear Side Bar then populate with hotel info. 
clearxml();
document.getElementById("side_bartop").innerHTML = 'Search Results';

//var x=0; 
for (x=0; x<1; x++) {
     
     // alert(xmlarray[x]);

    
      var request = GXmlHttp.create();
      request.open("GET", "http://www.travelmapia.com/files/" + xmlarray[x], false);  
      request.onreadystatechange = function() 
      {
        if (request.readyState == 4) 
        { 
          var xmlDoc = GXml.parse(request.responseText); 
          var markers = xmlDoc.documentElement.getElementsByTagName("marker"); // obtain the array of markers and loop through it
          
          for (var i = 0; i < markers.length; i++) 
          {  // obtain the attribues of each marker
           var placename = markers[i].getAttribute("placename"); //Get  placenames from xml file
           var lowercaseplacename = placename.toLowerCase() //Convert to lower case for string search function
           var stripplacenamewhitespace = lowercaseplacename.replace(/\s/g, "");
           var lowercasestring = string.toLowerCase() //Convert user input string to lowercase for search function compatability
           var stripstringwhitespace = lowercasestring.replace(/\s/g, "");
           var threecharacterstring = stripstringwhitespace.substring(0,4); //Cuts input for 3 char search.  
           var RegularExpression = new RegExp(threecharacterstring); //convert label to lowercase, fix for loop done thanks
           var found = stripplacenamewhitespace.search(RegularExpression)
              
            //alert(stripplacenamewhitespace + threecharacterstring);
          
           if(string ==""){
           //If string entered is null display nothing found
           document.getElementById("side_bartop").innerHTML = 'Not Found';
           return;
           }
           
          if (found != -1)
           {
             
             
                  
             var countrycode = markers[i].getAttribute("countrycode");
             var categoryx = markers[i].getAttribute("category");
             //var placename = markers[i].getAttribute("placename");
             var addressx = markers[i].getAttribute("address");
             var phonex = markers[i].getAttribute("phone");
             var lat = parseFloat(markers[i].getAttribute("lat"));
             var lng = parseFloat(markers[i].getAttribute("lng"));
             var username = markers[i].getAttribute("username");
             var userlevel = markers[i].getAttribute("userlevel");
             var zoom = parseInt(markers[i].getAttribute("zoomlevel"));
             var point = new GLatLng(lat,lng);
             var image = markers[i].getAttribute("image"); 
             var video = markers[i].getAttribute("video");
             var iconObj = new GIcon();
             iconObj.image = markers[i].getAttribute("icon");
             iconObj.iconSize = new GSize(23,33);
             iconObj.iconAnchor = new GPoint(5,33);
             iconObj.infoWindowAnchor = new GPoint(9, 2);
           //  var jscriptads = 'adbrite.html'        
             var html = markers[i].getAttribute("html");
             
             //var url = markers[i].getAttribute("url");
             countrycode=countrycode.toLowerCase();
             categoryx=categoryx.toLowerCase();
             var htmlx;
             //Assume Guests
             if(theadmin == undefined || theadmin == ""){

              htmlx = '<div style="font-size:14px; font-weight: bolder; color:#996633">' + placename + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + i + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + countrycode + '/' +  categoryx + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr><tr><td style="background-color:#ddd" align=center>Address:</td></tr><tr><td style="background-color:#eee" align=center>'+addressx+'</td></tr><tr><td style="background-color:#ddd" align=center>Phone:</td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center>Category:</td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center>Submitted By:</td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></div>';       
      
             }                       
             else if(theadmin == "admin" ){ //*******Needs to be session user fix!************
             //alert("Super Admin - Can Edit Everything");
             htmlx = '<div style="font-size:14px; font-weight: bolder; color:#996633">' + placename + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + i + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;<a href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="images/icons/weblink.gif"> Edit</a></div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + countrycode + '/' + categoryx + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr><tr><td style="background-color:#ddd" align=center>Address:</td></tr><tr><td style="background-color:#eee" align=center>'+addressx+'</td></tr><tr><td style="background-color:#ddd" align=center>Phone:</td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center>Category:</td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center>Submitted By:</td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></div>';        
             }  
             else if(theadmin == username ){ //Need to Match Country Admin - Country == Admin Country IsCOuntry Admin in XML file. 3phase
             //alert("Registered User - Only Edit his/her posts");
             htmlx = '<div style="font-size:14px; font-weight: bolder; color:#996633">' + placename + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + i + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;<a href="javascript:editsubmission(' + lat + ',' + lng + ')"><IMG border=0 alt="Edit details." src="images/icons/weblink.gif"> Edit</a></div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + countrycode + '/' + categoryx + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr><tr><td style="background-color:#ccc" align=center>Address:</td></tr><tr><td style="background-color:#eee" align=center>'+addressx+'</td></tr><tr><td style="background-color:#ddd" align=center>Phone:</td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center>Category:</td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center>Submitted By:</td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></div>';        
             }  
             else{
             //  alert("Cannot edit ");
             htmlx = '<div style="font-size:14px; font-weight: bolder; color:#996633">' + placename + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + i + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;</div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + countrycode + '/' + categoryx + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></tr><tr><td style="background-color:#ddd" align=center>Address:</td></tr><tr><td style="background-color:#eee">'+addressx+'</td></tr><tr><td style="background-color:#ddd" align=center>Phone:</td></tr><tr><td style="background-color:#eee" align=center>'+phonex+'</td></tr><tr><td style="background-color:#ddd" align=center>Category:</td></tr><tr><td style="background-color:#eee" align=center>'+categoryx+'</td></tr><tr><td style="background-color:#ddd" align=center>Submitted By:</td></tr><tr><td style="background-color:#eee" align=center>'+username+'</td></tr></table></div>';       
             }
    
              // alert("Found - Creating Marker");
              var marker = createMarkerx(lat,lng,zoom,point,countrycode,placename,categoryx,image,htmlx,iconObj,video);// create the marker
          
                       
             map.addOverlay(marker);
           }//Close if  
           
           else{
           
           
         //  alert(thecountry);
         //  alert(district);
           
          // movemaptocountry(thecountry);
          
       
           //getcountrydistricts(thecountry + '_districts_view.xml');
           loadxmlfile('english/'+thecountry+'_attractions.xml');
           
           
           
           
           }
           
           
           
           
           
           
          
           document.getElementById("side_bar").innerHTML = side_bar_html; // put the assembled side_bar_html contents into the side_bar div
          
          }//Close for
       
        }//Close If
        
         
      }
  request.send(null);  

}//Close For loop

return false;
 
}




function legendsearch(iconindex){



var x = 0;
var xmlarray= new Array(3) 
xmlarray[0]="attractions.xml"; 
xmlarray[1]="restaurants.xml"; 
xmlarray[2]="hotels.xml"; 
xmlarray[3]="misc.xml";

var imagesarray= new Array(3)
imagesarray[0]="attractions";
imagesarray[1]="restaurants";
imagesarray[2]="hotels";
imagesarray[3]="misc";

i=0;
map.clearOverlays(); //Clear Side Bar then populate with hotel info. 
clearxml();

var iconxz = iconObj[iconindex].image;
var iconxzlenght = iconxz.length;
var index1 = iconxzlenght-4;
var iconxzz = iconxz.substring(13,index1) + '.png';
  


var x=0; 
for (x=0; x<4; x++) {



var request = GXmlHttp.create();
      request.open("GET", "http://www.travelmapia.com/files/" + language + "/" + xmlarray[x], false);   
      request.onreadystatechange = function() 
      {
       
        if (request.readyState == 4) 
        { 
          var xmlDoc = GXml.parse(request.responseText); 
          var markers = xmlDoc.documentElement.getElementsByTagName("marker"); // obtain the array of markers and loop through it
              
          for (var i = 0; i < markers.length; i++) 
          {  
                      
           var iconstring = markers[i].getAttribute("icon");
           var iconlength = iconstring.length;
           var index = iconlength-4;
           var iconname = iconstring.substring(40,index) + '.png';
       
           var lowercaseiconxzzz = iconxzz.toLowerCase() //Convert to lower case for string search function
           var lowercaseiconname = iconname.toLowerCase() //Convert user input string to lowercase for search function compatability
           var RegularExpression  =  new RegExp(lowercaseiconxzzz); //convert label to lowercase, fix for loop done thanks
           
           
           
           var found = lowercaseiconname.search(RegularExpression)
       
         //  alert(lowercaseiconxzzz + " " + lowercaseiconname + " " + found);
               
           if (found != -1)
           {   
           
             
            document.getElementById("side_bartop").innerHTML =  iconstring.substring(40,index);

             xmlfileused = xmlarray[x];
             
             var label = markers[i].getAttribute("label"); //Get labels from xml file
             var lat = parseFloat(markers[i].getAttribute("lat"));
             var lng = parseFloat(markers[i].getAttribute("lng"));
             var point = new GLatLng(lat,lng);
             var image = markers[i].getAttribute("image"); 
             var video = markers[i].getAttribute("video");
             var iconObj1 = new GIcon();
             iconObj1.image = markers[i].getAttribute("icon");
             iconObj1.iconSize = new GSize(23,33);
             iconObj1.iconAnchor = new GPoint(5,33);
             iconObj1.infoWindowAnchor = new GPoint(9, 2);
             
             var html = markers[i].getAttribute("html");
             var url = markers[i].getAttribute("url"); 
         
           //  var jscriptads = 'adbrite.html'        
             // var htmlx = '<div style="padding-left:8px; padding-top:3px; font-size:14px; font-weight: bolder; color:#996633">' + label + '</DIV><table border=0 cellPadding=3><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:3px;border-color: #CC9E47"><img src="images/' + imagesarray[x] + '/' + image + '" align="left" width=125 height=100></div></td><td width="320" valign=top><div style="text-align:justify">' + html + '</div></td></table><table border=0 cellPadding=2><tr><td align=center width="150"><a href="javascript:setZM(' + i + ',' + lat + ',' + lng + ')">Zoom In</a></td></table>' + '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=90 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME>'       
             // create the marker
   
             
              var htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div style="font-size:14px; font-weight: bolder; color:#996633">' + label + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + i + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="http://www.travelmapia.com/images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;<a href="' + url + '" target="_blank"><IMG border=0 alt="Web Link" src="http://www.travelmapia.com/images/icons/weblink.gif"> Web Link</a></div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="http://www.travelmapia.com/images/' + imagesarray[x] + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></table></div>'  
          
              var marker = createMarker(lat,lng,point,label,image,htmlx,iconObj1,video);
             map.addOverlay(marker);
           }//Close if  
                    
          }//Close for
          document.getElementById("side_bar").innerHTML = side_bar_html; // put the assembled side_bar_html contents into the side_bar div
          
        }//close if
      }
      request.send(null);   

}//Close For loop

}//Close function





function menusearch(iconname){

var string = iconname

//var linkname = iconname.toUpperCase;

var xmlarray= new Array(1) 
xmlarray[0]= language + '/' + "attractions.xml"; 
xmlarray[1]= language + '/' + "hotels.xml"; 
xmlarray[2]= language + '/' + "restaurants.xml";
xmlarray[3]= language + '/' + "misc.xml"; 

var imagesarray= new Array(1)
imagesarray[0]="attractions";
imagesarray[1]="hotels";
imagesarray[2]="restaurants";
imagesarray[3]="misc";

i=0;
map.clearOverlays(); //Clear Side Bar then populate with hotel info. 
clearxml();


//var x=0; 
for (x=0; x<4; x++) {
     

      
      var request = GXmlHttp.create();
      request.open("GET", "http://www.travelmapia.com/files/" + xmlarray[x], false);  
      request.onreadystatechange = function() 
      {
        if (request.readyState == 4) 
        { 
          var xmlDoc = GXml.parse(request.responseText); 
          var markers = xmlDoc.documentElement.getElementsByTagName("marker"); // obtain the array of markers and loop through it
          
          for (var i = 0; i < markers.length; i++) 
          {  // obtain the attribues of each marker
           
           var label = markers[i].getAttribute("label");
           var iconnamexml = markers[i].getAttribute("icon"); //Get labels from xml file
           
           
           var lowercaseiconnamexml = iconnamexml.toLowerCase() //Convert to lower case for string search function
           
           
           var iconxzlenght = lowercaseiconnamexml.length;
           var index1 = iconxzlenght-4;
           var iconxzz = lowercaseiconnamexml.substring(40,index1) + '.png';
           
           
           var lowercasestring = string.toLowerCase() //Convert user input string to lowercase for search function compatability
           
       //    alert(iconxzz);
           
           var RegularExpression  =  new RegExp(lowercasestring); //convert label to lowercase, fix for loop done thanks
           var found = iconxzz.search(RegularExpression)
              
           if(string ==""){
           //If string entered is null display nothing found
           document.getElementById("side_bartop").innerHTML = '&nbsp;&nbsp;&nbsp;<font size="2"><font face="Verdana"><font color="#996633"><b>Not Found</b></font></font></font>';
           return;
           }
         
           if (found != -1)
           {
           
           xmlfileused = xmlarray[x];
           
           
           
           document.getElementById("side_bartop").innerHTML = lowercaseiconnamexml.substring(40,index1);
            // alert(found);
             var lat = parseFloat(markers[i].getAttribute("lat"));
             var lng = parseFloat(markers[i].getAttribute("lng"));
             var point = new GLatLng(lat,lng);
             var image = markers[i].getAttribute("image"); 
             var video = markers[i].getAttribute("video");
             var iconObj = new GIcon();
             iconObj.image = markers[i].getAttribute("icon");
             iconObj.iconSize = new GSize(23,33);
             iconObj.iconAnchor = new GPoint(5,33);
             iconObj.infoWindowAnchor = new GPoint(9, 2);
             var jscriptads = 'adbrite.html'        
             var html = markers[i].getAttribute("html");
             
             
              
             var url = markers[i].getAttribute("url");
             var htmlx = '<IFRAME SRC='+jscriptads+' WIDTH=485 HEIGHT=70 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=1></IFRAME><div style="font-size:14px; font-weight: bolder; color:#996633">' + label + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<a valign=middle href="javascript:setZM(' + i + ',' + lat + ',' + lng + ')"><IMG alt="Zoom Into Map" src="images/icons/zoomin.gif" border=0> Zoom In</a>&nbsp;&nbsp;&nbsp;<a href="' + url + '" target="_blank"><IMG border=0 alt="Web Link" src="images/icons/weblink.gif"> Web Link</a></div><table border=0 cellPadding=1><tr><td><div style="width:125px; height:100px;border:thin solid; border-width:2px;border-color: #CC9E47"><img src="images/' + imagesarray[x] + '/' + image + '" align="left" width=125 height=100></div></td><td width="340" valign=top><div style="font-family:Helvetica,Verdana, Arial, sans-serif;text-align:justify;font-size:12px">' + html + '</div></td></table></div>'  
             var marker = createMarker(lat,lng,point,label,image,htmlx,iconObj,video);
             map.addOverlay(marker);
           }//Close if  
          
           document.getElementById("side_bar").innerHTML = side_bar_html; // put the assembled side_bar_html contents into the side_bar div
          
          }//Close for
       
        }//Close If
        
         
      }
  request.send(null);  

}//Close For loop
 
}


function openmainloginphpfile(phpfilename){




var thephpfile;


if(phpfilename == undefined || phpfilename == ""){

thephpfile = 'http://www.travelmapia.com/php/main.php';



}

else{

thephpfile = phpfilename;

}







var mainlogineng ='<iframe frameBorder=no align=left allowTransparency=true width=400px height=500px scrolling=no src="' + thephpfile + '"></iframe>';
var mainloginesp ='<iframe frameBorder=no align=left allowTransparency=true width=400px height=500px scrolling=no src="' + thephpfile + '"></iframe>';


var w=document.getElementById("map").offsetWidth/2;
var h=document.getElementById("map").offsetHeight/2;


document.getElementById("mapwindow").innerHTML =  '';
//var cc = map.fromLatLngToDivPixel(map.getCenter()); 

var left = w - 150; 
var right = h - 180; 
 
document.getElementById("mapwindow").style.visibility = "visible";
 
var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(left,right)); 
pos.apply(document.getElementById("mapwindow")); 
document.getElementById("map").appendChild(document.getElementById("mapwindow"));

if (language=="english"){
document.getElementById("mapwindow").innerHTML =   mainlogineng;
}
else{
document.getElementById("mapwindow").innerHTML =  mainloginesp;
}  


}  


function resize_iframe(){
document.getElementById("iframediv").innerHTML = '<iframe src="http://www.travelmapia.com/php/login.php" frameBorder=0 width=800px height=205px allowTransparency=true scrolling=no marginheight=0px marginwidth=0px></iframe>';
}



function openregistrationphpfile(phpfilename){


//alert(phpfilename);
var thephpfile;

if(phpfilename == undefined || phpfilename == ""){


thephpfile = 'http://www.travelmapia.com/php/register.php';
}
else{


thephpfile = phpfilename;

}



var registrationeng ='<iframe frameBorder=no align=left allowTransparency=true width=500px height=500px scrolling=no src="' + thephpfile + '"></iframe>';
var registrationesp ='<iframe frameBorder=no align=left allowTransparency=true width=500px height=500px scrolling=no src="' + thephpfile + '"></iframe>';



var w=document.getElementById("map").offsetWidth/2;
var h=document.getElementById("map").offsetHeight/2;


document.getElementById("mapwindow").innerHTML =  '';
//var cc = map.fromLatLngToDivPixel(map.getCenter()); 

var left = w - 250; 
var right = h - 180; 
 
document.getElementById("mapwindow").style.visibility = "visible";
 
var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(left,right)); 
pos.apply(document.getElementById("mapwindow")); 
document.getElementById("map").appendChild(document.getElementById("mapwindow"));

if (language=="english"){
document.getElementById("mapwindow").innerHTML =   registrationeng;
}
else{
document.getElementById("mapwindow").innerHTML =  registrationesp;
} 



}  



function openfacebookloginphpfile(phpfilename){


//alert(phpfilename);
var thephpfile;

if(phpfilename == undefined || phpfilename == ""){


thephpfile = 'http://www.travelmapia.com/php/register.php';
}
else{


thephpfile = phpfilename;

}



var registrationeng ='<iframe frameBorder=no align=left allowTransparency=true width=500px height=500px scrolling=no src="' + thephpfile + '"></iframe>';
var registrationesp ='<iframe frameBorder=no align=left allowTransparency=true width=500px height=500px scrolling=no src="' + thephpfile + '"></iframe>';



var w=document.getElementById("map").offsetWidth/2;
var h=document.getElementById("map").offsetHeight/2;


document.getElementById("mapwindow").innerHTML =  '';
//var cc = map.fromLatLngToDivPixel(map.getCenter()); 

var left = w - 450; 
var right = h - 240; 
 
document.getElementById("mapwindow").style.visibility = "visible";
 
var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(left,right)); 
pos.apply(document.getElementById("mapwindow")); 
document.getElementById("map").appendChild(document.getElementById("mapwindow"));

if (language=="english"){
document.getElementById("mapwindow").innerHTML =   registrationeng;
}
else{
document.getElementById("mapwindow").innerHTML =  registrationesp;
} 



}  











function openusereditphpfile(phpfilename){


var thephpfile = phpfilename;

var userediteng ='<iframe frameBorder=no align=left allowTransparency=true width=400px height=500px scrolling=no src="' + thephpfile + '"></iframe>';
var usereditesp ='<iframe frameBorder=no align=left allowTransparency=true width=400px height=500px scrolling=no src="' + thephpfile + '"></iframe>';

var w=document.getElementById("map").offsetWidth/2;
var h=document.getElementById("map").offsetHeight/2;


document.getElementById("mapwindow").innerHTML =  '';
//var cc = map.fromLatLngToDivPixel(map.getCenter()); 

var left = w - 150; 
var right = h - 180; 
 
document.getElementById("mapwindow").style.visibility = "visible";
 
var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(left,right)); 
pos.apply(document.getElementById("mapwindow")); 
document.getElementById("map").appendChild(document.getElementById("mapwindow"));

if (language=="english"){
document.getElementById("mapwindow").innerHTML = userediteng;
}
else{
document.getElementById("mapwindow").innerHTML = usereditesp;
} 



}  


function openadmincenter(phpfilename){



var thephpfile = phpfilename;

var userinfoeng ='<div id="adminwindow"><div id="adminwindowclose"> <a class="whitext" style="text-align:left;" href="#" onclick="closeadminwindow();">Close</a></div><iframe frameBorder=no align=left allowTransparency=true width=600px height=500px scrolling=yes src="' + thephpfile + '"></iframe></div>';
var userinfoesp ='<a style="padding-left:70px" href="#" onclick="closeadminwindow();">Close</a><iframe frameBorder=no align=left allowTransparency=true width=600px height=500px scrolling=yes src="' + thephpfile + '"></iframe>';

var w=document.getElementById("map").offsetWidth/2;
var h=document.getElementById("map").offsetHeight/2;


document.getElementById("adminwindow").innerHTML =  '';
//var cc = map.fromLatLngToDivPixel(map.getCenter()); 

var left = w - 470; 
var right = h - 250; 
 
document.getElementById("adminwindow").style.visibility = "visible";
 
var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(left,right)); 
pos.apply(document.getElementById("adminwindow")); 
document.getElementById("map").appendChild(document.getElementById("adminwindow"));

if (language=="english"){
document.getElementById("adminwindow").innerHTML = userinfoeng;
}
else{
document.getElementById("adminwindow").innerHTML = userinfoesp;
} 








}  


function openuserinfo(phpfilename){


var thephpfile = phpfilename;

var userinfoeng ='<iframe frameBorder=no align=left allowTransparency=true width=400px height=500px scrolling=no src="' + thephpfile + '"></iframe>';
var userinfoesp ='<iframe frameBorder=no align=left allowTransparency=true width=400px height=500px scrolling=no src="' + thephpfile + '"></iframe>';

var w=document.getElementById("map").offsetWidth/2;
var h=document.getElementById("map").offsetHeight/2;


document.getElementById("mapwindow").innerHTML =  '';
//var cc = map.fromLatLngToDivPixel(map.getCenter()); 

var left = w - 150; 
var right = h - 180; 
 
document.getElementById("mapwindow").style.visibility = "visible";
 
var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(left,right)); 
pos.apply(document.getElementById("mapwindow")); 
document.getElementById("map").appendChild(document.getElementById("mapwindow"));

if (language=="english"){
document.getElementById("mapwindow").innerHTML = userinfoeng;
}
else{
document.getElementById("mapwindow").innerHTML = userinfoesp;
} 



}  





function selecticon()
{    

 document.getElementById("mapwindow").innerHTML =  '';
 document.getElementById("mapwindow").style.visibility = "visible";
 var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(60,75)); 
 pos.apply(document.getElementById("mapwindow")); 
 document.getElementById("map").appendChild(document.getElementById("mapwindow")); 
      
 var iconlegend = "";
 //var iconObj = [];
 var icondir = [];
 var xformat = "";
 var x=4; 
 var iconstring ="";
 var request = GXmlHttp.create();
 
 
 if(language=='english'){
 
 request.open("GET", "http://www.travelmapia.com/files/" + "english/" + "icons.xml", true);   
 
 }else if(language=='espanol'){
 
 request.open("GET", "http://www.travelmapia.com/files/" + "espanol/" + "icons.xml", true);   
 
 }
 
 
 
 request.onreadystatechange = function() 
 {
     if (request.readyState==4) 
        { //Removed for IE documentElement error.
          //var xmlDoc = request.responseXML;
          var xmlDoc = GXml.parse(request.responseText); 
          // obtain the array of markers and loop through it
          var markers = xmlDoc.documentElement.getElementsByTagName("marker");
           
          for (var i = 0; i < markers.length; i++) 
          {  // obtain the attribues of each marker
            iconObj[i] = new GIcon();
            iconObj[i].image = markers[i].getAttribute("icon");
            
            var iconstring = markers[i].getAttribute("icon");
            var iconlength = iconstring.length;
            var index = iconlength-4;
            var iconname = iconstring.substring(13,index);

            if(i==x)
            {
          
             iconlegend += '<tr><td><a href="#" onclick="legendsearch('+ i + ');"><img border=0 src="http://www.travelmapia.com/' + iconObj[i].image + '"></img></a></td> <td Align=left vAlign=middle width="35"><a href="#" onclick="iconselected('+ i + ');">' + iconname + '</a>&nbsp;' + '</td>' ;
             x = x + 4;   
            }
            else{
             iconlegend += '<td><a href="#" onclick="legendsearch('+ i + ');"><img border=0 src="http://www.travelmapia.com/' + iconObj[i].image + '"></img></a></td> <td Align=left vAlign=middle width="35"><a href="#" onclick="iconselected('+ i + ');">' + iconname + '</a>&nbsp;' + '</td>' ;
            }
                
          }
          
          if(language=='english'){
          
          
          document.getElementById("mapwindow").innerHTML =  '<div id="legend"><div id="legendtop"><b>Please Select an Icon below for the place you are adding.</b><a style="padding-left:70px" href="#" onclick="closelegend();">Close</a></div><div style="overflow:scroll;float:left; width:470px;height:300px"><TABLE><TBODY><tr>' + iconlegend + '</tr></TBODY></TABLE></div></div>';
          }
          
          else if(language=='espanol'){
          
           document.getElementById("mapwindow").innerHTML =  '<div style="padding-top:3px"><div align="right" style="padding-right:7px"><a href="#" onclick="closelegend();">Cerrar</a></div><b>Seleciona Uno</b></div><span class=' + '"header"' + '">' + '<div style="overflow:scroll;float:left; width:150px;height:519px"><TABLE><TBODY><tr>' + iconlegend + '</tr></TBODY></TABLE></div>';
          
          
          }
          
        }
                    
    }
      request.send(null); 
 
  }//Close function  




function iconselected(iconindex){

var iconxz = iconObj[iconindex].image;
var iconxzlenght = iconxz.length;
var index1 = iconxzlenght-4;
var iconxzz = iconxz.substring(13,index1) + '.png';
  
window.frames["infoframe"].document.forms["submitformx"].elements["uploadedicon"].value = iconxzz;

window.frames["icon_frame"].document.getElementById("wrapperx").innerHTML = '<div id="iconattached"><Table align:left cellspacing="1" cellpadding="0" border="0" width="100%"><tr><td COLSPAN=2><span class="submitformwhitetext"> Icon Loaded Successful !</span></td></tr><tr><td align=center style="width:35px"><img align=center height="31" width="21" src="http://www.travelmapia.com/images/icons/' + iconxzz + '"></td><td style="width:auto" align=left valign=top><span class="submitformwhitetext">Name:' + iconxzz + '<br>\n<a class="submitformwhitetext" href="iconupload.html">Change Icon>></a></td></tr></table></div>'  


uploadediconvalue=iconxzz;


//map.clearOverlays(); //Clear Side Bar then populate with hotel info. 
//clearxml();


}


 function findPosX(obj)
  {
  

    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
        
       loginwidth=curleft; 
        
        
    return curleft;
  }


  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
        
        loginheight=curtop; 
        
    return curtop;
  }



function showdropdownmenu(){



var userinfoeng ='<div id="mapdropdownmenu"><span class="whitetext"><ul><li><a onclick="parent.submit(\'Attractions\'); parent.removelink();" class="whitetext" href="#">Attraction</a></li><li><a onclick="parent.submit(\'Lodging\'); parent.removelink();"class="whitetext" href="#">Lodging</a></li><li><a onclick="parent.submit(\'Restaurant\'); parent.removelink();" class="whitetext" href="#">Restaurant</a></li><li><a onclick="parent.submit(\'Real Estate\'); parent.removelink();" class="whitetext" href="#">Real Estate</a></li><li><a onclick="parent.submit(\'Directory\'); parent.removelink();" class="whitetext" href="#">Directory Entry</a></li></ul></span></div>';


document.getElementById("mapwindow").innerHTML =  '';

var x = loginwidth; 
var y = loginheight + 22; 


 
 
document.getElementById("mapwindow").style.visibility = "visible";
 
var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(x,y)); 
pos.apply(document.getElementById("mapwindow")); 
document.getElementById("map").appendChild(document.getElementById("mapwindow"));

//CLOSE DROP DOWN MENU IF MOVE ON SIDEBAR

//GEvent.addListener(map, "mouseover", function() { document.getElementById("mapwindow").innerHTML =  '';} );
 
GEvent.addListener(map, "mouseout", function() { document.getElementById("mapwindow").innerHTML =  '';} );
 
//GEvent.addListener(map, "mousemove", function() { document.getElementById("mapwindow").innerHTML =  '';} );
      

if (language=="english"){
document.getElementById("mapwindow").innerHTML = userinfoeng;
}
else{
document.getElementById("mapwindow").innerHTML = userinfoesp;
} 


}


function hidedropdownmenu(){

document.getElementById("mapwindow").innerHTML =  '';
//document.getElementById("mapwindow").style.visibility = "invisible";
 

}


function jlogout(){

document.getElementById("mapwindow").innerHTML =  '';

document.getElementById("sidebarwrapper").innerHTML = '<div id="letterbar"><ul><li><A title="A" onclick="find(\'A\'); return false;" href="http://www.travelmapia.com/directory/index.html">A</A></li><li><A title="B" onclick="find(\'B\'); return false;" href="http://www.travelmapia.com/directory/index.html">B</A></li><li><A title="C" onclick="find(\'C\'); return false;" href="http://www.travelmapia.com/directory/index.html">C</A><li><A title="D" onclick="find(\'D\'); return false;" href="http://www.travelmapia.com/directory/index.html">D</A></li></li><li><A title="E" onclick="find(\'E\'); return false;" href="http://www.travelmapia.com/directory/index.html">E</A></li><li><A title="F" onclick="find(\'F\'); return false;" href="http://www.travelmapia.com/directory/index.html">F</A></li><li><A title="G" onclick="find(\'G\'); return false;" href="http://www.travelmapia.com/directory/index.html">G</A></li><li><A title="H" onclick="find(\'H\'); return false;" href="http://www.travelmapia.com/directory/index.html">H</A></li><li><A title="I" onclick="find(\'I\'); return false;" href="http://www.travelmapia.com/directory/index.html">I</A></li><li><A title="J" onclick="find(\'J\'); return false;" href="http://www.travelmapia.com/directory/index.html">J</A></li><li><A title="K" onclick="find(\'K\'); return false;" href="http://www.travelmapia.com/directory/index.html">K</A></li><li><A title="L" onclick="find(\'L\'); return false;" href="http://www.travelmapia.com/directory/index.html">L</A></li><li><A title="M" onclick="find(\'M\'); return false;" href="http://www.travelmapia.com/directory/index.html">M</A></li><li><A title="N" onclick="find(\'N\'); return false;" href="http://www.travelmapia.com/directory/index.html">N</A></li><li><A title="O" onclick="find(\'O\'); return false;" href="http://www.travelmapia.com/directory/index.html">O</A></li><li><A title="P" onclick="find(\'P\'); return false;" href="http://www.travelmapia.com/directory/index.html">P</A></li><li><A title="Q" onclick="find(\'Q\'); return false;" href="http://www.travelmapia.com/directory/index.html">Q</A></li><li><A title="R" onclick="find(\'R\'); return false;" href="http://www.travelmapia.com/directory/index.html">R</A></li><li><A title="S" onclick="find(\'S\'); return false;" href="http://www.travelmapia.com/directory/index.html">S</A></li><li><A title="T" onclick="find(\'T\'); return false;" href="http://www.travelmapia.com/directory/index.html">T</A></li><li><A title="U" onclick="find(\'U\'); return false;" href="http://www.travelmapia.com/directory/index.html">U</A></li><li><A title="V" onclick="find(\'V\'); return false;" href="http://www.travelmapia.com/directory/index.html">V</A></li><li><A title="W" onclick="find(\'W\'); return false;" href="http://www.travelmapia.com/directory/index.html">W</A></li><li><A title="X" onclick="find(\'X\'); return false;" href="http://www.travelmapia.com/directory/index.html">X</A></li><li><A title="Y" onclick="find(\'Y\'); return false;" href="http://www.travelmapia.com/directory/index.html">Y</A></li><li><A title="Z" onclick="find(\'Z\'); return false;" href="http://www.travelmapia.com/directory/index.html">Z</A></li></ul></div><!--END LETTERBAR--><div id="sidebarcontainer"><div id="side_bartop"> <a href="http://www.travelmapia.com/belize/attractions/index.html">Attractions</a></div><div id="side_bar"></div><!-- END side_bar--></div>';

map.clearOverlays();
 
clearadmin();

//loadxmlfile('english/countries.xml')

loadcountryxmlfile("english/countries.xml");
       

}

