

document.onmouseover = applyMouseOverFilter;
document.onmouseout  = applyMouseOutFilter;
//document.onmousedown = doDown;
//document.onmouseup   = doUp;


function applyMouseOutFilter() {
	var el = window.event.srcElement;
    if (el != null)
    {
        if (el.className == "coolButton")  {
            removeFilter(el);// remove
        }
        if (el.className == "coolButtonTop")  {
            removeFilter(el);// remove
        }  
    }

}

function applyMouseOverFilter() {
	var el = window.event.srcElement;

    if (el != null)
    {
        if (el.className == "coolButton")  {
            applyFilter(el);
        }
        if (el.className == "coolButtonTop")  {
            applyFilter2(el);// remove
        } 
    }

}





function highlightedgesAdd(el) {
	with (el.style) {
		borderLeft   = "0px solid buttonhighlight";
		borderRight  = "1px solid buttonshadow";
		borderTop    = "0px solid buttonhighlight";
		borderBottom = "1px solid buttonshadow";
		paddingTop    = "0px";
		paddingLeft   = "0px";
		paddingBottom = "0px";
		paddingRight  = "0px";
	}
}

function highlightedgesRemove(el) {
	with (el.style) {
		borderLeft   = "0px solid white";
		borderRight  = "1px solid white";
		borderTop    = "0px solid white";
		borderBottom = "1px solid white";
		paddingTop    = "0px";
		paddingLeft   = "0px";
		paddingBottom = "0px";
		paddingRight  = "0px";
	}
}


function applyFilter(el) {
	var filtval;
	
    //filtval = "Shadow(Color=#ff00ff, Direction=45)";
    //filtval = "Alpha(Opacity=20, FinishOpacity=90, Style=2, StartX=0, StartY=0, FinishX=200, FinishY=2100)";
   filtval = "Xray()"

    highlightedgesAdd(el);    

	el.style.filter = filtval;

}


function applyFilter2(el) {
	var filtval;
	
    filtval = "Alpha(Opacity=20, FinishOpacity=90, Style=2, StartX=0, StartY=0, FinishX=200, FinishY=2100)";

    highlightedgesAdd(el);    

	el.style.filter = filtval;

}

function removeFilter(el) {
	var filtval;

    filtval = "";

    highlightedgesRemove(el);

	el.style.filter = filtval;
}
	


