<?
include ("config.inc.php3");
$ip=getenv("REMOTE_ADDR");
$timestamp=date("Y-m-d H:i:s");
$click=mysql_query("INSERT INTO clicks (dienst,time,ip,satzid) values ('homepage','$timestamp','$ip','')");

$partner1=mysql_query("SELECT firma,ort,url FROM kunden WHERE art=1");
$firma="";
while($partner=mysql_fetch_row($partner1)) {
   if($partner[2]!="") {
      $urlstart="<a href=\"http://$partner[2]\" target=\"partner\">";
      $urlend="<a>";
   } else {
      $urlstart="";
      $urlend="";
   }
   $firma.=$urlstart.$partner[0].", ".$partner[1]."<br><br>".$urlend;
}


?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>TELEINSTITUT - Medien f&uuml;r Menschen</TITLE>
<script language="JavaScript">
<!--
    var Dateien = "index.html?f_rm.htm";
    if (top.myframe + "" != "bwiest"){
        if(document.images)
            top.location.replace(Dateien);

        else
            top.location.href = Dateien ;
    }

// AB HIER: TEXT-SCROLL
//scroller width
var swidth=200

//scroller height
var sheight=30


//scroller's speed;
var sspeed=5

var wholemessage=''

//text: change to your own

var wholemessage='<? echo $firma; ?>'

function start(){
   if (document.all) return
   if (document.getElementById){
      document.getElementById("slider").style.visibility="show"
      ns6marquee(document.getElementById('slider'))
   } else if(document.layers){
      document.slider1.visibility="show"
      ns4marquee(document.slider1.document.slider2)
   }
}

function ns4marquee(whichlayer){
   ns4layer=eval(whichlayer)
   ns4layer.document.write(wholemessage)
   ns4layer.document.close()
   sizeup=ns4layer.document.height
   ns4layer.top-=sizeup
   ns4slide()
}

function ns4slide(){
    if (ns4layer.top>=sizeup*(-1)){
       ns4layer.top-=sspeed
       setTimeout("ns4slide()",100)
    }else {
       ns4layer.top=sheight
       ns4slide()
    }
}

function ns6marquee(whichdiv){
   ns6div=eval(whichdiv)
   ns6div.innerHTML=wholemessage
   ns6div.style.top=sheight
   sizeup=sheight
   ns6slide()
}

function ns6slide(){
   if (parseInt(ns6div.style.top)>=sizeup*(-1)){
      ns6div.style.top=parseInt(ns6div.style.top)-sspeed
      setTimeout("ns6slide()",100)
   } else {
      ns6div.style.top=sheight
      ns6slide()
   }
}
// -->
</script>
</HEAD>

<BODY BGCOLOR="#e7e7f7" TEXT="#000063" LINK="#003399" VLINK="#6699cc" ALINK="#0000ff" onLoad='start()'>

<table height=104% border=0 align=left cellspacing=0 cellpadding=0>
<tr>
 <td>

 <br>
 <b><font size="3"><a href="kunden.php3?kundenart=1">Unsere Partner:<br></font></b></a>
 <font size="1">
 <span style="borderWidth:0; borderColor:#e7e7f7; width:200; height:30;">
    <ilayer width=200 height=30 name="slider1" bgcolor="#e7e7f7" visibility=hide>
      <layer name="slider2" onMouseover="sspeed=0;" onMouseout="sspeed=5">
      </layer>
    </ilayer>
    <script language="JavaScript">
    if (document.all){
       document.writeln('<marquee id="ieslider" scrollAmount=2 width=200 height=30 direction=up style="border:1 solid #e7e7f7;background-color:#e7e7f7">')
       document.writeln(wholemessage)
       ieslider.onmouseover=new Function("ieslider.scrollAmount=0")
       ieslider.onmouseout=new Function("if (document.readyState=='complete') ieslider.scrollAmount=1")
       document.write('</marquee>')
    }

    if (document.getElementById&&!document.all){
       document.write('<div style="position:relative;overflow:hidden;width:200;height:30;clip:rect(0 302 102 0); background-color:#e7e7f7;border:1px solid #e7e7f7;" onMouseover="sspeed=0;" onMouseout="sspeed=5">')
       document.write('<div id="slider" style="position:relative;width:&{swidth};">')
       document.write('</div></div>')
    }
    </script>
 </span>
 </font>
 </td>
</tr>
<tr>
<td align=left valign=bottom>
<IMG SRC="pix/monitor.gif" WIDTH="149" HEIGHT="159" ALT="Medien f&uuml;r Menschen" vspace=0 hspace=0><br>
</td></tr></table>

&nbsp;<br>

<table cellspacing=0 cellpadding=0 border=0 width=500><tr>

<td width="32" align=left valign=bottom><IMG SRC="pix/table-left.gif" WIDTH="32" HEIGHT="23" vspace=0 hspace=0><br></td>
<td width="452" bgcolor="#ffff9c" valign=bottom><IMG SRC="pix/trans.gif" WIDTH="452" HEIGHT="2" vspace=0 hspace=0><br><FONT SIZE="4" FACE="Arial, Helvetica">TeleInstitut</FONT><br></td>
<td width="16" align=left valign=bottom><IMG SRC="pix/table-right.gif" WIDTH="16" HEIGHT="23" vspace=0 hspace=0><br></td>

</tr><tr>

<td colspan=3 valign=top><IMG SRC="pix/tableshadow.gif" WIDTH="500" HEIGHT="9" vspace=0 hspace=0><br></td>

</tr><tr>

<td></td>

<td colspan=2><FONT SIZE="2" FACE="Arial, Helvetica">
&nbsp;<br>
<?
# Infos aus der Datenbank
$aktuell=date("Y-m-d");

$text1=mysql_query("SELECT id,text FROM intro WHERE start<='$aktuell' AND ende>'$aktuell' ORDER BY start desc");
echo mysql_error();
#Anzeigen in Intro
echo ("<div style=\"text-align=justify; margin-right:30px\">");
while ($text=mysql_fetch_row($text1)) {
        echo $text[1];
}
echo ("</div>");
?>

</td></tr>
<tr>
<td width="32" align=left valign=bottom><IMG SRC="pix/table-left.gif" WIDTH="32" HEIGHT="23" vspace=0 hspace=0><br></td>
<td width="452" bgcolor="#ffff9c" valign=bottom><IMG SRC="pix/trans.gif" WIDTH="452" HEIGHT="2" vspace=0 hspace=0><br><FONT SIZE="4" FACE="Arial, Helvetica"><? echo date("d.m.Y") ." - "; ?>Aktuelles</FONT><br></td>
<td width="16" align=left valign=bottom><IMG SRC="pix/table-right.gif" WIDTH="16" HEIGHT="23" vspace=0 hspace=0><br></td>

</tr><tr>

<td colspan=3 valign=top><IMG SRC="pix/tableshadow.gif" WIDTH="500" HEIGHT="9" vspace=0 hspace=0><br></td>

</tr><tr>

<td></td>

<td colspan=2>
<?
echo ("<table size=100% cellspacing=0 cellpadding=3 border=0>");

# Infos aus der Datenbank
$aktuell=date("Y-m-d");

$info1=mysql_query("SELECT id,start,text,link,flag FROM aktuell WHERE start<='$aktuell' AND ende>'$aktuell' ORDER BY start desc");
echo mysql_error();
#Anzeigen in Aktuelles
while ($info=mysql_fetch_row($info1)) {
        $wichtig=substr($info[4],0,1);
        $neu=substr($info[4],1,1);
        $datum1=explode("-",$info[1]);
        $datum=$datum1[2] . "." . $datum1[1] . "." . $datum1[0];
        if ($wichtig==1) {$formatstart="<b>"; $formatend="</bold>";} else {$formatstart=""; $formatend="";}
        echo ("<tr valign=top><td>");
        if ($neu==1) {echo ("<img src=\"neu04.gif\">");}
        echo ("<FONT SIZE=\"2\" FACE=\"Arial, Helvetica\">$formatstart $datum $formatend</FONT>");
        echo ("</td>");

        echo ("<td>");
      if (!empty($info[2])) {
        echo ("<FONT SIZE=\"2\" FACE=\"Arial, Helvetica\">$formatstart $info[2]</FONT>
        <FONT SIZE=\"1\" FACE=\"Arial, Helvetica\"><br>
        <A HREF=\"javascript:var popup=window.open('aktuell_info.php3?info_id=$info[0]','AktuelleInfo','width=300, height=400, screenx=300, screeny=200, resizable=yes')\">
        Weitere Informationen..
        </a>&nbsp;&nbsp;&nbsp;
        ");
      }
      if (!empty($info[3])) {
        $internja=substr(($info[3]),0,2);

        if ($internja=="p:") {
          $internlink=substr(($info[3]),2);

          echo ("<a href=\"produktdetail.php3?id=$internlink&linkid=$info[0]\">Zur Webseite</a></font>");
        } else {
          echo ("<a href=\"jump.php3?count=$info[0]\" target=\"_blank\">Zur Webseite</a></font>");
        }
      }

        echo ("$formatend </td></tr>");
}
echo ("</table>");
?>


</td></tr></table>

</BODY></HTML>

