var name="",pW=320,pH=240,pic=0,rY=-195,speed=5;tid=tid1=tid2=0;
window.onload=function () {setoverout ()};
window.document.onmousemove=function (event) {follow (event)};
function popimghide(){pic=0;hide$("jpic")}
function popimg(n) {name="b"+n.src.substring(n.src.lastIndexOf("/")+2,n.src.length);
$("jpic","<img src='"+name+"' id=jimg style='width:320px;height:240px;background-color:black;position:absolute;top:0px;left:0px'><img src='loading.gif' id='jimgp' style='position:absolute;top:104px;left:144px'>");
$("jimg").onload=function () {hide$("jimgp");$("jimg").onload=null};pic=1}
function hide$(id) {$(id).style.visibility="hidden"}
function follow(e) {if (!e) e=window.event
if (pic) {pId=$('jpic').style;var ympos=e.clientY,ympos=ympos-((ympos/pageHeight())*pH);
if (ympos) ympos=ympos+posTop()
pId.position="absolute";pId.left=e.clientX+30+"px";pId.top=ympos+"px";pId.visibility="visible";$("jimgp").style.visibility=($("jimg").complete)? "hidden":"visible"}
if (e.clientY>131 && e.clientY<191) {nfolink.href="info"+((e.clientY>170)?"en":(e.clientY<151)?"lv":"ru")+".html";}}
function $(id,dta) {if (typeof dta!="undefined") document.getElementById(id).innerHTML=dta
return document.getElementById(id)}
function posTop()
{return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ?
 document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;}
function pageWidth() 
{return  window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ?
  document.documentElement.clientWidth : document.body != null? document.body.clientWidth : null;}
function pageHeight()
{return  window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ?
  document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;}
function opacity (id,pct) {var obj=$(id).style;obj.filter="alpha(opacity="+pct+")";pct=pct/100;
obj.opacity=pct;obj.MozOpacity=pct;obj.KhtmlOpacity=pct;}
function rollout () {rs=speed*-1;roll()}
function roll() {$("jmenu").style.height=(195+rY)+"px";$("ne").style.top=rY+"px";$("ne").style.height="195px";
if ((rs>0 && rY<0) || (rs<0 && rY>-195)) {rY=rY+rs;tid=setTimeout("roll()",3)}
if (rs<0 && rY<=-195) hide$("jmenu")}
function hhide(){$("map",' ');}
function setoverout () {$("v3",'<div id="jmenu"></div><div id="jpic"></div><div id="gmap"></div>');
$("map",'<img src="loading.gif" style="margin:14px;">');
picarray=document.images;for (i=0;i<picarray.length;i++)
{n=picarray[i];if (n.src.charAt(n.src.lastIndexOf("/")+1)=="s" ) 
{picarray[i].onmouseover=function () {popimg(this)};picarray[i].onmouseout=function () {popimghide ()};}}
$("vmenu").onmouseover=function () {showmenu()};$("vmenu").onmouseout=function () {hidemenu()};
$("jmenu").onmouseover=function () {showmenu()};$("jmenu").onmouseout=function () {hidemenu()};
$("map").onmouseover=function () {showmap()};$("map").onmouseout=function () {hidemap()};
$("gmap").onmouseover=function () {showmap()};$("gmap").onmouseout=function () {hidemap()};
var dta='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" onload="hhide()" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=lv&amp;geocode=&amp;q=melnsila+23+riga&amp;sll=57.007094,23.862305&amp;sspn=0.310337,1.045074&amp;g=riga&amp;ie=UTF8&amp;msa=0&amp;msid=105951266449462007385.0004552350790cd0b245e&amp;s=AARTsJrKCmFtjX7EwHFGFiWVnukab2F_AQ&amp;ll=56.951575,24.06847&amp;spn=0.016383,0.036478&amp;z=14&amp;iwloc=addr&amp;output=embed"></iframe>';
$("gmap",dta);opacity("nav",90);opacity("jmenu",90);
document.getElementsByTagName("a")[1].href="jgalery.html";nfolink=document.getElementsByTagName("a")[2];
if ($("la")) {opacity("la",30);opacity("ra",30);$("lb").onmouseover=function () {overarrow("la")};$("lb").onmouseout=function () {outarrow("la")};
$("rb").onmouseover=function () {overarrow("ra")};$("rb").onmouseout=function () {outarrow("ra")};
$("lb").onclick=function () {arclick("la")};$("rb").onclick=function () {arclick("ra")};
scr=1;scrmax=5;scrw=1;}}
function overarrow(num) {if ($(num)) $(num).style.visibility=((scr>1 && num=="la") || (scr<scrmax && num=="ra"))?"visible":"hidden"}
function outarrow(num) {adir="";hide$(num)}
function arclick(num) {if ($(num).style.visibility=="visible" && scrw) {scrw=0;scr+=((num=="la")?-1: 1);adir=num;$("s2").src="i"+scr+".jpg";
$("s2").onload=function () {complete()};if ($("s2").complete) complete()}}
function complete() {$("s2").onload=null;pct=0;spct("s1","s2")}
function spct (id1,id2) {opacity(id1,100-pct);opacity(id2,pct);pct+=10;
if (pct<100) setTimeout("spct ('"+id1+"','"+id2+"')",50)
 else setTimeout("spctf ('"+id1+"','"+id2+"')",50)}
function spctf (id1,id2) {opacity(id1,0);opacity(id2,100);$(id1).src=$(id2).src;opacity(id1,100);opacity(id2,0);scrw=1;overarrow(adir)}
function showmenu() {rs=speed;tid=cleartim(tid);tid1=cleartim(tid1);
if (rY<=-195) {var dta='<div id="ne"><a href="susi.html">Suši - Суши -Sushi</a><a href="zupas.html">Zupas - Супы - Soups</a><a href="uzkodas.html">Uzkodas - Закуски - Appetizers</a><a href="cukgala.html">Cūkgaļa - Свинина - Pork</a><a href="lielops.html">Liellops - Говядина - Beef</a><a href="vista.html">Vista - Курица - Chicken</a><a href="jurasprod.html">Jūras produkti - Морепродукты - Seafood</a><a href="kplats.html">Karstā plāts - Горячая тарелка - Hotpot</a><a href="pile.html">Pīle - Утка - Duck</a><a href="darzeni.html">Dārzeņi - Овощи - Vegetables</a><a href="risi.html">Rīsi un nūdeles - Рис и лапша - Rice and noodles</a><a href="deserts.html">Deserts - Десерт - Desert</a><a href="bdzerieni.html">Dzerieni - Напитки - Drinks</a></div>';
$("jmenu",dta).style.visibility="visible"};$("jmenu").style.left=xypos($("vmenu")).x+"px";roll()}
function hidemenu() {tid1=setTimeout("rollout()",3)}
function showmap() {tid2=cleartim(tid2);$("gmap").style.left=xypos($("map")).x-365+"px";$("gmap").style.visibility="visible"}
function hidemap() {tid2=setTimeout("hide$('gmap')",500)}
function cleartim(tim) {if (tim) clearTimeout(tim)
return null}
function xypos(num) {var r={x:num.offsetLeft, y:num.offsetTop};if (num.offsetParent) {var tmp=xypos(num.offsetParent);r.x+=tmp.x;r.y+=tmp.y};
return r}