﻿var tmr;
var t;
var obj;
var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;

function sFa() {
    document.getElementById('master').style.filter = "alpha(opacity=40)"
    document.getElementById('master').style.opacity = "0.4"
    //document.getElementById('master').style.filter = "blur(add=false, direction=225, strength=4)";
	obj = gObj();
    
	sLft();
	shw(true);
	t = 0;
	sTmr();


}

function hFa() {

    document.getElementById('master').style.filter = ""
    document.getElementById('master').style.opacity = ""
	t = -100;
	sTmr();
	shw(false);
	if (IE6) {
	   //shw(false);
	}
	return false;
}

function sTmr() {
	tmr = setInterval("fd()",20);
}

function fd() {
	var amt = Math.abs(t+=10);
	if(amt == 0 || amt == 100) clearInterval(tmr);
	amt = (amt == 100)?99.999:amt;
  	
  	if (!IE6) {
	    //obj.style.filter = "alpha(opacity:"+amt+")";
	}
	//obj.style.KHTMLOpacity = amt/100;
	//obj.style.MozOpacity = amt/100;
	//obj.style.opacity = amt/100;
	
	//if(amt == 0) shw(false);
}

function sLft() {
	var w = 70;	// set this to 1/2 the width of the faw div defined in the style sheet 
			// there's not a reliable way to retrieve an element's width via javascript!!
					
	var l = (document.body.innerWidth)? document.body.innerWidth / 2:document.body.offsetWidth / 2;

	obj.style.left = (l - w -100)+"px";
	obj.style.top = "100px";	
}

function gObj() {
	return document.getElementById("faw");	
}

function shw(b) {
	(b)? obj.className = 'show':obj.className = '';	
}
