Hi Arturo,
thank You for the answer.
Here is a different solution for opening panos without using the whole browser window.
I've written a few lines of javascript that open the initial display window within the browser window depending on screen size.
here is the link:
http://www.alois.cc/i/garten-psychiatrie-hall-9.html
here is the javascript code snippet:
Code: Select all
<script type="text/javascript" src="pano2vr_player.js">
</script>
<script type="text/javascript" src="skin.js">
</script>
<script type="text/javascript">
// check for CSS3 3D transformations
if (Modernizr.csstransforms3d) {
//start template modified by alois wechselberger
// trigger initial display window size by screen size javascript response to nested if-else statements
// container sizes are not tested and should be changed according to taste
// alternative method: trigger initial display window size by different user agents
// use HTML5 panorama for specified screen size
if ((screen.width>=1920) && (screen.height>=1200)) {
document.writeln('<div id="container" style="width:1600px;height:1100px;margin-left:auto;margin-right: auto ;"></div>');
// use HTML5 panorama for specified screen size
} else {
if ((screen.width>=1600) && (screen.height>=1000)) {
document.writeln('<div id="container" style="width:1200px;height:800px;margin-left:auto;margin-right: auto ;"></div>');
// use HTML5 panorama for specified screen size
} else {
if ((screen.width>=1024) && (screen.height>=768)) {
document.writeln('<div id="container" style="width:900px;height:600px;margin-left:auto;margin-right: auto ;"></div>');
//start of i-devices
// Screen resolution for iPad = 1024x768; iPhone4 = 960x640; iPod Touch and iPhone 3G = 480x320
// width and height inverted as devices assume portrait mode
// use HTML5 panorama ipad 1024x768
} else {
if ((screen.width>=768) && (screen.height>=1024)) {
document.writeln('<div id="container" style="width:800px;height:600px;margin-left:auto;margin-right: auto ;"></div>');
// use HTML5 panorama iphone4 960x640
} else {
if ((screen.width>=640) && (screen.height>=960)) {
document.writeln('<div id="container" style="width:600px;height:450px;margin-left:auto;margin-right: auto ;"></div>');
// use HTML5 panorama iphone3 480x320
} else {
if ((screen.width>=320) && (screen.height>=480)) {
document.writeln('<div id="container" style="width:300px;height:225px;margin-left:auto;margin-right: auto ;"></div>');
}
}
}
}
}
}
//end template modified by alois wechselberger
pano=new pano2vrPlayer("container");
skin=new pano2vrSkin(pano);
pano.readConfigUrl("garten-psychiatrie-hall-1.xml");
updateOrientation();
setTimeout(function() { updateOrientation(); }, 10);
setTimeout(function() { updateOrientation(); }, 1000);
} else {
// use Flash panorama
if (DetectFlashVer(9,0,0)) {
p2q_EmbedFlash('garten-psychiatrie-hall-1.swf', '800', '600',
'bgcolor', '#f0f0f0',
'play', 'true',
'cache','true',
'allowFullscreen','true',
'autoplay','true');
} else { // flash is too old or we can't detect the plugin
document.write('This content requires the Adobe Flash Player Version 9 or higher. ');
}
}
</script>
Greetings from Alois