[js] tab menu

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lea

    #1

    [js] tab menu

    Hi,

    I have difficulties in understanding the following script. If a good soul
    was passing by here ...

    Thks

    Lea

    <script language="javas cript">
    var userEmail=getCo okie("idlogin[m]");var gTimer=null;var gTimer2=null;va r
    bEnableEffect=f alse;var
    bEnableFavorite s=getCookie("fa v")=="yes"?true :false;var aTabs=new
    Array();var aVisitedLinks=n ew Array();var
    sTbPath='http://toolbar.tiscali .fr/';var
    sDefaultLogo=sT bPath+'media/logo.gif';var t='http://';var
    u='.tiscali.fr/';var w=t+'www'+u;var z=t+'register'+ u;aTabs[0]=new
    Tab("accueil"," #7E71B4","#BFB8 DA",w);aTabs[0].addLink('e-mail',w+'webmai l');
    aTabs[0].addLink('bienv enue','javascri pt: var bv =
    window.open(\'h ttp://www.tiscali.fr/bienvenue/\',\'bienvenue\ ',\'width=560,h
    eight=565,left= 50,top=50\');') ;aTabs[0].addLink('assis tance','http://support
    '+u+'index.asp' );if(userEmail= =""){aTabs[1]=new Tab("nos
    offres","#FF970 6","#FFCB83",z+ 'forfaits/');aTabs[1].addLink('adsl
    illimit&eacute; ',z+'adsl/');aTabs[1].addLink('wifi' ,z+'adsl/signup.php3?got o
    =ADSL_WIFI');aT abs[1].addLink('forfa its
    illimit&eacute; s',z+'adsl/signup.php3?got o=IFI');aTabs[1].addLink('forfa its
    5h\/10h',z+'adsl/signup.php3?got o=FORFAITS');aT abs[1].addLink('acc&e grave;s
    gratuit',z+'ads l/signup.php3?got o=ACCES_GRATUIT ');aTabs[1].addLink('d&eac ute
    ;j&agrave; abonn&eacute; ?',z+'selfcare/');}else{aTabs[1]=new
    Tab("abonnes"," #FF9706","#FFCB 83",z+'selfca re/');aTabs[1].addLink('mon
    compte',z+'self care/');aTabs[1].addLink('chang er
    d\'offre',z+'se lfcare/');aTabs[1].addLink('parra inage',z+'parra inage/');aTab
    s[1].addLink('recip rok',t+'recipro k'+u);aTabs[1].addLink('s&eac ute;curit&eac
    ute; PC',w+'securite pc');aTabs[1].addLink('s&eac ute;curit&eacut e;
    mail',w+'superm ail');aTabs[1].addLink('s&eac ute;curit&eacut e;
    achat',w+'secur iteachat');aTab s[1].addLink('barre
    magique',t+'bar remagique'+u);} aTabs[2]=new
    Tab("services", "#61AF32","#B0D 799",w+'service s.asp');aTabs[2].addLink('emplo
    i',w+'emploi/');aTabs[2].addLink('fax', t+'fax'+u);aTab s[2].addLink('immo' ,w+
    'immobilier');a Tabs[2].addLink('logic iels',t+'telech argement'+u);aT abs[2].ad
    dLink('pages
    perso',t+'www.c hez'+u);aTabs[2].addLink('photo ',w+'photo/');aTabs[2].addLink
    ('plans &amp;
    iti',t+'plansit ineraires'+u+'t iscali/');aTabs[2].addLink('s&eac ute;curit&eac
    ute;',w+'securi te');aTabs[2].addLink('shopp ing',t+'www.sho pping'+u);aTabs[2]
    ..addLink('sms' ,t+'services'+u +'smsforfaits/index.php?servi ce=express_sms' );a
    Tabs[2].addLink('webca m',t+'webcam'+u );aTabs[3]=new
    Tab("actu","#00 61B4","#80B0DA" ,w+'actu.asp'); aTabs[3].addLink('actua lit&eacu
    te;s','http://actu'+u+'enune/home.asp');aTab s[3].addLink('auto-moto',t+'auto
    moto'+u);aTabs[3].addLink('bours e',t+'bourse'+u );aTabs[3].addLink('europ e',t
    +'europe'+u);aT abs[3].addLink('m&eac ute;t&eacute;o' ,w+'meteo/');aTabs[3].add
    Link('professio nnel',w+'profes sionnel');aTabs[3].addLink('sport ',t+'sport'+u
    );aTabs[3].addLink('t&eac ute;l&eacute;vi sion',t+'tv'+u) ;aTabs[4]=new
    Tab("loisirs"," #D8005F","#EC80 AF",w+'loisirs. asp');aTabs[4].addLink('chat
    &amp;
    forums',t+'comm unautes'+u);aTa bs[4].addLink('cin&e acute;ma',t+'ww w.mcinema.c
    om/');aTabs[4].addLink('f&eac ute;minin',w+'f emmes/');aTabs[4].addLink('horos
    cope',t+'horosc ope'+u);aTabs[4].addLink('jeux' ,w+'jeux/');aTabs[4].addLink('
    mobile',w+'mobi le/');aTabs[4].addLink('musiq ue',t+'musique' +u);aTabs[4].addL
    ink('rencontres ',t+'rencontres '+u);aTabs[4].addLink('sexy' ,w+'sexy');aTab s[4
    ].addLink('tests ',w+'tests');aT abs[4].addLink('voyag es
    ',w+'voyages/');function
    Tab(sLabel,sCol or,sdColor,sLin k){this.id='tab _'+aTabs.length ;this.color=sCo l
    or;this.dcolor= sdColor;this.la bel=sLabel;this .link=sLink;thi s.links=new
    Array();this.ad dLink=tab_addli nk;}function
    tab_addlink(sLa bel,sLink){this .links[this.links.leng th]=new
    Link(this.id+'_ '+this.links.le ngth,sLabel,sLi nk);}function
    Link(sID,sLabel ,sLink){this.ID =sID;this.label =sLabel;this.li nk=sLink;if(bEn a
    bleFavorites){t his.count=getCo okie(sID)!=""?g etCookie(sID):0 ;if(document.lo c
    ation==this.lin k){this.count++ ;setCookie(sID, this.count,365) ;}if(this.count >
    0)aVisitedLinks[aVisitedLinks.l ength]=this;}}functio n
    colle(iRank){cl earTimeout(gTim er2);gTimer=set Timeout('Change Tab('+iRank+')' ,
    50);}function
    decolle(){clear Timeout(gTimer) ;gTimer2=setTim eout('ChangeTab ('+(topbar_tab-1
    )+')',10000);}v ar OptSel,OptSho;O ptSel="<option value=0>tout le web<option
    value=8>toutes les images<option value=sh>tout le shopping";OptSh o="<option
    value=sh>tout le shopping<option value=0>tout le web<option value=8>toutes
    les images";adres=n ew
    String(document .location);adre s=adres.toLower Case();aShop=(a dres.indexOf("s h
    opping.tiscali. fr")>-1)?1:0;if(aShop )OptSel=OptSho; function
    Render(){docume nt.write('<styl e>#topbar {position: relative; font:12px
    Arial, Helvetica, sans-serif;}#topbar a, #topbar a:visited{ text-decoration:
    none; font:12px Arial, Helvetica, sans-serif; color: #ffffff; font-weight:
    bold; } #topbar a:hover{text-decoration: underline}#topb ar .topbar_top
    {width: 776px; background-color: #ffffff; height: 25px;}#topbar
    ..topbar_middle {width: 776px; background-color: #7E71B4; height: 20px;
    text-align: right;}table.ta bs {width: 463px; height: 25px;
    cursor:pointer; }td.intertab { width: 2px;}td.tab {height: 24px; width: 91px;
    text-align: center; background-image: url('+sTbPath+'/media/tab.png);
    text-transform: uppercase; } td.belowtab {height: 1px; width: 91px;
    background-color: #FFFFFF}#topbar _links {display: hidden;}#topbar _links a
    {color: white; }.topbar_bottom
    {height:41px;wi dth:776px;backg round-color:#E5E5E5; border-bottom:1px solid
    #EDECEC; }#topbar .topbar_bottom a, #topbar .topbar_bottom a:visited
    {font-size:11px;font-family:Arial;co lor: #0750D9}.topbar _bottom .mail
    {width:144px;ba ckground-color:#D7D3E5;h eight:41px; text-align:
    left; }.topbar_bottom .tbtds {padding-left: 5px; }.topbar_bottom select
    {font-size:11px;font-family:Arial;fo nt-weight:100;widt h:140px;}.topba r_botto
    m a.title {font-size:17px;font-family:Arial}.t opbar_bottom .advanced
    {padding-left: 5px;}.topbar_bo ttom .keyword {width:200px;bo rder:1px solid
    #7E71B4;}#topba r .idlogin {padding-left: 5px; font-size:8pt; color:
    white; }#topbar .idlogin a.cu {font-size: 7pt; font-weight:
    normal; }#persobar {width: 776px; background: #f0f0f0; color: #232896;
    text-align: left; height: 16px; border-top: 1px #808080 solid;
    border-bottom: 1px #808080 solid;}#persoba r a.links,#persob ar
    a:visited.links {font: 8pt arial; color: black; padding-right:
    20px;}</style>');docume nt.write('<div id=topbar>');do cument.write('< table
    cellpadding=0 cellspacing=0 class=topbar_to p border=0><tr><t d rowspan=2
    width=331 align=left><img src="'+topbar_l ogo+'" id=imgLogo
    onerror="this.s rc=sDefaultLogo ;"></td><td
    height=15></td></tr>');document. write('<tr><td
    height=24>');do cument.write('< table cellpadding=0 cellspacing=0
    class=tabs>');d ocument.write(' <tr>');for(va r
    i=0;i<aTabs.len gth;i++){docume nt.write('<td class=tab
    style="backgrou nd-color:'+aTabs[i].color+';" id='+aTabs[i].id+'><a
    href="'+aTabs[i].link+'" onmouseover="co lle('+i+')" onmouseout="dec olle()"
    target=_top>'+a Tabs[i].label+'</a></td>');if(i+1<aT abs.length)docu ment.write
    ('<td
    class=intertab> </td>');}document .write('</tr>');document. write('<tr>');f or(v
    ar i=0;i<aTabs.len gth;i++){docume nt.write('<td class=belowtab
    id=b_'+aTabs[i].id+'></td>');if(i+1<aT abs.length)docu ment.write('<td
    class=intertab> </td>');}document .write('</tr>');document. write('</table>');d
    ocument.write(' </td></tr></table>');docume nt.write('<tabl e cellpadding=0
    cellspacing=0 class=topbar_mi ddle border=0><tr><t d id=topbar_links
    align=right></td></tr></table>');docume nt.write('<tabl e class=topbar_bo ttom
    cellpadding=0 cellspacing=0>< tr><td id=mail class=mail><img
    src=http://toolbar.tiscali .fr/media/pi_mail.gif hspace=10 vspace=5 width=16
    height=16 border=0 align=left><a href=http://webmail.tiscali .fr><FONT
    id=tbEmail><ILA YER id=tbEmailNS>Co nsultez <br>vos
    e-mails</ILAYER></FONT></a></td><form name=frmTBShopp ing
    action=http://www.shopping.ti scali.fr/query.html method=get><inp ut
    type=hidden name=qu></form><form
    action=http://rechercher.noma de.tiscali.fr/recherche.asp name=frmTB id=frmTB
    OnSubmit=\'retu rn frmTB_valide(); \'><input type=hidden name=src
    value=toolbar>< input type=hidden name=MT><td class=tbtds><a
    href=http://www.nomade.tisc ali.fr/ class=title
    style="font-size:17px;">Rec herche</a>&nbsp;&nbsp;< input style="width:20 0;"
    type=text class=keyword name=s>&nbsp;&n bsp; <span
    style="font-size:17px;font-family:Arial;co lor:#666666;">< strong>dans</strong[color=blue]
    ></span>&nbsp; <select name=opt[/color]
    id=frmTB_Opt>'+ OptSel+'</select>&nbsp;&n bsp;<input type=image class=button
    src=http://toolbar.tiscali .fr/media/btn_ok2.gif alt=Search border="0"
    align=absmiddle ></a><a href=http://rechercher.noma de.tiscali.fr/nomade.asp
    class=advanced style="font-weight:100"><b> &#187;</b> options</a><a
    href="javascrip t:var windowVar =
    window.open(\'h ttp://support.tiscali .fr/popup.asp?catid =21&amp;ficheid =227\'
    ,\'dd\',\'toolb ar=0,location=0 ,directories=0, status=0,menuba r=0,scrollbars= 1
    ,resizable=0,wi dth=614,height= 550\');" class=advanced
    style="font-weight:100"><b> &#187;</b>
    aide</a></td></form></tr></table>');if(bEn ableFavorites&& aVisitedLinks.l engt
    h>0){aVisitedLi nks.sort(SortLi nks);var
    maxLinks=aVisit edLinks.length> 8?8:aVisitedLin ks.length;docum ent.write('<div
    id=persobar>&nb sp;<b>Mes favoris:</b>&nbsp;&nbsp;& nbsp;&nbsp;');f or(var
    nl=0;nl<maxLink s;nl++)document .write(' <a href="'+aVisite dLinks[nl].link+'"
    class=links
    title='+aVisite dLinks[nl].count+'>'+aVis itedLinks[nl].label+'</a>');document
    ..write('</div>');}documen t.write('</div>');}functio n
    ChangeTab(tabIn dex){for(var
    i=0;i<aTabs.len gth;i++){docume nt.getElementBy Id('b_'+aTabs[i].id).style.back
    groundColor='#f fffff';if(bEnab leEffect)docume nt.getElementBy Id(aTabs[i].id).
    style.backgroun dColor=aTabs[i].dcolor;}if(bEn ableEffect)docu ment.getElement B
    yId(aTabs[tabIndex].id).style.back groundColor=aTa bs[tabIndex].color;document
    ..getElementByI d('b_'+aTabs[tabIndex].id).style.back groundColor=aTa bs[tabInde
    x].color;var
    topbar_linksEL= document.getEle mentById('topba r_links');topba r_linksEL.style .
    backgroundColor =aTabs[tabIndex].color;var htLinks='<table cellspacing=0
    cellpadding=0 border=0><tr>'; for(var
    j=0;j<aTabs[tabIndex].links.length;j ++)htLinks+='<t d><a
    href="'+aTabs[tabIndex].links[j].link+'"
    target=_top>.'+ aTabs[tabIndex].links[j].label+'</a></td><td width=20
    height=1></td>';htLinks+=' </tr></table>';if(tabI ndex==0&&userEm ail!="")topba
    r_linksEL.inner HTML="<table cellspacing=0 cellpadding=0 width=776
    border=0><tr><t d class=idlogin width=400
    align=left>"+un escape(userEmai l)+"&nbsp;&nbsp ;&nbsp;&raquo ; <a class=cu
    href=http://www.tiscali.fr/webmail/login.asp?mod=y >changer
    d'utilisateur</a></td><td width=376
    align=right>"+h tLinks+'</td></tr></table>';else
    topbar_linksEL. innerHTML=htLin ks;}function
    ChangeLogo(sPat h){document.get ElementById('im gLogo').src=sPa th;}function
    getCookie(Cooki eName){var lf="\n";var CookieString=do cument.cookie;v ar
    CookieSet=Cooki eString.split(' ; ');var SetSize=CookieS et.length;var
    CookiePieces;va r ReturnValue=""; var
    x=0;for(x=0;((x <SetSize)&&(Ret urnValue=="")); x++){CookiePiec es=CookieSet[x].
    split('=');if(C ookiePieces[0].substring(0,1) =='
    ')CookiePieces[0]=CookiePieces[0].substring(1,Co okiePieces[0].length);if(Coo
    kiePieces[0]==CookieName)Re turnValue=Cooki ePieces[1];}return
    ReturnValue;}fu nction setCookie(name, value,days){if( !days)days=-1;var
    expire=new
    Date();expire.s etTime(expire.g etTime()+864000 00*days);docume nt.cookie=name+ "
    ="+escape(value )+";path=/;domain=tiscali .fr;expires="+e xpire.toGMTStri ng()+"
    ;";}function SortLinks(a,b){ return b.count-a.count;}functi on
    frmTB_valide(){ if(document.for ms["frmTB"].opt.options[document.forms["frmTB"
    ].opt.selectedIn dex].value=='sh'){d ocument.forms["frmTBShopp ing"].qu.value=d
    ocument.forms["frmTB"].s.value;docume nt.forms["frmTBShopp ing"].submit();retu
    rn
    false;}else{doc ument.forms["frmTB"].MT.value=docum ent.forms["frmTB"].s.value
    ;}return
    true;}try{if(se lf.topbar_tab== undefined||self .topbar_tab<1|| self.topbar_tab >
    5)var topbar_tab=1;if (self.topbar_lo go==undefined)v ar
    topbar_logo=sDe faultLogo;}catc h(TBex){var topbar_tab=1;va r
    topbar_logo=sDe faultLogo;}Rend er();ChangeTab( self.topbar_tab-1);
    </script>


  • Erwin Moller

    #2
    Re: [js] tab menu

    Lea wrote:
    [color=blue]
    > Hi,
    >
    > I have difficulties in understanding the following script. If a good soul
    > was passing by here ...
    >
    > Thks
    >
    > Lea
    >
    > <script language="javas cript">
    > var userEmail=getCo okie("idlogin[m]");var gTimer=null;var gTimer2=null;va r
    > bEnableEffect=f alse;var
    > bEnableFavorite s=getCookie("fa v")=="yes"?true :false;var aTabs=new
    > Array();var aVisitedLinks=n ew Array();var
    > sTbPath='http://toolbar.tiscali .fr/';var
    > sDefaultLogo=sT bPath+'media/logo.gif';var t='http://';var
    > u='.tiscali.fr/';var w=t+'www'+u;var z=t+'register'+ u;aTabs[0]=new
    >[/color]
    Tab("accueil"," #7E71B4","#BFB8 DA",w);aTabs[0].addLink('e-mail',w+'webmai l');[color=blue]
    > aTabs[0].addLink('bienv enue','javascri pt: var bv =
    >[/color]
    window.open(\'h ttp://www.tiscali.fr/bienvenue/\',\'bienvenue\ ',\'width=560,h[color=blue]
    >[/color]
    eight=565,left= 50,top=50\');') ;aTabs[0].addLink('assis tance','http://support[color=blue]
    > '+u+'index.asp' );if(userEmail= =""){aTabs[1]=new Tab("nos
    > offres","#FF970 6","#FFCB83",z+ 'forfaits/');aTabs[1].addLink('adsl
    >[/color]
    illimit&eacute; ',z+'adsl/');aTabs[1].addLink('wifi' ,z+'adsl/signup.php3?got o[color=blue]
    > =ADSL_WIFI');aT abs[1].addLink('forfa its
    >[/color]
    illimit&eacute; s',z+'adsl/signup.php3?got o=IFI');aTabs[1].addLink('forfa its[color=blue]
    >[/color]
    5h\/10h',z+'adsl/signup.php3?got o=FORFAITS');aT abs[1].addLink('acc&e grave;s[color=blue]
    >[/color]
    gratuit',z+'ads l/signup.php3?got o=ACCES_GRATUIT ');aTabs[1].addLink('d&eac ute[color=blue]
    > ;j&agrave; abonn&eacute; ?',z+'selfcare/');}else{aTabs[1]=new
    > Tab("abonnes"," #FF9706","#FFCB 83",z+'selfca re/');aTabs[1].addLink('mon
    > compte',z+'self care/');aTabs[1].addLink('chang er
    >[/color]
    d\'offre',z+'se lfcare/');aTabs[1].addLink('parra inage',z+'parra inage/');aTab[color=blue]
    >[/color]
    s[1].addLink('recip rok',t+'recipro k'+u);aTabs[1].addLink('s&eac ute;curit&eac[color=blue]
    > ute; PC',w+'securite pc');aTabs[1].addLink('s&eac ute;curit&eacut e;
    > mail',w+'superm ail');aTabs[1].addLink('s&eac ute;curit&eacut e;
    > achat',w+'secur iteachat');aTab s[1].addLink('barre
    > magique',t+'bar remagique'+u);} aTabs[2]=new
    >[/color]
    Tab("services", "#61AF32","#B0D 799",w+'service s.asp');aTabs[2].addLink('emplo[color=blue]
    >[/color]
    i',w+'emploi/');aTabs[2].addLink('fax', t+'fax'+u);aTab s[2].addLink('immo' ,w+[color=blue]
    >[/color]
    'immobilier');a Tabs[2].addLink('logic iels',t+'telech argement'+u);aT abs[2].ad[color=blue]
    > dLink('pages
    >[/color]
    perso',t+'www.c hez'+u);aTabs[2].addLink('photo ',w+'photo/');aTabs[2].addLink[color=blue]
    > ('plans &amp;
    >[/color]
    iti',t+'plansit ineraires'+u+'t iscali/');aTabs[2].addLink('s&eac ute;curit&eac[color=blue]
    >[/color]
    ute;',w+'securi te');aTabs[2].addLink('shopp ing',t+'www.sho pping'+u);aTabs[2][color=blue]
    >[/color]
    ..addLink('sms' ,t+'services'+u +'smsforfaits/index.php?servi ce=express_sms' );a[color=blue]
    > Tabs[2].addLink('webca m',t+'webcam'+u );aTabs[3]=new
    >[/color]
    Tab("actu","#00 61B4","#80B0DA" ,w+'actu.asp'); aTabs[3].addLink('actua lit&eacu[color=blue]
    >[/color]
    te;s','http://actu'+u+'enune/home.asp');aTab s[3].addLink('auto-moto',t+'auto[color=blue]
    >[/color]
    moto'+u);aTabs[3].addLink('bours e',t+'bourse'+u );aTabs[3].addLink('europ e',t[color=blue]
    >[/color]
    +'europe'+u);aT abs[3].addLink('m&eac ute;t&eacute;o' ,w+'meteo/');aTabs[3].add[color=blue]
    >[/color]
    Link('professio nnel',w+'profes sionnel');aTabs[3].addLink('sport ',t+'sport'+u[color=blue]
    > );aTabs[3].addLink('t&eac ute;l&eacute;vi sion',t+'tv'+u) ;aTabs[4]=new
    > Tab("loisirs"," #D8005F","#EC80 AF",w+'loisirs. asp');aTabs[4].addLink('chat
    > &amp;
    >[/color]
    forums',t+'comm unautes'+u);aTa bs[4].addLink('cin&e acute;ma',t+'ww w.mcinema.c[color=blue]
    >[/color]
    om/');aTabs[4].addLink('f&eac ute;minin',w+'f emmes/');aTabs[4].addLink('horos[color=blue]
    >[/color]
    cope',t+'horosc ope'+u);aTabs[4].addLink('jeux' ,w+'jeux/');aTabs[4].addLink('[color=blue]
    >[/color]
    mobile',w+'mobi le/');aTabs[4].addLink('musiq ue',t+'musique' +u);aTabs[4].addL[color=blue]
    >[/color]
    ink('rencontres ',t+'rencontres '+u);aTabs[4].addLink('sexy' ,w+'sexy');aTab s[4[color=blue]
    > ].addLink('tests ',w+'tests');aT abs[4].addLink('voyag es
    > ',w+'voyages/');function
    >[/color]
    Tab(sLabel,sCol or,sdColor,sLin k){this.id='tab _'+aTabs.length ;this.color=sCo l[color=blue]
    > or;this.dcolor= sdColor;this.la bel=sLabel;this .link=sLink;thi s.links=new
    > Array();this.ad dLink=tab_addli nk;}function
    > tab_addlink(sLa bel,sLink){this .links[this.links.leng th]=new
    > Link(this.id+'_ '+this.links.le ngth,sLabel,sLi nk);}function
    >[/color]
    Link(sID,sLabel ,sLink){this.ID =sID;this.label =sLabel;this.li nk=sLink;if(bEn a[color=blue]
    >[/color]
    bleFavorites){t his.count=getCo okie(sID)!=""?g etCookie(sID):0 ;if(document.lo c[color=blue]
    >[/color]
    ation==this.lin k){this.count++ ;setCookie(sID, this.count,365) ;}if(this.count >[color=blue]
    > 0)aVisitedLinks[aVisitedLinks.l ength]=this;}}functio n
    >[/color]
    colle(iRank){cl earTimeout(gTim er2);gTimer=set Timeout('Change Tab('+iRank+')' ,[color=blue]
    > 50);}function
    >[/color]
    decolle(){clear Timeout(gTimer) ;gTimer2=setTim eout('ChangeTab ('+(topbar_tab-1[color=blue]
    > )+')',10000);}v ar OptSel,OptSho;O ptSel="<option value=0>tout le web<option
    > value=8>toutes les images<option value=sh>tout le
    > shopping";OptSh o="<option value=sh>tout le shopping<option value=0>tout le
    > web<option value=8>toutes les images";adres=n ew
    >[/color]
    String(document .location);adre s=adres.toLower Case();aShop=(a dres.indexOf("s h[color=blue]
    > opping.tiscali. fr")>-1)?1:0;if(aShop )OptSel=OptSho; function
    > Render(){docume nt.write('<styl e>#topbar {position: relative; font:12px
    > Arial, Helvetica, sans-serif;}#topbar a, #topbar a:visited{
    > text-decoration: none; font:12px Arial, Helvetica, sans-serif; color:
    > #ffffff; font-weight: bold; } #topbar a:hover{text-decoration:
    > underline}#topb ar .topbar_top
    > {width: 776px; background-color: #ffffff; height: 25px;}#topbar
    > .topbar_middle {width: 776px; background-color: #7E71B4; height: 20px;
    > text-align: right;}table.ta bs {width: 463px; height: 25px;
    > cursor:pointer; }td.intertab { width: 2px;}td.tab {height: 24px; width:
    > 91px; text-align: center; background-image:
    > url('+sTbPath+'/media/tab.png); text-transform: uppercase; } td.belowtab
    > {height: 1px; width: 91px; background-color: #FFFFFF}#topbar _links
    > {display: hidden;}#topbar _links a
    > {color: white; }.topbar_bottom
    > {height:41px;wi dth:776px;backg round-color:#E5E5E5; border-bottom:1px solid
    > #EDECEC; }#topbar .topbar_bottom a, #topbar .topbar_bottom a:visited
    > {font-size:11px;font-family:Arial;co lor: #0750D9}.topbar _bottom .mail
    > {width:144px;ba ckground-color:#D7D3E5;h eight:41px; text-align:
    > left; }.topbar_bottom .tbtds {padding-left: 5px; }.topbar_bottom select
    >[/color]
    {font-size:11px;font-family:Arial;fo nt-weight:100;widt h:140px;}.topba r_botto[color=blue]
    > m a.title {font-size:17px;font-family:Arial}.t opbar_bottom .advanced
    > {padding-left: 5px;}.topbar_bo ttom .keyword {width:200px;bo rder:1px solid
    > #7E71B4;}#topba r .idlogin {padding-left: 5px; font-size:8pt; color:
    > white; }#topbar .idlogin a.cu {font-size: 7pt; font-weight:
    > normal; }#persobar {width: 776px; background: #f0f0f0; color: #232896;
    > text-align: left; height: 16px; border-top: 1px #808080 solid;
    > border-bottom: 1px #808080 solid;}#persoba r a.links,#persob ar
    > a:visited.links {font: 8pt arial; color: black; padding-right:
    > 20px;}</style>');docume nt.write('<div id=topbar>');do cument.write('< table
    > cellpadding=0 cellspacing=0 class=topbar_to p border=0><tr><t d rowspan=2
    > width=331 align=left><img src="'+topbar_l ogo+'" id=imgLogo
    > onerror="this.s rc=sDefaultLogo ;"></td><td
    > height=15></td></tr>');document. write('<tr><td
    > height=24>');do cument.write('< table cellpadding=0 cellspacing=0
    > class=tabs>');d ocument.write(' <tr>');for(va r
    > i=0;i<aTabs.len gth;i++){docume nt.write('<td class=tab
    > style="backgrou nd-color:'+aTabs[i].color+';" id='+aTabs[i].id+'><a
    > href="'+aTabs[i].link+'" onmouseover="co lle('+i+')" onmouseout="dec olle()"
    >[/color]
    target=_top>'+a Tabs[i].label+'</a></td>');if(i+1<aT abs.length)docu ment.write[color=blue]
    > ('<td
    >[/color]
    class=intertab> </td>');}document .write('</tr>');document. write('<tr>');f or(v[color=blue]
    > ar i=0;i<aTabs.len gth;i++){docume nt.write('<td class=belowtab
    > id=b_'+aTabs[i].id+'></td>');if(i+1<aT abs.length)docu ment.write('<td
    >[/color]
    class=intertab> </td>');}document .write('</tr>');document. write('</table>');d[color=blue]
    > ocument.write(' </td></tr></table>');docume nt.write('<tabl e cellpadding=0
    > cellspacing=0 class=topbar_mi ddle border=0><tr><t d id=topbar_links
    > align=right></td></tr></table>');docume nt.write('<tabl e
    > class=topbar_bo ttom cellpadding=0 cellspacing=0>< tr><td id=mail
    > class=mail><img src=http://toolbar.tiscali .fr/media/pi_mail.gif hspace=10
    > vspace=5 width=16 height=16 border=0 align=left><a
    > href=http://webmail.tiscali .fr><FONT id=tbEmail><ILA YER
    > id=tbEmailNS>Co nsultez <br>vos e-mails</ILAYER></FONT></a></td><form
    > name=frmTBShopp ing action=http://www.shopping.ti scali.fr/query.html
    > method=get><inp ut type=hidden name=qu></form><form
    > action=http://rechercher.noma de.tiscali.fr/recherche.asp name=frmTB
    > id=frmTB OnSubmit=\'retu rn frmTB_valide(); \'><input type=hidden name=src
    > value=toolbar>< input type=hidden name=MT><td class=tbtds><a
    > href=http://www.nomade.tisc ali.fr/ class=title
    > style="font-size:17px;">Rec herche</a>&nbsp;&nbsp;< input style="width:20 0;"
    > type=text class=keyword name=s>&nbsp;&n bsp; <span
    >[/color]
    style="font-size:17px;font-family:Arial;co lor:#666666;">< strong>dans</strong[color=blue][color=green]
    >></span>&nbsp; <select name=opt[/color]
    > id=frmTB_Opt>'+ OptSel+'</select>&nbsp;&n bsp;<input type=image class=button
    > src=http://toolbar.tiscali .fr/media/btn_ok2.gif alt=Search border="0"
    > align=absmiddle ></a><a href=http://rechercher.noma de.tiscali.fr/nomade.asp
    > class=advanced style="font-weight:100"><b> &#187;</b> options</a><a
    > href="javascrip t:var windowVar =
    >[/color]
    window.open(\'h ttp://support.tiscali .fr/popup.asp?catid =21&amp;ficheid =227\'[color=blue]
    >[/color]
    ,\'dd\',\'toolb ar=0,location=0 ,directories=0, status=0,menuba r=0,scrollbars= 1[color=blue]
    > ,resizable=0,wi dth=614,height= 550\');" class=advanced
    > style="font-weight:100"><b> &#187;</b>
    >[/color]
    aide</a></td></form></tr></table>');if(bEn ableFavorites&& aVisitedLinks.l engt[color=blue]
    > h>0){aVisitedLi nks.sort(SortLi nks);var
    >[/color]
    maxLinks=aVisit edLinks.length> 8?8:aVisitedLin ks.length;docum ent.write('<div[color=blue]
    > id=persobar>&nb sp;<b>Mes favoris:</b>&nbsp;&nbsp;& nbsp;&nbsp;');f or(var
    > nl=0;nl<maxLink s;nl++)document .write(' <a
    > href="'+aVisite dLinks[nl].link+'" class=links
    >[/color]
    title='+aVisite dLinks[nl].count+'>'+aVis itedLinks[nl].label+'</a>');document[color=blue]
    > .write('</div>');}documen t.write('</div>');}functio n
    > ChangeTab(tabIn dex){for(var
    >[/color]
    i=0;i<aTabs.len gth;i++){docume nt.getElementBy Id('b_'+aTabs[i].id).style.back[color=blue]
    >[/color]
    groundColor='#f fffff';if(bEnab leEffect)docume nt.getElementBy Id(aTabs[i].id).[color=blue]
    >[/color]
    style.backgroun dColor=aTabs[i].dcolor;}if(bEn ableEffect)docu ment.getElement B[color=blue]
    >[/color]
    yId(aTabs[tabIndex].id).style.back groundColor=aTa bs[tabIndex].color;document[color=blue]
    >[/color]
    ..getElementByI d('b_'+aTabs[tabIndex].id).style.back groundColor=aTa bs[tabInde[color=blue]
    > x].color;var
    >[/color]
    topbar_linksEL= document.getEle mentById('topba r_links');topba r_linksEL.style .[color=blue]
    > backgroundColor =aTabs[tabIndex].color;var htLinks='<table cellspacing=0
    > cellpadding=0 border=0><tr>'; for(var
    > j=0;j<aTabs[tabIndex].links.length;j ++)htLinks+='<t d><a
    > href="'+aTabs[tabIndex].links[j].link+'"
    > target=_top>.'+ aTabs[tabIndex].links[j].label+'</a></td><td width=20
    >[/color]
    height=1></td>';htLinks+=' </tr></table>';if(tabI ndex==0&&userEm ail!="")topba[color=blue]
    > r_linksEL.inner HTML="<table cellspacing=0 cellpadding=0 width=776
    > border=0><tr><t d class=idlogin width=400
    > align=left>"+un escape(userEmai l)+"&nbsp;&nbsp ;&nbsp;&raquo ; <a class=cu
    > href=http://www.tiscali.fr/webmail/login.asp?mod=y >changer
    > d'utilisateur</a></td><td width=376
    > align=right>"+h tLinks+'</td></tr></table>';else
    > topbar_linksEL. innerHTML=htLin ks;}function
    > ChangeLogo(sPat h){document.get ElementById('im gLogo').src=sPa th;}function
    > getCookie(Cooki eName){var lf="\n";var CookieString=do cument.cookie;v ar
    > CookieSet=Cooki eString.split(' ; ');var SetSize=CookieS et.length;var
    > CookiePieces;va r ReturnValue=""; var
    >[/color]
    x=0;for(x=0;((x <SetSize)&&(Ret urnValue=="")); x++){CookiePiec es=CookieSet[x].[color=blue]
    > split('=');if(C ookiePieces[0].substring(0,1) =='
    >[/color]
    ')CookiePieces[0]=CookiePieces[0].substring(1,Co okiePieces[0].length);if(Coo[color=blue]
    > kiePieces[0]==CookieName)Re turnValue=Cooki ePieces[1];}return
    > ReturnValue;}fu nction setCookie(name, value,days){if( !days)days=-1;var
    > expire=new
    >[/color]
    Date();expire.s etTime(expire.g etTime()+864000 00*days);docume nt.cookie=name+ "[color=blue]
    >[/color]
    ="+escape(value )+";path=/;domain=tiscali .fr;expires="+e xpire.toGMTStri ng()+"[color=blue]
    > ;";}function SortLinks(a,b){ return b.count-a.count;}functi on
    >[/color]
    frmTB_valide(){ if(document.for ms["frmTB"].opt.options[document.forms["frmTB"[color=blue]
    >[/color]
    ].opt.selectedIn dex].value=='sh'){d ocument.forms["frmTBShopp ing"].qu.value=d[color=blue]
    >[/color]
    ocument.forms["frmTB"].s.value;docume nt.forms["frmTBShopp ing"].submit();retu[color=blue]
    > rn
    >[/color]
    false;}else{doc ument.forms["frmTB"].MT.value=docum ent.forms["frmTB"].s.value[color=blue]
    > ;}return
    >[/color]
    true;}try{if(se lf.topbar_tab== undefined||self .topbar_tab<1|| self.topbar_tab >[color=blue]
    > 5)var topbar_tab=1;if (self.topbar_lo go==undefined)v ar
    > topbar_logo=sDe faultLogo;}catc h(TBex){var topbar_tab=1;va r
    > topbar_logo=sDe faultLogo;}Rend er();ChangeTab( self.topbar_tab-1);
    > </script>[/color]


    This is a joke, right?
    ;-)

    Regards,
    Erwin Moller

    Comment

    • Dr John Stockton

      #3
      Re: [js] tab menu

      JRS: In article <41138f36$0$497 11$e4fe514c@new s.xs4all.nl>, dated Fri,
      6 Aug 2004 16:01:38, seen in news:comp.lang. javascript, Erwin Moller
      <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> posted :
      [color=blue]
      >Lines: 272[/color]
      [color=blue]
      >Lea wrote:
      >[color=green]
      >> Hi,
      >>
      >> I have difficulties
      >> ...[/color][/color]
      [color=blue]
      >This is a joke, right?[/color]

      Posting it all again was a non-funny joke. Read the FAQ, and learn.

      --
      © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
      <URL:http://jibbering.com/faq/> JL / RC : FAQ for news:comp.lang. javascript
      <URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
      <URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.

      Comment

      Working...