//var hObjects = ['hobject01', 'hobject02', 'hobject03', 'hobject04', 'hobject05'];
function GetDefaultText(textboxid, defaultText){
	textbox = document.getElementById(textboxid);
	if (textbox.value == ""){textbox.value = defaultText;} 
}
function GetClear(textboxid, valueText){
	textbox = document.getElementById(textboxid);
	if (textbox.value == valueText){textbox.value = '';}
}
function getClientWidth(){
	var w = document.compatMode=='CSS1Compat' && !window.opera ? document.documentElement.clientWidth : document.body.clientWidth;
	if (document.compatMode == "CSS1Compat" && window.opera) w = window.innerWidth;
	return w;
}
function getClientHeight(){
	var h = document.compatMode=='CSS1Compat' && !window.opera ? document.documentElement.clientHeight : document.body.clientHeight;
	if (document.compatMode == "CSS1Compat" && window.opera) h = window.innerHeight;
	return h;
}
function setObjectPosition(){
	var wWidth = getClientWidth();
	if (wWidth<1007){wWidth = 1007;}
	if (wWidth>1400){wWidth = 1400;}
	$("#page").css("width", wWidth+"px");
	$(".finside").css("width", (wWidth-96)+"px");

    var obj = jQuery("a.hobjects");
    for(var i = 0; i < obj.length; i++)
    {
        var item = obj[i];
        var width = jQuery(item).width();
        var left = parseInt(jQuery(item).attr("rel"));
        jQuery(item).css("left", (left+(wWidth/2 - width))+"px");
    }
}
function setObjectOpacity(id, b){
	var ua = navigator.userAgent.toLowerCase();
	if (ua.indexOf("msie") != -1 && ua.indexOf("opera") == -1 && ua.indexOf("webtv") == -1){return true;}
    var hObjects = jQuery(".hobjects");
    jQuery(hObjects).stop(true, true);
	for (var i=0; i<hObjects.length; i++)
    {
        var obj_id = jQuery(hObjects[i]).attr("id");
		if(obj_id != id)
        {
			if (b){$("#"+obj_id).animate({opacity:0.2}, 500);}
			else{$("#"+obj_id).animate({opacity:1}, 500);}
		}
	}
}
jQuery(document).ready(function()
{
    setObjectPosition();
    if($("#hbslogan").length > 0)
    {
        $("#hbslogan").slides({
            container: 'hbscontainer',
            play: 5000,
            effect: 'fade'
        });
    }
	$('.hobjects').bind('mouseover', function(){setObjectOpacity($(this).attr('id'), true);})
	$('.hobjects').bind('mouseout', function(){setObjectOpacity($(this).attr('id'), false);})

if($('.mcyears-list:not(.active)') != null) {
console.log( $('.mcyears-list li').not('li.active') );
 $('.mcyears-list li').not('li.active').hover(function(){
  
  
    $(this).addClass('active');
    $(this).find('a').addClass('selected');
 

 },function() {

 

   $(this).removeClass('active');
    $(this).find('a').removeClass('selected');

 

 }); 
}

});
