var show_map = true;
var show_motto = true;
var show_icon = true;
var show_timer1 = null;			
var show_timer2 = null;
var show_timer3 = null;			
var show_timer4 = null;
var show_get_motto = 0;
var show_max_motto = 140;
var show_get_map = 0;
var show_max_map = 340;
var show_get_icon = 0;
var show_max_icon = 410;
var show_kibou_prefs = true;
var show_timer5 = null;			
var show_timer6 = null;
var show_get_prefs = 0;
var show_max_prefs = 82;


function movingPrefs(){
	   clearTimeout(show_timer5);	
	   clearTimeout(show_timer6);
	if(show_kibou_prefs == true){
        showingprefs();
        show_kibou_prefs = false;
	} else	{
		hidingprefs();
        show_kibou_prefs = true;
	}
}

function showingprefs(){
   if( show_get_prefs < show_max_prefs)	{
        show_get_prefs += 20;
	    prefs_px =  show_get_prefs + "px";
	document.getElementById('title_search_prefs').style.height = prefs_px;
		show_timer5 = setTimeout('showingprefs()',1);
	}
	else{
	document.getElementById('col_search_prefs').style.display = 'block';
  } 
}

function hidingprefs(){
    document.getElementById('col_search_prefs').style.display = 'none';
	if( show_get_prefs >= 20){
	show_get_prefs -= 20;
	prefs_px =  show_get_prefs + "px";
	document.getElementById('title_search_prefs').style.height = prefs_px;	
	show_timer6 = setTimeout('hidingprefs()',1);
	}
	else{
  }
}

function movingmotto(){
	   clearTimeout(show_timer1);	
	   clearTimeout(show_timer2);	
   
    
	if(show_motto == true){
    showingmotto();
    show_motto = false;
	} else	{
		hidingmotto();
    show_motto = true;
	}
}

function showingmotto(){
  if( show_get_motto < show_max_motto)	{
  show_get_motto += 20;
	map_px =  show_get_motto + "px";
	document.getElementById('title_search_map').style.height = map_px;
		show_timer1 = setTimeout('showingmotto()',1);
	}
	else{
	document.getElementById('col_search_map').style.display = 'block';
  }
}

function hidingmotto(){
  document.getElementById('col_search_map').style.display = 'none';
	if( show_get_motto >= 20){
	show_get_motto -= 20;
	map_px =  show_get_motto + "px";
	document.getElementById('title_search_map').style.height = map_px;	
	show_timer2 = setTimeout('hidingmotto()',1);
	}
	else{
  }
}


function movingMap(){
	   clearTimeout(show_timer1);	
	   clearTimeout(show_timer2);	
   
    
	if(show_map == true){
    showingMap();
    show_map = false;
	} else	{
		hidingMap();
    show_map = true;
	}
}

function showingMap(){
  if( show_get_map < show_max_map)	{
  show_get_map += 40;
	map_px =  show_get_map + "px";
	document.getElementById('title_search_map').style.height = map_px;
		show_timer1 = setTimeout('showingMap()',1);
	}
	else{
	document.getElementById('col_search_map').style.display = 'block';
  }
}

function hidingMap(){
  document.getElementById('col_search_map').style.display = 'none';
	if( show_get_map > 20){
	show_get_map -= 40;
	map_px =  show_get_map + "px";
	document.getElementById('title_search_map').style.height = map_px;	
	show_timer2 = setTimeout('hidingMap()',1);
	}
	else{
  }
}

function movingIcon(){
	   clearTimeout(show_timer3);	
	   clearTimeout(show_timer4);	
   
    
	if(show_icon == true){
    showingIcon();
    show_icon = false;
	} else	{
		hidingIcon();
    show_icon = true;
	}
}

function showingIcon(){
  if( show_get_icon < show_max_icon)	{
  show_get_icon += 40;
	map_px =  show_get_icon + "px";
	document.getElementById('title_search_icon').style.height = map_px;
		show_timer3 = setTimeout('showingIcon()',1);
	}
	else{
	document.getElementById('col_search_icon').style.display = 'block';
  }
}

function hidingIcon(){
  document.getElementById('col_search_icon').style.display = 'none';
	if( show_get_icon > 20){
	show_get_icon -= 40;
	map_px =  show_get_icon + "px";
	document.getElementById('title_search_icon').style.height = map_px;	
	show_timer4 = setTimeout('hidingIcon()',1);
	}
	else{
  }
}
