// BrowserCheck Object
function BrowserCheck() {
        var b = navigator.appName
        if (b=="Netscape") this.b = "ns"
        else if (b=="Microsoft Internet Explorer") this.b = "ie"
        else this.b = b
        this.version = navigator.appVersion
        this.v = parseInt(this.version)
        this.ns = (this.b=="ns" && this.v>=4)
        this.ns4 = (this.b=="ns" && this.v==4)
        this.ns5 = (this.b=="ns" && this.v==5)
        this.ie = (this.b=="ie" && this.v>=4)
        this.ie4 = (this.version.indexOf('MSIE 4')>0)
        this.ie5 = (this.version.indexOf('MSIE 5')>0)
        this.mac = (navigator.userAgent.indexOf("Mac")>0)
        this.min = (this.ns||this.ie)
        this.aol = (this.version.indexOf('AOL')>0)
}
is = new BrowserCheck();

function setStyle(pfad) {
        //alert("function found!  mac:"+is.mac);
        //pfad = (pfad=="../")?pfad:"";
        if (is.ie) {
                sfile  = pfad+"site_ie.css";
        } else {
                sfile  = pfad+"site.css";
        }
        styletag  = "<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\""+sfile+"\">";
        document.write(styletag);
}

var tipFlag = 0
function tipImages() {
        if (tipFlag == 0) {
                tipFlag = 1;
                setTimeout('tipImages()',50);
        }
        buff=new Array()
        for (i=0;i<document.images.length;i++) {
                buff[i] =  document.images[i].src;
                document.images[i].src = "imgs/dot.gif";
        }
        for (i=0;i<document.images.length;i++) {
                document.images[i].src = buff[i];
        }
}

function noFrame() {
        if(top.frames.length>=6){
                return false;
        } else {
                return true;
        }
}
var myMenu = 0

function toplogo(pfad) {
        fname = location.href;
        langID = fname.substr(fname.lastIndexOf("_")+1,1);
        if(noFrame()){
                lang = (langID=="e")? langID: "d";
                //alert(lang)
                mainfile = pfad+"frameset_"+lang+".html";
                tag = "<a href='"+mainfile+"' target='_top'><img src='"+pfad+"pics/global/logo03.gif' alt='' width='88' height='26' hspace='0' vspace='14' border='0'><\/a><br>";
                return tag;
        } else {
                fname = fname.slice(fname.lastIndexOf("/")+1,fname.lastIndexOf("_"));
                fname = (langID=="x")? "!": fname;
                //alert(fname)
                top.setCurr(myMenu,fname);
                return "";
        }
}

var myParent = "main"

function popwinlogo(pfad) {
        checker = window.name+"."
        if(checker=="." ||  checker.indexOf("popwindow")<0){
                fname = location.href
                lang =  (fname.substr(fname.lastIndexOf("_")+1,1) != "e")? "d": "e";
                mainfile = pfad+"frameset_"+lang+".html";
                mainfile += (myMenu>0)? "#"+myMenu+","+myParent : "";
                tag = "<a href='"+mainfile+"' target='_top'><img src='"+pfad+"pics/global/logo03.gif' alt='' width='88' height='26' hspace='0' vspace='14' border='0'><\/a><br>";
                return tag;
        } else {
                return "";
        }
}

function openPop(url,width,height,scroll){
        var name = "popwindow"+g_winID()
var mainframe = self
        vVal = screen.availHeight - height - 160;
        hVal = 80;
        if (vVal > 470) {vVal = 460};
        myWin = window.open(url, name,"width=" + width + ",height=" + height + ",resizable=yes,scrollbars="+scroll+",toolbar=no,status=yes,scrolling=yes,screenX=" + hVal + ",screenY=" + vVal);
        myWin.opener = self
        myWin.focus();
}


var curImgText = "667Bild"

function openImgPop(url,imgtext,width,height,lang,pfad){
        var name = "popwindow"+g_winID();
        wheight=height+30;
        thePath = "pics/" + url;
        myWin = window.open(pfad+"imgpop.html#"+thePath, name,"width=" + width + ",height=" + wheight + ",resizable=no,scrollbars=no,toolbar=no,status=yes,scrolling=no");
        myWin.props = new Array(imgtext,lang,width,height);
        myWin.focus();
}

function g_winID() {
    jetzt = new Date();
    return jetzt.getTime();
}


function mailadr(who){
        adr = "<a href='mailto:"+who+"Qmostwantedmen.de'>"+who+"<\/a>";
        adr = adr.replace(/Q/,"@");
        adr = adr.replace(/Q/,"@");
        return adr;
}
