var userinnerscreenwidth;
var userinnerscreenheight;
var xLogo;
var yLogo;
var xNavigation;
var yNavigation;
var textheight;
var textwidth;

var xNavigationCafe;
var xNavigationMenu;
var xNavigationCoordinates;
var xNavigationReserv;
var xNavigationEvents;
var xNavigationNews;

var imageheight;
var imagewidth;

var imageheightvert;
var imagewidthvert;

var imageheightfasad;
var imagewidthfasad;

function screener(){

if ( typeof( window.innerHeight ) == 'number' ) {
    //Non-IE
    
userinnerscreenwidth = window.innerWidth;
userinnerscreenheight = window.innerHeight;
	
  }

else if (document.documentElement && document.documentElement.clientHeight || document.documentElement.clientWidth)
	// Explorer 6 Strict Mode and all others
{

userinnerscreenwidth=document.documentElement.clientWidth;
userinnerscreenheight=document.documentElement.clientHeight;


}
else if (document.body && document.body.clientHeight || document.body.clientWidth) 
	// old Explorers
{

userinnerscreenwidth=document.body.clientWidth;
userinnerscreenheight=document.body.clientHeight;


}
else if (self.innerHeight)
	// all other old
{

userinnerscreenwidth=self.innerWidth;
userinnerscreenheight=self.innerHeight;

}

xLogo=parseInt((userinnerscreenwidth-340)/2, 10);
yLogo=parseInt((userinnerscreenheight-234)/3, 10);


//logo+navigation height is 234=208+26

//document.getElementById("divlogo").style.left=xLogo+"px";
//document.getElementById("divlogo").style.top=yLogo+"px";


xNavigation=parseInt((userinnerscreenwidth-(110+113+230+146))/2, 10);
yNavigation=parseInt((userinnerscreenheight-26)/5, 10);


if (xNavigation >= 0) {
xNavigationCafe=xNavigation;
}
else {
xNavigationCafe=0;
}

xNavigationMenu=xNavigationCafe+110;
xNavigationCoordinates=xNavigationCafe+110+113;
xNavigationReserv=xNavigationCafe+110+113+230;
//xNavigationEvents=xNavigationMenu+113+230+146;
//xNavigationNews=xNavigationMenu+113+230+146+169;

document.getElementById("divnavigationcafe").style.left=xNavigationCafe+"px";
document.getElementById("divnavigationmenu").style.left=xNavigationMenu+"px";
document.getElementById("divnavigationcoordinates").style.left=xNavigationCoordinates+"px";
document.getElementById("divnavigationreserv").style.left=xNavigationReserv+"px";
//document.getElementById("divnavigationevents").style.left=xNavigationEvents+"px";
//document.getElementById("divnavigationnews").style.left=xNavigationNews+"px";

//document.getElementById("divnavigation").style.bottom=yNavigation+"px";

textheight=userinnerscreenheight-(40+100+2+86);
//textwidth=userinnerscreenwidth-240;

document.getElementById("text").height=textheight;
//document.getElementById("text").width=textwidth;

//document.getElementById("logo").width=textwidth;


if (textheight <= (516+2+26)){
imageheightfasad=textheight-(2+26);
imagewidthfasad=imageheightfasad*1.28;
textframe.yPhotofasad=13;
textframe.xPhotofasad=parseInt((784-(imagewidthfasad+2))/2, 10);
}

else{
imageheightfasad=516;
imagewidthfasad=660;
textframe.yPhotofasad=parseInt((textheight-(516+2))/2, 10);
textframe.xPhotofasad=parseInt((784-(660+2))/2, 10);
}

textframe.imageheightfasad=imageheightfasad;
textframe.imagewidthfasad=imagewidthfasad;



if (textheight <= (440+2+26)){
imageheight=textheight-(2+26);
imagewidth=imageheight*1.5;
textframe.yPhoto=13;
textframe.xPhoto=parseInt((784-(imagewidth+2))/2, 10);
}

else{
imageheight=440;
imagewidth=660;
textframe.yPhoto=parseInt((textheight-(440+2))/2, 10);
textframe.xPhoto=parseInt((784-(660+2))/2, 10);
}

textframe.imageheight=imageheight;
textframe.imagewidth=imagewidth;


if (textheight <= (660+2+26)){
imageheightvert=textheight-(2+26);
imagewidthvert=imageheightvert/1.5;
textframe.yPhotovert=13;
textframe.xPhotovert=parseInt((784-(imagewidthvert+2))/2, 10);
}

else{
imageheightvert=660;
imagewidthvert=440;
textframe.yPhotovert=parseInt((textheight-(660+2))/2, 10);
textframe.xPhotovert=parseInt((784-(440+2))/2, 10);
}

textframe.imageheightvert=imageheightvert;
textframe.imagewidthvert=imagewidthvert;

}

