// e-dvertising - Hinterdorfer & Edlinger OEG, http://e-dvertising.at/
if(self.name == '') {
	self.name = "cms_main";
}

// >>>>> druck popup <<<<<
function openWindowPrint(){
	query_string = window.top.location.search;
	if (query_string){query_string_p = (query_string + '&p=y');}
	else {query_string_p = ('?p=y');}

	window.open(query_string_p, 'drucken', 'toolbar=no, menubar=yes, screenY=10, screenX=20, top=10, left=20, resizable=yes, scrollbars=yes, width=820, height=800');
}


// >>>>> bilder popup <<<<<
function openWindowImage(pic_filename, width, height, popup_title, popup_alt){
	var_left = (screen.availWidth-width)/10;
	var_up = (screen.availHeight-height)/10;

	window.open('/popup.php?pic_filename=' + pic_filename + '&width=' + width + '&height=' + height + '&popup_title=' + popup_title + '&popup_alt=' + popup_alt + '', 'zoom', 'toolbar=no, menubar=no, screenY='+var_left+', screenX='+var_up+', left='+var_left+', top='+var_up+', resizable=no, scrollbars=no, width=' + width + ', height=' + height);
}


// >>>>> admin popup <<<<<
function openWindowAdmin(x) {
	var_left = (screen.availWidth-804)/10;
	var_up = (screen.availHeight-640)/10;

	var adminpopup = window.open('', 'adminpopup','width=804, height=673, screenY='+var_left+', screenX='+var_up+', left='+var_left+', top='+var_up+', scrollbars=yes, menubar=yes, locationbar=no, resizable=yes, status=yes');

	//funct auch im opera
	document.forms[x].submit();
	if (window.focus) {adminpopup.focus()}

	//funct nicht im opera!!!(testet in 6.01)
	//document.getElementById(x).submit();
	return;
}


// >>>>> media library popup <<<<<
function openWindowLib(x) {
	var_left = (screen.availWidth-824)/6;
	var_up = (screen.availHeight-640)/6;

	medialib = window.open('', 'medialib', 'width=824, height=640, screenY='+var_left+', screenX='+var_up+', left='+var_left+', top='+var_up+', scrollbars=yes, menubar=yes, locationbar=no, resizable=yes,status=no');
	document.forms[x].submit();
	medialib.focus();
	return;
}


// >>>>> validation-fenster schließen und opener reloaden <<<<<
function close_validation(opener_href){
	opener.location.href = opener_href;
	window.close();
}

function popopen2(pic_filename, dir, width, height, popup_title, popup_alt){ 
	window.open('/popup2.php?pic_filename=' + pic_filename + '&dir=' + dir + '&pic_width=' + width + '&pic_height=' + height + '&popup_title=' + popup_title + '&popup_alt=' + popup_alt + '', 'zoom', 'toolbar=no, menubar=no, sreenY=10, screenX=10, left=10, top=10, resizable=no, scrollbars=no, width=' + width + ', height=' + height + '');
}

