var pop = null;

function popdown() {
  if (pop && !pop.closed) pop.close();
}

function newSite(obj,w,h) {
  var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
  if (!url) return true;
  w = (w) ? w += 0 : 150;  // 150px*150px is the default size
  h = (h) ? h += 0 : 150;
	l = (screen.width/2)-(w/2)+90+(w/2);
	t = (screen.height/2)-(h/2)+90;
  var args = 'width='+w+',height='+h+',resizable,scrollbars=yes,top='+t+',left='+l;
  popdown();
  pop = window.open(url,'WalkerSmallWindow',args);
  return (pop) ? false : true;
}

window.onunload = popdown;
window.onfocus = popdown;

var walker = null;


function startWalker(obj,w,h) {
  var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
  if (!url) return true;
  w = (w) ? w += 0 : 150;  // 150px*150px is the default size
  h = (h) ? h += 0 : 150;
  var args = 'width='+w+',height='+h+',resizable,top=20,left=20';
  walker = window.open(url,'walker',args);
  return (walker) ? false : true;
}

