/**
 * its.de 2010 (430700)
 *
 * /booking/its/js/termine_xx_xx_xx.js
 *
 * @copyright 2009 by TravelTainment - The Amadeus Leisure Group
 * @author    Guido Buchholz <buchholz@traveltainment.de>
 * @version   Release: @package_version@
 * @since     SVN:1.0
 */

/**
 * Globale Variablen
 */
var ttHighlightSortItemsFlag = 0;


/**
 * Navigation (Breadcrumbs)
 */
function zur_suche(showresult) {
    window.location.href = uebergabe + '&showresult=' + showresult;
}

function zum_zielgebiet(showresult) {
    window.location.href = uebergabe 
                         + '&detail=zielgebiet&showresult=' + showresult;
}

function zum_hotel(showresult, startposition_hotel, zielgebiets_kenner) {
    window.location.href = uebergabe 
                         + '&detail=hotel&showresult=' + showresult 
                         + '&startposition=' + startposition_hotel 
                         + '&zielgebiets_kenner=' + zielgebiets_kenner;
}
function ttSwitchToErde() {
    var targetDir = ttSwitchIbeCity == 1 ? 'city' : 'erde';
    var strHref = document.location.href.replace('index.php', targetDir + '/index.php');
    strHref = strHref.replace('engine=pauschal', 'engine=erde');
    if (strHref.search('&ttSwitchIbe=1') == '-1') {
        strHref += '&ttSwitchIbe=1';
    }
    document.location.href = strHref;
    return false;
}

function ttShowXITSTip(item) {
    var pos = getPosition(item);
    
    if($_('terminOfferVaInfo') == null || typeof($_('terminOfferVaInfo')) == 'undefined') {
        var offerTipDiv = document.createElement('div');
        var offerTipDiv_id = document.createAttribute('id');
        offerTipDiv_id.nodeValue = 'terminOfferVaInfo';
        offerTipDiv.setAttributeNode(offerTipDiv_id);
        var offerTipDiv_class = document.createAttribute('class');
        offerTipDiv_class.nodeValue = 'ttTerVaTipp';
        offerTipDiv.setAttributeNode(offerTipDiv_class);
        document.body.appendChild(offerTipDiv);
    }
    
    var strAusgabe = '';
    
    strAusgabe += '<div class="ttDiv1LT ttIePngFix"><img src="/images/spacer.gif" alt="" border="0" width="1" height="1" /></div>';
    strAusgabe += '<div class="ttXITSTippCT ttIePngFix"><img src="/images/spacer.gif" alt="" border="0" width="1" height="1" /></div>';
    strAusgabe += '<div class="ttDiv1RT ttIePngFix"><img src="/images/spacer.gif" alt="" border="0" width="1" height="1" /></div>';
    strAusgabe += clearBothDiv;
    strAusgabe += '<div class="ttDiv1LM ttIePngFix" style="height: 120px;"><img src="/images/spacer.gif" alt="" border="0" width="1" height="1" /></div>';
    strAusgabe += '<div class="ttXITSTippCM ttIePngFix" style="height: 120px;">';
    strAusgabe +=     '<div class="ttXITSTippContainer">';
    /*
    strAusgabe +=         '<div class="ttXITSTippIframe">';
    strAusgabe +=             '<iframe src="dummy.html" border="0" frameborder="0" style="background-color: #fff; height: 114px;"></iframe>';
    strAusgabe +=         '</div>';
    */
    strAusgabe +=         '<div class="ttXITSTippBody">';
    strAusgabe +=             '<div class="ttXITSTippHeadline">';
    strAusgabe +=                 '<div class="ttXITSTippHeadlineTitle">ITS INDI - der Jeden-Tag-Spar-Tarif</div>';
    strAusgabe +=                 '<div class="ttXITSTippHeadlineClose" onclick="flagShowDiv=false;document.getElementById(\'terminOfferVaInfo\').style.display=\'none\';" title="schließen">x</div>';
    strAusgabe +=                   clearBothDiv;
    strAusgabe +=             '</div>';
    strAusgabe +=             '<div class="ttXITSTippContent">'
               +                  '<div class="ttTerXITSTippLeft">'
               +                      '- tagesaktuelle Flugpreise kombiniert mit unseren Hotelangeboten<br />'
               +                      '- ständig erweitertes Hotelportfolio, größer als im Katalog<br />'
               +                      '- inklusive Transfer und Reiseleitung<br/><br/>'
               +                      'Hinweis: Bitte beachten Sie die Änderungs- und Stornierungs-<br/>richtlinien in unseren AGBs (ITS INDI)<br/><br/>'
               +                  '</div>'
               +                  '<div class="ttTerXITSTippRight">'
               +                      '<img src="' + imgPfad + '/indiTipp.png" alt="" border="0" />'
               +                  '</div>'
               +                  clearBothDiv
               +              '</div>';
    strAusgabe +=         '</div>';
    strAusgabe +=     '</div>';
    strAusgabe += '</div>';
    strAusgabe += '<div class="ttDiv1RM ttIePngFix" style="height: 120px;"><img src="/images/spacer.gif" alt="" border="0" width="1" height="1" /></div>';
    strAusgabe += clearBothDiv;
    strAusgabe += '<div class="ttDiv1LB ttIePngFix"><img src="/images/spacer.gif" alt="" border="0" width="1" height="1" /></div>';
    strAusgabe += '<div class="ttXITSTippCB ttIePngFix"><img src="/images/spacer.gif" alt="" border="0" width="1" height="1" /></div>';
    strAusgabe += '<div class="ttDiv1RB ttIePngFix"><img src="/images/spacer.gif" alt="" border="0" width="1" height="1" /></div>';
    strAusgabe += clearBothDiv;
    
    $_('terminOfferVaInfo').innerHTML = strAusgabe;
    
    var pos = getPosition(item);
    
    $_('terminOfferVaInfo').style.left = (pos.x - 3) + 'px';
    $_('terminOfferVaInfo').style.top  = (pos.y - 130) + 'px';
    
    $_('terminOfferVaInfo').style.display = 'block';
}
