    function popupMember(MemberID){
    var myWin = window.open ('/'+language+'/members/member_details.asp?id='+MemberID, 'MemberDetail', 'width=600,height=450,scrollbars=yes,status=no,resizable=no');
    myWin.focus();
}
    
    
    function popupWindow(myURL){
        var myWin = window.open (myURL, 'PopupWin', 'width=500,height=500,resizable=no,scrollbars=no,status=no');
        myWin.focus();
    }

    function popupAlert(myURL){
    var myWin = window.open (myURL, 'PopupWin', 'width=600,height=525,resizable=no,scrollbars=yes,status=no');
    myWin.focus();
}


    function popupExternalWindow(myURL){
        var myWin = window.open (myURL, 'NewWIndow', '');
        myWin.focus();
    }

    function ppWindow(myURL){
            var myWin = window.open (myURL+'?mode=popup', 'Popup', 'width=550,height=640,scrollbars=yes,status=no,resizable=yes');
            myWin.focus();
    }
					
    function tellafriend(){
        myURL = window.location.href;
        checkURL(myURL)   
        var myWin = window.open ('/' + language + '/tools/tellafriend.asp?URL=' + escape(getURL(myURL)) + '&title=' + escape(document.title), 'TellAFriend', 'width=550,height=400,scrollbars=no,status=no');
        myWin.focus();
    }


     function printPage(params){
        qsToAdd = window.location.href; 


        if(qsToAdd.indexOf('?')>0)
        {
            qsToAdd += "&mode=printer&" + params 

        }else{
            qsToAdd += "?mode=printer&" + params
        }
        

        var myWin = window.open (qsToAdd, 'PrintFriendly', 'width=800,height=500,scrollbars=yes,status=no');
        myWin.focus();
    } 
 

    function bookmarkme(title) {
            var ver = navigator.appName;
            var num = parseInt(navigator.appVersion);
            var agt=navigator.userAgent.toLowerCase();
            if ((ver == "Microsoft Internet Explorer")&&(num >= 4)&&(agt.indexOf("mac")==-1)) {
                window.external.AddFavorite(window.location,document.title);
            } else {
                window.alert("To add this page in your bookmark:\r Windows users must press the CTRL+D keys.\r Macintosh users must press the Command+D keys.");
            }
    }


    var pageURL;
    var pageQS;


function _qsElement(qsName, qsValue) {
    this.name   =   qsName;
    this.value  =   qsValue;
}

function checkURL(strURL){


    pageURL = '';
    pageQS = new Array();

    var oRegBS = new RegExp("\\\\", "g");

    strURL = strURL.replace(oRegBS.toString(), "/");

    var oRegHTTP = new RegExp("^http:\/\/", "i");

    
    if (oRegHTTP.test(strURL)) {
        if (strURL.indexOf("?")>0) {
            pageURL = strURL.substring(0, strURL.indexOf("?"));
        }else{
            pageURL = strURL;
        }
    }
      
    var strQueryString = strURL.substring(strURL.indexOf("?")+1, strURL.length);
    var myArrayQS = strQueryString.split("&")
    for(i=0;i<myArrayQS.length;i++){
        var myArgName   =   myArrayQS[i].toLowerCase().substring(0, myArrayQS[i].indexOf("=",0));
        var myArgValue  =   myArrayQS[i].substring(myArrayQS[i].indexOf("=",0)+1, myArrayQS[i].length);
        pageQS[i]       =   new _qsElement(myArgName, myArgValue);
    }
    
}

function getURL(strQS2Add){
    
    var myTempArrayQS;
    var arrToRemove = new Array();
    
    if (typeof(strQS2Add)!='undefined') {
        var myTempArrayQS = strQS2Add.split("&")
        for(i=0;i<myTempArrayQS.length;i++){
            var myArgName   =   myTempArrayQS[i].toLowerCase().substring(0, myTempArrayQS[i].indexOf("=",0));
            var myArgValue  =   myTempArrayQS[i].substring(myTempArrayQS[i].indexOf("=",0)+1, myTempArrayQS[i].length);
            arrToRemove[i]  =   new _qsElement(myArgName, myArgValue);
        }
    }

    var curURL = pageURL;
    var separator = "?";
    
    if (pageQS.length > 0) {
        for (i=0;i<pageQS.length;i++) {
            if (typeof(strQS2Add) != 'undefined') {

                isInRestriction = false;
                for (var j=0;j<arrToRemove.length; j++) {
                    
                    if (arrToRemove[j].name.toLowerCase() == pageQS[i].name.toLowerCase()) {
                        isInRestriction = true;
                        break;
                    }
                }

                if (isInRestriction != true && pageQS[i].name!='') {
                    curURL = curURL + separator + pageQS[i].name + '=' + pageQS[i].value;
                    separator = "&";
                }
            }
        }
    }
    
    if (typeof(strQS2Add)!='undefined') {
        for (var j=0;j<arrToRemove.length; j++) {
            curURL = curURL + separator + arrToRemove[j].name + '=' + arrToRemove[j].value;
            separator = "&";
        }
    }

    return curURL;
}

    function popupLogin(targetObjectID){
        
        var strURL;
        if (targetObjectID==null) {
            strURL = '/' + language+'/security/login.popup.asp?redirect='+currentURL;
        } else {
            strURL = '/' + language+'/security/login.popup.asp?redirect='+targetObjectID;
        }
        var myWin = window.open (strURL, 'Popup', 'width=400,height=320,scrollbars=no,status=no');
        myWin.focus();
    }

    function popupLogout(redirectURL){
        var myWin = window.open ('/' + language+'/security/login.popup.asp?action=LOGOUT', 'Popup', 'width=300,height=200,scrollbars=no,status=no');
        myWin.focus();
    }

    function cancelReservation() {
        var myAnswer = window.confirm('Are you sure that you want to cancel your registration?');
        if (myAnswer == true) {
            window.document.myForm.action.value = 'cancel_reservation';
            window.document.myForm.submit();
        }
    }

    function showTab (activeTab){
        
        var oTabs = document.getElementsByName('tab');
        for (i=0;i<oTabs.length;i++) {
            if ((i) == activeTab -2) {
                oTabs[i].style.display = '';
            } else {
                oTabs[i].style.display = 'none';
            }
        }
        var oTabs = document.getElementsByName('example');
        for (i=0;i<oTabs.length;i++) {
            if ((i) == activeTab -2) {
                oTabs[i].style.display = '';
            } else {
                oTabs[i].style.display = 'none';
            }
        }

    }



    function showTabsPrintMode()
    {
   
       var oTabs = document.getElementsByName('tab');
       for (i=0;i<oTabs.length;i++)
       {
           oTabs[i].style.display = '';
       }
       
       var oTabs = document.getElementsByName('example');
       for (i=0;i<oTabs.length;i++)
       {
           oTabs[i].style.display = '';
       }


       var buttoncart = document.getElementsByName("buttoncart")

       for (i=0;i<buttoncart.length-1;i++)
       {
         buttoncart[i].style.display = 'none';
       }

       var hrefs = window.document.getElementsByTagName("a")
       for (i=0;i<hrefs.length;i++)
       {
            hrefs[i].style.display = 'none';
       }

       var inputs = window.document.getElementsByTagName("input")
       for (i=0;i<inputs.length;i++)
       {
           inputs[i].style.display = 'none';
       }

    }


    function desactivateIBLogo() {
        window.document.getElementById('iblogo').src = '/images/logo_infobahn_sa_off.gif';
    }

    function activateIBLogo() {
    window.document.getElementById('iblogo').src = '/images/logo_infobahn_sa.gif';
    }

    var flashVersion = 0;
    getFlashVersion();
    
    
    function getFlashVersion() {
        
    	var agent = navigator.userAgent.toLowerCase(); 
    	
       // NS3 needs flashVersion to be a local variable
       if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
          flashVersion = 0;
       }
       
    	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
    	if (navigator.plugins != null && navigator.plugins.length > 0) {
    		var flashPlugin = navigator.plugins['Shockwave Flash'];
    		if (typeof flashPlugin == 'object') { 
    			if (flashPlugin.description.indexOf('10.') != -1) flashVersion = 10;
                else if (flashPlugin.description.indexOf('9.') != -1) flashVersion = 9;
                else if (flashPlugin.description.indexOf('8.') != -1) flashVersion = 8;
                else if (flashPlugin.description.indexOf('7.') != -1) flashVersion = 7;
    			else if (flashPlugin.description.indexOf('6.') != -1) flashVersion = 6;
    			else if (flashPlugin.description.indexOf('5.') != -1) flashVersion = 5;
    			else if (flashPlugin.description.indexOf('4.') != -1) flashVersion = 4;
    			else if (flashPlugin.description.indexOf('3.') != -1) flashVersion = 3;
    		}
    	}
    
    	// IE4+ Win32:  attempt to create an ActiveX object using VBScript
    	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
    	   document.write('<scr' + 'ipt language="VBScript"\> \n');
    		document.write('on error resume next \n');
    		document.write('dim obFlash \n');
    		document.write('set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.10") \n');
    		document.write('if IsObject(obFlash) then \n');
    		document.write('flashVersion = 10 \n');
    		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.9") end if \n');
    		document.write('if flashVersion < 10 and IsObject(obFlash) then \n');
    		document.write('flashVersion = 9 \n');
    		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.8") end if \n');
    		document.write('if flashVersion < 9 and IsObject(obFlash) then \n');
    		document.write('flashVersion = 8 \n');
    		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.7") end if \n');
    		document.write('if flashVersion < 6 and IsObject(obFlash) then \n');
    		document.write('flashVersion = 7 \n');
    		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.6") end if \n');
    		document.write('if flashVersion < 7 and IsObject(obFlash) then \n');
    		document.write('flashVersion = 6 \n');
    		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.5") end if \n');
    		document.write('if flashVersion < 6 and IsObject(obFlash) then \n');
    		document.write('flashVersion = 5 \n');
    		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.4") end if \n');
    		document.write('if flashVersion < 5 and IsObject(obFlash) then \n');
    		document.write('flashVersion = 4 \n');
    		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.3") end if \n');
    		document.write('if flashVersion < 4 and IsObject(obFlash) then \n');
    		document.write('flashVersion = 3 \n');
    		document.write('end if');
    		document.write('</scr' + 'ipt\> \n');
      }
    		
    	// WebTV 2.5 supports flash 3
    	else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;
    
    	// older WebTV supports flash 2
    	else if (agent.indexOf("webtv") != -1) flashVersion = 2;
    
    	// Can't detect in all other cases
    	else {
    		flashVersion = flashVersion_DONTKNOW;
    	}
    
    	return flashVersion;
    }
    
    function showFlashAnim (swfFileName, sourceFile){
        //alert('/images/flash/'+swfFileName+'?source=/'+sourceFile+'&amp;pxy=' + jsPXY);
        //flashVersion = 2;

        if (flashVersion==6 || flashVersion == 7) {
            document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="400" HEIGHT="18" id="" ALIGN="">');
            document.write ('<PARAM NAME="movie" VALUE="/images/flash/'+swfFileName+'?source=/'+sourceFile+'&amp;pxy=' + jsPXY + '"/>');
            document.write ('<PARAM NAME="quality" VALUE="high"/>');
            document.write ('<PARAM NAME="bgcolor" VALUE="#ffffff"/>');
            document.write ('<EMBED src="/images/flash/'+swfFileName+'?source=/'+sourceFile+'&amp;pxy=' + jsPXY + '" quality="high" bgcolor="#ffffff" WIDTH="400" HEIGHT="18" NAME="" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
            document.write ('</OBJECT>');
    
        }else{
            document.write ('no flash' + flashVersion);
        }
    }
    


    function setFlashAnim (swfFileName, destURL){
        //alert('/images/flash/'+swfFileName+'?source=/'+sourceFile+'&amp;pxy=' + jsPXY);
        //alert('hello');
        //alert(flashVersion);
        var strOut = '';
        if (flashVersion>= 6) {
            strOut = '<div style="position:absolute;top:0;left:0;z-index:10" onmouseover="this.style.cursor=\'hand\'">'; 
            strOut +=  '<OBJECT  classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="136" HEIGHT="99" id="" ALIGN="">';
            strOut += '<PARAM NAME="movie" VALUE="' + swfFileName +'"/>';
            strOut += '<PARAM NAME="quality" VALUE="high"/>';
            strOut += '<PARAM NAME="bgcolor" VALUE="#ffffff"/>';
            strOut += '<PARAM NAME="WMODE" VALUE="transparent"/>'
            strOut += '<embed src="'+swfFileName+ '" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="136" height="99"></embed>';
            //strOut += '<EMBED src="/images/flash/'+swfFileName+ '" quality="high" bgcolor="#ffffff" WIDTH="136" HEIGHT="99" NAME="" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>';
            strOut += '</OBJECT>';
            strOut += '</div>'
            strOut += '<div style="position:absolute;top:0;left:0;z-index:100;"onmouseover="this.style.cursor=\'hand\'"'  
            if (destURL.indexOf('/')== 1) {
                alert('go' +   destURL);
                strOut += 'onclick="window.open(\''+destURL+'\')">'
            }else{
                //alert(window.top.location.href);
                strOut += 'onclick="top.location.href=\''+destURL+'\'">'
            }
            strOut += '<img src="/images/transparent.gif" width="136" height="99"/></div>';
                
                //alert(strOut)
            //var myFrame = window.document.frames('myFrame')
            //myFrame.open();
            document.write (strOut);
            //myFrame.close();
            //alert(window.document.getElementById('myFrame').innerHTML);
        }else{
            document.write ('<div style="font-size:11px;color:#000000;font-weight:normal">&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_new"><img border="0" src="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif"/></a></div>');
            //document.write 'no flash' + flashVersion;
        }
    }




