function externalLinks()
{
   if( !document.getElementsByTagName ) return;
   var anchors = document.getElementsByTagName( "a" );
   for( var i = 0; i < anchors.length; i++ )
   {
      var anchor = anchors[ i ];
      if( anchor.getAttribute( "href" ) && anchor.getAttribute( "rel" ) == "blank" )
      {
         anchor.target = "_blank";
      }
   }
}

function preload()
{
   externalLinks();
}

function launchWindow( theUrl, theHeight, theWidth )
{
   // var theX = ( screen.availWidth - theWidth ) / 2;
   // var theY = ( screen.availHeight - theHeight ) / 2;
   var theX = 0;
   var theY = 0;
   
   var theFeatures = "height=" + theHeight + "," +
                     "width=" + theWidth + "," +
                     "left=" + theX + "," +
                     "top=" + theY + "," +
                     "scrollbars=1,status=0," +
                     "menubar=1,toolbar=0," +
                     "resizable=0";
   
   var theWindow = window.open( theUrl, "theWindow", theFeatures );
   theWindow.focus();
}


/*** ltw calendar function ***/
function launchcategory( url )
{
   window.name = 'opener';
   remote = open( url, "", "resizable,status,scrollbars,width=650,height=450,left=100,top=100" );
}

function launchevent( url )
{
   self.name = "opener";
   remote = open( url, "", "resizable,scrollbars,width=650,height=450,left=100,top=100" );
}

function launchlog( url )
{
   window.name = 'opener';
   remote = open( url, "", "resizable,status,scrollbars,width=650,height=450,left=100,top=100" );
}

function launchlogin( url )
{
   window.name = 'opener';
   remote = open( url, "", "resizable,status,scrollbars,width=650,height=450,left=100,top=100" );
}

function launchuser( url )
{
   window.name = 'opener';
   remote = open( url, "", "resizable,status,scrollbars,width=650,height=450,left=100,top=100" );
}