<!--
//window.moveTo(0,0);
//window.resizeTo(window.screen.availWidth,window.screen.availHeight);

var mainNavigationCount = 7;
var intNumberLinkGroups = 7;

/************************************************************************************************************************************/
/******************************************** individual layer fading functions ****************************************/
/************************************************************************************************************************************/
//loading//history//news//philanthropy//threads
function fadeHistory(){
	//shiftDisplayOn('loading');
	shiftDisplayOff('news');
	shiftDisplayOff('philanthropy');
	shiftDisplayOff('threads');
	shiftDisplayOff('images');
	shiftDisplayOff('registration');
	shiftDisplayOff('members');
	shiftDisplayOn('history');
	//setTimeout("shiftOpacityOn('history', 2000)",1000);
}

function fadeNews(){
//	shiftDisplayOn('loading');
	shiftDisplayOff('history');
	shiftDisplayOff('philanthropy');
	shiftDisplayOff('threads');
	shiftDisplayOff('images');
	shiftDisplayOff('registration');
	shiftDisplayOff('members');
	shiftDisplayOn('news');
	//setTimeout("shiftOpacityOn('news', 2000)",1000);
}

function fadeRegistration(){
//	shiftDisplayOn('loading');
	shiftDisplayOff('history');
	shiftDisplayOff('philanthropy');
	shiftDisplayOff('threads');
	shiftDisplayOff('images');
	shiftDisplayOff('news');
	shiftDisplayOff('members');
	shiftDisplayOn('registration');
	//setTimeout("shiftOpacityOn('news', 2000)",1000);
}
function fadeGallery(){
//	shiftDisplayOn('loading');
	shiftDisplayOff('history');
	shiftDisplayOff('philanthropy');
	shiftDisplayOff('threads');
	shiftDisplayOff('news');
	shiftDisplayOff('registration');
	shiftDisplayOff('members');
	shiftDisplayOn('images');
	//setTimeout("shiftOpacityOn('news', 2000)",1000);
}

function fadePhilanthropy(){
	//shiftDisplayOn('loading');
	shiftDisplayOff('news');
	shiftDisplayOff('history');
	shiftDisplayOff('threads');
	shiftDisplayOff('images');
	shiftDisplayOff('registration');
	shiftDisplayOff('members');
	shiftDisplayOn('philanthropy');
	//setTimeout("shiftOpacityOn('history', 2000)",1000);
}

function fadeThreads(){
	//shiftDisplayOn('loading');
	shiftDisplayOff('news');
	shiftDisplayOff('history');
	shiftDisplayOff('philanthropy');
	shiftDisplayOff('images');
	shiftDisplayOff('registration');
	shiftDisplayOff('members');
	shiftDisplayOn('threads');
	//setTimeout("shiftOpacityOn('history', 2000)",1000);
}

function fadeMembers(){
	//shiftDisplayOn('loading');
	shiftDisplayOff('news');
	shiftDisplayOff('history');
	shiftDisplayOff('philanthropy');
	shiftDisplayOff('images');
	shiftDisplayOff('registration');
	shiftDisplayOff('threads');
	shiftDisplayOn('members');
	//setTimeout("shiftOpacityOn('history', 2000)",1000);
}


function fadeError(){
	shiftDisplayOn('loading');
	
	setTimeout("shiftOpacityOff('introShow', 2000)",100);
	shiftDisplayOff('introShow');
	setTimeout("shiftOpacityOff('news', 2000)",100);
	shiftDisplayOff('news');
	setTimeout("shiftOpacityOff('history', 2000)",100);
	shiftDisplayOff('history');
	setTimeout("shiftOpacityOff('registration', 2000)",100);
	shiftDisplayOff('registration');
	setTimeout("shiftOpacityOff('philanthropy', 2000)",100);
	shiftDisplayOff('philanthropy');
/*******************************************************/	
	shiftDisplayOff('loading');
	shiftDisplayOn('error');
	setTimeout("shiftOpacityOn('error', 2000)",100);
}

/************************************************************************************************************************************/
/******************************************** general fading functions ****************************************************/
/************************************************************************************************************************************/
function startFading(){
	setTimeout("shiftOpacityOn('mainContent', 1000)",1000);
	setTimeout("shiftOpacityOn('border', 1000)",1000);
	setTimeout("shiftVisibilityOff('introShow', 1000)",2000);
	setTimeout("shiftDisplayOn('news', 1000)",2000);
	setTimeout("shiftOpacityOn('elviLogo', 1000)",2000);
	setTimeout('startFadingLinks()', 1000);
	setTimeout('startFadingAlert()', 2000);
}

function startFadingMembers(){
	setTimeout("shiftOpacityOn('mainContent', 100)",100);
	setTimeout("shiftOpacityOn('border', 100)",100);
	setTimeout("shiftDisplayOn('members', 100)",100);
	setTimeout("shiftOpacityOn('elviLogo', 100)",100);
	setTimeout('startFadingLinks()', 100);
}

function fadeInContent(){
	setTimeout("shiftOpacityOn('mainContent', 3000)",1000);
	setTimeout("shiftOpacityOn('images', 3000)",1000);
	setTimeout('startFadingLinks()', 2000);
	setTimeout('startFadingAlert()', 8000);
}

function startFadingLinks(){
	setTimeout("shiftOpacityOn('links', 100)",100);
	for(i = 1; i <= mainNavigationCount; i++) {
		shiftVisibilityOn('mainNavigation'+i);
		setTimeout("shiftOpacityOn('mainNavigation" + i + "', 100)",100*i);
		}
	setTimeout("shiftOpacityOn('squarehole', 5000)",5000);
}

function startFadingAlert(){
	shiftVisibilityOn('countDown');
	setTimeout("shiftOpacityOn('countDown', 1000)",3000);
}
function shiftVisibilityOn(id) {
	document.getElementById(id).style.visibility='visible';
}
function shiftVisibilityOff(id) {
document.getElementById(id).style.visibility='hidden';
}
function shiftDisplayOn(id) {
document.getElementById(id).style.display='block';
}

function shiftDisplayOff(id) {
document.getElementById(id).style.display='none';
}

function changeVisibility(id, opacStart, opacEnd, millisec) {
//speed for each frame
var speed = Math.round(millisec / 100);
var timer = 0;

//determine the direction for the blending, if start and end are the same nothing happens
if(opacStart > opacEnd) {
for(i = opacStart; i >= opacEnd; i--) {
setTimeout("changeVisOn(" + i + ",'" + id + "')",(timer * speed));
timer++;
}
} else if(opacStart < opacEnd) {
for(i = opacStart; i <= opacEnd; i++)
{
setTimeout("changeVisOff(" + i + ",'" + id + "')",(timer * speed));
timer++;
}
}
}
function changeVisOn(opacity, id) {
var object = document.getElementById(id).style; 
object.visibility = 'hidden';
//object.MozOpacity = (opacity / 100);
//object.KhtmlOpacity = (opacity / 100);
//object.filter = "alpha(opacity=" + opacity + ")";
}
function changeVisOff(opacity, id) {
var object = document.getElementById(id).style; 
object.visibility = 'hidden';
//object.MozOpacity = (opacity / 100);
//object.KhtmlOpacity = (opacity / 100);
//object.filter = "alpha(opacity=" + opacity + ")";
}
function startFadingSubSubLinks(linkId){
for(i = 1; i <= intNumberLinkGroups; i++) {
setTimeout("shiftOpacityOff('subSubNavigation" + i + "', 2000)",100);
}

setTimeout("shiftOpacityOn('subSubNavigation" + linkId + "', 2000)",100);
}
function shiftOpacityOn(id, millisec) {

opacity(id, 0, 100, millisec);
}
function shiftOpacityOff(id, millisec) {
if(document.getElementById(id).style.opacity == 1) {
opacity(id, 100, 0, millisec);
}
}
function opacity(id, opacStart, opacEnd, millisec) {
//speed for each frame
var speed = Math.round(millisec / 100);
var timer = 0;

//determine the direction for the blending, if start and end are the same nothing happens
if(opacStart > opacEnd) {
for(i = opacStart; i >= opacEnd; i--) {
setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
timer++;
}
} else if(opacStart < opacEnd) {
for(i = opacStart; i <= opacEnd; i++)
{
setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
timer++;
}
}
}
//change the opacity for different browsers
function changeOpac(opacity, id) {
var object = document.getElementById(id).style; 
object.opacity = (opacity / 100);
object.MozOpacity = (opacity / 100);
object.KhtmlOpacity = (opacity / 100);
object.filter = "alpha(opacity=" + opacity + ")";
}
function blendimage(divid, imageid, imagefile, millisec) {
var speed = Math.round(millisec / 100);
var timer = 0;
//set the current image as background
document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
//make image transparent
changeOpac(0, imageid);
//make new image
document.getElementById(imageid).src = imagefile;
//fade in image
for(i = 0; i <= 100; i++) {
setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
timer++;
}
}
function currentOpac(id, opacEnd, millisec) {
//standard opacity is 100
var currentOpac = 100;

//if the element has an opacity set, get it
if(document.getElementById(id).style.opacity < 100) {
currentOpac = document.getElementById(id).style.opacity * 100;
}

//call for the function that changes the opacity
opacity(id, currentOpac, opacEnd, millisec)
}
function openPopUp(winName){
leftVal = (screen.width - 800) / 2;
topVal = 0;
window.open(winName,'popUp', 'height=700,width=800,left='+leftVal+',top='+topVal+', toolbar=no, menubar=no, scrollbars=yes,resizable=no,location=no, directories=no, status=yes');
}
function openPopUpSmall(winName){
leftVal = (screen.width - 400) / 2;
topVal = 0;
window.open(winName,'popUp', 'height=600,width=800,left='+leftVal+',top='+topVal+', toolbar=no, menubar=no, scrollbars=yes,resizable=yes,location=no, directories=no, status=yes');
}


-->

