var mCur;
function weather()
{
 	fr1.location="http://www.meteoinfo.ru/informer/informer.php?ind="+parent.city.value+"&type=3&color=167";
 	setc();
}
function setc()
{
today = new Date();
today.setTime(today.getTime());
expires = 10080 * 1000 * 60;
d = new Date(today.getTime() + (expires));
var coo = "pugoocity=" + top.city.value + "; path=/; expires="+d.toGMTString();
document.cookie = coo;
}

function getc()
{
c_name="pugoocity";
if (document.cookie.length > 0)
{
c_start=document.cookie.indexOf(c_name + "=")
if (c_start!=-1)
{
c_start=c_start + c_name.length+1
c_end=document.cookie.indexOf(";",c_start)
if (c_end==-1) c_end=document.cookie.length
coo=unescape(document.cookie.substring(c_start,c_end))
city.value=coo;
weather();
}
else {top.city.value=33345;weather();}
}
document.f.q.focus();
}
 function tip(txt)
 { x=mCur.x; y=mCur.y;
 h=document.body.clientHeight+document.body.scrollTop;
 if (parseInt(txt.length)<53) tips.style.width="";
 else tips.style.width=350;
 tips.style.visibility="hidden"; height=(parseInt(txt.length/53)+1)*15;
 tips.style.left=x+5; tips.style.top=y+10; tips.style.opacity=1; tips.style.background="#DDFFDD"; dy=y+10+height-h;
 if (dy>0) tips.style.top=y-dy
 tips.innerHTML=txt;
 tips.style.visibility="visible";
  }
 function tipout()
 {
 tips.style.visibility="hidden";
 }

function c1()
{
document.f.list.disabled=0;
document.f.r1.checked=0;
document.f.r2.checked=0;
document.f.r3.checked=0;
}
function c2()
{
document.f.list.disabled=1;
document.f.log.checked=0;
}

function mousePageXY(e)
{
  var x = 0, y = 0;
  if (!e) e = window.event;
  if (e.pageX || e.pageY)
  {
    x = e.pageX;
    y = e.pageY;
  }
  else if (e.clientX || e.clientY)
  {
    x = e.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft) - document.documentElement.clientLeft;
    y = e.clientY + (document.documentElement.scrollTop || document.body.scrollTop)- document.documentElement.clientTop;
  }
  return {"x":x, "y":y};
}

document.onmousemove = function(e){mCur = mousePageXY(e); };


