// it.x: Eine Liste aller geöffneten Popups
var PopupList = new Array();

// it.x: Öffnen eines Fensters.
function js_popup(str_url, str_name, str_window, int_width, int_height, int_x, int_y, str_features)
   	{
    str_features = str_features + ',width=' + int_width + ',height=' + int_height;
   
	if (int_x=='false')
   	  str_features = str_features + ',left=' + ((screen.availWidth - int_width) / 2) + ',top=' + ((screen.availHeight - int_height) / 2);
    else
   	  str_features = str_features + ',left=' + int_x + ',top=' + int_y;
    
	if (PopupList[str_window] && PopupList[str_window].closed == false)
		PopupList[str_window].close();
	
	obj_window = window.open(str_url, str_window, str_features);
	
	if (obj_window)
		{
		PopupList[str_window] = obj_window;
		obj_window.focus();
		obj_window.innerWidth = int_width;
		obj_window.innerHeight = int_height;
		}
	}
		
		
function resizedBrowser (){
	if(window.innerWidth<1024 || document.documentElement.clientWidth < 1024){
		document.getElementsByTagName("Body")[0].style.left = 0;
		document.getElementsByTagName("Body")[0].style.marginLeft = "0px";
	} else {
		document.getElementsByTagName("Body")[0].style.left = "50%";
		document.getElementsByTagName("Body")[0].style.marginLeft = "-510px";
	}
}

function init(){
	if(window.addEventListener){
		window.addEventListener('resize', resizedBrowser, false);
	} else if (window.attachEvent){
		window.attachEvent('onresize', resizedBrowser);
	}
	resizedBrowser();
}
window.onload = init;

