//suckerfish internet explorer hover fix
function startList(list) {
	if (document.all&&document.getElementById&&MacIE!=true) {
		navRoot = document.getElementById(list);
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}


function MacIE(){
  browser = navigator.appName;
  platform = navigator.platform;
  if (browser == "Microsoft Internet Explorer" && platform == "MacPPC" && navigator.userAgent.indexOf('Opera') == -1) {
    return(true);
  }
}



//showHide()
function showHide (id,ident,tot_id) {
	for (i=1;i<=tot_id;i++) {
		document.getElementById(id + i).style.display = 'none';
	}
	document.getElementById(id + ident).style.display = '';
}

function hide( targetId ){
 	 if (document.getElementById){
  		target = document.getElementById( targetId );
  				target.style.visibility = "hidden";
  			}
  		}

function show( targetId ){
 	 if (document.getElementById){
  		target = document.getElementById( targetId );
  				target.style.visibility = "visible";
  			}
  		}

function turnOn( targetId ){
 	 if (document.getElementById){
  		target = document.getElementById( targetId );
  		if (target.style.display =="block") {
  			target.style.display = "none";
  		}
  		else {
			target.style.display = "block";
		}
	}
}


//cchanger
function cchanger(id,ident,tot_cla) {
	for (i=1;i<=tot_cla;i++) {
		changec(id + i, id + i + '_off');
	}
	changec(id + ident, id + ident + '_on');
}

function mcchanger(id,ident,tot_cla) {
	for (i=2;i<=tot_cla;i++) {
		changec(id + i, id + i + '_off');
	}
	changec(id + ident, id + ident + '_on');
}

function langtog() {
	target = document.getElementById( "langtog" );
	if (target.className == "langtog_on") {
		target.className = "langtog_off";
	}
	else {
		target.className = "langtog_on";
	}
}

//changec
function changec(id, newClass) {
	identity=document.getElementById(id);
	identity.className=newClass;
}




//b2t
function backToTop() {
    var x1 = x2 = x3 = 0;
    var y1 = y2 = y3 = 0;

    if (document.documentElement) {
        x1 = document.documentElement.scrollLeft || 0;
        y1 = document.documentElement.scrollTop || 0;
    }

    if (document.body) {
        x2 = document.body.scrollLeft || 0;
        y2 = document.body.scrollTop || 0;
    }

    x3 = window.scrollX || 0;
    y3 = window.scrollY || 0;

    var x = Math.max(x1, Math.max(x2, x3));
    var y = Math.max(y1, Math.max(y2, y3));

    window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));

    if (x > 0 || y > 0) {
        window.setTimeout("backToTop()", 25);
    }
}
