function directTo(place){
   location = place;
}

function show(loc, langId){
	//position in the site page
   screenSite(loc, langId);
   switch(loc){
          case 0:
               label=langId==1 ? 'about' : 'about';
          break;
          case 1:
               label=langId==1 ? 'mofaim' : 'mofaim';
          break;
          case 2:
               label=langId==1 ? 'menoym' : 'menoym';
          break;
          case 3:
               label=langId==1 ? 'taharohot' : 'taharohot';
          break;
          case 4:
               label=langId==1 ? 'knasim' : 'knasim';
          break;
          case 5:
               label=langId==1 ? 'galeryot' : 'galeryot';
          break;

   }
   document.innerpage_right.TGotoLabel("/",label);
   document.innerpage_right.TStopPlay("/animation");
   //document.innerpage_right.GotoFrame(1);
   obj = eval ("document.all.menu"+loc);
   //obj.style.right=rightPos;
   obj.style.top=205;
   div = eval ("document.all.menu"+loc);
   div.style.visibility = "visible";

   obj1=eval ("document.all.divTd"+loc);
   obj1.style.backgroundColor='#f67313';
   obj1.style.color='#ffffff';

}

function hide(loc,first){
   document.innerpage_right.TPlay("/animation");
   //document.innerpage_right.GotoFrame(1);
   div = eval ("document.all.menu"+loc);
   div.style.visibility = "hidden";

   obj1=eval ("document.all.divTd"+loc);
   obj1.style.backgroundColor='f64515';

}

function drawTd(me){
   	me.style.backgroundColor = "#f6a235";
	me.style.color = "#ffffff";
	//me.style.a.color

}


function clearTd(me){
	me.style.backgroundColor = "#f64515";
	me.style.color = "#ffffff";
}




function screenSite(loc, langId){
    obj = eval ("document.all.menu"+loc);
	width = document.body.clientWidth;
    height = document.body.clientHeight;
//    window.status = width;
    if(width<779){
        far1 = 0;
    }
    else{
        far1 = (width-778)/2;
    }

    if(langId==1){
	     if(loc==0)
	       obj.style.left=far1+137;
	    else if(loc==1)
	       obj.style.left=far1+248;
	    else if(loc==2)
	       obj.style.left=far1+349;
	    else if(loc==3)
	       obj.style.left=far1+436;
	    else if(loc==4)
	       obj.style.left=far1+498;
	    else if(loc==5)
	       obj.style.left=far1+592;
	}else{
	     if(loc==0)
	       obj.style.right=far1+137;
	    else if(loc==1)
	       obj.style.right=far1+254;
	    else if(loc==2)
	       obj.style.right=far1+361;
	    else if(loc==3)
	       obj.style.right=far1+449;
	    else if(loc==4)
	       obj.style.right=far1+511;
	    else if(loc==5)
	       obj.style.right=far1+586;
	}
}
