function getWindowHeight() {
var windowHeight=0;
if (typeof(window.innerHeight)=='number') {
windowHeight=window.innerHeight;
}
else {
if (document.documentElement&&
document.documentElement.clientHeight) {
windowHeight=
document.documentElement.clientHeight;
}
else {
if (document.body&&document.body.clientHeight) {
windowHeight=document.body.clientHeight;
}
}
}
return windowHeight;
}



function getWindowWidth() {
var windowWidth=0;
if (typeof(window.innerWidth)=='number') {
windowWidth=window.innerWidth;
}
else {
if (document.documentElement&&
document.documentElement.clientWidth) {
windowWidth=
document.documentElement.clientWidth;
}
else {
if (document.body&&document.body.clientWidth) {
windowWidth=document.body.clientWidth;
}
}
}
return windowWidth;
}




//sätter content höjd till hämtad höjd minus balkarna

// ska sätta minus på balkarna
function flowerposition() {
if (document.getElementById) {
var windowHeight=getWindowHeight();
var windowWidth=getWindowWidth();
if (windowHeight>0) {


var flowerheight=356;
var flowerwidth=276;
var sitewidth=900;
var setwidth
var contentHeight=document.getElementById("container_site").offsetHeight

if(windowWidth >= 1156){
  document.getElementById("flower").style.display = 'block';
  document.getElementById("flower").style.top = contentHeight - flowerheight + "px";
  document.getElementById("flower").style.left = ((windowWidth - sitewidth) / 2) + sitewidth + "px";
  
  if(windowWidth <= 1156 + 271){
  setwidth = ((windowWidth-1156) / 2)
  //alert(setwidth);
  document.getElementById("flower").style.width = setwidth + 116 + "px";
   if(navigator.appName == "Microsoft Internet Explorer")
    {
    document.getElementById("flower").style.width = setwidth + 126 + "px";
    }
  
  }
  else{
  document.getElementById("flower").style.width = "271px"
  }
  
}
else{
  document.getElementById("flower").style.display = 'none';
}


}
}
}


function sideshadowdisplay(){
var windowWidth=getWindowWidth();

if(windowWidth <= 1156){
  document.getElementById("container_site").style.width = "990px";
  document.getElementById("container_site").style.backgroundPosition = "-83px 0px";
  
  // försöker fixa width bugg 090625
  //window.innerWidth = 400;
  //document.body.style.width = "50px";
}
else{
  document.getElementById("container_site").style.width = "1156px";
  document.getElementById("container_site").style.backgroundPosition = "0px 0px";
}


}

window.onload = function() {
 isIE6 = navigator.userAgent.toLowerCase().indexOf('msie 6') != -1;
 if(isIE6==false){
 flowerposition();
 sideshadowdisplay();
 }
}
window.onresize = function() {
 if(isIE6==false){
 flowerposition();
 sideshadowdisplay();
 }
}