function Designwahl(styletyp)
{
////nachsehen, ob Cookies erlaubt
if(navigator.cookieEnabled == false)
 {alert("Sie haben Cookies deaktiviert.\n Deshalb kann diese\n Funktion nicht genutzt werden ! ");
}
else
{
 var ablauf = new Date();
 var Verfalltage = ablauf.getTime() + (365 * 24 * 60 * 60 * 1000);
 ablauf.setTime(Verfalltage);
 //alert(styletyp+"\n"+ablauf);
 document.cookie = "DESIGN="+styletyp+"; expires="+ablauf.toGMTString()+";";
}
location.reload();
parent.frmMain.location.reload();
}
/* ----- ende Designauswahl -----------*/


function SetHeader(titel1,titel2,root)
{

document.write('<table width="99%" cellspacing="0" cellpadding="0" border="0">');
document.write('<tr><td width=80%><span class="header">',titel1,'</span><br>');
if (titel2.length > 0)
 {document.write('<span class="subheader">', titel2,'</span>&nbsp;'); }

document.write('</td><td width=20% align=right>');
/*----------------------------------------------------------------
wird eine Headerzeile für einen Datei im Root-Verzeichnis benötigt,
muss der Pfad zum LOGO-Verzeichnis richtig referenziert werden
-----------------------------------------------------------------*/
if (root == true)
{
document.write('<A href="javascript:myBack()" onFocus="if(this.blur)this.blur()"><img src="./logo/bt_back.gif" width="15" height="9" alt="" border="0" align="center">zur&uuml;ck</A>&nbsp;</td></tr></table><br>');
}
else
{
document.write('<A href="javascript:myBack()" onFocus="if(this.blur)this.blur()"><img src="../logo/bt_back.gif" width="15" height="9" alt="" border="0" align="center">zur&uuml;ck</A>&nbsp;</td></tr></table><br>');
}

}
/* ----- ende SetHeader -----------*/

var isPrint=false;
//------ Druckfunktion im neuen Fenster ------------------
function PrintWindow()
{
var isPrint = true;
tW=screen.width*0.8;
tH=screen.height*0.8;
aktW=Math.round(tW);
aktH=Math.round(tH);

vFile=window.location.href;

pWindow=window.open(vFile,"printwindow","fullscreen=0,toolbar=no,scrollbars=yes,width="+aktW+",height="+aktH+",top=0,left=0");

 pWindow.status="Seite drucken";
 pWindow.document.focus();
 pWindow.print();
}

//------- Überschriftenzeile mit Drucklink
function writeHeader(vTitel)
{
document.write("<table width='100%' cellspacing='1' cellpadding='0' border='0'>");
document.write("<tr><td>");
document.write("<span class='header'>");
document.write(vTitel);
document.write("</span></td><td>");
document.write("<div align='right'><a class='noprint' href='#' onClick='javascript:window.print()'>[Seite drucken]</a></div>");
document.write("</td></tr></table>");
}

//------- Überschriftenzeile speziell für Patientenverfügung
function writeHeader2(vTitel,vPic)
{
document.write("<table width='100%' cellspacing='1' cellpadding='0' border='0'>");
document.write("<tr><td valign='top'>");
document.write("<span class='header'>");
document.write(vTitel);
document.write("</span></td><td width=40%><img src='./images/");
document.write(vPic);
document.write("'></td><td>");
document.write("<div align='right'><a class='noprint' href='#' onClick='javascript:window.print()'>[Seite drucken]</a></div>");
document.write("</td></tr></table>");
}


function writeFooter()
{
document.write("<br><br><div align='right'>");
document.write("<a class='noprint' href='#top'><img src='images/logo_top3.png' width='15' height='15' alt='\nSeitenanfang\n' border='0'></a></div><br>");
}


framename="frmMain";
frameset="http://www.hospiz-stmk.at/index.html";
//frameset="http://localhost/mydata/STM/index.html";

function checkframe()
 {
   if(!eval("parent."+framename))
       { location.replace(frameset+"?"+location.href);}

 }

function LoadFrame()
{
 var URL=location.search;
 if(URL)
    { frame=eval("frames."+framename);
      frame.location.replace(URL.substring(1,URL.length));
    }
}

function WindowAuktion(vfile)
{
pictWindow=window.open(vfile,"pictw","fullscreen=0,toolbar=no,scrollbars=auto,width=640,height=400,top=50,left=150");
 w=pictWindow.document;
 w.focus();
 w.close();
}