flag = false;

function swapPage(){

	if(flag == false ){
		flag = true;
		document.getElementById("definition").style.display="none";
		document.getElementById("middleresultat").style.display="block";
		
		}else{
		flag = false;
		document.getElementById("definition").style.display="block";
		document.getElementById("middleresultat").style.display="none";
		}
		
}

/* function which attribute CSS */

var temp;
var last;


function initClick(){
	
	if( last != undefined && last != "" ){
		
		document.getElementById(last).className ="letterDim floatleft";	
		last = undefined;
		temp = undefined;
		clickbt = false;
		
	}
	
}

function lastClick(id){
	
	if(clickbt == false){
		last = id+"_min";
	}else{
		document.getElementById(last).className ="letterDim floatleft";	
		last = id+"_min";
	}
	
}

 
var clickbt = false;

function clickIndex(id){

	if(temp == id+"_min"){
		
		//alert("idem");
	
	}else{
		
		temp = id+"_min";

		document.getElementById(temp).className ="letterDimClick floatleft";
		lastClick(id);
		clickbt = true;
	}
	//document.getElementById(temp).className ="letterDimClick floatleft";
	
	
}


function getBrowserCodeName()
{
	var name = null;
	
	if ( document.getElementById && !document.all )
	{
		name = 'NS6';
	}
	else if ( document.all )
	{
		name = 'IE';
	}
	else if ( navigator.appName == 'Netscape' && navigator.appVersion.charAt( 0 ) == '4' )
	{
		name = 'NS';
	}
	else if ( navigator.userAgent.indexOf( 'Mac' ) != -1 )
	{
		name = 'MAC';
	}
	
	return name;
}

/*
function deplDiv() 
{ 	
	var id = 'div_move';
	
	var obj = document.getElementById( id ).style; 
	var winY = document.documentElement.scrollTop;
	var winH = document.documentElement.clientHeight;
	var obj_top = ( getBrowserCodeName() == 'IE' ) ? obj.pixelTop : parseInt(obj.top);
	
	var vitesse = 0.3;
	var remonter_de = 230;
	
	var go_y = winY + ( winH / 2 ) - ( parseInt(obj.height) / 2 ) - remonter_de; 
	
	var distance =  Math.abs( go_y - obj_top );
	var smooth = distance * vitesse;
	
	if ( go_y < obj_top ) smooth *= -1;
	
	if ( ( (obj_top + smooth) >= 0 ) && ( winH > parseInt(obj.height) ) )
	{
		if ( getBrowserCodeName() == 'IE' )
		{
			obj.pixelTop += smooth;
		}
		else if ( getBrowserCodeName() == 'NS6' || getBrowserCodeName() == 'NS' )
		{
			obj.top = (obj_top + smooth) + 'px';
		}
	}
	
	if ( winY == 0 )
	{
		if ( getBrowserCodeName() == 'IE' )
		{
			obj.pixelTop = 0;
		}
		else ( getBrowserCodeName() == 'NS6' || getBrowserCodeName() == 'NS' )
		{
			obj.top = '0px';
		}
	}
	
	
	setTimeout("deplDiv()", 20 );
}
*/
