// JavaScript Document

// returns true left position of element
function getLeft( el) {
	if ( el.currentStyle ) {
		return el.currentStyle.left;
	} else if ( document.defaultView.getComputedStyle ){
		return document.defaultView.getComputedStyle(el,'').left;
	} else {
		return;
	}
}

window.load = function(){
	// Get the current screen variables
	var windowHeight = document.body.clientHeight;	
	var sizeDiff = document.body.clientWidth - 1024;

	// Adjust the height to full screen
	windowHeight = windowHeight - 380;
	windowHeight = windowHeight + 'px';
	
	// Adjust the width to align
	sizeDiff = sizeDiff / 2;
	var leftDiff = sizeDiff + 200;	
	var rightDiff = sizeDiff + 940;
	
	// Set the heights of the divs
	document.getElementById('poleLeft').style.height = windowHeight;
	document.getElementById('poleRight').style.height = windowHeight;

	// Set the left positions
	document.getElementById('flameLeft').style.left = leftDiff + 'px';	
	document.getElementById('poleLeft').style.left = leftDiff + 'px';
	document.getElementById('flameRight').style.left = rightDiff + 'px';
	document.getElementById('poleRight').style.left = rightDiff + 'px';
	
	// Hide until finished loading 
	document.getElementById('hide').style.visibility = 'visible';
}
//fades layer in
ie5  = (document.all && document.getElementById);
ns6 = (!document.all && document.getElementById);
opac = 0;

function fadeIn() {
    if(opac < 100){
        opac+=1;
        if(ie5) document.getElementById('hide').filters.alpha.opacity = opac;
        if(ns6) document.getElementById('hide').style.MozOpacity = opac/100;
        setTimeout('fadeIn()', 20);
    }
}