function boxchange(temp, width){
       	  var num=''; 
	   if(temp){
			
			num = parseInt(temp.text());
			$("#rollicon .activebox").removeClass("activebox").addClass("inactivebox");
			temp.addClass("activebox");
			$("#banner").animate({"left":"-"+(width*(num-1))+"px"},"slow");
		} else{		  
			if($("#rollicon .activebox").next().length==0){
				num = parseInt($("#rollicon .activebox").text());
				$("#rollicon .activebox").removeClass("activebox").addClass("inactivebox");
				$("#rollicon a:first-child").removeClass("inactivebox").addClass("activebox");
				$("#banner").animate({"left":"-"+(width*(num))+"px"},{duration:"slow", complete:function(){$("#banner").css({"left":"0px"});}});
			}else{
			num = parseInt($("#rollicon .activebox").text());
			$("#rollicon .activebox").next().removeClass("inactivebox").addClass("activebox");
			$("#rollicon .activebox").prev().removeClass("activebox").addClass("inactivebox");
			$("#banner").animate({"left":"-"+(width*num)+"px"},"slow");
			}
		}
		
	}
   function showhide(){
    var whichImage = Math.floor(Math.random()*9);
	$(".quotebox img").hide();
	$(".quotebox img").attr("src", "/global/newimages/quotes/jquote" + whichImage + ".png");
	$(".quotebox img").fadeIn(3000);
   }
  
// International Select Box Code //
function switchpage(select) {
  var index;

  for(index=0; index<select.options.length; index++)
    if(select.options[index].selected)
      {
        if(select.options[index].value!="")
          window.location.href=select.options[index].value;
        break;
      }
}

// Subnavigation Tree Code //
menu_status = new Array();
plus_status = new Array();

function showHide(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        }else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
	}
}
function plusMinus(tree){
    if (document.getElementById) {
    var plus_id = document.getElementById(tree);

        if(plus_status[tree] != 'cOpen') {
           plus_id.className = 'cOpen';
           plus_status[tree] = 'cOpen';
        }else{
           plus_id.className = 'cClosed';
           plus_status[tree] = 'cClosed';
        }
    }
}

function searchmips(){
 var temp = "http://search.mips.com/search?q="+ document.getElementById('gSearch').value;
 window.open (temp);
}

