//------ get element ------------//

/*   function gg(aID)
   {
     var element = null;
     var br=window.navigator.appCodeName;

     switch(br){
       case "Mozilla": element=document.getElementById(aID);break;
       case "IE5": element=document.getElementById(aID);break;
       case "Netscape4": element=document.layers[aID];break;
       case "IE4": element=document.all[aID];
     }
     return element;
   }
*/
var iebody=(document.compatMode && document.compatMode != "BackCompat")?document.documentElement : document.body;


//------ mouseover meniu --------//
  function ov(i)
  {
    for(j=0;j<t;j++)
    {
      with (document.getElementsByTagName("div").item(n+j)){
        innerHTML="";
        style.top=0;
        style.fontSize=0;
        style.backgroundColor="";
      }
    }    
    with (document.getElementsByTagName("div").item(i).style)
    {
      color="Crimson";
      backgroundColor="NavajoWhite"
      fontWeight="700"
    }
    var s=0;

    for(var j=0;j<i;j++)
      s+=b[j];
    var tttop=0;
    for(j=0;j<b[i];j++)
    {
       with (document.getElementsByTagName("div").item(n+j)){
         style.textIndent="0px";
//	 if((i==17)&&(j!=1))style.textIndent="25px";
//	 innerHTML=(((i==17)&&(j==1))?"<img alt='new' src='"+locatie+"pictures\/new.gif' height='15px' width='20px' align='absbottom'> ":"")+m[s+j];
	 innerHTML=m[s+j];
         title=m[s+j];
         style.top=document.getElementsByTagName("div").item(i).offsetTop+tttop; //+
           //document.getElementById("sss").offsetTop+tttop; //4+j*17;
         style.left=document.getElementsByTagName("div").item(i).offsetLeft+138; 
         style.fontSize="9pt";
         style.backgroundColor="BlanchedAlmond";
         tttop+=document.getElementsByTagName("div").item(n+j).offsetHeight;
       }
    }
    ales=i;
  }
//------ mouseout meniu --------//  
  function ou(i)
  {
   if(ales!=-1){
   with (document.getElementsByTagName("div").item(i).style)
    {
      color="brown";
      backgroundColor="BlanchedAlmond";
      fontWeight="500"
    }
    if(b[i]==0)
    {
      for(j=0;j<t;j++)
      {
        with (document.getElementsByTagName("div").item(n+j)){
          innerHTML="";
          style.top=0;
          style.fontSize=0;
          style.backgroundColor="";
        }  
      }
      ales=-1;
    }  
    document.getElementsByTagName("div").item(pagina).style.backgroundColor="NavajoWhite";
    }
  }
//------- click meniu ----------//
  function cl(i)
  {
    for(j=0;j<t;j++)
    {
      with (document.getElementsByTagName("div").item(n+j)){
        innerHTML="";
        style.top=0;
        style.fontSize=0;
        style.backgroundColor="";
      }  
    }    
   document.getElementsByTagName("div").item(i).style.backgroundColor="red";
    
    if((a[i]=="Forum")||(a[i]=="Grades Online"))window.open(fisier[i]);
      else window.location.href=fisier[i];
  }

//----- mouseover submeniu ------//
  function ovm(j)
  {
   if(ales!=-1)
   {
    with (document.getElementsByTagName("div").item(n+j).style){
      color="Crimson";
      backgroundColor="NavajoWhite"
    }
   
    with (document.getElementsByTagName("div").item(ales).style)
    {
      color="Black";
      backgroundColor="Moccasin"
      fontWeight="700"
    }
   }
  }
//----- mouseout submeniu ------//  
  function oum(j)
  {
   if(ales!=-1)
   {
    with (document.getElementsByTagName("div").item(n+j).style)
    {
      color="brown";
      backgroundColor="BlanchedAlmond";
    }

    with (document.getElementsByTagName("div").item(ales).style)
    {
      color="brown";
      backgroundColor="";
      fontWeight="500"
    }
   } 
  }
//------ click submeniu --------//
  function clm(j)
  {
    var s=0;
    for(var k=0;k<ales;k++)
      s+=b[k];
    for(k=0;k<t;k++)
    {
      with (document.getElementsByTagName("div").item(n+k)){
        innerHTML="";
        style.top=0;
        style.fontSize=0;
        style.backgroundColor="";
      }
    }
    window.location.href=subfisier[j+s];
  }

//------- submeniuri -------//
function submeniuri()
{
  for(var i=0;i<t;i++)
  {
    document.write("<div id='submeniu' onmouseover='ovm("+i+")' onmouseout");
    document.write("='oum("+i+")' onclick='clm("+i+")'></div>");
  }
}

//------- fuzzy image -----//
function change(x,y,fx,fy,normal)
{
	with(document.getElementById("chestie").filters.alpha){
	   style=normal;
	   if(normal==1)
		   finishOpacity=25;
	   else
		   finishOpacity=0;
	   startX=x;
	   startY=y;
	   finishX=fx;
	   finishY=fy;
	}
}

//----- titlul paginii ---//
function titlu()
{
	document.write("<div ");
	document.write("id='titlumare' onmouseover='style.borderStyle=\"outset\";");
	document.write("style.background=\"blanchedalmond\"' onmouseout='style.borderStyle=\"inset\";");
	document.write("style.background=\"none\"'>");
	window.status='Welcome to LAUDER - REUT Educational Complex'
}
  
  
function buton(fo,tex)
{
document.write("<button style=\"color:maroon;background:none\" onmouseover=\"style.background='blanchedalmond'\" onmouseout=\"style.background='none'\" onclick=\"document.getElementById('"+fo+"').submit()\">"+tex+"</button>");
}
  
function termin(){
   clearTimeout(mm);
   mm=0;
}
function misca(){
    s=0;
    for(var k=0;k<n;k++)
      s+=b[k];
   with(document.getElementsByTagName("div").item(s+2)){
   alert(offsetTop-style.top);
   if(offsetTop>-randuri*12)
	style.top=offsetTop-1;
   else
	style.top=0;
	}
 //  mm=setTimeout("misca()",110);
}  
function incep(){
/*   with(document.getElementsByTagName("p")){
        item(3).style.border="none";
        item(5).style.left=item(5).offsetLeft-2;
        item(5).style.top=item(5).offsetTop-2;
        item(5).style.visibility="visible";
   }*/
}        


function positionit(i){
    var dsoctop=document.all? iebody.scrollTop : pageYOffset;
    hi=dsoctop+document.getElementsByTagName("table").item(0).clientHeight+15;
    if((!hh)&&(i))hh=document.all?iebody.scrollHeight-document.body.clientHeight:window.scrollMaxY;
    aaa=(typeof(window.innerHeight) == 'number')?window.innerHeight:
      (document.documentElement.clientHeight?document.documentElement.clientHeight:
      ( document.body.clientHeight?document.body.clientHeight:801 ));
    if ((!i)||(hi<hh+document.getElementsByTagName("table").item(0).clientHeight))
      {
       for(var i=0;i<n;i++)
       {
        document.getElementsByTagName("div").item(i).style.top=hi+"px";
        if(aaa>790)
          switch(i){
            case 7:hi+=42;break;
            case 8:hi+=42;break;
//            case 17:hi+=42;break;
            default:hi+=28;
          }
        else
          switch(i){
            case 7:hi+=34;break;
            case 8:hi+=34;break;
//            case 17:hi+=34;break;
            default:hi+=20;        
          }
       }
        if(aaa>790)
           hi+=28;
        else
           hi+=20;
        document.getElementsByTagName("p").item(0).style.top=hi+"px";
    }
}

function completeaza()
{

}

//------- generare meniu -------//
    window.status='Welcome to LAUDER - REUT Educational Complex'
    var n,t;
    var a = new Array();
    var b = new Array(0,9,0,2,2,2,2,11,6,		
                      0,0,0,0,0,0,0,0,2,0,0);			//cate submeniuri la fiecare meniu
    var m = new Array();
    var fisier = new Array();
    var subfisier = new Array();
    var ales=-1;

    a[0]="Home";
    a[1]="About us";
    a[2]="News";
    a[3]="Kindergarten";
    a[4]="Elementary";
    a[5]="Secondary";
    a[6]="High School";
    a[7]="Our Projects / Parnerships";
    a[8]="Extracurricular Activities";
    a[9]="Olympics/Contests";
    a[10]="PTF";
    a[11]="Newspaper"
    a[12]="Pictures"
    a[13]="Lauder Links"
    a[14]="Jewish Links"
    a[15]="Career Opportunities"
//    a[16]="Our sponsors"
    a[16]="Grades Online"
    a[18]="Forum"
    a[17]="Quality in Education";
    n=19;
    hh=0;
    m[0]="A message from our founder";
    m[1]="The Ronald S. Lauder Foundation"
//    m[2]="Romania - A story of a New Beginning";
    m[2]="The Ronald S. Lauder Foundation Report";
    m[3]="Mission statement";
    m[4]="Admission";
    m[5]="Accreditation";
    m[6]="Staff and Board";
    m[7]="Professional training";
    m[8]="Contact info";
    m[9]="Organization chart";
    m[10]="Kindergarten offer";
    m[11]="Organization chart";
    m[12]="Elementary offer";
    m[13]="Organization chart";
    m[14]="Secondary offer";
    m[15]="Organization chart";
    m[16]="High School offer";
	m[17]="Weizmann Institute";
	m[18]="From Grey to Green";
    m[19]="Comenius Project";
    m[20]="Grundtvig Project";
    m[21]="L.A. Pincus Fund";
    m[22]="Center for the Jewish History";
    m[23]="Dutch Jewish Humanitarian Fund";
    //m[18]="Cooperation with the Fullbright Commission";
    m[24]="Cooperation with the British Council";
    m[25]="Ellie Wiesel Institute";
    m[26]="Partnerships with international schools & organizations";
    m[27]="Partnerships with national educational institutions and organizations";
    m[28]="Clubs";
    m[29]="Study Trips";
    m[30]="Students' highlights";
    m[31]="Szarvas camp";
    m[32]="Summer school";
    m[33]="Charity and Community Projects";
    m[34]="Strategic Targets";
    m[35]="Self Evaluation";
    t=11;
    
    fisier[0]=locatie+"..\/index.php";
    fisier[1]=locatie+"about.php";
    fisier[2]=locatie+"news.php";
    fisier[3]=locatie+"kindergarten.php";
    fisier[4]=locatie+"elementary.php";
    fisier[5]=locatie+"secondary.php";
    fisier[6]=locatie+"college.php";
    fisier[7]=locatie+"projects.php";
    fisier[8]=locatie+"extraschool.php";
    fisier[9]=locatie+"contest.php";
    fisier[10]=locatie+"ptf.php";
    fisier[11]=locatie+"newspapers.php";
    fisier[12]=locatie+"pictures.php";
    fisier[13]=locatie+"llinks.php";
    fisier[14]=locatie+"links.php";
    fisier[15]=locatie+"jobs.php";
//    fisier[16]=locatie+"sponsors.php"
    fisier[16]="http://www.cataloglauder.ro";
    fisier[18]="http://lauderschool.traducator.info/forum/"; //locatie+"blank.php";
    fisier[17]=locatie+"quality.php";
    
    subfisier[0]=locatie+"message.php";
    subfisier[1]=locatie+"europe.php";
//    subfisier[2]=locatie+"story.php";
    subfisier[2]=locatie+"about/report.pdf";
    subfisier[3]=locatie+"mission.php";
    subfisier[4]=locatie+"admission.php";
    subfisier[5]=locatie+"accreditation.php";
    subfisier[6]=locatie+"staff.php";
    subfisier[7]=locatie+"training.php";
    subfisier[8]=locatie+"about.php#contact";
    subfisier[9]=locatie+"chartkind.php";
    subfisier[10]=locatie+"kindergarten.php";
    subfisier[11]=locatie+"chartelem.php";
    subfisier[12]=locatie+"elementary.php";
    subfisier[13]=locatie+"chartgym.php";
    subfisier[14]=locatie+"secondary.php";
    subfisier[15]=locatie+"charthigh.php";
    subfisier[16]=locatie+"college.php";
	subfisier[17]=locatie+"projects/weizmann.php";
    subfisier[18]="../../greytogreen.php";
	subfisier[19]=locatie+"projects/comenius.php";
    subfisier[20]=locatie+"projects/grundtvig.php";
    subfisier[21]=locatie+"projects/pincus.php";
    subfisier[22]=locatie+"projects/history.php";
    subfisier[23]=locatie+"projects/dutch.php";
//    subfisier[18]=locatie+"projects/fullbright.php";
    subfisier[24]=locatie+"projects/british.php";
    subfisier[25]=locatie+"projects/wiesel.php";
    subfisier[26]=locatie+"projects/intsch.php";
    subfisier[27]=locatie+"projects/natsch.php";
    subfisier[28]=locatie+"extra/clubs.php";
    subfisier[29]=locatie+"extra/trip.php";
    subfisier[30]=locatie+"extra/highlights.php";
    subfisier[31]=locatie+"extra/summer.php";
    subfisier[32]=locatie+"extra/sschool.php";
    subfisier[33]=locatie+"extra/community.php";
    subfisier[34]=locatie+"targets.php";
    subfisier[35]=locatie+"selfeval.php";

    for(var i=0;i<n;i++)
    {
       document.write("<table style='height:28px'><tr><td>&nbsp;</td></tr></table>");
       document.write("<div id='meniu' title='"+a[i]+"' onmouseover=");
       document.write("'ov("+i+")' onclick='cl("+i+")' onmouseout=");
       document.write("'ou("+i+")' style='");
       switch(i){
       case 7:document.write("height:42px'>");break;
       case 8:document.write("height:42px'>");break;
       case 9:document.write("height:28px'>");break;
       default:document.write("height:28px'>");
       }
       ((i==3)||(i==9)||(i==12))?document.write("<img alt='new' src='"+locatie+"pictures\/new.gif' height='14pt' width='16pt' align='absbottom'> "):document.write("");
//       (i==18)?document.write("<font color='gray'>"):document.write("");
       document.write(a[i]+"</div>");
	   
    }
    document.write("<table style='height:42px'><tr><td>");
    document.write("<p id='ff' style='text-align:center;font-size:smaller;position:absolute;width:128px'><a href='"+locatie+"disclaimer.php'>Data Protection Policy - Privacy Disclaimer</a></p>");
    document.write("</td></tr></table>");
    document.write("<table style='height:28px'><tr><td></td></tr></table>");    
    positionit(0);
     
    document.getElementsByTagName("div").item(pagina).style.border="1pt groove brown";
    document.getElementsByTagName("div").item(pagina).style.backgroundColor="NavajoWhite";
    document.getElementsByTagName("table").item(1).rows.item(0).cells.item(0).width="150px";
    document.write("<body onscroll='positionit(1)'>");
