﻿active = 'spurA';acturl = 'home';function init() {changeOpac(100, "spurA");changeOpac(0,"spurB");document.getElementById('spurA').style.visibility = 'visible';document.getElementById('spurB').style.visibility = 'visible';document.getElementById('spurA').style.zIndex = 2;document.getElementById('spurB').style.zIndex = 1;}function changeSite(newurl) {if (active == "spurA" && acturl != newurl) {parent.frames[1].location.href = newurl + ".html";opacity("spurA", 100, 0, 400);window.setTimeout("opacity('spurB', 0, 100, 400)", 400);window.setTimeout("parent.frames[0].location.href = 'leer.html'", 100);document.getElementById("spurA").style.zIndex = 1;document.getElementById("spurB").style.zIndex = 2;active = "spurB";acturl = newurl;}else if (active == "spurB" && acturl != newurl) {parent.frames[0].location.href = newurl + ".html";opacity("spurB", 100, 0, 400);window.setTimeout("opacity('spurA', 0, 100, 400)", 400);window.setTimeout("parent.frames[1].location.href = 'leer.html'", 100);document.getElementById("spurB").style.zIndex = 1;document.getElementById("spurA").style.zIndex = 2;active = "spurA";acturl = newurl;}}function opacity(id, opacStart, opacEnd, millisec) {    var speed = Math.round(millisec / 100);    var timer = 0;    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++;        }    }}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 shiftOpacity(id, millisec) {    if(document.getElementById(id).style.opacity == 0) {        opacity(id, 0, 100, millisec);    } else {        opacity(id, 100, 0, millisec);    }} 
