t=top
if (t == self) {p=self}
else {
 p=parent
 if (self.name=='main') {
  t.mainURL = location.href
 }
}
d=document

//dolUrl = 'http://www.dol2day.com/'
dolUrl = '/'
dolLogo = 'img/dol2day_logo.gif'

nix =-47110815
strCR=String.fromCharCode(13);
strAllowedChars = ' !#$%&()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~???????'
toggle = 0

img = new Array()
partei_namen = new Array()

// parteien-array umrechnen
partei_namen[1] = "Das Volk"
for(j in parteien)
    partei_namen[ parteien[j][1] ] = parteien[j][2]



/** Component Functions **/

// dol2day - Header
// p=user_pid / m=mails / o=online_users / l=login-link 
// h=history / ti=tutor_pid / to=tutor_online / tu=tutor_url

function dolHeader(p, m, o, l, h, ti, to, tu) {
t=
'<div id="header">\n'+
'<table cellspacing="0" cellpadding="0" width="770" border="0">'+

'<colgroup>'+
'<col width="293" />'+
'<col width="1" />'+
'<col width="476" />'+
'</colroup>'+

'<tr>'+
'   <td rowspan="7" valign="top" id="logo">\n'+
'       <a href="' +dolUrl+ 'index.php3?position=100"><img height="85" alt="Home" src="' +dolUrl + dolLogo+'" width="293" border="0" name="dol2day_logo" /></a>\n'+
'   </td>\n'+
'   <td width="1" rowspan="7">' +space(1,1)+ '</td>'+
//' <td valign="top">'+

//'<table cellspacing="0" cellpadding="0" border="0" height="83" width="476">'+
//'<tr>'+

'   <td id="row1" class="row">\n'+
//'     <a href="javascript:open_std_window(\'' +dolUrl+ 'user_direkt.php\',600,400);">Mitglieder</a> | '+
//'     <a href="javascript:open_help(\'/help/\',\'\');">Hilfe</a> | '+
//'     <a href="' +dolUrl+ 'index.php3?position=1100">Suche</a> | '+
'       <a href="' +dolUrl+ 'index.php3?position=24000">Team</a> | '+
'       <a href="' +dolUrl+ 'index.php3?position=500">Kontakt</a> | '+
//'		    <a href="' +dolUrl+ 'index.php3?position=1410">Partner</a> | '+
'       <a href="' +dolUrl+ 'index.php3?position=1400">Impressum</a>'+
'   </td>'+
'</tr>\n'+

'<tr><td width="1">' +space(476,1)+ '</td></tr>'+

'<tr>'+
'<td id="row2" class="row">\n'

if (p > 0)
    t+=
'   <a href="' +dolUrl+ 'index.php3?position=1700&pid=' +p+ '">Mein Profil</a> |\n'+
'   <a href="javascript:open_std_window(\'' +dolUrl+ 'nachricht_direkt.php\',530,400);">Interne Mail</a> |\n'+
//'   <a href="' +dolUrl+ 'index.php3?position=900">Favoriten</a> |\n'+
'   <a href="' +dolUrl+ 'index.php3?logout=1">Logout</a> |\n'

else
    t+=
'   <a href="' +dolUrl+ 'index.php3?position=420&pid=' +p+ '"><b>Mitglied werden!</b></a> |\n'+
'   <a href="' +dolUrl+ 'index.php3?position=400' +l+ '">Login</a> |\n'

t+=
'   <a onClick="window.open(\'\',\'user_online\',\'width=400,height=500,resizable=yes,scrollbars=yes,status=no\')" href="' +dolUrl+ 'user_online.php3" target="user_online">Online</a>:&nbsp;<b>' +o+ '</b>\n'+

'   </td>'+
'</tr>\n'+

'<tr><td width="1">' +space(1,1)+ '</td></tr>'+

'<tr>'+
'   <td id="row3" class="row">\n'+

'       <table border="0" cellspacing="0" cellpadding="0" align="right">\n'+
'       <form name="suche" action="' +dolUrl+ 'index.php3" method="post">\n'+
'       <input type="hidden" name="position" value="1100" />\n'+
'       <input type="hidden" name="send" value="1" />\n'+

'       <tr>\n'+
'           <td>\n'+
'               <input type="text" name="suchstr" style="width:90px; border:1px solid;" maxlength="255" value="Suche in..." onFocus="this.value=\'\'" accesskey="s" />'+
'           </td>\n'+
'           <td>&nbsp;</td>'+
'           <td><select name="suchmethode">\n'+
'               <option value="umfragen" selected>Umfragen</option>\n'+
'               <option value="diskussionen">Diskussionen</option>\n'+
'               <option value="mitglieder">Mitglieder</option>\n'+
'               <option value="ini">Initiativen</option>\n'+
'               <option value="mitglieder_history">alte Nicks</option>\n'+
'           </select></td>\n'+
'           <td>&nbsp;</td>'+
'           <td><select name="suchverknuepfung">\n'+
'               <option value="AND">Und</option>\n'+
'               <option value="OR">Oder</option>\n'+
'           </select></td>\n'+
'           <td>&nbsp;</td>'+
'           <td><input type="checkbox" name="similar" value="1" checked="checked" title="&auml;hnliche Suche?" /></td>\n'+
'           <td>&nbsp;</td>'+
'           <td><input type="submit" value="Ok" /></td>\n'+

'       </tr>\n'+
'       </form>\n'+
'       </table>'+

'   </td>'+
'</tr>\n'+

'<tr><td width="1">' +space(1,1)+ '</td></tr>'+

'<tr>'+
'   <td id="row4" class="row" valign="middle">\n'+

'       <table  cellspacing="0" cellpadding="0" border="0" align="right" style="height:17px;">\n'+
'       <tr align="center" valign="middle">\n'+

'           <td>'+
'               <a class="box" onClick="window.open(\'' +dolUrl+ 'fragen_liste_neu.php3\',\'fragen_liste\',\'width=810,height=600,resizable=yes,scrollbars=yes,status=no\')" href="#">Umfragen</a>'+
'               <div class="dpullmenue"></div>'+
'           </td>'+
'           <td width="5">' +space(1,1)+ '</td>'


if(!document.layers && document.getElementsByTagName('body')[0].attributes) 
{ 
    t+=
'           <td>'+
'               <a onmouseover="ShowNavi(1);" href="#" onClick="return false;" id="pulldown1" class="box">Themengebiete</a>'+
'               <div id="dpullmenue1" class="dpullmenue"></div>'+
'           </td>'+

'           <td width="35">' +space(1,1)+ '</td>'+

'           <td>'+
'               <a onmouseover="ShowNavi(3);" href="#" onClick="return false;" id="pulldown3" class="box">Institutionen</a>'+
'               <div id="dpullmenue3" class="dpullmenue"></div>'+
'           </td>'+

'           <td width="5">' +space(1,1)+ '</td>'+

'           <td>'+
'               <a onmouseover="ShowNavi(2);" href="#" onClick="return false;" id="pulldown2" class="box">Parteien</a>'+
'               <div id="dpullmenue2" class="dpullmenue"></div>'+
'           </td>'

}
else
{
    t+=
'           <form name="kat_form" action="' +dolUrl+ 'index.php3" method="post">\n'+
'           <input type="hidden" value="200" name="position" />\n'+

'           <td><select onChange="javascript:open_kategorien(this.form);" size="1" name="kategorie_id">\n'+
'                   <option value="0" selected>- Themengebiete -</option>\n'

    for(j in themengebiete) 
        t += '<option value="' +themengebiete[j][1]+ '">' +themengebiete[j][0]+ '</option>\n'

    t+=
'               </select></td>\n'+
'           </form>\n'+

'           <td width="35">' +space(1,1)+ '</td>'+


'           <form name="select_institutionen" action="' +dolUrl+ 'index.php3" method="post">\n'+
'           <td><select name="institution_id" onChange="javascript:open_institution(this.form);">\n'+
'                   <option value="0" selected>- Institutionen -</option>\n'

    for(j in institutionen) 
    {
        t += '<option value="' +institutionen[j][1]+ '">'
        t += ( (institutionen[j][1] != 0) ? '&nbsp;&nbsp; ' +institutionen[j][0] : '&gt;&gt; ' +institutionen[j][0] )
        t += '</option>\n'
    }
    
    t+=
'               </select></td>\n'+
'           </form>\n'+

'           <td width="10">' +space(1,1)+ '</td>'+

'           <form name="select_parteien" action="' +dolUrl+ 'index.php3" method="post">\n'+
'           <input type="hidden" value="1900" name="position" />\n'+

'           <td><select onChange="javascript:open_parteien(this.form);" size="1" name="partei_id">\n'+
'                   <option value="0" selected>- Parteien -</option>\n'

    for(j in parteien) 
        t += '<option value="' +parteien[j][1]+ '">' +parteien[j][0]+ '</option>\n'


    t+=
'               </select></td>\n'+
'           </form>\n'
}


t+=
'           <td width="35">' +space(1,1)+ '</td>'+
'           <td>'+
'               <a class="box" href="/helpdesk/" target=_blank>DoLex</a>'+
'               <div class="dpullmenue"></div>'+
'           </td>'+
'           <td width="10">' +space(1,1)+ '</td>'+
'           <td>'+
'               <a class="box" onClick="open_help(\'/help/\',\'\');" href="#">Hilfe</a>'+
'               <div class="dpullmenue"></div>'+
'           </td>'+

'       </tr></table>'+

//' </td>'+
//'</tr>\n'+

//'</table>'+


'   </td>'+
'</tr>'+

'<tr><td width="1" colspan="3">' +space(1,1)+ '</td></tr>'+

'<tr>'+
'   <td colspan="3" id="row5">\n'+
'       <table width="100%" cellspacing="0" cellpadding="0" border="0">'+
'       <tr>'+
'           <td width="520" class="fontcolor11">' +h+ '</td>'

if (ti > 0)
{
    t+=
    '<td class="font10" align="right" width="100">'+
    '<a href="javascript:open_std_window(\'nachricht_tutor.php?position=http://www.dol2day.com?' +tu+ '\',600,400);">Tutor fragen</a>'+
    '&nbsp;<img src="img/ini/inidetails/btn_'+
    ( (to == 1) ? 'green' : 'red' ) +
    '.gif" width="9" height="10" border="0" alt="Tutor '+
    ( (to == 1) ? 'online' : 'offline' ) +
    '" /></td>'
}
else
{
    t+=
    '<td width="100"></td>'
}

t+=
'           <td width="70" align="right">'

if (p > 0)
    t+=
    '<a href="javascript:open_std_window(\'' +dolUrl+ 'mailbox/mailbox.php\',800,600);"><img border="0" height="14" width="64" hspace="3" src="img/mail_'+
    ( (m > 0) ? 'on.gif" alt="Neue Mail" title="Neue Mail"' : 'off.gif" alt="Mailbox" title="Mailbox"' ) +
    ' /></a>'


t+=
'           </td>'+
'           <td align="right" width="70"><img border="0" height="14" width="64" hspace="3" src="' +dolUrl+ 'img/'+
( (p > 0) ? 'online.gif" alt="Du bist ONLINE!" title="Du bist ONLINE!"' : 'offline.gif" alt="Du bist OFFLINE!" title="Du bist OFFLINE!"' )+
' /></td>'+

'       </tr>'+
'       </table>'+
'   </td>'+
'</tr>'+

'<tr><td width="1">' +space(1,1)+ '</td></tr>'+

'<tr><td id="row6" colspan="3"></td></tr>\n'+
'</table>\n'+

'</div>'

document.write(t)
}


// Hilfsfunktionen f?r die Pulldown-Men?s

var NavHide= new Array()
var NavOn = new Array()
var NavPos = new Array()

function ShowNavi(p)
{
    NaviInhalt(p)
    NaviPos(p)
    NaviShowHide(p,0)
    NaviShowHide(p,1)
    NavOn[p]=1
}

function NaviInhalt(p)
{
    var NavInhalt
    
    if (p == 1)
    {
        // themengebiete
        NavInhalt = '<table id="dpulltable' +p+ '" cellpadding="0" cellspacing="0" border="0">'

        for(j in themengebiete) 
            NavInhalt += '<tr><td align="left"' +( (j!=themengebiete.length-1) ? ' class="border"' : '')+ '><a href="' +dolUrl+ 'index.php3?position=200&kategorie_id=' +themengebiete[j][1]+ '" class="pull">' +themengebiete[j][0]+ '</a></td></tr>\n'
    }

    else if (p == 2)
    {
        // parteien
        NavInhalt = '<table id="dpulltable' +p+ '" cellpadding="0" cellspacing="0" border="0">'

        for(j in parteien) 
            NavInhalt += '<tr><td align="left"' +( (j!=parteien.length-1) ? ' class="border"' : '')+ '>' +parteilogolink( parteien[j][1] )+ '&nbsp;<a href="' +dolUrl+ 'index.php3?position=1900&partei_id=' +parteien[j][1]+ '" class="pull">' +parteien[j][0]+ '</a></td></tr>\n'
    }
    
    else if (p == 3)
    {
        // institutionen
        NavInhalt = '<table id="dpulltable' +p+ '" cellpadding="0" cellspacing="0" border="0">'
        
        for(j in institutionen) 
        {
            NavInhalt += '<tr><td align="left"' +( (j!=institutionen.length-1) ? ' class="border"' : '')+ '>'
            NavInhalt += ( (institutionen[j][1] != 0) ? '&nbsp;&nbsp;<a href="' +institutionen[j][1]+ '" class="pull">' +institutionen[j][0]+ '</a>' : '<b>' +institutionen[j][0]+ '</b>' )
            NavInhalt += '</td></tr>\n'         
        }
    }
        
    NavInhalt += '<\/table>'
    document.getElementById('dpullmenue' +p ).innerHTML=NavInhalt
}

function NaviPos(p)
{
    var PosX, PosY
    var NS6 = (navigator.appName.indexOf("Netscape") != -1 && document.getElementById && navigator.userAgent.indexOf("rv:0")!=-1) ? 1 : 0

    if (document.getElementById && !NS6) {
        PosX = getLeft(document.getElementById('pulldown' +p ))
        PosY = getTop(document.getElementById('pulldown' +p ))
    }
        
    if (NS6) {
        PosX = document.getElementById('pulldown' +p ).offsetLeft
        PosY = document.getElementById('pulldown' +p ).offsetTop
    }
    
    if (!NavPos[p])
    {
        PosX = PosX + document.getElementById('pulldown' +p ).offsetWidth - document.getElementById('dpullmenue' +p ).offsetWidth
        PosY = PosY + document.getElementById('pulldown' +p ).offsetHeight
    
        document.getElementById('dpullmenue' +p ).style.left = PosX + "px"
        document.getElementById('dpullmenue' +p ).style.top = PosY + "px"
        NavPos[p] = 1
    }
}

function NaviShowHide(p,status) 
{
    if(status==0)
        document.getElementById('dpullmenue' +p ).style.visibility = 'hidden'
    else
        document.getElementById('dpullmenue' +p ).style.visibility = 'visible'
            
    if (NavHide[p]) clearTimeout(NavHide[p])
    NavHide[p]=setTimeout("aus(" +p+ ")",100)
}
        
function aus(p) {
    if(!NavOn[p]) NaviShowHide(p,0)
}

document.onmouseover=OnDolNavi;
        
function OnDolNavi(el) 
{
    if (document.all) 
        var thisEl = event.srcElement;

    if (document.getElementById && !document.all) 
        var thisEl = el.target

    if (thisEl!=-1) 
    {
        var i = 0;
        var DomPath="";
        DomPathArray = [];
        var node = thisEl;
        while(node.tagName!="HTML") 
        {
            if(node.tagName!="undefined") 
            {
                DomPathArray[i] = node.id;
                DomPath += DomPathArray[i]+'/';
                i++;
            }
            node = node.parentNode;
        }
        for(i=1;i<=3;i++)
        {
            if ( DomPath.match("dpullmenue" +i) || DomPath.match("pulldown" +i)) NavOn[i] = 1;  
            if ( !DomPath.match("dpullmenue" +i) && !DomPath.match("pulldown" +i) && NavOn[i]) {NavOn[i] = 0; NaviShowHide(i,1);}
        }
    }
}

// Ende Navi-Hilfsfunktionen





/** PopUp-Funktionen **/

// Vertrauensliste (Zeile)
function popup_trustrow(pid,nickname,partei_name,partei_logo,online,gegenseitig,wert) {
	if (wert == 2)
	{
		nickname = '<b>'+nickname+'</b>'
	}
    t= 
    '<table cellpadding="0" cellspacing="0" border="0" width="240">'+
    '<tr class="bglist' +toggle+ '">'+
    '<td width="130" class="font11" align="left">'+
     '&nbsp;<a href="javascript:opener.location.href=\'index.php3?position=1700&pid=' +pid+ '\'; self.focus();">' +nickname+ '</a></td>'+
    '<td width="25" align="center"><img src="/img/' +(online ? 'online_small' : '1')+ '.gif" border="0" width="17" heigth="11" /></td>'+
    '<td width="30" align="center"><img src="' +partei_logo+ '" border="0" width="20" height="10" alt="' +partei_name+ '" /></td>'+
    '<td width="25" align="center"><img src="img/pfeil_' +gegenseitig+ '.gif" border="0" width="15" height="15" /></td>'+
    '<td width="30" align="right"><a href="javascript:open_nachricht_write(' +pid+ ');"><img src="img/mail.gif" border="0" width="20" height="12" /></a></td>'+
    '</tr>'+
    '</table>'
    document.writeln(t)
    toggle = 1-toggle
}


/** Themengebiete-Darstellung **/

function ThemengebieteShow()
{
    i = 0
    t = '<table cellpadding="5" cellspacing="0" border="0" width="400">'

    for(j in themengebiete)
    {
        if (themengebiete[j][1] != '?' &&
            themengebiete[j][1] != 'q' &&
            themengebiete[j][1] != 'z' &&
            themengebiete[j][1] != 'n')
        {
            i++
            new_row = i % 2
        
            if (i == 1)
                t += '<tr>'
            
            if (new_row == 1 && i != 1)
                t += '</tr><tr>'
            
            t += '<td class="font10"><img src="/img/cross.gif" width="8" height="8" border="0" alt="+" />&nbsp;<a href="index.php3?position=200&kategorie_id=' +themengebiete[j][1]+ '">' +themengebiete[j][0]+ '</a> (' +themengebiete[j][2]+ ')</td>'
        }
    }
    
    t+= '</table>'

    document.writeln(t)
}


/** Highscore-Darstellung **/

function HighscoreShowHeader ( text )
{
    t=
    '<div class="header"><img src="/img/cross.gif" width="8" height="8" alt="+" align="left" border="0" />&nbsp;' +text+ '</div>'

    document.writeln(t)
}

function HighscoreShow ( id, nickname, partei_id, score )
{
    t=
    '<table cellpadding="3" cellspacing="0" border="0" width="169">'+
    '<tr>'+
    ' <td width="84"><a href="index.php3?position=1700&pid=' +id+ '">' +nickname+ '</a></td>'+
    ' <td align="right" width="25">' +parteilogolink( partei_id )+ '</td>'+
    ' <td align="right" width="60">' +score+ '</td>'+
    '</tr>'+
    '</table>'

    document.writeln(t)
}

function HighscoreShowP (kuerzel, partei_id, score )
{
    t=
    '<table cellpadding="3" cellspacing="0" border="0" width="169">'+
    '<tr>'+
    ' <td width="84"><a href="index.php3?position=1900&partei_id=' +partei_id+ '">' +kuerzel+ '</a></td>'+
    ' <td align="right" width="25">' +parteilogolink( partei_id )+ '</td>'+
    ' <td align="right" width="60">' +score+ '</td>'+
    '</tr>'+
    '</table>'

    document.writeln(t)
}

function HighscoreShowBottom ( uebersicht, archiv )
{
    t=
    '<table cellpadding="3" cellspacing="0" border="0" width="169">'+
    '<tr>'+
    '<td align="right">'+
    '<a href="javascript:open_std_window(\'' +uebersicht+ '\', 400, 500);">&Uuml;bersicht...</a>'+
    ( (archiv) ? '&nbsp;&nbsp;<a href="javascript:open_std_window(\'' +archiv+ '\', 420, 400);\">Archiv...</a>' : '')+
    '</td>'+
    '</tr>'+
    '</table>'

    document.writeln(t)
}


function HighscoreArchiveRow ( date , id , nickname , partei_id, score, file )
{
    t=
    '<table cellpadding="3" cellspacing="0" border="0" width="100%"  class="bglist' +toggle+ '">'+
    '<tr valign="top">'+
    ' <td width="80">' +date+ '</td>'+
    ' <td width="100">'+
    '    <a href=\"javascript:opener.location.href=\'/index.php3?position=1700&pid=' +id+ '\'; stop();\">' +nickname+ '</a></td>'+
    ' <td width="50">' +parteilogo( partei_id )+ '</td>'+
    ' <td width="60">' +score+ '</td>'+
    ' <td><a href="javascript:open_std_window2(\'archiv_details.php?file=' +file+ '\',300,260);">Details...</a></td>'+
    '</tr>'+
    '</table>'
    
    document.writeln(t)
    
    toggle = 1-toggle
}


function HighscoreArchiveDetails ( id , nickname , partei_id, score )
{
    t=
    '<table cellpadding="3" cellspacing="0" border="0" width="100%" class="bglist' +toggle+ '">'+
    '<tr valign="top">'+
    ' <td width="100"><a href="javascript:opener.opener.location.href=\'/index.php3?position=1700&pid=' +id+ '\'; stop();">' +nickname+ '</a></td>'+
    ' <td width="50">' +parteilogo( partei_id )+ '</td>'+
    ' <td align="right">' +score+ '</td>'+
    '</tr>'+
    '</table>'

    document.writeln(t)
    
    toggle = 1-toggle
}



/* Vertrauens-Funktionen */

function TrustProfilRow(pid,txt,img,mode,num) {
    t=
    '<tr valign="bottom">'+
    '<td align="right">' +txt+ '</td>'+
    '<td><img src="/img/' +img+ '" width="16" height="12" style="margin:0px 3px; border:0;" alt="" /></td>'+
    '<td><a onClick="javascript:window.open(\'\',\'trust_distrust\',\'width=280,height=500,resizable=yes,scrollbars=yes,status=yes\')"'+
    ' href="' +dolUrl+ 'popup_trust_distrust.php?pid=' +pid+ '&mode=' +mode+ '" target="trust_distrust">' +num+ '</a></td>'+
    '</tr>'
    document.writeln(t)
}


/* Profil */

function ProfilDetails(script, pid, w,h, alt) 
{
    document.write('<a href="javascript:open_std_window_pid(\'' +script+ '\',' +pid+ ',' +w+ ',' +h+ ');\"><img src="/img/details.gif" alt="' +alt+ '" width="13" height="9" border="0" /></a>')
}


function ProfilIniRow(id,name,logo,mail) {
    t=
    '<tr class="bglist' +toggle+ '">'+
    '<td width="30">&nbsp;<a href="' +dolUrl+ 'index.php3?position=14000&ini_id=' +id+ '">'+
    '<img src="' +dolUrl + logo+ '" height="10" width="20" style="margin:1px 0; border:0;" alt="' +name+ '" title="' +name+ '" /></a>&nbsp;</td>'+
    '<td><a href="' +dolUrl+ 'index.php3?position=14000&ini_id=' +id+ '">' +name+ '</a></td>'+
    '<td width="30">'
    t+=(mail>0) ? '<a href="/mailbox/rundmail_inbox.php?itemId=' +mail+ '&objectId=' +id+ '&objectType=2" target="_blank"><img border="0" src="/img/mail.gif" alt="Neue Rundmail(s)" /></a>':'&nbsp;'
    t+=
    '</td>'+
    '<td width="20"><a href="' +dolUrl+ 'index.php3?position=2220&ini_id=' +id+ '"><img src="/img/forum.gif" width="13" height="15" border="0" title="Forum dieser Ini" alt="Forum dieser Ini" /></td>'+
    '</tr>'
    document.write(t)
    toggle = 1-toggle
}


/*** Forum ***/

function forumStart ( link, suche )
{
    t=
    '<table cellpadding="3" cellspacing="0" border="0" width="600">'+

    '<tr bgcolor="#2e4870">'+
    '<td style="font-weight: bold; color: #fff">Themen&uuml;bersicht</td>'+
    '<td align="center">' +suche+ '</td>'+	
    '<td align="right">' +link+ '</td>'+
    '</tr>'+
    '</table>'
    
    document.writeln(t)
}

function forumThread ( nickname, text, date, count, bgcolor )
{
    t=
    '<table cellpadding="4" cellspacing="0" border="0" width="600">'+

    '<colgroup>'+
    '   <col width="100" />'+
    '   <col width="330" />'+
    '   <col width="130">'+
    '   <col width="40">'+
    '</colgroup>'+

    '<tr bgcolor="' +bgcolor+ '">'+
    '<td class="font12">' +nickname+ '</td>'+
    '<td class="font12">' +text+ '</td>'+
    '<td class="font10" align="right">' +date+ '</td>'+
    '<td class="font10" align="right">' +count+ '</td>'+
    '</tr>'+
    '</table>'
    
    document.writeln(t)
}



function get_image_and_border( img, link, width, height)
{
    t=
    '<table cellpadding="0" cellspacing="0" border="0">'+

    '<colgroup>'+
    '   <col width="7" />'+
    '   <col width="' +width+ '" />'+
    '   <col width="14">'+
    '</colgroup>'+

    '<tr valign="bottom">'+
    '   <td><img src="/dolphotos/img/v2/foto_lu.gif" width="7" height="7" border="0" alt="" /></td>'+
    '   <td><img src="/dolphotos/img/v2/foto_u.gif" width="' +width+ '" height="7" border="0" alt="" /></td>'+
    '   <td><img src="/dolphotos/img/v2/foto_ru.gif" width="14" height="7" border="0" alt="" /></td>'+
    '</tr>'+
    '<tr>'+
    '   <td><img src="/dolphotos/img/v2/foto_l.gif" width="7" height="' +height+ '" border="0" alt="" /></td>'+
    '   <td><a href="' +link+ '"><img src="' +img+ '" width="' +width+ '" height="' +height+ '" border="0" alt="" /></a></td>'+
    '   <td><img src="/dolphotos/img/v2/foto_r.gif" width="14" height="' +height+ '" border="0" alt="" /></td>'+
    '</tr>'+
    '<tr>'+
    '   <td><img src="/dolphotos/img/v2/foto_lb.gif" width="7" height="15" border="0" alt="" /></td>'+
    '   <td><img src="/dolphotos/img/v2/foto_b.gif" width="' +width+ '" height="15" border="0" alt="" /></td>'+
    '   <td><img src="/dolphotos/img/v2/foto_rb.gif" width="14" height="15" border="0" alt="" /></td>'+
    '</tr>'+
    '</table></div>'

    document.writeln(t)
}





/** Hilfs-Funktionen **/

function getLeft(l)
{
    if (l.offsetParent) return (l.offsetLeft + getLeft(l.offsetParent));
    else return (l.offsetLeft);
}
function getTop(l)
{
    if (l.offsetParent) return (l.offsetTop + getTop(l.offsetParent));
    else return (l.offsetTop);
}

function parteilogo( partei_id )
{
    return '<img src="/img/parteilogos/logo_' +partei_id+ '_20x10.gif" width="20" height="10" border="0" alt="' +partei_namen[partei_id]+ '" title="' +partei_namen[partei_id]+ '" />'
}

function parteilogolink( partei_id )
{
    return (partei_id == 1) ? parteilogo( partei_id ) : '<a href="' +dolUrl+ 'index.php3?position=1900&partei_id=' +partei_id+ '">' +parteilogo( partei_id )+ '</a>'
}

function print_parteiLogoName( partei_id )
{
    t= 
    parteilogolink( partei_id ) + '&nbsp' + 
    '<a href="' +dolUrl+ 'index.php3?position=1900&partei_id=' +partei_id+ '">' +partei_namen[partei_id]+ '</a>'
    
    document.writeln(t)
}

function space(width,height) 
{
    return '<img src="/img/1.gif" alt="" width="' +width+ '" height="' +height+ '" border="0" />'
}



/** altes zeug **/





function nada() {}
function exitWin() {}
function dw(text) {document.write(text)}
function numSort(a,b) {return a-b}

function img_preload(name,modes) {
 img[name]=new Array()
 for (var i=0; i<=modes; i++) {
  img[name][i] = new Image()
  img[name][i].src = 'gfx/' +name+i+ '.gif'
 }
}

function statusText(text) {
 return  ' onMouseover="status=\'' +text+ '\';return true"'+
          ' onMouseout="status=\'\'"'
}
function infoText(text) {
 return  ' onMouseover="t.info(\'' +text+ '\')"'+
          ' onMouseout="t.info()"'
}


function space_gif(width,height) {
    document.write('<img src="/img/1.gif" alt="" width="' +width+ '" height="' +height+ '" border="0" />')
}

function vspace(height) {
 return '<br>' +space(1,height)+ '<br>'
}
function spaceline(width,height) {
 return '<table cellspacing=0 cellpadding=0 border=0><tr><td>' +space(width,height)+ '</td></tr></table>'
}



function timeFormat(timestamp,mode) {
 now = new Date()
 now.setTime(timestamp)
 switch(mode) {
  case 1:
   return now.getDate()+ '.' +(now.getMonth()+1)+ '.' +now.getFullYear()+ '&nbsp;' +now.getHours()+ ':' +now.getMinutes()+ ':' +now.getSeconds()
   break

  default:
   return now.toLocaleString()
   break
 }
}

function forceInt(inp,def) {
 if (''+parseInt(inp) == 'NaN') {
  return def
 } else {
  return parseInt(inp)
 }
}

function numFormat(num,dec) {
 var zero = '00000'
 num = ''+num
 var tmp = num.split('.')

 return tmp[0]+','+
  (tmp[1]
   ? tmp[1].substr(0,dec)+zero.substr(0,dec-tmp[1].length)
   : zero.substr(0,dec)
  )
}

function readTime() {
 now=new Date()
 return now.getTime()
}

function clickImg(imgName,imgSrc,imgWidth,imgHeight,hspace,vspace,imgAlt,mOver,mOut,mClick) {
 return '<a href="' +mClick+ '"'+
  ' onMouseover="flip(\'' +imgName+ '\',1);' +mOver+ '"'+
   ' onMouseout="flip(\'' +imgName+ '\',0);' +mOut+ '"'+
  ' onMousedown="flip(\'' +imgName+ '\',2);"'+
    ' onMouseup="flip(\'' +imgName+ '\',1);">'+
  '<img name="' +imgName+ '" src="' +imgSrc+ '" '+
  (hspace ? 'hspace="' +hspace+ '" ' :'')+
  (vspace ? 'vspace="' +vspace+ '" ' :'')+
  'alt="' +imgAlt+ '" title="' +imgAlt+ '" width="' +imgWidth+ '" height="' +imgHeight+ '" border="0" /></a>'

}

function checkAllowedChars(text) {
 if (text == '' || text == null) {return false}
 var badChars = ''
 for (var i=0; i<text.length; i++) {
  if (strAllowedChars.indexOf(text.substr(i,1))==-1) {
   badChars+=text.substr(i,1)
  }
 }
 if (badChars!='') {return false}
 return true
}













function buddyList() {
 partei_idx = new Array()
 toggle = 1
 for (i=0; i<partei.length; i++) {
  if (partei[i].shortname != '') {
   partei_idx[partei_idx.length] = i
  }
 }
 t = '<table width="100%" border="0" cellspacing="0" cellpadding="0">'+
        '<tr><td colspan="3" class="rmenuhead">Deine Buddies</td></tr>'

 j=1+Math.floor(30*Math.random())
 for (i=0; i<j; i++) {
  id = Math.floor(32000*Math.random())
  t += '<tr class="bglist' +toggle+ '">'+
  '<td><img src="' +dolUrl+ 'img/logo_' +partei[partei_idx[Math.floor(partei_idx.length*Math.random())]].imgname+ '_20x10.gif" alt="" width="20" height="10" border="0" hspace="4"></td>'+
  '<td><a href="' +dolUrl+ 'index.php3?position=1700&pid=' +id+ '" class="n1">Buddy Nr.' +(i+1)+ '</a></td>'+
  '<td><a href="javascript:open_nachricht_write(' +id+ ')"'+
  ' onMouseover="d.images.buddy' +i+ 'mail.src=\'img/mail1.gif\'"'+
  ' onMouseout="d.images.buddy' +i+ 'mail.src=\'img/mail0.gif\'"'+
  '><img src="img/mail0.gif" name="buddy' +i+ 'mail" alt="" width="15" height="10" border="0"></a></td></tr>'
  toggle = 1-toggle
 }

 t+='</table>'
 return t
}



function inst_url(url){
    if (url != '0')
        window.location=url
}





