/* */
var WHeight = window.innerHeight;

/*
if (WHeight < 800) 
{
    document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"Style/base_1024.css\" />"); 
}
else 
{
*/
    document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"Style/base.css\" />"); 
// }
//alert (WHeight);



// HILFSFUNKTION Count HTML Elements
function countEle(nID, nTag, nClass) {
    var allEle = document.getElementById(nID).getElementsByTagName(nTag);
    var Res = [];

    for (var i = 0; i < allEle.length; i++) {
        var cName = nClass;
        var cName2 = allEle[i].className;
        if (cName == cName2) { Res.push(allEle[i]) } else { }
    }
    return Res;
}


function gId(name) { return document.getElementById(name); }

function getMenuEl(eID) {
    var allDT = gId(eID).getElementsByTagName("dt");
    var allDD = gId(eID).getElementsByTagName("dd");
    var allUL = gId(eID).getElementsByTagName("ul");
}

function allDT(eID) { return gId(eID).getElementsByTagName("dt"); }
function allDD(eID) { return gId(eID).getElementsByTagName("dd"); }
function allUL(eID) { return gId(eID).getElementsByTagName("ul"); }


// VARIABLEN MENU !!!!
var MP1 = "SN-Reiseziele";
var MP2 = "SN-Reiselust";
var MP3 = "SN-Reisenews";
var MP4 = "SN-Reisespecials";
var MP5 = "SN-Reiseausarbeitung";
var MP6 = "SN-Newsletter";




// HILFSFUNKTION MENU
function SNavSetAtt() {

    if (gId(MP1) != null) { allDT = allDT(MP1); allDD = allDD(MP1); allUL = allUL(MP1) }
    if (gId(MP2) != null) { allDT = allDT(MP2); allDD = allDD(MP2); allUL = allUL(MP2) }
    if (gId(MP3) != null) { allDT = allDT(MP3); allDD = allDD(MP3); allUL = allUL(MP3) }
    if (gId(MP4) != null) { allDT = allDT(MP4); allDD = allDD(MP4); allUL = allUL(MP4) }
    if (gId(MP5) != null) { allDT = allDT(MP5); allDD = allDD(MP5); allUL = allUL(MP5) }
    if (gId(MP6) != null) { allDT = allDT(MP6); allDD = allDD(MP6); allUL = allUL(MP6) }
    //alert("DT: " + allDT);
    //alert("UL: " + allUL);
    for (var i = 0; i < allDT.length; i++) {

        //FIX fore Reisenews
        chkDD = allDD.length;

        if (chkDD != 0) {
            allDT[i].className = "SSN";
            allUL[i].className = "SSNul";
            allDD[i].style.height = 0;
        } else {

        }


        /**/
        var sID = document.createAttribute("id"); sID.nodeValue = "SNP-" + [i];

        var Ele1 = allDT[i]; Ele1.setAttributeNode(sID);
        Ele1.onclick = shSSNList;
        /*
        var sID = document.createAttribute("id");    sID.nodeValue = "SNL-"+[i];
        var Ele2 = allDD[i];    Ele2.setAttributeNode(sID);
	   
	   var sID = document.createAttribute("id");    sID.nodeValue = "SNUL-"+[i];
        var Ele3 = allUL[i];    Ele3.setAttributeNode(sID);
	   
	   
        allDD[i].className      = "CLOSED";
        */

    }

}

function opSNav() {
    gId("open").style.height = "auto";
    gId("open").style.display = "block";
}

function shSSNList() {

    if (gId(MP1) != null) { var allDD = gId(MP1).getElementsByTagName("dd"); }
    if (gId(MP2) != null) { var allDD = gId(MP2).getElementsByTagName("dd"); }
    if (gId(MP3) != null) { var allDD = gId(MP3).getElementsByTagName("dd"); }
    if (gId(MP4) != null) { var allDD = gId(MP4).getElementsByTagName("dd"); }
    if (gId(MP5) != null) { var allDD = gId(MP5).getElementsByTagName("dd"); }
    if (gId(MP6) != null) { var allDD = gId(MP6).getElementsByTagName("dd"); }

    for (var i = 0; i < allDD.length; i++) { allDD[i].style.height = 0; }

    var theBrow = navigator.appName; Res = theBrow.indexOf("Microsoft");
    if (Res != -1) { var actMenu = this.nextSibling.getAttribute("id", 0); opSSNList(actMenu); }
    else { var actMenu = this.nextSibling.nextSibling.getAttribute("id", 0); opSSNList(actMenu); }
}



function toNull() {

    if (gId(MP1) != null) { var allDD = gId(MP1).getElementsByTagName("dd"); }
    if (gId(MP2) != null) { var allDD = gId(MP2).getElementsByTagName("dd"); }
    if (gId(MP3) != null) { var allDD = gId(MP3).getElementsByTagName("dd"); }
    if (gId(MP4) != null) { var allDD = gId(MP4).getElementsByTagName("dd"); }
    if (gId(MP5) != null) { var allDD = gId(MP5).getElementsByTagName("dd"); }
    if (gId(MP6) != null) { var allDD = gId(MP6).getElementsByTagName("dd"); }

    for (var i = 0; i < allDD.length; i++) { allDD[i].className = "CLOSED"; /**/ }
}




// START Submenu
// CHECK Submenu
function opSSNList(actMenu) {

    if (gId(actMenu) != "") {
        var MList = gId(actMenu);
    }
    else {
        return;
    }

    aMenu = actMenu;

    var ECheckClass = MList.className;
    var maxEHeight = (((MList.getElementsByTagName("li").length) * 18) - 10); //+27
    var actEHeight = parseInt(MList.style.height);

    if (ECheckClass == "CLOSED") {
        doo = 0;
        toNull();
        gId(aMenu).className = "OPEN";
    }
    else {
        doo = 1;
        gId(aMenu).className = "CLOSED";
    }

    switch (doo) {
        case 0: Loop(aMenu); break;
        case 1: setNull(aMenu); break;
    }
}


// OPEN Submenu
function Loop(Val1) {

    var aMenu = Val1;
    var maxEHeight = (((gId(aMenu).getElementsByTagName("li").length) * 18) - 10); //+27
    var actEHeight = parseInt(gId(aMenu).style.height);

    if (actEHeight < maxEHeight) {
        EStyle = gId(aMenu).style;
        actEHeight += 5;
        EStyle.height = actEHeight + "px";
        window.setTimeout('Loop(aMenu)', 10);
    } else {
        //gId(aMenu).className = "OPEN";
        EStyle = gId(aMenu).style.height = "auto";
    }
}
// END Submenu

// CLOSE Submenu
function setNull(aMenu) {
    EStyle2 = gId(aMenu).style;
    EStyle2.height = 0;
    //gId(aMenu).className = "CLOSED";
}



function hdSSNList() {
    var actMenu3 = this.nextSibling.getAttribute("id", 0);
    EStyle2 = gId(actMenu3).style;
    EStyle2.height = 0;
    var actMenu4 = this.getAttribute("id", 0);
    gId(actMenu4).onclick = opSSNList;
}




// CONTENT move in
var a = 980;
function moveUp() {
    var Ele = gId("Content").style;
    var b = 0;

    if (a > b) {
        a -= 5;
        Ele.top = a + "px";
        window.setTimeout('moveUp()', 5);
    }
}

function moveUp2() 
{
    gId("Content2").style.top = 0;
}


function fadeCout() 
{
    var Ele = gId("Content3").style;
    var nMoz = "-moz-opacity";
    var nSaf = "-khtml-opacity"; 
    Ele.top = 0;
    Ele.filter = "alpha(opacity=0)";
    Ele.nMoz = "0.0";
    Ele.nSaf = "0.0"; 
    Ele.opacity = "0.0";
}


var stOpa = 0;
var stOpa2 = 0;
function fadeCin() {
    var Ele = gId("Content3").style; var nMoz = "-moz-opacity"; var nSaf = "-khtml-opacity"; var edOpa = 99; Ele.top = 0;
    if (stOpa < edOpa) {
        stOpa += 1; stOpa2 += 3;
        Ele.filter = "alpha(opacity=" + stOpa2 + ")"; Ele.nMoz = stOpa; Ele.nSaf = "0." + ((stOpa) / 10); Ele.opacity = "0." + ((stOpa) / 10);
        window.setTimeout('fadeCin()', 1);
    } else {
        Ele.filter = "alpha(opacity=100)"; Ele.nMoz = "1.0"; Ele.nSaf = "1.0"; Ele.opacity = "1.0";
    }
}





// CONTENT Box Navigation - Hide / Show Boxcontent
function swap1HP() {
    gId("B1").src = '/Image/ic_close_pas.gif'; gId("B1").alt = 'Box minimieren';
    gId("B1").onclick = swap2HP; gId("B1").title = 'Box minimieren';
    window.setTimeout(function() { gId("Menus").style.visibility = 'visible'; gId("CT").style.visibility = 'visible'; }, 500);
    if (gId("Gallery") != null) { window.setTimeout(function() { gId("Gallery").style.visibility = 'visible'; }, 500) }
    if (gId("Gallery2") != null) { window.setTimeout(function() { gId("Gallery2").style.visibility = 'visible'; }, 500) }
}

function swap2HP() {
    gId("B1").src = '/Image/ic_open_pas.gif'; gId("B1").info = 'Box maximieren';
    gId("B1").onclick = swap1HP; gId("B1").title = 'Box maximieren';
    gId("Menus").style.visibility = 'hidden'; gId("CT").style.visibility = 'hidden';
    if (gId("Gallery") != null) { window.setTimeout(function() { gId("Gallery").style.visibility = 'hidden'; }, 300) }
    if (gId("Gallery2") != null) { window.setTimeout(function() { gId("Gallery2").style.visibility = 'hidden'; }, 200) }
}




// CONTENT Scroll Text
activ = "";
function movDn() {
    gId("ScrollDn").onmouseup = movStop1; gId("ScrollDn").src = '/Image/ic_scroll_dn_blue.gif'; ETop = parseInt(gId("Text").style.top); EHeight = gId("Text").offsetHeight; maxUp = "-" + (EHeight - 200);
    if (ETop > maxUp) { EStyle = gId("Text").style; ETop -= 5; EStyle.top = ETop + "px"; activ = window.setTimeout('movDn()', 5); } else { }
}
function movUp() {
    gId("ScrollUp").onmouseup = movStop2; gId("ScrollUp").src = '/Image/ic_scroll_up_blue.gif'; ETop = parseInt(gId("Text").style.top); maxDown = 0;
    if (ETop < maxDown) { EStyle = gId("Text").style; ETop += 5; EStyle.top = ETop + "px"; activ = window.setTimeout('movUp()', 5); } else { }
}


function movDn2() {
    gId("ScrollDn").onmouseup = movStop1; gId("ScrollDn").src = '/Image/ic_scroll_dn_blue.gif'; ETop = parseInt(gId("Text").style.top); EHeight = gId("Text").offsetHeight; maxUp = "-" + (EHeight - 140);
    if (ETop > maxUp) { EStyle = gId("Text").style; ETop -= 5; EStyle.top = ETop + "px"; activ = window.setTimeout('movDn2()', 5); } else { }
}
function movUp2() {
    gId("ScrollUp").onmouseup = movStop2; gId("ScrollUp").src = '/Image/ic_scroll_up_blue.gif'; ETop = parseInt(gId("Text").style.top); maxDown = 0;
    if (ETop < maxDown) { EStyle = gId("Text").style; ETop += 5; EStyle.top = ETop + "px"; activ = window.setTimeout('movUp2()', 5); } else { }
}



function movDn3() {
    gId("ScrollDn").onmouseup = movStop1; gId("ScrollDn").src = '/Image/ic_scroll_dn_blue.gif'; ETop = parseInt(gId("Text").style.top); EHeight = gId("Text").offsetHeight; maxUp = "-" + (EHeight - 340);
    if (ETop > maxUp) { EStyle = gId("Text").style; ETop -= 5; EStyle.top = ETop + "px"; activ = window.setTimeout('movDn3()', 5); } else { }
}
function movUp3() {
    gId("ScrollUp").onmouseup = movStop2; gId("ScrollUp").src = '/Image/ic_scroll_up_blue.gif'; ETop = parseInt(gId("Text").style.top); maxDown = 0;
    if (ETop < maxDown) { EStyle = gId("Text").style; ETop += 5; EStyle.top = ETop + "px"; activ = window.setTimeout('movUp3()', 5); } else { }
}



function movDn4() {
    gId("ScrollDn2").onmouseup = movStop1b; gId("ScrollDn2").src = '/Image/ic_scroll_dn_blue.gif'; ETop = parseInt(gId("TopAngebote2").style.top); EHeight = gId("TopAngebote2").offsetHeight; maxUp = "-" + (EHeight - 90);
    if (ETop > maxUp) { EStyle = gId("TopAngebote2").style; ETop -= 5; EStyle.top = ETop + "px"; activ = window.setTimeout('movDn4()', 5); } else { }
}
function movUp4() {
    gId("ScrollUp2").onmouseup = movStop2b; gId("ScrollUp2").src = '/Image/ic_scroll_up_blue.gif'; ETop = parseInt(gId("TopAngebote2").style.top); maxDown = 0;
    if (ETop < maxDown) { EStyle = gId("TopAngebote2").style; ETop += 5; EStyle.top = ETop + "px"; activ = window.setTimeout('movUp4()', 5); } else { }
}



function movDn5() {
    gId("ScrollDn").onmouseup = movStop1; gId("ScrollDn").src = '/Image/ic_scroll_dn_blue.gif'; ETop = parseInt(gId("Angebotsliste").style.top); EHeight = gId("Angebotsliste").offsetHeight; maxUp = "-" + (EHeight - 440);
    if (ETop > maxUp) { EStyle = gId("Angebotsliste").style; ETop -= 5; EStyle.top = ETop + "px"; activ = window.setTimeout('movDn5()', 5); } else { }
}
function movUp5() {
    gId("ScrollUp").onmouseup = movStop2; gId("ScrollUp").src = '/Image/ic_scroll_up_blue.gif'; ETop = parseInt(gId("Angebotsliste").style.top); maxDown = 0;
    if (ETop < maxDown) { EStyle = gId("Angebotsliste").style; ETop += 5; EStyle.top = ETop + "px"; activ = window.setTimeout('movUp5()', 5); } else { }
}


function movStop1() { gId("ScrollDn").src = '/Image/ic_scroll_dn_grey2.gif'; window.clearTimeout(activ); }
function movStop2() { gId("ScrollUp").src = '/Image/ic_scroll_up_grey2.gif'; window.clearTimeout(activ); }

function movStop1b() { gId("ScrollDn2").src = '/Image/ic_scroll_dn_grey2.gif'; window.clearTimeout(activ); }
function movStop2b() { gId("ScrollUp2").src = '/Image/ic_scroll_up_grey2.gif'; window.clearTimeout(activ); }




// CONTENT Scroll Gallery Thumbnails
activG = "";
function movRt() {
    gId("ScrollRt1").src = '/Image/ic_arrow_scGal_right_a.gif'; gId("ScrollRt1").onmouseup = movStopG1; ELt = parseInt(gId("Bilderliste").style.left); AnzLi = gId("Bilderliste").getElementsByTagName("li").length; maxLt = "-" + ((AnzLi * 150) - 440);
    if (ELt > maxLt) { EStyle = gId("Bilderliste").style; ELt -= 5; EStyle.left = ELt + "px"; activG1 = window.setTimeout('movRt()', 5); } else { }
}

function movLt() {
    gId("ScrollLt1").src = '/Image/ic_arrow_scGal_left_a.gif'; gId("ScrollLt1").onmouseup = movStopG2; ELt = parseInt(gId("Bilderliste").style.left); maxLt2 = 0;
    if (ELt < maxLt2) { EStyle = gId("Bilderliste").style; ELt += 5; EStyle.left = ELt + "px"; activG2 = window.setTimeout('movLt()', 5); } else { }
}

function movStopG1() { gId("ScrollLt1").src = '/Image/ic_arrow_scGal_left.gif'; window.clearTimeout(activG1); }
function movStopG2() { gId("ScrollRt1").src = '/Image/ic_arrow_scGal_right.gif'; window.clearTimeout(activG2); }





// SPECIALS scroll
var P1 = 0; var P2 = -90; var P3 = -180; var P4 = -270;

function scrollSP() { window.setTimeout('scrollSPPo1()', 6000); }

function scrollSPPo1() {
    var Ele = gId("TopAngebote").style; var x = -90;
    if (P1 > x) { P1 -= 5; Ele.top = P1 + "px"; window.setTimeout('scrollSPPo1()', 20); } else { P1 = 0; window.setTimeout('scrollSPPo2()', 6000); }
}

function scrollSPPo2() {
    var Ele = gId("TopAngebote").style; var x = -180;
    if (P2 > x) { P2 -= 5; Ele.top = P2 + "px"; window.setTimeout('scrollSPPo2()', 20); } else { P2 = -90; window.setTimeout('scrollSPPo3()', 6000); }
}

function scrollSPPo3() {
    var Ele = gId("TopAngebote").style; var x = -270;
    if (P3 > x) { P3 -= 5; Ele.top = P3 + "px"; window.setTimeout('scrollSPPo3()', 20); } else { P3 = -180; window.setTimeout('scrollSPPo4()', 6000); }
}

function scrollSPPo4() {
    var Ele = gId("TopAngebote").style; var x = 0;
    if (P4 < x) { P4 += 18; Ele.top = P4 + "px"; window.setTimeout('scrollSPPo4()', 20); } else { P4 = -270; scrollSP(); }
}






// SUBNav move in

function setEvSN() 
{
}

var stOutSN = 0;
var stInSN = 0;
var wOutSN = 0;
var wInSN = 0;
var PCat = "";

var FirstRunAfterLoad = true;

function mInSN() 
{
    gId("snIn").onclick = mOutSN;

    if (gId(MP1) != null) { var Ele = gId(MP1).style; gId("snIn").className = 'Reiseziele2'; PCat = "MP1" }
    if (gId(MP2) != null) { var Ele = gId(MP2).style; gId("snIn").className = 'Reiselust2'; PCat = "MP2" }
    if (gId(MP3) != null) { var Ele = gId(MP3).style; gId("snIn").className = 'Reisenews2'; PCat = "MP3" }
    if (gId(MP4) != null) { var Ele = gId(MP4).style; gId("snIn").className = 'Reisespecials2'; PCat = "MP4" }
    if (gId(MP5) != null) { var Ele = gId(MP5).style; gId("snIn").className = 'Reiseausarbeitung2'; PCat = "MP5" }
    if (gId(MP6) != null) { var Ele = gId(MP6).style; gId("snIn").className = 'Newsletter2'; PCat = "MP6" }

    gId("snIn").style.backgroundColor = '#4153a1';

    if (gId("open") != null || gId("Aktiv") != null) {

        if (FirstRunAfterLoad) 
        {
            FirstRunAfterLoad = false;
            stInSN = -176;
            stOutSN = -176;
            wInSN = 176;
            wOutSN = 176;
            Ele.left = "-176px";
            Ele.width = "176px";
        }
    }

    if (stInSN > -176) 
    {
        stInSN -= 16; Ele.left = stInSN + "px";
        wInSN += 16; Ele.width = wInSN + "px";
        stOutSN -= 16;
        wOutSN += 16;
        window.setTimeout('mInSN()', 20);
    }
    else 
    {
        if (gId("SSN1") != null) { gId("SSN1").style.display = "block"; }
        if (gId("SSN1a") != null) { var Ele3 = gId("SSN1a").style.display = "block"; }
    }

}


function mOutSN() 
{
    gId("snIn").onclick = mInSN;

    if (gId(MP1) != null) { var Ele = gId(MP1).style; var Ele2 = gId("snIn").className = 'Reiseziele'; }
    if (gId(MP2) != null) { var Ele = gId(MP2).style; var Ele2 = gId("snIn").className = 'Reiselust'; }
    if (gId(MP3) != null) { var Ele = gId(MP3).style; var Ele2 = gId("snIn").className = 'Reisenews'; }
    if (gId(MP4) != null) { var Ele = gId(MP4).style; var Ele2 = gId("snIn").className = 'Reisespecials'; }
    if (gId(MP5) != null) { var Ele = gId(MP5).style; var Ele2 = gId("snIn").className = 'Reiseausarbeitung'; }
    if (gId(MP6) != null) { var Ele = gId(MP6).style; var Ele2 = gId("snIn").className = 'Newsletter'; }

    gId("snIn").style.backgroundColor = '';

    if (gId("SSN1") != null) { gId("SSN1").style.display = "none"; }
    if (gId("SSN1a") != null) { gId("SSN1a").style.display = "none"; }

    if (stOutSN < 0) 
    {
        stOutSN += 16; Ele.left = stOutSN + "px";
        wOutSN -= 16; Ele.width = wOutSN + "px";
        stInSN += 16;
        wInSN -= 16;
        window.setTimeout('mOutSN()', 20);
    }
    else 
    {
        Ele2.backgroundColor = 'transparent';
    }
}


function hideSN() 
{
    var Ele3 = gId("SSN1").style;
    Ele3.display = "none";
    if (gId("SN-Reiseziele") != null) { var Ele = gId("SN-Reiseziele").style; gId("snIn").className = 'Reiseziele'; }
    if (gId("SN-Reiselust") != null) { var Ele = gId("SN-Reiselust").style; gId("snIn").className = 'Reiselust'; }
    if (gId("SN-Reisenews") != null) { var Ele = gId("SN-Reisenews").style; gId("snIn").className = 'Reisenews'; }
    if (gId("SN-Reisespecials") != null) { var Ele = gId("SN-Reisespecials").style; gId("snIn").className = 'Reisespecials'; }
    if (gId("SN-Reiseausarbeitung") != null) { var Ele = gId("SN-Reiseausarbeitung").style; gId("snIn").className = 'Reiseausarbeitung'; }
    if (gId("SN-Newsletter") != null) { var Ele = gId("SN-Newsletter").style; gId("snIn").className = 'Newsletter'; }

    alert("hideSN");

}

function showSN() 
{
    var Ele3 = gId("SSN1a").style;
    Ele3.display = "block";
    mInSN();
    stOutSN = -176;
    wOutSN = 176;
}

function showSN2() 
{
    var Ele3 = gId("SSN1a").style;
    Ele3.display = "none";
    mOutSN(); 
}






// SPECIALS Hover Effekt BG
function SpecHover() {
    var li = gId("TopAngebote").getElementsByTagName("li");
    for (var i = 0; i < li.length; i++) {
        li[i].onmouseover = li[i].onfocus = function() { this.style.backgroundColor = 'white'; }
        li[i].onmouseout = li[i].onblur = function() { this.style.backgroundColor = ''; };
    }
}

function SpecHover2() {
    var li = gId("TopAngebote2").getElementsByTagName("li");
    for (var i = 0; i < li.length; i++) {
        li[i].onmouseover = li[i].onfocus = function() { this.style.backgroundColor = 'white'; }
        li[i].onmouseout = li[i].onblur = function() { this.style.backgroundColor = ''; };
    }
}





// TOP NAVIGATION Hover Effekt BG
function TNavHover() 
{
    var li = gId("TopNavigation").getElementsByTagName("li");
    for (var i = 0; i < li.length; i++) 
    {
        li[i].onmouseover = li[i].onfocus = function() { this.style.backgroundColor = 'white'; }
        li[i].onmouseout = li[i].onblur = function() { this.style.backgroundColor = ''; };
    }
}



// TOP NAVIGATION switch SubNavigation / Tab Contentbox
function showSNav() { alert("In Progress --- SNav muss noch geschrieben werden."); }



// CONTENT - Tab Angebot merken	
var AMout = 200;
var AMin = 30;

function hiAM() { var Ele = gId("Angebot-Merken").style; Ele.width = "30px"; }

function miAMerken() {
    var Ele = gId("Angebot-Merken").style; var x = 200;
    if (AMin < x) { AMin += 5; Ele.width = AMin + "px"; window.setTimeout('miAMerken()', 20); } else { }
}

function moAMerken() {
    var Ele = gId("Angebot-Merken").style; var x = 30;
    if (AMout > x) { AMout -= 5; Ele.width = AMout + "px"; window.setTimeout('moAMerken()', 20); } else { hiAM(); }
}



// CONTENT - Gallery longdescription
function sIDsGallery() {
    gId("SLS").style.left = 0;
    gId("prev").onclick = prevIMG;
    gId("next").onclick = nextIMG;

    var GList1 = gId("SLS").getElementsByTagName("li");
    for (var i = 0; i < GList1.length; i++) {
        var cntID = i + 1;
        var Ele = GList1[i];
        var setID = document.createAttribute("id");
        setID.nodeValue = "I" + cntID;
        Ele.setAttributeNode(setID);
    }

    var GList2 = gId("GLinks2").getElementsByTagName("a");
    for (var i = 0; i < GList2.length; i++) {
        var cntID = i + 1;
        var Ele = GList2[i];
        var setID = document.createAttribute("id");
        setID.nodeValue = "IL" + cntID;
        Ele.setAttributeNode(setID);
    }

    // Set Imagetitle -> Title Array: "araSub" starts with Index "1"
    ImgTitle = araSub[1];
    ImgTitleLength = ImgTitle.length;
    if (ImgTitleLength > 40) {
        ImgTitleShort = ImgLabel.slice(0, 39);
        gId("Imagetitle").innerHTML = ImgTitleShort;
    } else {
        gId("Imagetitle").innerHTML = ImgTitle;
    }

}



function shIMG(getID) {
    // Gallery2 - Sample Pattern of getID = IL2 -> I2
    pos = parseInt(gId("SLS").style.left);

    var aliIMG = gId("GLinks2").getElementsByTagName("a");
    for (var i = 0; i < aliIMG.length; i++) { if (aliIMG[i].className != "") { var actID = aliIMG[i].id; } else { } }  //alert("a " + aID);

    gId(actID).className = "";
    gId(getID.id).className = "act";

    // ID 1 oder 2stellig  --- z.B.IL2 oder IL22
    var IDString = getID.id;
    var LString = IDString.length;

    if (LString == 4) {
        var imgLab = Number(getID.id.substring(2, 4));
        // var posFa  = ((imgLab)-1);
        var posFa = (Number(getID.id.substring(2, 4)) - 1);

    } else {
        var imgLab = Number(getID.id.substring(2, 4));
        // var posFa  = ((imgLab)-1);
        var posFa = (Number(getID.id.substring(2, 3)) - 1);

    }


    //var posFa = (Number(getID.id)-1);
    var pos2 = -(486 * Number(posFa));


    if (pos > pos2) {
        motoIMG1(pos2);
    } else {
        motoIMG2(pos2);
    }

    // Set Imagetitle -> Title Array: "araSub" starts with Index "1"
    ImgTitle = araSub[imgLab];
    ImgTitleLength = ImgTitle.length;

    if (ImgTitleLength > 40) {
        ImgTitleShort = ImgLabel.slice(0, 39);
        gId("Imagetitle").innerHTML = ImgTitleShort;
    } else {
        gId("Imagetitle").innerHTML = ImgTitle;
    }



}


function motoIMG1(pos2) {
    var Ele = gId("SLS").style; x = pos2;
    if (pos > x) { pos -= 54; Ele.left = pos + "px"; window.setTimeout('motoIMG1(x)', 50); } else { }
}

function motoIMG2(pos2) {
    var Ele = gId("SLS").style; x = pos2;
    if (pos < x) { pos += 54; Ele.left = pos + "px"; window.setTimeout('motoIMG2(x)', 50); } else { }
}


function prevIMG() {

    pos = parseInt(gId("SLS").style.left);

    gId("prev").onmousedown = function() { gId("prev").firstChild.src = '/Image/ic_arrow_g2_prev_a.gif'; };
    gId("prev").onmouseup = function() { gId("prev").firstChild.src = '/Image/ic_arrow_g2_prev.gif'; };

    var aliIMG = gId("GLinks2").getElementsByTagName("a");
    for (var i = 0; i < aliIMG.length; i++) { if (aliIMG[i].className != "") { var actID = aliIMG[i].id; } else { } }

    // ID 1 oder 2stellig
    var LString = actID.length;
    if (LString == 4) {
        var prev = Number(actID.substring(2, 4)) - 1;
    } else {
        var prev = Number(actID.substring(2, 3)) - 1;
    }


    var prevID = "IL" + prev;

    var prev2 = prev + (aliIMG.length) - 1;
    var prevID2 = "IL" + (prev2 + 1);

    gId(actID).className = "";


    if (prev < 1) {
        var posFa = prev2;
        gId(prevID2).className = "act";
    } else {
        var posFa = (Number(actID.substring(2, 3)) - 2);
        gId(prevID).className = "act";
    }

    var pos2 = -(486 * Number(posFa));


    if (pos > pos2) { motoIMG1(pos2); }
    else { ; motoIMG2(pos2); }

}



function nextIMG() {

    pos = parseInt(gId("SLS").style.left);

    gId("next").onmousedown = function() { gId("next").firstChild.src = '/Image/ic_arrow_g2_next_a.gif'; };
    gId("next").onmouseup = function() { gId("next").firstChild.src = '/Image/ic_arrow_g2_next.gif'; };

    var aliIMG = gId("GLinks2").getElementsByTagName("a");
    for (var i = 0; i < aliIMG.length; i++) { if (aliIMG[i].className != "") { var actID = aliIMG[i].id; } else { } }


    // ID 1 oder 2stellig
    var LString = actID.length;
    if (LString == 4) {
        var next = Number(actID.substring(2, 4)) + 1;
    } else {
        var next = Number(actID.substring(2, 3)) + 1;
    }

    //var next  = Number(actID.substring(2,3))+1;   
    var nextID = "IL" + next;
    var next2 = aliIMG.length;
    var nextID2 = "IL1";
    gId(actID).className = "";

    //alert("next " + next + " / next2 " + next2);

    if (next > next2) {

        var pos2 = 0;
        gId(nextID2).className = "act";
    }
    else {
        if (next < next2 || next == next2) {

            // ID 1 oder 2stellig
            if (LString == 4) {
                var posFa = Number(actID.substring(2, 4));
            } else {
                var posFa = Number(actID.substring(2, 3));
            }

            var pos2 = -(486 * Number(posFa));
            gId(nextID).className = "act";

        } else {

            var pos2 = -486;
            gId(nextID).className = "act";

        }
    }

    if (pos >= pos2) { motoIMG1(pos2); }
    else { motoIMG2(pos2); }
}




// FOOTER
function sFooID() {
    var sID = document.createAttribute("id"); sID.nodeValue = "bFoo";
    var Ele = gId("ctl00_divFooter").getElementsByTagName("h6")[0]; Ele.setAttributeNode(sID);
}
/*
function hdFoo (){
gId("Destinationen").style.display = "none";
gId("bFoo").onclick = shFoo;
}

function shFoo (){
gId("Destinationen").style.display = "block";
gId("bFoo").onclick = hdFoo;
}
*/
