function presse(Username, SessionKey, ProjectvariantGUID, SeiteGUID, ProjectGuID, LanguagevariantGUID)
{
	ref="our_rql/pressemitteilung_generieren.asp?Username=" + Username +  "&SessionKey=" + SessionKey +  "&ProjectvariantGUID=" + ProjectvariantGUID +  "&SeiteGUID=" + SeiteGUID +  "&ProjectGuID=" + ProjectGuID +  "&LanguagevariantGUID=" + LanguagevariantGUID;
	
	window.open(ref, "Presse", "width=300,height=180,left=50,top=50");
}

function ausrichten(LoginGuid, PageGuid, SessionKey, PageURL, Ausrichtung)
{
	ref="our_rql/ausrichten.asp?GuidCallingPage="+ PageGuid + "&LoginGuid="+ LoginGuid +  "&SessionKey=" + SessionKey + "&Ausrichtung=" + Ausrichtung;
	parent.frames.text.location.href=ref;
	//parent.frames.text.location.href=PageURL;
	location.reload ();
}

// Druckvorschau
function print()
{
var OLECMDID = 7;
var PROMPT = 1; 
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser); 
WebBrowser1.ExecWB(OLECMDID, PROMPT);
WebBrowser1.outerHTML = "";
}

// Seitenstatus ein- und ausblenden
function Status_ein_aus(Wert)
{
if(document.getElementById(Wert).style.display=="inline")
document.getElementById(Wert).style.display = "none";
else
document.getElementById(Wert).style.display = "inline";
}

// Veranstaltungskalender ein- und ausblenden
function ein_aus(dbid)
{
if(document.getElementById("inhalt"+dbid).style.display=="inline")
document.getElementById("inhalt"+dbid).style.display = "none";
else
document.getElementById("inhalt"+dbid).style.display = "inline";
}

//Aufruf des PopUp-Fensters
function popup(url,name,params)
{
window.open(url,name,params);
}

//Popup-Fenster anpassen
function anpassen() 
      {
        hoehe = document.all.inhalt.offsetHeight; 
        breite = document.all.inhalt.offsetWidth;       
        //über name wird der Wert der scrollbars übergeben, nur wenn scrollbars -ein- sind, grosse Fenster verkleinern
        if (name == "yes") 
            {
            if (hoehe > 500) {hoehe = 500};
            breite = breite + 16;
            if(breite > 700){breite = 700};
            }
        window.resizeTo(breite + 10,hoehe + 29);
      }

//Datum in der Beitragsseite aktualisieren
function datum_setzen(LoginGuid, PageGuid, SessionKey, PageURL)
{
	ref="PlugIns/Heute_Geaendert/start.asp?GuidCallingPage="+ PageGuid + "&LoginGuid="+ LoginGuid +  "&SessionKey=" + SessionKey;
	parent.frames.text.location.href=ref;
	//parent.frames.text.location.href=PageURL;
        	//location.reload ();
}

function ausklappen()
{
	if((navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 3 && navigator.userAgent.indexOf("Opera") == -1) || (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4) || (navigator.appName == "Opera" && parseInt(navigator.appVersion) >= 5)) {
		var MTMCodeFrame = "code";
		for(i = 0; i < parent.frames.length; i++) {
			if(parent.frames[i].name == MTMCodeFrame && parent.frames[i].MTMLoaded) {
				parent.frames[i].MTMTrack = true;
				setTimeout("parent.frames[" + i + "].MTMDisplayMenu()", 50);
				break;
			}
		}
	}
	parent.document.title = " - " + document.title;
}

// Nachladen durch Framebuster
function dyn_nachladen(hier, bcseite)
{
parent.frames.text.location.href=hier;
parent.frames('code').BCZiel = bcseite;	
}

function buster(code, menu_empty, eigeneSeite, BCWert)
{
	if (code=="code.html") {
		code="code.htm";
	}
	if (menu_empty=="menu_empty.html") {
		(menu_empty="menu_empty.htm");
	}
	var LetzterSlash="";
	bcseite=""; 
	document.write('<frameset frameborder="0" framespacing="0" border="0" cols="*" rows="60,30,*">');
	document.write('<frame marginwidth="0" marginheight="0" src="headbereich_sachsen_de/headbereich.html" name="heading" noresize scrolling="no">');
	document.write('<frame marginwidth="0" marginheight="0" src="headbereich_sachsen_de/pfad.html" name="pfad" noresize scrolling="no">');
	document.write('<frameset frameborder="0" framespacing="0" border="0" cols="230,*" rows="*">');
  	document.write('<frameset frameborder="0" framespacing="0" border="0" cols="*" rows="0,*">');
  	document.write('<frame marginwidth="0" marginheight="0" src=' + code + '   name="code" noresize scrolling="no" frameborder="0">'); 
  	document.write('<frame marginwidth="0" marginheight="0" src=' + menu_empty +'  name="menu" noresize scrolling="auto" frameborder="0">');
  	document.write('</frameset>'); 
	document.write('<frame marginwidth="0" marginheight="0" src=' + eigeneSeite +'  name="text" noresize>');
	document.write('</frameset>');
	document.write('</frameset>');
         	if(BCWert != "") 
         {
         	bcseite = window.location.href;
         	if(bcseite.protocol == "file:") {var regExp = /\\/g; bcseite = bcseite.replace(regExp, "\/");}
         	//filepfad wandeln;
         	LetzterSlash = window.location.href.lastIndexOf("/"); 
         	bcseite = bcseite.slice(0,LetzterSlash + 1) + BCWert;    
         	//aufräumen für Smart-Editmodus
         	var suchstring="http://sinpos.polizei.sachsen.de/cms//cms";
         	var ersatzstring="http://sinpos.polizei.sachsen.de/cms";
         	var jetzt = bcseite.replace(suchstring, ersatzstring);
         	bcseite=jetzt;     	
         }
         window.setTimeout ("dyn_nachladen('" + eigeneSeite + "' , '" + bcseite + "')",300);
}

// Aenderung der Schriftgroesse

var defaultGroesse = 1.03;
var aktuelleGroesse = defaultGroesse;
var groesseSchritt = 0.25;

function schriftgroesse(wert)
{
  if (wert == 'plus')
  {
    aktuelleGroesse += groesseSchritt;
    groesseAendern(aktuelleGroesse);
  }
  else
  {
    if (wert == 'minus')
    {
      aktuelleGroesse -= groesseSchritt;
      groesseAendern(aktuelleGroesse);
    }
    else
    {
      aktuelleGroesse = defaultGroesse;
      groesseAendern(aktuelleGroesse);
    }
  }
}

function groesseAendern(wert)
{
  var size = String(wert + 'em');
  var kopf = document.getElementById('maintitle');
  var hauptteil = document.getElementById('maincontainer');
  var fuss = document.getElementById('mainfooter');

  maintitle.style.fontSize = size;
  maincontainer.style.fontSize = size;
  mainfooter.style.fontSize = size;
}
// Funktion für Karten Pop-Up der einzelen Diensstellen
function szwrite(id) {
nameField=themeNameFields;
title=values[nameField][id];
listdoc=window.open("about:blank","DisplayWindow","toolbar=no,directories=no,top=160,left=240,width=378,height=100,status=no,scrollbars=no,menubar=no");
listdoc.document.open();
listdoc.document.write('<html><head><title>www.polizei.sachsen.de</title>' + '<style type="text/css">' + ' h1 { margin-top:-18; margin-left:-9;}' + '</style></head><h1><table width="360" border="0" cellspacing="3"><tr><td colspan="2"><font size=2 face="arial"><b>' + title + '</b><br><img src="navigation_internet/trenner360.gif" border="0"></td></tr>');
for (i=1;i<fieldNames.length-1;i++) {
if (!(i==nameField)) 
{
listdoc.document.write('<tr><td width="72" bgcolor="#006633"><font size="2" face="arial" color="white"><b>'+ fieldNames[i] + '</b></td><td width="288" bgcolor="#efefef"><font size=2 face="arial">' + values[i][id]+ '</td></tr>');
}
}
listdoc.document.write('</table></html>');
listdoc.document.close();
}
function fini() {
listdoc.close()
}
// Ende Funktion für Karten Pop-Up der einzelen Diensstellen