
var iconCount = 0;                     //global counter

//Resets the icon counter to 0
function ogmResetIconCounter()
{
   iconCount = 0;
}

//Increments the icon counter
function ogmIncIconCounter(refresh)
{
   iconCount++;
   if(refresh==true) ogmRefreshIconCounter();
}

//Decrements the icon counter
function ogmDecIconCounter(refresh)
{
   iconCount--;
   if(refresh==true) ogmRefreshIconCounter();
}

//Refreshes display of the icon counter
function ogmRefreshIconCounter()
{
   var counter = document.getElementById("ogmSiteCounter");
   if(counter!=null) counter.innerHTML = iconCount;
}

//Class GmsMarker
function GmsMarker(xml)
{
   this.siteId       = xml.getAttribute("siteid");
   this.iconId       = xml.getAttribute("iconid");
   this.icon         = getGmsIcon(this.iconId);
   this.lat          = xml.getAttribute("lat");
   this.lng          = xml.getAttribute("lng");
   this.title        = xml.getAttribute("title");
   this.description  = xml.getAttribute("desc");
   this.openingHours = xml.getAttribute("openinghours");
   this.address      = xml.getAttribute("streetaddress");
   this.contact      = xml.getAttribute("contact");
   this.phone        = xml.getAttribute("phone");
   this.email        = xml.getAttribute("email");
   this.fax          = xml.getAttribute("fax");
   this.website      = xml.getAttribute("website");
}

