﻿try
{
    if (top.location.href == self.location.href)
    {
        top.location.replace('/isapi/timbersports-series/default.asp?contenturl=' + self.location.pathname);
    }
}
catch(e)
{
    
}

//Erzeugung von Zufallszaheln
//alert(parent.frames.length)
/*
if (parent.frames.length != 0) {
    function rand(range){
        return Math.ceil(Math.random() * 1000) % range;
    }
    var zufalls_zahl = rand(7);
    var img_top = parent.frames["header"].header_top_img[zufalls_zahl].src;
    var img_bot = parent.frames["header"].header_bot_img[zufalls_zahl].src;
    parent.frames["header"].document.getElementById("pageWrapper").style.background = '#f37a1f url('+ img_bot +') no-repeat right bottom';
    parent.frames["header"].document.getElementById("page").style.background = '#ffffff url('+ img_top +') no-repeat right top';
}
*/

var nw;
window.onunload = function() {
    if(nw && !nw.closed) {
        nw.close();
    }
}
function openWindow(uri,windowName,windowStyle)
{
    if (windowName == '') windowName = 'newWindow';
    if(nw && !nw.closed){
        nw.close();
    }
    nw=window.open(uri,windowName,windowStyle);
    nw.focus();
}

// popup oeffnen
var links = 10;
var oben = 10;
var nw;
function newwin(url,weite,hoehe){
     if(nw && !nw.closed){
        nw.close();
    }
    nw=window.open(url,"popup","width="+weite+",height="+hoehe+",left="+links+",top="+oben+",screenX="+links+",screenY="+oben+",scrollbars=no,resizable=yes,status=yes");
    nw.focus();
}
// popup beim Verlassen der Seite schliessen
window.onunload=closepopup;
function closepopup() {
    if(nw && !nw.closed){
        nw.close();
    }
}