<!--

function download_media(preview_id) {	
	f1 = window.open(docroot+"/pages/popup_media_download.php?id="+preview_id, "MediaDownload",  "width=450,height=300,menubar=no,status=no,toolbar=no,scrollbars=yes")
	
	if (f1) f1.focus()
}

function show_gallery(pm_id) {
	window_gallery = window.open(docroot+"/pages/popup_gallery.php?pm_id="+pm_id, "ImageDownload", "width=450,height=300,menubar=no,status=no,toolbar=no,scrollbars=yes,dependent=yes")
	
	if (window_gallery) window_gallery.focus()
}

function link_extern(uri) {
	extern = window.open(docroot+"/pages/popup_externer_link.php?uri="+uri, "LinkExtern", "width=570,height=510,menubar=yes,status=yes,toolbar=yes,scrollbars=yes,resizable=yes")

	if (extern) extern.focus();
}

function download_file(file_id, file_type) {
	f3 = window.open(docroot+"/download/t:" + file_type + "/p:" + file_id + "/", "FileDownload", "width=590,height=380,resizable=yes,scrollbars=yes,location=no,directories=no,status=no,menubar=yes,toolbar=yes")
	
	if (f3) f3.focus()
}

var f5;

function openWindow(uri, width, height) {
	f5 = window.open(uri, "Fenster", "width="+width+",height="+height+",resizable=no,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no")
	
	if (f5) f5.focus()
}

var f6;

function openStandort(URL) {
	f6 = window.open(URL, "Standort", "width=790,height=400,resizable=yes,scrollbars=yes,location=no,directories=yes,status=yes,menubar=yes,toolbar=yes")
	
	if (f6) f6.focus()
}


var gallerywin;

function bild_vorschau(bild_id, breite, hoehe) {
	var bild_uri = docroot + "/pages/show_vorschau.php?id=" + bild_id;
	
	content = '<html>';
	content += '<head>';
	content += '<title>Bildvorschau</title>';
	content += '<body style="margin:0px; background-color:#FFFFFF">';
	content += '<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">';
	content += '<tr><td align="center" valign="middle">';
	content += '<a href="javascript:window.self.close();"><img src="'+bild_uri+'" width="'+breite+'" height="'+hoehe+'" border="0" alt=""></a>';
	content += '</td></tr>';
	content += '</table>';
	content += '</body></html>';
	
	if (gallerywin) {
		if (!gallerywin.closed) gallerywin.self.close();
	}
	
	gallerywin = window.open('', 'gallerywin', 'width='+breite+', height='+hoehe+', resizable=no, scrollbars=no, location=no, directories=no, status=no, menubar=no, toolbar=no');
	
	gallerywin.document.open();
	gallerywin.document.writeln(content);
	gallerywin.document.close();
	
	if (gallerywin) {
		gallerywin.focus();
	}
}

/*
* Tabbing
*/

var page = '1';

function tab_rollover(tab_name) {
	if (tab_name != page) {
		if (page) {
			gE('ecke_'+page).src = docroot + '/data/images/pixel_blank.gif';
			gE('tab_'+page).className = 'tab_inactive';
			hE(gE('content_'+page));		
		}
		
		gE('tab_'+tab_name).className = 'tab_active';
		gE('ecke_'+tab_name).src = docroot + '/data/images/tab_ecke.gif';
		sE(gE('content_'+tab_name));
		
		page = tab_name;
	}
}

/*
* DHTML Pulldowns
*/

var pulldown_1_status = 0
var pulldown_1_value = ''
var pulldown_1_fieldname = 'tid'

var pulldown_2_status = 0
var pulldown_2_value = ''
var pulldown_2_fieldname = 'bid'

function togglePulldownVisibility(pulldown_name)
{
	eval(pulldown_name+'_status = ('+pulldown_name+'_status == 1) ? 0 : 1')
	eval('tmp_status = '+pulldown_name+'_status')
	
	if (tmp_status == 1) {
		//gE(pulldown_name+'_img').src = docroot + '/data/images/pulldown_down.gif'
		sE(gE(pulldown_name+'_div'))
	} else {
		//gE(pulldown_name+'_img').src = docroot + '/data/images/pulldown_up.gif'
		hE(gE(pulldown_name+'_div'))
	}
}

function setPulldownValue(pulldown_name, pulldown_value)
{
	eval('tmp_fieldname = ' + pulldown_name + '_fieldname')
	eval('tmp_value = ' + pulldown_name + '_value')
	
	if (String(tmp_value).match(/[0-9]+/)) {
		gE(pulldown_name+'_'+tmp_value).bgColor = '#FFFFFF'
	}
	
	gE(pulldown_name+'_'+pulldown_value).bgColor = '#EFEFEF'
	
	eval('document.suche.' + tmp_fieldname + '.value = pulldown_value')
	eval(pulldown_name + '_value = pulldown_value')
}

//-->