function changeDisplay(div_id,if_,then_)
{
 var elem=document.getElementById(div_id);
 if (elem)
 { if (elem.style.display==if_) {elem.style.display=then_;}

 }
}
function changeVisibility(div_id,if_,then_)
{
 var elem=document.getElementById(div_id);

 if (elem)
 {
  
 if (elem.style.visibility==if_) {elem.style.visibility=then_;}}
} 

function open_sub(SM_SHORT)
{
/*
	if (akt_sub!=SM_SHORT) {

		 changeDisplay(akt_sub,'block','none');
		 changeDisplay(SM_SHORT,'none','block');

		 akt_sub=SM_SHORT;			   
	}*/
}
function getAdr(prefix,postfix,lnkparam,lnktxt)
{
  lnktxt=lnktxt.replace(/TMPL_MAIL/,prefix+'@'+postfix);
 document.write('<a '+lnkparam+' href="mailto:'+prefix+'@'+postfix+'">'+lnktxt);
}



/*printjob*/
function printjob()
{		
    
    		if (document.all && (navigator.appVersion.indexOf("Mac") != -1))
		{

		self.focus();
		alert("Drucken-Funktion unter Macintosh nicht moeglich! \nBitte verwenden Sie Datei/Drucken");
		}
		else
		{
					if (document.all && navigator.appVersion.substring(22,23)==4)
      		{
					self.focus();
					var OLECMDID_PRINT = 6;
 					var OLECMDEXECOPT_DONTPROMPTUSER = 2;
 					var OLECMDEXECOPT_PROMPTUSER = 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_PRINT,OLECMDEXECOPT_DONTPROMPTUSER);
 					WebBrowser1.outerHTML = '';
		      }
					else{	self.focus();window.print();}

		}
	}
	

function Favorite()
{
 if (document.all)
 {
   window.external.AddFavorite('http://www.frei-steuern.at','Dr. Wilhelm Frei - www.frei-steuern.at');
 }
} 
function cont2pdf(ID)
{
 script="http://www.atikon.at/rechner/content2pdf.php";

 script=script+"?ID="+ID+"&url="+encodeURIComponent(window.location);

 window.open(script,'m','scrollbars=no,height=400,width=470');
 
}