// Diese Datei ist die Verbindungsschicht zum Map-Service;

var osmcWeb = null;
osmcWeb = new smcWebControl(false);

function smcWebControl(flagDebug)
{
	this.Debug = flagDebug;
}

function smcWebDebug(strText)
{
	if (osmcWeb)
	{
		if (osmcWeb.Debug)
		{
			alert(strText);
		}
	}
}


// =============================

var osmcWebMap = null;
var osmcWebMapControl = null;
var osmcWebMapAdress = null;

function smcWebMapControl(strElement)
{
	this.Element = strElement;
	if (document.getElementById(strElement)) this.State = true;
	else
	{
		smcWebDebug('ERROR smcWebMapControl - Element not found:' + strElement);
		this.State = false;
	}
}

function smcWebMapAdress(strStreet, strPZIP, strLocation, strCountry)
{
	this.Street = strStreet;
	this.PZIP = strPZIP;
	this.Location = strLocation;
	this.Country = strCountry;
	this.AdressSPLC = strStreet + ' ' + strPZIP + ' ' + strLocation + ' ' + strCountry;
}

function smcWebMapShowAdress(strElement, strStreet, strPZIP, strLocation, strCountry)
// Adresse asu Map-Service anzeigen;
{
	osmcWebMapControl = new smcWebMapControl(strElement);
	if (osmcWebMapControl.State == true)
	{
		osmcWebMapAdress = new smcWebMapAdress(strStreet, strPZIP, strLocation, strCountry);
		if (osmcWebMapAdress)
		{
			osmcWebMap = new WebMapShowAdress(osmcWebMapControl,osmcWebMapAdress);
			if (osmcWebMap) return true;
		}
		else smcWebDebug('ERROR WebMapShowAdress');
	}
	return false;
}

function smcWebMapUnload()
// Entladen Map-Funktion
{
	WebMapUnload();
}

