function frameTest(){
  if(top == self) {
    var home = "http://www.bike-transalp.de";
    var neueURL = home
    var appVer = navigator.appVersion;
    var NS = (navigator.appName == 'Netscape') && ((appVer.indexOf('3') != -1) || (appVer.indexOf('4') != -1));
    var MSIE = (appVer.indexOf('MSIE 4') != -1);
    if (NS || MSIE)
      location.replace(neueURL);
    else
      location.href = neueURL;
    }
}



// Popup
var default_width = 780;
var default_height = 540;
var rahmen_w = 0;
var rahmen_h = 30;


function showBild(a, name)
{
    if(!a.target) a.target = "BildFenster";

    // Das Fenster öffnen
    isLoad = false;
    if(!showFenster || showFenster.closed == true)
    showFenster = popUp("BTA08", a.target, default_width, default_height);

    showFenster.document.open('text/html');
    showFenster.document.write( getHTML(a.href, name) );
    showFenster.document.close();
    showFenster.focus();
    return false;
}

isLoad = false;

function fitWin(i, w)
{
    if(isLoad) return;
    isLoad = true;
    w.resizeTo(i.width, i.height);
    var width = w.innerWidth ? w.innerWidth : w.document.body.offsetWidth;
    var height = w.innerHeight ? w.innerHeight : w.document.body.offsetHeight;

    //alert('Fenster:' + width + ' x ' + height );

    w.resizeBy(i.width - width + rahmen_w, i.height - height + rahmen_h);
    w.focus();
}

function getHTML(src, title, bgcolor)
{
    var body = (window.opera || document.layers) ? false : true;

    if(!title) title = 'CRAFT BIKE TRANSALP powered by NISSAN';
    if(!bgcolor) bgcolor = '#fff';

    return '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">\n' +
    '<HTML>\n<HEAD>\n' +
    '<TITLE>' + title + '</TITLE>\n' +
    '<meta http-equiv="imagetoolbar" content="no">\n' +
    '<STYLE type="text/css">\n' +
    'body{\nposition:absolute;top:0;left:0;margin:0;padding:0;'+
    'text-align:center;background-color:' + bgcolor + ';\n}\n'+
    '</STYLE>\n' + '</HEAD>\n' +
    '<body ' + (body ? 'onload="opener.fitWin(document.images[0], window);"' : '') +
    '>\n' +
    '<a href="javascript:self.close();"><img src="' + src +
    '" border=0 ' + (!body ? 'onload="opener.fitWin(this, window);"' : '' ) + '>' +
    '\n</a></body>\n</html>\n';
}

function popUp(url, name, w, h)
{
    var tmp = new Array();
    tmp[tmp.length] = 'resizable=no';
    tmp[tmp.length] = 'scrollbars=no';
    if(w) tmp[tmp.length] = 'width=' + w;
    if(h) tmp[tmp.length] = 'height=' + h;

    return window.open(url, name, tmp.join(','));
}
/////////////////////////////////////////////////////////////////////
// Alle Fenster schliessen
function closeAll()
{
    if(showFenster && !showFenster.closed) showFenster.close();
}
var showFenster = null;

window.onunload = closeAll;


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}