var pageRoot = "";

function popWindow( url, width, height, windowName )
{
    //get center coords
    var left = (screen.width - width) / 2;
    var top = (screen.height - height) / 2;
    
    win=window.open(url, windowName, 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);
}

function popScrollingWindow(url, width, height, windowName)
{
    //get center coords
    var left = (screen.width - width) / 2;
    var top = (screen.height - height) / 2;
    
    win=window.open(url, windowName, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);
}

function openWindow(url)
{
    var rand = "_blank";
    win=window.open(url,rand,"directories=yes,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes");
}

function popFanbox(){
	popWindow("http://www.saw6.kinowelt.de/assets/fanbox/index.html",800,732, "popup_fanbox");
}





function showWallpaper(number)
{
	popWindow(pageRoot + "./content/wallpapers/wallpaper.html?wid="+number+"&size=1024", 544, 589, "wallpapers");
}



function popPoster() {
	popWindow("motion_poster/motion_poster.html", 700, 500, "motion_poster");
}

function popBlooddrive() {
	popWindow("http://www.saw6.kinowelt.de/blooddrive/index.html", 600, 250, "blooddrive");
}








function checkSize(fix)

{

   myHeight = 5;

   minHeight = 856;

   if( typeof( window.innerWidth ) == 'number' )

   {

      //Non-IE

      myHeight = window.innerHeight;

   } 

   else if( document.documentElement && ( document.documentElement.clientHeight ) ) 

   {

      //IE 6+ in 'standards compliant mode'

      myHeight = document.documentElement.clientHeight;

   } 

   else if( document.body && ( document.body.clientHeight ) ) 

   {

      //IE 4 compatible

      myHeight = document.body.clientHeight;

   }



   if( fix )

   {

      document.getElementById('flashcontainer').style.height = minHeight;

   }

   else

   {

      document.getElementById('flashcontainer').style.height = '100%';

   }

}
