var headerItem=document.getElementById('header');var parOneItem=document.getElementById('parOne');var parTwoItem=document.getElementById('parTwo');var mapDiv=document.getElementById('map');var panelDiv=document.getElementById('panel');var instructionsDiv=document.getElementById('instructions');var map=null;var request=null;var markers;function Setup()
{try
{if(!GBrowserIsCompatible())
{mapDiv.innerHTML='Sorry, your browser is not compatible with Google Maps.';return;}
MySetLanguage(LANG_FRENCH);}
catch(e)
{GLog.write('Setup:\n'+Props(e));}}
var myCurrentLanguage=LANG_UNKNOWN;function MySetLanguage(language)
{if(language!=myCurrentLanguage)
{switch(language)
{case LANG_ENGLISH:headerItem.innerHTML='Paris Star Forts';parOneItem.innerHTML='In 1840 France was involved in an international conflict over Egypt, the details of which no one remembers today. However as part of the conflict, King Louis-Philippe and Prime Minister Thiers decided to build a ring of large forts around Paris. Besides impressing the neighbors, these forts could also be used to suppress insurrections. The forts proved very effective in the Franco-Prussian war of 1870, providing ideal spots for the Prussians to bombard Paris.';parTwoItem.innerHTML='Most of the forts still exist today. Some are still in use by the military, some are parks, one is a WWII cemetery. And some have been gradually replaced by office buildings and apartments, preserving only the outline of the original fort.';break;case LANG_FRENCH:headerItem.innerHTML='Forts en Étoile de Paris';parOneItem.innerHTML="En 1840 la France a été impliquée dans un conflit international contre l'Egypte, ce dont peux se souviennent aujourd'hui. Le Roi Louis-Philippe et son ministre Thiers ont donc décidé de la construction d'une série de fortifications autour de Paris. En plus de servir à dissuader les ennemis potentiels, ces forts pouvaient également servir à supprimer les insurrections. Les forts se révélèrent fort efficace durant la guerre franco-allemande de 1870, malgré le fait qu'ils soient visés par l'artillerie allemande.";parTwoItem.innerHTML="Plusieurs de ces forts existent encore aujourd'hui. Certains sont encore employé par les forces armées françaises, d'autres ont été convertit en parcs et l'un d'eux est devenue un cimetière militaire après la seconde guerre mondiale. Après la guerre, certains ont été détruit pour faire place à des immeubles et à des bureaux, conservant seulement le contour des anciennes fortifications.";break;}
myCurrentLanguage=language;var lng,lat,zoom;if(map==null)
{lat=48.873281;lng=2.212887;zoom=14;}
else
{var p=map.getCenter();lat=p.lat();lng=p.lng();zoom=map.getZoom();}
SetLanguage(language);instructionsDiv.innerHTML=''+_mInstructions+'';CreateMap(lat,lng,zoom);}}
function CreateMap(lat,lng,zoom)
{mapDiv.innerHTML='';map=new GMap2(mapDiv,{draggableCursor:'default'});map.addControl(new GLargeMapControl());map.addControl(new GMapTypeControl());map.addControl(new GScaleControl());map.setCenter(new GLatLng(lat,lng),zoom);map.setMapType(G_SATELLITE_MAP);if(request!=null)
RequestChecker(request)
else
HttpGet('data.xml',RequestChecker);}
function RequestChecker(_request)
{try
{request=_request;var xmlDoc=request.responseXML.documentElement;var markerElements=xmlDoc.getElementsByTagName('marker');markers=[];var panelHtml='';for(var i=0;i';var html=link+'
'+link+marker.name+'
';panelHtml+=html;}
panelDiv.innerHTML=panelHtml;}
catch(e)
{GLog.write('RequestChecker:\n'+Props(e));}}
function PopUp(i)
{try
{var html='
'+markers[i].name+'
'+markers[i].town+'
N '+markers[i].lat+' E '+markers[i].lng+'';markers[i].openInfoWindowHtml(html,{maxWidth:300});}
catch(e)
{GLog.write('PopUp:\n'+Props(e));}}