adaptation =
{
	interval	:	100,
	timer		:	false,
	mode        :   "pc",

	mask:
	[
		[800, 	"pc"],
		[370,   "mobile"],
		[0, 	"mobile small"]
	],
	ini:function()
	{
		this.last_width	= window.screen.width ;
		this.set(true) ;
		this.timer = setInterval(() => {this.set()}, this.interval) ;
	},
	set:function(important)
	{
		let w = document.body.clientWidth,
			i = typeof(important) == "undefined" ? false : important ;

		if(i || w != this.last_width)
		{
			let n = "pc" ;
			for(x in this.mask)
			{
				if(w >= this.mask[x][0])
				{
					n = this.mask[x][1] ;
					break ;
				}
			}

            var c = this.mode.split(" ");
            for(x in c)document.body.classList.remove(c[x]) ;
            
            
            this.mode = n ;
			
			var c = n.split(" ");
            for(x in c)document.body.classList.add(c[x]) ;
			
			this.last_width = w ;
		}
	}
}