<!--//--><![CDATA[//><!--
var num = 0;
var img_0 = new Image();
img_0.src = "images/center_design_managing.jpg";
var img_1 = new Image();
img_1.src = "images/center_design_experts.jpg";
var img_2 = new Image();
img_2.src = "images/center_design_programs.jpg";
var img_3 = new Image();
img_3.src = "images/center_design_support.jpg";

function rotate(num) {
	setInterval('change()',4000);
}
function change() {
	num = count(num++);
	if(num == 0) {
		document.getElementById('center').innerHTML = '<img name="mainIMG" id="mainIMG" style="width: 800px; height: 255px; border: 0 none; filter: alpha(opacity=0); -moz-opacity: 0; opacity: 0;" />';
		document.images.mainIMG.src = img_0.src;
		shiftOpacity('mainIMG', 2000);
	}
	else if (num == 1) {
		document.getElementById('center').innerHTML = '<img name="mainIMG" id="mainIMG" style="width: 800px; height: 255px; border: 0 none; filter: alpha(opacity=0); -moz-opacity: 0; opacity: 0;" />';
		document.images.mainIMG.src = img_1.src;
		shiftOpacity('mainIMG', 2000);
	}
	else if (num == 2) {
		document.getElementById('center').innerHTML = '<img name="mainIMG" id="mainIMG" style="width: 800px; height: 255px; border: 0 none; filter: alpha(opacity=0); -moz-opacity: 0; opacity: 0;" />';
		document.images.mainIMG.src = img_2.src;
		shiftOpacity('mainIMG', 2000);
	}
	else if (num == 3) {
		document.getElementById('center').innerHTML = '<img name="mainIMG" id="mainIMG" style="width: 800px; height: 255px; border: 0 none; filter: alpha(opacity=0); -moz-opacity: 0; opacity: 0;" />';
		document.images.mainIMG.src = img_3.src;
		shiftOpacity('mainIMG', 2000);
	}
}

function count(numCount) {
	if (numCount < 3)
		numCount += 1;
	else 
		numCount = 0;
	return numCount;
}

// --------------------------fade stuff

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 + ")";
} 

function shiftOpacity(id, millisec) {
    //if an element is invisible, make it visible, else make it ivisible
    if(document.getElementById(id).style.opacity == 0) {
        opacity(id, 25, 100, millisec);
    } else {
        opacity(id, 100, 0, millisec);
    }
} 

// -----------------end of fade stuff
<!--//--><![CDATA[//><!--

sfHover = function() {
	var sfEls = document.getElementById("navigation").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>