// ==========================================
//	v3.6, singlepage
//	diverse CMS Standard JavaScript-Funktionen
// ==========================================


/*
	31.01.2009, dogan

	©2009 Tanyel Dogan, alle Rechte vorbehalten
*/
function cms4d_write_flash(movie_src
							,f_objid
							,f_width
							,f_height
							,f_align
							,f_allow_script_access
							,f_loop
							,f_menu
							,f_quality
							,f_scale
							,f_salign
							,f_wmode
							,f_bgcolor
							,version_str)
{
	var src = movie_src;
	var t = '';
t += '<object';
t += '\n classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
t += '\n codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + version_str + '"';
t += '\n width="' + f_width + '"';
t += '\n height="' + f_height + '"';
t += '\n id="' + f_objid + '"';
t += '\n align="' + f_align + '">\n';
t += '\t<param name="allowScriptAccess" value="' + f_allow_script_access + '"/>\n';
t += '\t<param name="movie" value="' + src + '"/>\n';
t += '\t<param name="loop" value="' + f_loop + '"/>\n';
t += '\t<param name="menu" value="' + f_menu + '"/>\n';
t += '\t<param name="quality" value="' + f_quality + '"/>\n';
t += '\t<param name="scale" value="' + f_scale + '"/>\n';
t += '\t<param name="salign" value="' + f_salign + '"/>\n';
t += '\t<param name="wmode" value="' + f_wmode + '"/>\n';
t += '\t<param name="bgcolor" value="' + f_bgcolor + '"/>\n';
	t += '\t<embed src="' + src + '"';
	t += '\n loop="' + f_loop + '"';
	t += '\n menu="' + f_menu + '"';
	t += '\n quality="' + f_quality + '"';
	t += '\n scale="' + f_scale + '"';
	t += '\n salign="' + f_salign + '"';
	t += '\n wmode="' + f_wmode + '"';
	t += '\n bgcolor="' + f_bgcolor + '"';
	t += '\n width="' + f_width + '"';
	t += '\n height="' + f_height + '"';
	t += '\n name="' + f_objid + '"';
	t += '\n align="' + f_align + '"';
	t += '\n allowScriptAccess="' + f_allow_script_access + '"';
	t += '\n type="application/x-shockwave-flash"';
	t += '\n pluginspage="http://www.macromedia.com/go/getflashplayer"/>\n';
t += '</object>';
//alert(t);
document.write(t);
}


//------------- Standard neues Fenster öffnen ------------
function neuwindow(fenstername, url, w, h, status_flag, resize_flag, scroll_flag)
{
	var aw = screen.availWidth;
	var ah = screen.availHeight;
	if(w == null || h == null)
	{
		wb = screen.availWidth - 100;
		wh = screen.availHeight - 100;
	}
	else
	{
		wb = w;
		wh = h;
	}
	var wx = (aw / 2) - (wb / 2) - 6;
	var wy = (ah / 2) - (wh / 2) - 30;

	var status_enable = 1;
	if(status_flag != null)status_enable = status_flag;
	var scroll_enable = 1;
	if(scroll_flag != null)scroll_enable = scroll_flag;
	var resize_enable = 1;
	if(resize_flag != null)resize_enable = resize_flag;

	var fenster = window.open(url,fenstername,'toolbar=0,location=0,directories=0,status=' + status_enable + ',menubar=0,scrollbars=' + scroll_enable + ',resizable=' + resize_enable + ',Width=' + wb + ',height=' + wh + ',left=' + wx + ',top=' + wy);
	//return(fenster);
}



//------- Bild Zoomfunktion ----------
//Veraltet. Aus Gründen der Rückwärtskompatibilität vor v1.6 beibehalten !
function zoomwindow(url) 
{
	var wb = 300;
	var wh = 300;
	var sx = screen.width;
	var sy = screen.height;
	var wx = (sx / 2) - (wb / 2);
	var wy = (sy / 2) - (wh / 2);

	//WICHTIG: das window MUSS resizeable sein, da sonst Netscape 4.x
	//die Grösse nachträglich nicht ändern kann !

	zoomwin=window.open(url,'Zoom',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,WIDTH=" + wb + ",HEIGHT=" + wh + ",left=0,top=0,left=" + wx + ",top=" + wy)
	zoomwin.focus();
}
//ab v3.6
/*
function zoom(id)
{
	var url = 'cmszoom.asp?id=' + id;
	//WICHTIG: BasisURL der aufrufenden Seite einbeziehen.
	if(page_baseurl)
	{
		url = page_baseurl + url;
	}
	zoomwindow(url);
}
*/

//Für Suche
function suche(obj)
{
	var such_str = obj.suchbegriff.value;
	if(such_str != '')
	{
		obj.submit();
	}
}


//Gästebuch in neuem Fenster öffnen
function open_gb()
{
	var url = page_baseurl + '../gbuch';
	var fenstername = 'vogelsang_ip_gaestebuch';
	var wb = 800;
	var wh = 600;

	var aw = screen.availWidth;
	var ah = screen.availHeight;

	var wx = (aw / 2) - (wb / 2) - 6;
	var wy = (ah / 2) - (wh / 2) - 30;

	var gb = window.open(url,fenstername,'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,Width=' + wb + ',height=' + wh + ',left=' + wx + ',top=' + wy);
	gb.focus();
}

//---
