function nw(source)
{
window.open(source);
}


function newindow(source,x,y,scroll)
{
if (scroll == 1){
window.open(source,'_blank','scrollbars=yes,resizable=yes,width='+x+',height='+y+',toolbar=no,location=no,status=no,menubar=no');} else {
window.open(source,'_blank','scrollbars=no,resizable=no,width='+x+',height='+y+',toolbar=no,location=no,status=no,menubar=no');}

}

function newidow(source,x,y) 
{
  window.open(source,'','scrollbars=no,resizable=no,width=10,height=10,toolbar=no,location=no,status=no,menubar=no');
}
var footer = '&copy; Tatarica, 2010 &nbsp;&nbsp;<font size=2><a href="javascript:newindow(\'http://tatarica.com/legal/terms.htm\',\'400\',\'600\',\'1\');">Terms</a></font>';

function showmenu(sel)
{
var display="";
if (sel=='achievements')
{
display = "secondaryselect="+sel;
} else { display="selected="+sel;}
var menu = "<iframe id='ifrm' name='ifrm' src='http://tatarica.com/cgi-bin/topmenu.cgi?"+display+"' scrolling='no'  width='650' height='23' frameborder='0'></iframe>";
document.write(menu);
}

function photomenu(sel,sec)
{
var display="";
if (sec == null)
{
display="selected="+sel;
} else { 
  display = "selected="+sel+"&secondaryselect="+sec;}
var menu = "<iframe id='ifrm' name='ifrm' src='http://tatarica.com/cgi-bin/menu.cgi?"+display+"' scrolling='no'  width='250' height='320' frameborder='0'></iframe>";
document.write(menu);
}


function changeFra(id,x,y,what)
{  //what = 1 - parent
   
   if (what == 1)
   {
    document.getElementById(id).height=y+"px";
    document.getElementById(id).width=x+"px";
   } 
   if (what == 2) //auto
   {

    var frame= document.getElementById(id);
    var src = frame.src;
    alert(src);
     if (src == 'http://tatarica.com:8081/cgi-bin/login/status.cgi')
     {
      frame.height = "30px";
      frame.width = "200px";
     } else 
     {  frame.height = "300px";
        frame.width = "200px";
     }
   }
}

function moveTo(id, x,y)
{
  document.getElementById('ifrupload').style.position="absolute";   
  document.getElementById('ifrupload').style.top=y+"px"; 
  document.getElementById('ifrupload').style.left=x+"px"; 
} 