
function fixer() {
	var arVersion = navigator.appVersion.split("MSIE");
	var version = parseFloat(arVersion[1]);

	if ((version >= 5.5 && version < 7) && (document.body.filters)) 
	{
		for(var i=0; i<document.images.length; i++)
	    {
			var img = document.images[i]
			var imgName = img.src.toUpperCase()
			if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
			{
                                /**
                                * Get png attributes
                                **/
                                var mousedown = (img.getAttribute('onmousedown')) ? img.getAttribute('onmousedown') : null;
				var imgID = (img.id) ? "id='" + img.id + "' " : ""
				var imgClass = (img.className) ? "class='" + img.className + "' " : ""
				var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
				var imgStyle = "display:inline-block;" + img.style.cssText 
			
				if (img.align == "left") imgStyle = "float:left;" + imgStyle
				if (img.align == "right") imgStyle = "float:right;" + imgStyle
				if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
				var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
                                
				img.outerHTML = strNewHTML;
                                
                                if(mousedown && img.id)
                                {
                                  document.getElementById(img.id).onmousedown = mousedown;
                                }
                                
			   	i = i-1;
			 }
		}	
	}
}

//Place all onload function in init()
function init (){
    fixer();
    changeTestmonImage();
    changePromoImage();
}

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 + ")"; 
}

var formCounter = "private_form";

function activateForm (id) {
    if (formCounter != id) {
        if ($(formCounter)) {
            $(formCounter).style.display="none";
        }
    }
    
    formCounter = id;
    
    if ($(formCounter)) {
        $(formCounter).style.display="block";
    }
}

var lastImg;
function changeTestmonImage() {
    if (!lastImg || !$("TestmonTitle_" + lastImg)) {
        lastImg = 0;
    }
    if ($("TestmonTitle_" + lastImg) && $("TestmonText_" + lastImg)) {
        opacity ("TestmonTitle_" + lastImg,100,0, 2000);
        opacity ("TestmonText_" + lastImg,100,0, 2000);
    }
    lastImg++;
    if (!$("TestmonTitle_" + lastImg) || !$("TestmonText_" + lastImg)) {
        lastImg = 0;
    }
    if ($("TestmonTitle_" + lastImg) && $("TestmonText_" + lastImg)) {
        opacity ("TestmonTitle_" + lastImg,0,100, 2000);
        opacity ("TestmonText_" + lastImg,0,100, 2000);
        setTimeout('$("TestmonText_' + lastImg + '").style.fontWeight = 900;', 2000);
    }
    
    setTimeout("changeTestmonImage()", 8000);
    
}


var lastPromo;
function changePromoImage() {
    if (!lastImg || !$("promo_" + lastPromo)) {
        lastPromo = 0;
    }
    if ($("promo_" + lastPromo)) {
        opacity ("promo_" + lastPromo,100,0, 2000);
    }
    lastPromo++;
    if (!$("promo_" + lastPromo)) {
        lastPromo = 0;
    }
    if ($("promo_" + lastPromo)) {
        opacity ("promo_" + lastPromo,0,100, 2000);
    }
    
    setTimeout("changePromoImage()", 10000);
}

function displayInformation (obj) {
        if ($('info_title') && $('info_description')) {
                $('info_title').innerHTML = obj.innerHTML;
                $('info_description').innerHTML = $(obj.id + "_content").innerHTML;
        } else {
                $('jargon_nav').innerHTML = '<div class="iframe_top_border2"><img src="images/team_iframe_top_left_corner.gif" alt="" class="iframe_top_left_corner" /><img src="images/team_iframe_top_right_corne.gif" alt="" class="iframe_top_right_corner" /><br class="clear" /></div><div class="iframe_body2"><br class="clear" /><div id="object_info" style="min-height: 100px;"><div style="padding: 0 10px;">' + "<span class='tyser'><h2 style='margin-top:0; padding-top:0; font-size:14px;' id='info_title' >" + obj.innerHTML + "</h2></span><div id='info_description' >" + $(obj.id + "_content").innerHTML + '</div></div></div> <br class="clear" /></div><div class="iframe_bottom_border2"><img src="images/team_iframe_bottom_left_cor.gif" alt="" class="iframe_bottom_left" /><img src="images/team_iframe_bottom_right_co.gif" alt="" class="iframe_bottom_right" /></div>';
        }
}