
function getCookie(Name)
{  
 var search = Name + "=" 
 if (document.cookie.length > 0) 
    {
	offset = document.cookie.indexOf(search)       
    if (offset != -1) 
    {
	offset += search.length
    end = document.cookie.indexOf(";", offset)  
    if (end == -1)
    end = document.cookie.length 
    return unescape(document.cookie.substring(offset, end))   
 }
}
}

function firsttoolbarhide() 
{
alert("toolbar.eitan.ac.il  בחרת לסגור את תפריט איתן, להפעלתו מחדש אנא גש לכתובת");
toolbarhide()
}     

function toolbarhide()
{
themenu.display='none';
var today = new Date()
var expires = new Date() ;  
expires.setTime(today.getTime() + 1000*60*60*24*365);
document.cookie = "hide=0"+"; expires=" + expires.toGMTString()+"; path=/"+"; domain=eitan.ac.il";
}


function toolbaropenwin(File,i,h,w,site,addtitle)//file=what we whant to open,i=offset,site=from where opened
{
title=document.title;
B=240+i;
A='toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=no, scrollbars=no, width='+w+', height='+h+','+'top='+B+',left='+B;
Filetoolbarurl=File+'?site='+site;
if(addtitle)
{
Filetoolbarurl=Filetoolbarurl+'*'+title;
}
window.open(Filetoolbarurl,"",A);
}

function toolbaropenwin_withscroll(File,i,h,w,site)//file=what we want to open,i=offset,site=from where opened
{
B=240+i;
A='toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=no, scrollbars=yes, width='+w+', height='+h+','+'top='+B+',left='+B;
Filetoolbarurl=File+'?site='+site;
window.open(Filetoolbarurl,"",A);
} 

 function toolbatsurfto(form) {
        var myindex=form.google.selectedIndex
        if (form.google.options[myindex].value != "0") {
		form.google.options[myindex].value=form.google.options[myindex].value+"&qu="+form.as_q.value;
       	 location=form.google.options[myindex].value;}
		 else
		 location='http://www.google.co.il/search'+'?as_q='+form.as_q.value;
}

// for NN4/IE4
if (self.screen) {
        width = screen.width
        height = screen.height
}

// for NN3 w/Java
else if (self.java) {
       var javakit = java.awt.Toolkit.getDefaultToolkit();
       var scrsize = javakit.getScreenSize();
       width = scrsize.width;
       height = scrsize.height;
}
else {

// N2, E3, N3 w/o Java (Opera and WebTV)
width = height = '?'
}
width=width-24;
document.write(" <style>#toolbarslidemenubar, #toolbarslidemenubar2{position:absolute;left:0px;width:"+width+"px;top:-24px;border:1.5px solid green;background-color:#CCCCCC;layer-background-color:#C6C3C6;font:bold 14px Verdana;}</style>")
document.write('<style type="text/css">');
document.write(' .toolbarform {height: 15px; margin: 0px; padding: 0px;}');
document.write(' .toolbarfav2{ font-weight : bold;	font-family: arial;	font-size: 10px;	color: #FFFFFF;	padding: 1px;}');
document.write(' .toolbarfav3{	font-weight : bold;	font-family: arial;	font-size:10px;	color: #000000;	background-color: #87ADDB;	border: 1px solid #336699;}');
document.write('.atoolbar {font-family: Arial, Helvetica, sans-serif;font-size: 10px;font-weight: bold;	color: #FFFFFF;	text-decoration: none;}</style>');


var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0

if (ie4||ns6)
document.write('<div id="toolbarslidemenubar2" style="top:-24px" onMouseover="pull()" onMouseout="draw()">');
else
document.write('<layer id="toolbarslidemenubar" onMouseover="pull()" onMouseout="draw()">');

toolbarstr='<table border=0 cellpadding=0 cellspacing=1 width=100% background="http://toolbar.eitan.ac.il/new/gif/npp2.gif" height="25px">';
toolbarstr+='<tr><td><table border=0 cellpadding=0 cellspacing=0  width="100%"><tr>';
toolbarstr+='<td  nowrap  align="center">';
toolbarstr+='<img src="http://toolbar.eitan.ac.il/new/gif/close.gif" onclick="firsttoolbarhide()" style="cursor:hand">';
toolbarstr+='<td   >|</td>';
document.write(toolbarstr);
toolbarstr='</td>';
document.write(toolbarstr);

toolbarstr+='<td  nowrap  align="center"  class="toolbarfav2" onMouseOver="this.className=';
toolbarstr+="'toolbarfav3';";
toolbarstr+=' " onMouseOut="this.className=';
toolbarstr+="'toolbarfav2' ;";
toolbarstr+=' "><img src="http://toolbar.eitan.ac.il/new/gif/star_small.gif" border=0 align=absmiddle hspace=1 alt="fav">&nbsp;';
document.write(toolbarstr);

toolbarurl=location.href;
toolbarurl=toolbarurl.substr(7, toolbarurl.length);
out="<a class='atoolbar' href=\"javascript:toolbaropenwin('http://toolbar.eitan.ac.il/passport_test.php?redi=http://toolbar.eitan.ac.il/new/fav/my_fav.php',0,300,290,'"+toolbarurl+"',1)\"  >המועדפים שלי </a>";
document.write(out);

toolbarstr='</td><td   >|</td>';
toolbarstr+='<td  nowrap  align="center"  class="toolbarfav2" onMouseOver="this.className=';
toolbarstr+="'toolbarfav3';";
toolbarstr+=' " onMouseOut="this.className=';
toolbarstr+="'toolbarfav2' ;";
toolbarstr+=' "><img src="http://toolbar.eitan.ac.il/new/gif/edit.gif" border=0 align=absmiddle hspace=1 alt="pad">&nbsp;';
toolbarstr+='<a class="atoolbar"  href="javascript:toolbaropenwin';
toolbarstr+="('http://toolbar.eitan.ac.il/passport_test.php?redi=http://toolbar.eitan.ac.il/editor/my_pad.php',";
toolbarstr+='0,350,524)" >מחברת אישית</a>';
toolbarstr+='</td><td   >|</td>';
toolbarstr+='<td  nowrap  align="center"  class="toolbarfav2" onMouseOver="this.className=';
toolbarstr+="'toolbarfav3';";
toolbarstr+=' " onMouseOut="this.className=';
toolbarstr+="'toolbarfav2' ;";
toolbarstr+=' "><img src="http://toolbar.eitan.ac.il/new/gif/group.gif" border=0 align=absmiddle hspace=1 alt="talckback">&nbsp;';

document.write(toolbarstr);

toolbarurl=location.href;
toolbarurl=toolbarurl.substr(7, toolbarurl.length);
out="<a class='atoolbar' href=\"javascript:toolbaropenwin_withscroll('http://toolbar.eitan.ac.il/passport_test.php?redi=http://toolbar.eitan.ac.il/new/talkback/talkback.php',0,287,440,'"+toolbarurl+"')\" >תגובות הקוראים</a>";
document.write(out);

toolbarstr='</td><td  >|</td>';
toolbarstr+='<td  nowrap  align="center"  class="toolbarfav2" onMouseOver="this.className=';
toolbarstr+="'toolbarfav3';";
toolbarstr+=' " onMouseOut="this.className=';
toolbarstr+="'toolbarfav2' ;";
toolbarstr+=' "><img src="http://toolbar.eitan.ac.il/new/gif/poll.gif" border=0 align=absmiddle hspace=1 alt="poll">&nbsp;';
toolbarstr+='<a class="atoolbar" href="javascript:toolbaropenwin';
toolbarstr+="('http://toolbar.eitan.ac.il/passport_test.php?redi=http://toolbar.eitan.ac.il/new/poll/poll.php',";
toolbarstr+='0,190,424)" >השתתף בסקר</a>';
toolbarstr+='</td><td  ></td>    <td nowrap align="center"  class="toolbarfav2" >     </td><td  >|</td><td nowrap align="center"   width="24%"  class="toolbarfav2" >';
toolbarstr+='<form class="toolbarform" action="http://toolbar.eitan.ac.il/new/google2.php" method="get"   >';
toolbarstr+='<input style="height: 17px; font-family: Arial, Helvetica, sans-serif; font-size:12px;" type="text" name="qu"   size="15"  dir="rtl">&nbsp;<input type="image"  src="http://toolbar.eitan.ac.il/new/gif/search.gif" border=0 align=absmiddle   alt="חפש בגוגל"  >&nbsp; <select   name="goto"   dir="rtl">';

document.write(toolbarstr);

toolbarurl=location.href;
toolbarurl=toolbarurl.substr(7, toolbarurl.length);

document.write('<OPTION SELECTED  VALUE="0" >חפש ברשת</option>');
document.write('<OPTION   VALUE="1" >באתר הנוכחי</option>');
document.write('<OPTION  VALUE="2" >חפש באיתן</option></select></select> <input type=hidden name="site" value="'+toolbarurl+'"></form></td><td>|</td>');

toolbarstr='</td>';
toolbarstr+='<td  nowrap  align="center"  class="toolbarfav2" onMouseOver="this.className=';
toolbarstr+="'toolbarfav3';";
toolbarstr+=' " onMouseOut="this.className=';
toolbarstr+="'toolbarfav2' ;";
toolbarstr+=' "><img src="http://toolbar.eitan.ac.il/new/gif/about.gif" border=0 align=absmiddle hspace=1 alt="about">&nbsp;';
toolbarstr+='<a class="atoolbar" target="_blank" href="http://toolbar.eitan.ac.il/"';
toolbarstr+='>אודות</a>';
toolbarstr+='</td>';


document.write(toolbarstr);

document.write('<td>|</td><td nowrap align="center" width="10%" class="toolbarfav2"><a href="http://eitan.ac.il" ><img src="http://toolbar.eitan.ac.il/new/gif/eitan3.gif" border=0 align=absmiddle hspace=1 border="0" alt="eitan home page"></a>&nbsp; &nbsp;תפריט איתן</td>');
document.write('</tr></table></td></tr></table>');

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (ns4)
setTimeout("window.onresize=regenerate",400)
}
window.onload=regenerate2
if (ie4||ns6){
document.write('</div>')
themenu=(ns6)? document.getElementById("toolbarslidemenubar2").style : document.all.toolbarslidemenubar2.style
topboundary=-2
buttomboundary=-24
}
else{
document.write('</layer>')
themenu=document.layers.toolbarslidemenubar
topboundary=-2
buttomboundary=-24
}

function pull(){
if (window.drawit)
clearInterval(drawit)
pullit=setInterval("pullengine()",50)
}



function draw(){
clearInterval(pullit)
drawit=setInterval("drawengine()",50)
}



function pullengine(){
if (ie4&&themenu.pixelTop<topboundary)
themenu.pixelTop+=5
else if (ns6&&parseInt(themenu.top)<topboundary)
themenu.top=parseInt(themenu.top)+5
else if( ns4&&themenu.top<topboundary)
themenu.top+=5
else if (window.pullit)
clearInterval(pullit)
}

function drawengine(){
if (ie4&&themenu.pixelTop>buttomboundary)
themenu.pixelTop-=1
else if (ns6&&parseInt(themenu.top)>buttomboundary)
themenu.top=parseInt(themenu.top)-1
else if(ns4&&themenu.top>buttomboundary)
themenu.top-=1
else if (window.drawit)
clearInterval(drawit)
}

if(cookie=getCookie("hide"))
{
if(cookie==0)
toolbarhide()
} 

