//map show / hide
mapc=0;mapc2=0;mapswt=true;mapswt2=false;hidem=false;
function hidemap(){
if(mapswt2){mapswt2=false;document.getElementById("accent_sound_back").play();
clearInterval(mapint);
hidemapp=function(){mapc-=3;mapc2-=0.6;
if(mapc<=0){clearInterval(mapint2);hidem=false;mapc=0;mapc2=0;mapswt2=false;mapswt=true;
document.getElementById("map").style.left=window.innerWidth/2-400/2-85+"px";
document.getElementById("map").style.top=window.innerHeight/2-309/2-105+"px";
}else{document.getElementById("map").style.left=mapx-mapc+"px";document.getElementById("map").style.top=mapy-mapc2+"px";}}
hidem=true;mapint2=setInterval("hidemapp()",1);}}
function showmap(){
if(mapswt){mapswt=false;document.getElementById("accent_sound").play();
mapx=Number(String(document.getElementById("map").style.left).substr(0,String(document.getElementById("map").style.left).indexOf("px")));
mapy=Number(String(document.getElementById("map").style.top).substr(0,String(document.getElementById("map").style.top).indexOf("px")));	
if(hidem){clearInterval(mapint2);}	
showmapp=function(){mapc+=3;mapc2+=0.6;	
if(mapc>=275){clearInterval(mapint);mapc=275;mapswt2=true;mapswt=false;}else{
document.getElementById("map").style.left=mapx-mapc+"px";document.getElementById("map").style.top=mapy-mapc2+"px";}}	
mapint=setInterval("showmapp()",1);}}
