
(function(){
	var images=["/static/img/bg_image.jpg","/static/img/hbg_1.jpg","/static/img/hbg_2.jpg","/static/img/hbg_3.jpg","/static/img/hbg_4.jpg","/static/img/hbg_5.jpg","/static/img/hbg_6.jpg","/static/img/hbg_7.jpg","/static/img/hbg_8.jpg","/static/img/hbg_9.jpg"];   //*** 
	document.images.bgimage.src = images[Math.floor(Math.random() * images.length)];

	var bg=document.getElementById('bg'),float=document.createElement('span'),scale=Scaler(bg);						//Create and bind scaler-function

    var db=document.body;				

	var header=document.getElementById('header');	
	var header_schatten=document.getElementById('header_schatten');
	var adminstrip_div=document.getElementById('adminstrip_div');
	var wito_wrapper=document.getElementById('wito_wrapper');
	var home_logo=document.getElementById('home_logo');

	header.style.width=(db.clientWidth) +'px';
	header_schatten.style.width=(db.clientWidth) +'px';
	adminstrip_div.style.width=(db.clientWidth) +'px';
    /*wito_wrapper.style.left=(db.clientWidth - 1116) +'px';*/ 
    wito_wrapper.style.right=Math.floor((db.clientWidth/100)*4) +'px';
    home_logo.style.right=Math.floor((db.clientWidth/100)*9.2) +'px';
    home_logo.style.bottom=Math.floor((db.clientHeight/100)*11.7) +'px';
    
    setInterval(function(){
    	header.style.width=(db.clientWidth) +'px';
		header_schatten.style.width=(db.clientWidth) +'px';
		adminstrip_div.style.width=(db.clientWidth) +'px';
    	/*wito_wrapper.style.left=(db.clientWidth - 1116) +'px';*/
    	wito_wrapper.style.right=Math.floor((db.clientWidth/100)*4) +'px';
    	home_logo.style.right=Math.floor((db.clientWidth/100)*9.2) +'px';
    	home_logo.style.bottom=Math.floor((db.clientHeight/100)*11.7) +'px';
	},2);
		
	/*var mapimages = ["img/map_01.jpg","img/map_02.jpg","img/map_03.jpg","img/map_04.jpg","img/map_05.jpg"];	
	var next = 1;
	setInterval(function(){
					fade(mapimages[next],2000);
					next++;
					if (next == mapimages.length) next = 0;
	},4000);*/
})();
