var PopW;
PopW=0;

//Preload menu
var mImg1 = new Image;
var mImg2 = new Image;
mImg1.src = 'img/menu3/ar.gif';
mImg2.src = 'img/menu3/ar-up.gif';


function CI(who,what)
{
  obj = document.getElementById('m'+who);
  cls = '';
  if (what) {cls = 'menuTdUp'};

  obj.className = cls;

}

function PopTextScroll(path,w,h)
{
  stepLeft=100;
  stepTop=100;
  ww = w;
  hh = h;

  //if (ww > 800){ww = 800};
  //if (hh > 600){hh = 600};

  if (PopW) {PopClose();};
  PopW = window.open(path,'poptext','marginheight=0,marginweight=0,toolbar=no,width='+ww+',height='+hh+', left='+stepLeft+', top='+stepTop+', resizable=no, scrollbars=yes');
  PopW.focus();
};

function PopClose()
{
  PopW.close();
  PopW=0;
};

function popImg(path,wIn,hIn,stepLeft,stepTop)
{
  if (!stepLeft) {stepLeft=200;};
  if (!stepTop) {stepTop=200;};
  w = wIn;
  h = hIn;
  ww = wIn + 50;
  hh = hIn + 50;

  if (PopW) {PopClose();};
  PopW = window.open('/popimg.html?'+path+'&'+w+"&"+h,'poppic','marginheight=0,marginweight=0,toolbar=no,width='+ww+',height='+hh+', left='+stepLeft+', top='+stepTop+', resizable=no, scrollbars=no');
  PopW.focus();
};

function PopImg2(img,w,h)
{
  ww = w + 50;
  hh = h + 50;
  path=img;

  if (PopW) {PopClose();};
  PopW=window.open('/popimg.html?'+path+'&'+w+"&"+h,'poppic','marginheight=0,marginweight=0,toolbar=no,width='+ww+',height='+hh+', left=100, top=100, resizable=no, scrollbars=no');
  PopW.focus();
}

function popFscroll(path,wIn,hIn)
{
  stepLeft=10;
  stepTop=10;
  w = wIn;
  h = hIn;
  ww = wIn + 50;

  if (PopW) {PopClose();};
  PopW = window.open('/popimg.html?'+path+'&'+w+"&"+h,'poppic','marginheight=0,marginweight=0,toolbar=no,width='+ww+',height='+700+', left='+stepLeft+', top='+stepTop+', resizable=no, scrollbars=yes');
  PopW.focus();
};
