mapTheme = 'Councils: '
mzDataSet = 'ADMIN'

mzjsNoUrlMode         = false
mzjsNoWikiMode        = false


//-----------------------------------------------------
function showChangeBoxTxt(ZitID, mapIndexName)
{
P=PtD[ZitID]
Url=P['Url']
WikiPhrase = P['Popup']+P['GG']
 
if (P['GG']==undefined)
  {
    regx = new RegExp('//','g')
    GoogleString = P['Popup'].replace(regx,' ')
    AnglePosition = GoogleString.indexOf('<')
    if (AnglePosition >-1) GoogleString = GoogleString.slice(0,AnglePosition)
  }
else
  {
    GoogleString = P['Popup']
    CrPosition = GoogleString.indexOf('//')
    if (CrPosition >-1) GoogleString = GoogleString.slice(0,CrPosition)
    GoogleString += ' ' + P['GG']
  }


if (msjsGoogleExtra.length>0)
  {
  GoogleExtra = ' for ' + msjsGoogleExtra
  GoogleString += msjsGoogleExtra
  }
else
  GoogleExtra = ''

buttonAndStyle = mzjsMapPopupButtonStyle
buttonAndStyle += ' type="button"'
buttonAndStyle += ' onmouseover="this.style.background=\'#cccccc\'; this.style.color=\'red\'"'
buttonAndStyle += ' onmouseout="this.style.background=\'silver\'; this.style.color=\'black\'"'

txt=''
txt += '<table  border="2" cellpadding=0 cellspacing=0 '
txt += ' style="font-family:arial, verdana, helvetica;font-size:8pt; background:#cccccc;">'
txt += '<tr><td align="center">'


txt += '<input ' +buttonAndStyle+ ' value="Cancel" name= "next1" '
txt += 'onclick="javascript:hideChangeBox();">'
txt += '</td></tr><tr><td align="center">'

if (!mzjsNoUrlMode && Url!=undefined)
    {
    txt += '<a href="http://' +Url+ '">' +Url+ '</a>'
    txt += '</td></tr><tr><td align="center">'
    }
    
if (!mzjsNoGoogleMode)
    {
    txt += '<a href="http://www.google.com/search?q=' +encodeURI(GoogleString)+ '">Search Google' +GoogleExtra+ '</a>'
    txt += '</td></tr><tr><td align="center">'
    }

if (!mzjsNoStreetMapMode)
    {
    txt += '<a href="' +streetmapSpot(ZitID)+ '">Visit Streetmap</a>'
    txt += '</td></tr><tr><td align="center">'
    }

if (!mzjsNoWikiMode)
    {
    regx = new RegExp(' ','g')
    WikiString='http://localhost/piki/Piki.cgp?' +WikiPhrase.replace(regx,'')
    txt += '<a href="' +WikiString+ '">Lookup Wiki</a>'
    txt += '</td></tr><tr><td align="center">'
    }

if (!mzjsNoTerraserverMode && P['Lt']!=undefined && P['Ln']!=undefined)
    {
    TerraserverString = ''
    TerraserverString += 'http://www.terraserver.com/imagery/image_gx.asp?cpx=' + P['Ln']
    TerraserverString += '&cpy=' + P['Lt'] + '&res=15&provider_id=340'
    txt += '<a href="' +encodeURI(TerraserverString)+ '">Visit Terraserver</a>'
    txt += '</td></tr><tr><td align="center">'
    }

if (!mzjsNoChangePopupMode)
    {
    txt += '<input ' +buttonAndStyle+ ' value="Change Popup" name= "ChangePopup" '
    txt += 'onclick="javascript:hideChangeBox();changePopup(' +ZitID+ ')">'
    txt += '</td></tr><tr><td align="center">'
    }
    
if (!mzjsNoEditSpotInfoMode)
    {
    txt += '<input ' +buttonAndStyle+ ' value="Edit Spot Information" name= "EditSpotInformation" '
    txt += 'onclick="javascript:hideChangeBox();editSpotInformation(' +ZitID+ ')">'
    txt += '</td></tr><tr><td align="center">'
    }

if (!mzjsNoDeleteSpotMode)
    {
    txt += '<input ' +buttonAndStyle+ ' value="Delete Spot" name= "DeleteSpot" '
    txt += 'onclick="javascript:hideChangeBox();deleteSpot(' +ZitID+ ')">'
    txt += '</td></tr><tr><td align="center">'
    }



txt += '</td></tr>'
txt += '</table>'

return txt
}

