function showMap24(startStreet, startZip, targetStreet, targetZip)
{
    if (startStreet != '' && startZip != '')
    {
        var link = 'http://link2.map24.com?lid={0}&maptype=JAVA&action=route&rtype=fast&sstreet={1}&szip={2}&dstreet={3}&dzip={4}';
        link = link.replace('{0}', 'f70edb7c');
        link = link.replace('{1}', escape(startStreet));
        link = link.replace('{2}', startZip);
        link = link.replace('{3}', escape(targetStreet));
        link = link.replace('{4}', targetZip);
        var map24 = window.open(link, 'Map24');
    }
}

var currentWindow = null;
var showRadWindowCounter = 0;
function showRadWindow(clientID, url)
{
    try
    {
        var radWindow = $find(clientID);
        hideRadWindow();
        if (url && url != '')
        {
            radWindow.setUrl(url);
        }
        radWindow.show();
        currentWindow = radWindow;
        showRadWindowCounter = 0;
    }
    catch (e)
    {
        // $find noch nicht verfuegbar
        showRadWindowCounter++;
        if (showRadWindowCounter < 10)
        {
            currentTimeout = window.setTimeout('showRadWindow(\'' + clientID + '\', \'' + url + '\')', 100);
        }
    }
}

function hideRadWindow()
{
    if (currentWindow)
    {
        currentWindow.hide();
        currentWindow = null;
    }
}

function ShowToolTipDescription(id)
{ 
    var divDescription = document.getElementById('divDescription_ID_' + id);
    if(divDescription != null) 
    {
        if (typeof netscape == 'undefined') 
        { 
            divDescription.style.setAttribute('display', 'block', false); 
        } 
        else 
        { 
            divDescription.style['display'] = 'block'; 
        } 
     } 
}

function HideToolTipDescription(id)
{ 
    var divDescription = document.getElementById('divDescription_ID_' + id);
    if(divDescription != null) 
    {
        if (typeof netscape == 'undefined') 
        { 
            divDescription.style.setAttribute('display', 'none', false); 
        } 
        else 
        { 
            divDescription.style['display'] = 'none'; 
        } 
     } 
}

function ShowRadToolTipImage(rttClientId, targetId, imgClientId, newSrc)
{
    var img = document.getElementById(imgClientId);
    img.src = newSrc;
    ShowRadToolTip(rttClientId, targetId);
}


function ShowRadToolTipWithPostBack(rttClientId, targetId, postBackElement)
{
    document.getElementById(postBackElement).click();
    //ShowRadToolTip(rttClientId, targetId);
}

var activeToolTip = null;
function ShowRadToolTip(rttClientId, targetId)
{
    var radToolTip = $find(rttClientId);
    radToolTip.set_targetControlID(targetId);  
    
    activeToolTip = rttClientId;
    radToolTip.show();
}

function DetectNEnter(e, btn) {
    var characterCode;
    if (e && e.which) {
        // NN4 specific code
        e = e;
        characterCode = e.which;
    }
    else {
        // IE specific code
        e = event
        characterCode = e.keyCode;
    }

    if (characterCode == 13) //// Enter key is 13
    {
        e.returnValue = false;
        e.cancelBubble = true;
        document.getElementById(btn).click();
    }
}

function WindowCallBack(sender, args) 
{
    window.location = args; 
}

//function Wait(milliseconds)
//{
//    setTimeout(dummy(), milliseconds);
//}

//function dummy()
//{
//    // nichts zu tun
//}

