var ARI_APPLICATION = "/_appl/files_prog/";
var ARI_IMAGES = "/_appl/files_img/";

var ns4 = document.layers?1:0;
var ns6 = (document.styleSheets&&!document.all)?1:0;
var ie = document.all?1:0;

/************* POPUP *************/

function fenster_open_js(string,w_width,w_height,w_left,nr,forcesize) {
	if(!w_width || w_width < 780) w_width = 780;
	if(!w_height) w_height = 500;
	
	// string = ARI_APPLICATION+string;
	fenster = window.open(
		string,
		'fenster_open_'+nr,
		'dependent=yes,toolbar=no,left='+w_left+',top=0,directories=no,status=yes,scrollbars=yes,menubar=yes,resizable=yes,width='+w_width+',height='+w_height
	);
	fenster.focus();
}

function fenster_open_output_table(string,w_width,w_height,w_left,nr,w_file) {
	if(!w_width || w_width < 780) w_width = 780;
	if(!w_height || w_height < 500) w_height = 500;
	if(w_file == 12){
		//Printaugabe CAD-Symbole 
		string = ('p_global_info_open_10.php?' + string);
	}else if(w_file == 22){ 
		//Excelausgabe CAD-Symbole  
		string = "p_symbib_excel_01.php?<?=SID?>";
	}
	fenster = window.open(string,'fenster_open'+nr,'dependent=yes,toolbar=no,left='+w_left+',top=0,directories=no,status=yes,scrollbars=yes,menubar=yes,resizable=yes,width='+w_width+',height='+w_height);
	if(fenster.focus != null) fenster.focus();
}

/************* LAYER *************/

function popupImg(num,bild,w_width,w_height) { PopupImg(num,'',bild,w_width,w_height); }
function PopupImg(num,bez,bild,w_width,w_height) {
/*
	console.log("num: "+num);
	console.log("bez: "+bez);
	console.log("bild: "+bild);
	console.log("w_width: "+w_width);
	console.log("w_height: "+w_height);
*/
	bild = ARI_IMAGES+bild;
	Slimbox.open([[bild,bez]], 0, {
		loop: true,
		counterText: "{x}/{y}",
		overlayOpacity: 0.2,
		overlayFadeDuration: 300,
		resizeDuration: 300,
		resizeTransition: Fx.Transitions.Quad,
		imageFadeDuration: 300,
		captionAnimationDuration: 100
	});
	
}


var initialize = 0;
function Activate(){initialize=1}
function deActivate(){initialize=0}












