/****************************************************
     Popup window generator provided for free at Hypergurl
     Url: http://www.hypergurl.com
     Author: Eric King
     Url: http://eak.digitalrice.com
     This script is free to use as long
     as this info is left in
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos)
{
  if( pos=="random" )
  {
    LeftPosition=(screen.availWidth)?Math.floor(Math.random()*(screen.availWidth-w)):50;
    TopPosition=(screen.availHeight)?Math.floor(Math.random()*((screen.availHeight-h)-75)):50;
  }
  if( pos=="center" )
  {
    LeftPosition=(screen.availWidth)?(screen.availWidth-w)/2:50;
    TopPosition=(screen.availHeight)?(screen.availHeight-h)/2:50;
  }
  if( pos=="default" )
  {
    LeftPosition=50;
    TopPosition=50
  } else if( (pos!="center" && pos!="random" && pos!="default") || pos==null )
  {
    LeftPosition=0;
    TopPosition=20;
  }

  settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';

  wkkfWin=window.open(mypage,myname,settings);

  if(wkkfWin.focus){wkkfWin.focus();}
}

function CloseNewWin()
{
  if( wkkfWin!=null && wkkfWin.open )
    wkkfWin.close();
}

function ExternalLink(URL)
{
  window.open(URL);
}

/*-------------------------------------------------
 * Cross-browser Script to alter the content.
 * Obtained and modified from: 
 *  http://www.javascriptkit.com/javatutors/dynamiccontent5.shtml
 */
function AlterContent(ControlID, Content)
{
  //if IE 4+
  if (document.all)
    eval(ControlID).innerHTML = Content;
  //else if NS 4
  else if (document.getElementById)
  {
      document.getElementById(ControlID).innerHTML = Content;
  }
} // AlterContent()

/*-------------------------------------------------
 * Script to help hide email address from crawlers
 */
function SendMail(Addr) 
{
  var MailTo = 'mailto:' + Addr;
  document.location = MailTo;
  return;
} // SendMail()

// Hide from the code havesters.
function SM(s,u)
{
  var m = 'mailto:' + u + '@' + s;
  document.location = m;
  return;
} // SM()

/*-------------------------------------------------
 * Cross-browser script to show and hide an element id on the page
 */
function ShowHideContent(objID)
{
  var obj = document.getElementById(objID);

  if( (obj.style.display == 'none') || (obj.style.display == '') )
    obj.style.display = 'block';
  else
    obj.style.display = 'none';
}




