//var root = 'http://' + location.host + '/pages/';

function Drucken() {
	Drucken = window.open("print/print.html", "Zweitfenster","width=420,height=300,scrollbars=yes");
	Drucken.focus();
}

function printer(){
		var platform;
		platform = window.navigator.platform.toLowerCase();
	if(document.all && navigator.appVersion.substring(22,23)==5 && platform.indexOf('mac') == 0) {
		top.main.focus();
		alert ("Um diese Seite zu drucken, klicken Sie bitte in das Inhaltsfenster. \nDanach drücken Sie bitte Apfel + p. "); 
	}
	else if(document.all && navigator.appVersion.substring(22,23)==4 && platform.indexOf('mac') == 1) {
		top.main.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 
	{
		parent.main.focus(); 
		print();
	}
}

function loadFrames (left, main) {
	parent.left.location.href = left;
	self.location.href = main;
}

function ns_act() {
	if(nc4){
		location.reload();
	}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//-->

function ZweiFrames(URL1,F1,URL2,F2,URL0,F0)
{
parent.frames[F1].location.href=URL1;
parent.frames[F2].location.href=URL2;
parent.frames[F0].location.href=URL0;
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function fensterNeu(url,bez)
{
   window.open(url,bez,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=380,height=440')
}

function fensterNeu2(url,bez)
{
   window.open(url,bez,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=380,height=390')
}

function fensterNeu3(url,bez)
{
   window.open(url,bez,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=440,height=440')
}

function ie_click(){
	window.focus();
}

//////////////////////////////////
/////////////////////////////////////////                BROWSERWEICHE
/////////////////////////////////
var browser = navigator.userAgent.toLowerCase();
var ganzzahl = parseInt(navigator.appVersion);
var genauezahl = parseFloat(navigator.appVersion);
//ist es netscape
var netscape = ((browser.indexOf('mozilla')!=-1) && (browser.indexOf('spoofer')==-1) && (browser.indexOf('compatible') == -1) && (browser.indexOf('opera')==-1) && (browser.indexOf('webtv')==-1) && (browser.indexOf('hotjava')==-1));
var netscape4 = (netscape && (ganzzahl == 4));
var netscape4up = (netscape && (ganzzahl >= 4));
var netscapeonly = (netscape && ((browser.indexOf(";nav") != -1) || (browser.indexOf("; nav") != -1)));
//ist es netscape 6
var netscape6 = (netscape && (ganzzahl == 5));
var netscape6up = (netscape && (ganzzahl >= 5));
var is_gecko = (browser.indexOf('gecko') != -1);
//ist es internet explorer 
var explorer = ((browser.indexOf("msie") != -1) && (browser.indexOf("opera") == -1));
var explorer3 = (explorer && (ganzzahl < 4));
var explorer4 = (explorer && (ganzzahl == 4) && (browser.indexOf("msie 5")==-1));
var explorer4up = (explorer && (ganzzahl >= 4));
var explorer5 = (explorer && (ganzzahl == 4) && (browser.indexOf("msie 5.0")!=-1));
var explorer5_5 = (explorer && (ganzzahl == 4) && (browser.indexOf("msie 5.5") !=-1));
var explorer5up = (explorer && !explorer3 && !explorer4);
var explorer5_5up =(explorer && !explorer3 && !explorer4 && !explorer5);
var explorer6 = (explorer && (ganzzahl == 4) && (browser.indexOf("msie 6.0") !=-1));
//ist es opera
var opera = (browser.indexOf("opera") != -1);
var opera4 = (browser.indexOf("opera 4") != -1);
var opera5 = (opera && (ganzzahl == 5));
var opera5up = (opera && (ganzzahl >=5));
//////////////////////////////////
/////////////////////////////////////////                BROWSERWEICHE
/////////////////////////////////
	if (!netscape4) {
		document.write('<style type="text/css">.inputer {width: 160px; border:solid 1px #000000; height:18px; margin-top: 0px;padding-left:2px; padding-right: 2px;}</style>');
		document.write('<style type="text/css">.submiter {border:none; height:18px; margin-top: 0px; background-color:#FFD666; cursor: hand;}</style>');
	}
	
function doDownload (file) {
	//var homeUrl = 'http://' + location.host + '/dialogo/pages/';
	var homeUrl = 'http://' + location.host + '/pages/';
	/*	
	if (!netscape4)
		document.location.href = homeUrl + 'download.php?file=' + encodeURI(file);	
	else
	*/
	document.location.href = homeUrl + 'download.php?file=' + file;		
}	