function TargetOpen( Url, Target, Width, Height)
{
        ZOption="";

        if(Width != null && Width > 0)
        {
                if(ZOption.length > 0)
                        ZOption+=",";
                ZOption+="width=" + (Width+10) + ",innerWidth=" + Width;
        }
        if(Height != null && Height > 0)
        {
                if(ZOption.length > 0)
                        ZOption+=",";
                ZOption+="height=" + (Height+10) + ",innerHeight=" + Height;
        }
        if(ZOption.length > 0)
                ZOption+=",";
        ZOption+="resizable=yes";
        Fenster = window.open("",Target,ZOption);

        ZOption="<html><head><TITLE>Image - click to close</TITLE><meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'><meta http-equiv='imagetoolbar' content='no'></head><body bgcolor='#000000' onBlur='window.close()' onClick='window.close()' leftmargin='0' topmargin='0' rightmargin='0' bottommargin='0' marginwidth='0' marginheight='0'>";
        ZOption+="<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr valign='middle'><td align='center'>";
          ZOption+="<table width='"+Width+"' height='"+Height+"' border='0' cellspacing='0' cellpadding='0'><tr><td style='background-image : url("+Url+")'><IMG SRC='images/1x1.gif'";
//          ZOption+=Url;
          ZOption+=" WIDTH='"+Width+"' HEIGHT='"+Height+"' BORDER='0' alt='click to close'></td></tr></table>";
        ZOption+="</td></tr></table>";
        Fenster.document.open();
        Fenster.document.writeln(ZOption);
        Fenster.document.writeln('</body></html>');
        Fenster.document.close();
        Fenster.focus();

}

function FTPSearch(File)
{
        var link = "http://ftpsearch.lycos.com/cgi-bin/search?form=medium&doit=Search&type=Case+insensitive+multiple+substrings+search&hits=50&matches=&hitsprmatch=&limdom=&limpath=&f1=Count&f2=Mode&f3=Size&f4=Date&f5=Host&f6=Path&header=none&sort=date&trlen=20&query=";

        link += file;
//        alert(link);
        parent.location.href = link;
}

function NewWindow(url)
{
        window.open(url,"_blank","scrollbars=yes");
}

function AmazonDE(ASIN)
{
        var url = "http://www.amazon.de/exec/obidos/ASIN/" + ASIN + "/noodles05";
        NewWindow(url);
}

function AmazonUS(ASIN)
{
        var url = "http://www.amazon.com/exec/obidos/ASIN/" + ASIN + "/enricostraube";
        NewWindow(url);
}

function BookDE(ASIN)
{
        var book = '<a href="javascript:AmazonDE(';
        book += "'" + ASIN + "')";
        book += '" onmouseover="';
        book += "window.status=''; return true";
        book += '" onmouseout="';
        book += "window.status=''; return true";
        book += '" onfocus="blur()">';
        book += "<img src='http://images-eu.amazon.com/images/P/" + ASIN + ".03.MZZZZZZZ.jpg' alt='' border='0'>";
        book += "</a>";
        document.writeln(book);
}

function ChangeLanguage()
{
        if(parent.action.document == null)
        {
        F1 = document.URL;
        if(F1.match(/_de.html/))
            top.location.href = "index_en.html";
        else
            top.location.href = "index_de.html";
        return;
    }

        Datei = parent.action.document.URL;
        Menu  = parent.menu.document.URL;
        MenuU = parent.menu_unten.document.URL;

        if (Datei.match(/_de.html/))
        {
                parent.action.location = Datei.replace(/_de.html/,"_en.html");
    }
        else if (Datei.match(/_en.html/))
        {
        parent.action.location = Datei.replace(/_en.html/,"_de.html");
    }

        if (Menu.match(/_de.html/))
        {
                parent.menu.location = Menu.replace(/_de.html/,"_en.html");
    }
        else
        {
        parent.menu.location = Menu.replace(/_en.html/,"_de.html");
    }

        if (MenuU.match(/_de.html/))
        {
                parent.menu_unten.location = MenuU.replace(/_de.html/,"_en.html");
    }
        else
        {
        parent.menu_unten.location = MenuU.replace(/_en.html/,"_de.html");
    }
}


function checkFrames()
{
  if(top.frames.length <= 1)
  {
    Datei = document.URL;
    if(Datei.match(/menu_de.html/)||
       Datei.match(/menu_u_de.html/))
       top.location.href = "index_de.html";
    else if(Datei.match(/menu_en.html/)||
       Datei.match(/menu_u_en.html/))
       top.location.href = "index_en.html";
    else
       top.location.href = "index_js.html?" + Datei;
  }

}
