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 + ")";
}


/********************************************************************************
Submitted with modifications by Jack Routledge (http://fastway.to/compute) to DynamicDrive.com
Copyright (C) 1999 Thomas Brattli @ www.dhtmlcentral.com
This script is made by and copyrighted to Thomas Brattli
This may be used freely as long as this msg is intact!
This script has been featured on http://www.dynamicdrive.com
********************************************************************************
Browsercheck:*/
ie=document.all?1:0
n=document.layers?1:0
ns6=document.getElementById&&!document.all?1:0

//These are the variables you have to set:

//How much of the layer do you wan't to be visible when it's in the out state?
lshow=0

//How many pixels should it move every step?
var move=40;
var tmove=17;

//At what speed (in milliseconds, lower value is more speed)
flSpeed=1

//Defining variables

var ltop;
var tim=0;

//Object constructor
function makefl(obj){

    this.css=eval(obj+'.style')
	this.state=1
	this.go=0
    this.width=eval(obj+'.offsetWidth')
	this.left=b_getleft
    this.top=b_gettop
    this.obj = obj + "Object"; 	eval(this.obj + "=this")

}
//Get's the top position.
function b_getleft(){

        if (ns6){ gleft=parseInt(this.css.left)}
        else if (ie){ gleft=eval(this.css.pixelLeft)}
	return gleft;
}
function b_gettop(){
        if (ns6){ gtop=parseInt(this.css.top)}
        else if (ie){ gtop=eval(this.css.pixelTop)}

	return gtop;
}
/********************************************************************************
Deciding what way to move the fl (this is called onmouseover, onmouseout or onclick)
********************************************************************************/
function movefl(){
		clearTimeout(tim)
		mOut()
}

//fl out
function mOut(){
	if(oArrow.left()>80){
		oArrow.go=1
		oArrow.css.left=oArrow.left()-move
        oArrow.css.top=oArrow.top()-tmove
		tim=setTimeout("mOut()",flSpeed)
	}else{
	 oArrow.go=0
	 oArrow.state=0
     opacity('divArrow', 100, 0, 1000)

     }
}

/********************************************************************************
Inits the page, makes the fl object, moves it to the right place,
show it
********************************************************************************/
function flInit(){ 
	oArrow=new makefl('divArrow')
        scrolled="document.body.scrollTop"
	//oArrow.css.left=oArrow.width+lshow
        ltop=oArrow.css.pixelTop
        opacity('divArrow',0,100,500)
	//oArrow.css.visibility='visible'
	//if(moveOnScroll) ie?window.onscroll=checkScrolled:checkScrolled();
    movefl()
}

function showScrolls(){
var object = document.body.style;
object.overflow = "auto";

// Move the arrow to the edge of the screen
//var arrow = document.getElementById("divArrow").style;
//arrow.top = 0;
//arrow.left = 0;
}

function Init(){
var fl = getQueryVariable("fl");
if (fl !== "no") {
setTimeout("opacity('titlebg',0,100,500)",500);
setTimeout("opacity('menu',0,100,500)",1000);
setTimeout("opacity('arc',0,100,500)",1500);
setTimeout("flInit()",2000);
setTimeout("opacity('logo',0,100,500)",3800);
setTimeout("opacity('title',0,100,500)",3800);
setTimeout("opacity('flash',0,100,500)",4300);
setTimeout("opacity('liens',0,100,500)",4300);
setTimeout("opacity('maincontent',0,100,500)",4800);
setTimeout("showScrolls()",5200);
}
else{
setTimeout("changeOpac(100,'arc')",100);
setTimeout("changeOpac(100,'menu')",100);
setTimeout("changeOpac(100,'logo')",100);
setTimeout("changeOpac(100,'title')",100);
setTimeout("changeOpac(100,'flash')",100);
setTimeout("changeOpac(100,'liens')",100);
setTimeout("changeOpac(100,'titlebg')",100);
setTimeout("changeOpac(100,'maincontent')",100);
setTimeout("flInit()",100);
setTimeout("showScrolls()",1000);


}
}

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  }
}