var merkQW = 0;
var merkQH = 0;
var merkHW = 0;
var merkHH = 0;

var FQ;
var FH;
var FG;
var F1;
var FBf;
var FBc;
var F2;
var FP;

var Show = "visible";
var Hide = "hidden";

var BrowserName    = ' ';
var BrowserVersion = ' ';
var MSIE = false;

// #######################################################

var DHTML = 0, DOM = 0, MS = 0, NS = 0, OP = 0;
DHTML_init();

/* Vorabsteuerung für die SLidshows ---------------- */

//	g = FndObj(ul_dyn_slogan);
/*
	g = document.getElementsByName("ul_dyn_slogan")[0];

	if (g !=null)
	{
		d  = (document.layers) ? g:g.style;

		d.visibility = "visible";
	}
	else
	{
		alert ("nicht gefunden");
	}
*/

/*************************************************************************/
function DHTML_init() {

 //alert("DHTML_init");
 
 if (window.opera) {
     OP = 1;
 }
 if(document.getElementById) {
   DHTML = 1;
   DOM = 1;
 }
 if(document.all && !OP) {
   DHTML = 1;
   MS = 1;
 }
if(document.layers && !OP) {
   DHTML = 1;
   NS = 1;
 }

//alert("OP= "+ OP + " DHTML= " + DHTML + " DOM= " + DOM + " MS= " + MS);
}

/*************************************************************************/
function calculate_microsite(anz_features,seiten_preis_,foto_preis_,header_foto_preis_)
{
	grund_preis 		= 0;
	gesamt_preis 		= 0;
	seiten_preis 		= 0;
	foto_preis 	 		= 0;
	header_foto_preis	= 0;

//	Header Fotos ----------------
	if (anz_features > 2)
	{
		anz_header_fotos			= document.getElementById("www_zus_header_fotos");
		anz_header_fotos_preis	= document.getElementById("www_zus_header_fotos_preis");
		
		if (anz_header_fotos.value >= "0"
		&&  anz_header_fotos.value <= "99")
		{
			header_foto_preis	= parseInt(anz_header_fotos.value) * header_foto_preis_;
		}
		else
		{
			anz_header_fotos.value = 0;
		}
	}
//	Fotos ----------------
	if (anz_features > 1)
	{
		anz_fotos			= document.getElementById("www_zus_fotos");
		anz_fotos_preis	= document.getElementById("www_zus_fotos_preis");
		
		if (anz_fotos.value >= "0"
		&&  anz_fotos.value <= "99")
		{
			foto_preis	= parseInt(anz_fotos.value) * foto_preis_;
		}
		else
		{
			anz_fotos.value = 0;
		}
	}
//	Seiten ----------------
	if (anz_features > 0)
	{
		anz_seiten			= document.getElementById("www_zus_seiten");
		anz_seiten_preis	= document.getElementById("www_zus_seiten_preis");
		
		if (anz_seiten.value >= "0"
		&&  anz_seiten.value <= "99")
		{
			seiten_preis	= parseInt(anz_seiten.value) * seiten_preis_;
		}
		else
		{
			anz_seiten.value = 0;
		}
	}
	grundpreis 	= document.getElementById("www_grundpreis");
	gesamtpreis	= document.getElementById("www_gesamt_preis");

	grund_preis		= parseInt(grundpreis.value);
//	gesamt_preis	= parseInt(gesamtpreis.value);
	
	if (anz_features > 0)
	{
		seiten_preis = parseInt(anz_seiten.value) * seiten_preis_;
		gesamt_preis = grund_preis + seiten_preis;
		
		if (anz_features > 1)
		{
			foto_preis		= parseInt(anz_fotos.value) * foto_preis_;
			gesamt_preis	= gesamt_preis + foto_preis;
		
			if (anz_features > 2)
			{
				gesamt_preis		= gesamt_preis + header_foto_preis;
			}
		}
	}
	if (anz_features > 2)
	{
		anz_header_fotos_preis.value = header_foto_preis;
	}
	if (anz_features > 1)
	{
		anz_fotos_preis.value = foto_preis;
	}
	if (anz_features > 0)
	{
		anz_seiten_preis.value = seiten_preis;
	}
	gesamtpreis.value	= gesamt_preis;

}

/*************************************************************************/
function Fensterweite()
{
 if (window.innerWidth) return window.innerWidth;
 else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
 else return 0;
}

/*************************************************************************/
function Fensterhoehe()
{
 if (window.innerHeight) return window.innerWidth;
 else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
 else return 0;
}

/*************************************************************************/

function SetWindowTitle(titel)
{
   top.document.title = "Artis Web Design :: " + titel + " - -";
   

}

/*************************************************************************/
function FndObj(n, d)
{ //v4.01
   var p, i, x;

   /*if (n == 'fotorueck')
   {
      alert("FndObj: n= " + n);
   }*/

   if (!d)
      d = document;

   // Auf übergeordnete Frames mit Parameterübergabe prüfen?
   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];

      /*if (x)
      {
         alert("1 n= " + n + " x= " + x);
      }*/


   for (i = 0; !x && i < d.forms.length; i++)
      x = d.forms[i][n];

      /*if (x)
      {
         alert("2 n= " + n + " x= " + x);
      }*/

   for (i = 0; !x  && d.layers && i < d.layers.length;i++)
      x = FndObj(n,d.layers[i].document);

      /*if (x)
      {
         alert("3 n= " + n + " x= " + x);
      }*/

   if (!x && d.getElementById)
      x = d.getElementById(n);

      /*if (x)
      {
         alert("4 n= " + n + " x= " + x);
      }*/


   return x;
}


