
	// Windowpopups
	
	function OpenForum(url) {
		props = "width=640,height=560,toolbar=1,location=0,status=0,menubar=0,scrollbars=1,resizable=1";
		forumfenster=window.open(url,"Forum",props); 
		forumfenster.focus();
	}
	
	function OpenPremiumsommer() {
		url = "http://www.livingathome.de/flashteaser/premiumsommer/flash/detection.html";
		props = "width=428,height=428,toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0";
		pwin=window.open(url,"Premiumsommer",props); 
		pwin.focus();
	}
		
	function OpenFotostrecke(url, breite, hoehe) {
		props = "width=" + breite + ",height=" + hoehe + ",toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0";
		awin=window.open(url,"Fotostrecke",props); 
		awin.focus();
	}

	function OpenGeschenkefinder(url) { 
		awin=window.open(url,"geschenkefinder","width=600,height=580,toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0");
		awin.focus();
	}

	function OpenSommerSpiel(url) { 
		awin=window.open(url,"gewinnspiel","width=610,height=450,toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0");
		awin.focus();
	}

	function OpenAdventskalender(url) {
		awin=window.open(url,"advent","width=600,height=460,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0");
		awin.focus();
	}

	function OpenAdventskalenderFrage(url) {
		awin=window.open(url,"advent2","width=600,height=480,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0");
		awin.focus();
	}
	
	function OpenHerstellerFenster(link) {
		hersteller = window.open(link,"Hersteller","width=220,height=200,resizable=0");
		hersteller.focus();
	}
	
	function OpenRezeptVorschau(link) {
		RezeptVorschau = window.open(link,"RezeptVorschau","width=480,height=560,resizable=0");
		RezeptVorschau.focus();
	}
	
	function OpenRezeptDruckansicht(link) {
		RezeptDruckansicht = window.open(link,"RezeptDruckansicht","width=650,height=660,toolbar=1,resizable=1,scrollbars=1");
		RezeptDruckansicht.focus();
	}
	
	function OpenHaeuserSpecial(url) { 
		awin=window.open(url,"haeuserspecial","width=700,height=560,toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0");
		awin.focus();
	}

	function OpenHaeuserSpecial2(url) { 
		awin=window.open(url,"haeuserspecial2","width=680,height=550,toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0");
		awin.focus();
	}

	function OpenSpecialSchwoerer(url) { 
		awin=window.open(url,"SchwoererHaus","width=710,height=525,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");
		awin.focus();
	}

	function OpenSpecialDatabecker(url) { 
		awin=window.open(url,"databecker","width=700,height=470,toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0");
		awin.focus();
	}

	function OpenSpecialSchweiz(url) { 
		awin=window.open(url,"schweiz","width=620,height=420,toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0");
		awin.focus();
	}
	
	function OpenWindow(url) { 
		awin=window.open(url,"swin","width=480,height=400,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0");
		awin.focus();
	}

	function OpenWindowCustom(url, breite, hoehe) {
		props = "width=" + breite + ",height=" + hoehe + ",toolbar=1,location=0,status=0,menubar=0,scrollbars=1,resizable=0";
		awin=window.open(url,"lah2",props);
		awin.focus();
	}
	
	function OpenWindowCustomResize(url, breite, hoehe) {
		props = "width=" + breite + ",height=" + hoehe + ",toolbar=1,location=0,status=0,menubar=0,scrollbars=1,resizable=1";
		awin=window.open(url,"lah1",props); 
		awin.focus();
	}

	function OpenWindowCustomName(url, name, breite, hoehe) {
		props = "width=" + breite + ",height=" + hoehe + ",toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0";
		awin=window.open(url,name,props);
		awin.focus();
	}

	function OpenWindowCustomResizeName(url, name, breite, hoehe) {
		props = "width=" + breite + ",height=" + hoehe + ",toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1";
		awin=window.open(url,name,props); 
		awin.focus();
	}
	
	function GoToSeite(s) {
		var d = s.options[s.selectedIndex].value;
		window.top.location.href = d;
		s.selectedIndex=0;
	}

	function GoToFotostrecke(s, breite, hoehe) {
		var d = s.options[s.selectedIndex].value;
		OpenFotostrecke(d, breite, hoehe);
		s.selectedIndex=0;
	}
	
	function img_act(imgName) {
		imgOn = eval(imgName + "on.src");
		document [imgName].src = imgOn;
	}
	
	function img_inact(imgName) {
		imgOff = eval(imgName + "off.src");
		document [imgName].src = imgOff;
	}


//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}


// StyleSwitcher functions written by Paul Sowden
// For the details, visit ALA: http://www.alistapart.com/stories/alternate/

/*
function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}


function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

window.onload = function(e) {
  var cookie = readCookie("style");
  var title = cookie ? cookie : getPreferredStyleSheet();
  setActiveStyleSheet(title);
}

window.onunload = function(e) {
  var title = getActiveStyleSheet();
  createCookie("style", title, 365);
}

var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);
*/
