/*
 * Copyright 2002 by All Time Flash Dreamer
 * 
 * This script collection contains the necessary JavaScript methods
 * for the alltimeflashdreamer.org page to work properly.
 */
 //-----------------------------------------------------------------
 /*
  * The redirect function knows where to redirect the client to, depending
  * on the URL that was called to get here. It finds out where the client
  * shall be redirected to and calls the appropriate redirect method.
  */
function redirect()
{
	var redirectTarget = document.location.href.substring( 0, document.location.href.lastIndexOf( "/" ) + 1 ) + "overview.html";
	if ( document.location.href.indexOf( "sake" ) >= 0 )
		redirectToSake();
	else if ( document.location.href.indexOf( "filelister" ) >= 0 )
		redirectToFileLister();
	else if ( document.location.href.indexOf( "log4jmonitor" ) >= 0 )
		redirectToLog4JMonitor();
	else if ( document.location.href.indexOf( "mailwebform" ) >= 0 )
		redirectToMailWebForm();
	else if ( document.location.href.indexOf( "mhldb2" ) >= 0 )
		redirectToMHLDB2();
	else
		document.location.href = redirectTarget;
}

/*
 * Redirects the client to Sake.
 */
function redirectToSake()
{
	top.location.href = "http://ente.limmat.ch:8080/sake/mail?sake.skin=modern";
}

/*
 * Redirects the client to FileLister.
 */
function redirectToFileLister()
{
	top.location.href = "http://ente.limmat.ch/filelister/doc/index.html";
}

/*
 * Redirects the client to Log4JMonitor.
 */
function redirectToLog4JMonitor()
{
	top.location.href = "ftp://ente.limmat.ch/pub/software/applications/Log4JMonitor/";
}

/*
 * Redirects the client to MHLDB2.
 */
function redirectToMHLDB2()
{
	top.location.href = "http://ente.limmat.ch/mhldb2";
}

/*
 * Redirects the client to MailWebForm.
 */
function redirectToMailWebForm()
{
	top.location.href = "http://ente.limmat.ch/mailwebform/doc/index.html";
}

/*
 * Redirects the client to the author's homepage.
 */
function redirectToHomePage()
{
	top.location.href = "http://burro.steinsiepe.ch";
}

/*
 * Redirects the client to MHLDB.
 */
function redirectToMHLDB()
{
	top.location.href = "http://mhldb.steinsiepe.ch";
}

/*
 * Redirects the client to DimDom.
 */
function redirectToDimDom()
{
	top.location.href = "http://dimdom.steinsiepe.ch";
}

/**
 * Sets the address referenced by the given id (string) appropriately.
 * Supported id's are:
 * - florian
 */
function setAddress(id)
{
	if ( id = "florian" )
		document.getElementById(id).href="mailto:" + id + "@steinsiepe.ch";
}
