/* Erotic Trade Only Javascripts Functions */

function navSet(id)
{
  var img = id;
  document.getElementById(id).style.backgroundImage = "url(/images/nav/tab-"+id+"-sel.gif)";
}

function openWin(url, width, height)
{
  window.open(url, 'NewWin', 'width='+ width +', height='+ height +', scollbars=1');
}

/*
Auto center window script- Eric King (http://redrival.com/eak/index.shtml)
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

var win = null;
function NewWindow(mypage,myname,w,h,scroll)
{
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'

  win = window.open(mypage,myname,settings)
}

function bookmarksite(title, url)
{
	if (document.all)
	window.external.AddFavorite(url, title);
	else if (window.sidebar)
	window.sidebar.addPanel(title, url, "")
}

function clearopt(opt)
{
  var field = document.getElementsByName(opt);

  for (var i=0; i<field.length; i++)
  {
    field[i].checked = 0;
  }
}