var redirect="/redir.php?";

function popW(url,l,t,w,h,hidden)
{
  if (navigator.appName=="Netscape") {oWin=window.open("","_blank","toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1");}
  else{if (navigator.appName=="Microsoft Internet Explorer"){oWin=window.open("","","toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1");}}
  if (oWin!=null)
	{
	if (hidden)
	{
		oWin.blur();
		self.focus();
		oWin.resizeTo(w,h);oWin.moveTo(l,t);oWin.location=url;
	}
	else
	{
		oWin.blur();
		oWin.resizeTo(w,h);oWin.moveTo(l,t);oWin.location=url;
		oWin.focus();
	}
	}
}


function GoTo(URL)
		{window.location=redirect + URL;}

function popup(URL)
{
	popW(redirect + URL, 10,20,800,700,0);
}

function popunder(URL)
{
	popW(URL, 20,20,850,700,1);
}

function pophidden(URL)
{
	popW(URL, 2000,2000,1,1,1);
}

function pophex(URL)
{
    popup(fromhex(URL));
}

function fromhex(str) {
	var url='';
	len = str.length / 2;
	for (i=0; i<len; i++) {url += unescape('%' + str.substr(i*2,2))}
	return url;
}

