function resizeView() { marginLeft=100; marginRight=100; marginTop=80; marginBottom=28; maxWidth=690; paddingContainer=5; if (window.innerHeight!=undefined){windowHeight=window.innerHeight;} else { if (document.body.clientHeight!=undefined){windowHeight=document.body.clientHeight;} else {windowHeight=600;}; }; if (window.innerWidth!=undefined){windowWidth=window.innerWidth;} else { if (document.body.clientWidth!=undefined){windowWidth=document.body.clientWidth;} else {windowWidth=800;}; }; extraWidth=windowWidth-maxWidth-marginLeft-marginRight-2*paddingContainer; if (extraWidth<=0){extraLeft=0;} else {extraLeft=Math.floor(extraWidth/2); extraWidth=0;}; if (document.getElementById('container')!==null) { document.getElementById('container').style.padding=paddingContainer+'px'; document.getElementById('container').style.height=(windowHeight-marginTop-marginBottom-2*paddingContainer)+'px'; document.getElementById('container').style.top=marginTop+'px'; document.getElementById('container').style.left=marginLeft+extraLeft+'px'; document.getElementById('container').style.width=maxWidth+extraWidth+'px'; document.getElementById('container').style.visibility='visible'; }; if (document.getElementById('container_bg')!==null) { document.getElementById('container_bg').style.height=(windowHeight-marginTop-marginBottom-2*paddingContainer)+'px'; document.getElementById('container_bg').style.top=marginTop+'px'; document.getElementById('container_bg').style.left=marginLeft+extraLeft+'px'; document.getElementById('container_bg').style.width=maxWidth+extraWidth+'px'; document.getElementById('container_bg').style.visibility='visible'; }; if (document.getElementById('mp3player')!==null) { document.getElementById('mp3player').style.left=marginLeft+extraLeft+maxWidth+extraWidth+2*paddingContainer-document.getElementById('mp3player').clientWidth-12+'px'; document.getElementById('mp3player').style.top=windowHeight-Math.floor((marginBottom+document.getElementById('mp3player').clientHeight)/2)+'px'; document.getElementById('mp3commentdiv').style.left=document.getElementById('mp3player').offsetLeft+'px'; document.getElementById('mp3commentdiv').style.top=document.getElementById('mp3player').offsetTop-145+'px'; }; if (document.getElementById('h_band')!==null) { document.getElementById('h_band').style.left=document.getElementById('container').offsetLeft+12+'px'; document.getElementById('h_band').style.top=marginTop-28+'px'; // document.getElementById('h_band').style.height='17px'; document.getElementById('h_band').style.width=document.getElementById('container').offsetWidth-24+'px'; document.getElementById('h_band').style.visibility='visible'; }; topvk=document.getElementById('container').offsetTop+((document.getElementById('container').offsetHeight-697)/2); // if (topvk+697>windowHeight) {topvk=windowHeight-697;}; leftvk=document.getElementById('container').offsetLeft-190; if (leftvk<-30) {leftvk=-30;}; if (document.getElementById('klavecimbel')!==null) { document.getElementById('klavecimbel').style.top=topvk+'px'; document.getElementById('klavecimbel').style.left=leftvk+'px'; document.getElementById('klavecimbel').style.visibility='visible'; }; if (document.getElementById('klavecimbel2')!==null) { document.getElementById('klavecimbel2').style.top=topvk+'px'; document.getElementById('klavecimbel2').style.left=leftvk+'px'; document.getElementById('klavecimbel2').style.visibility='visible'; }; if (document.getElementById('menu_right')!==null) { document.getElementById('menu_right').style.left=windowWidth-100+'px'; document.getElementById('menu_right').style.top='100px'; }; }; function sizeView(){ resizeView(); }; window.onresize=resizeView; window.onload=sizeView;