// ------------------------------------------------------------------------
// Fenster voll aufziehen
// ------------------------------------------------------------------------
self.moveTo(0,0);
var w = screen.availWidth;
var h = screen.availHeight;
self.resizeTo(w, h);

// ------------------------------------------------------------------------------------
// Blur auf Links entfernen
// ------------------------------------------------------------------------------------
function BlurLinks() 	{ 
	lnks=document.getElementsByTagName('a'); 
		for(i=0;i<lnks.length;i++)	{ 
			lnks[i].onfocus=new Function("if(this.blur)this.blur()"); 
		} 
	} 

// ------------------------------------------------------------------------
// Bildwechsel
// ------------------------------------------------------------------------
function tausche(bild,datei)
               {
               if(document.all)
			        document[bild].src = datei;
			   else if(document.getElementById)
			        document.images[bild].src = datei;
			   else if(document.layers)
			        document[bild].src = datei;
			   }
// ------------------------------------------------------------------------
// Fenster auf
// ------------------------------------------------------------------------
var name = "";
    var fenster = null;
	var breite = 0;
	var hoehe = 0;
	
function auf(datei,name,breite,hoehe) 
    {
    var xpos = (screen.width-breite)/2;
	var ypos = (screen.height-hoehe)/2;
    
    fenster=window.open( datei, + name,'locationbar=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=no,width='+breite+',height='+hoehe+',screenY='+ypos+',screenX='+xpos+',top='+ypos+',left='+xpos);
    }	
	
function aufvariabel(datei,name,breite,hoehe) 
    {
    var xpos = (screen.width-breite)/2;
	var ypos = (screen.height-hoehe)/2;
    
    fenster=window.open( datei, + name,'locationbar=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,width='+breite+',height='+hoehe+',screenY='+ypos+',screenX='+xpos+',top='+ypos+',left='+xpos);
    }	
	
// ------------------------------------------------------------------------
// Fenster zu
// ------------------------------------------------------------------------
function zu() 
    {
        if(fenster == null) {  
           return ;
        }
        if(fenster.closed == true) {
           return (fenster = null);
        }
        else { 
          fenster.close();
          fenster=null;
        }
    }

function bestellung() 	{
zu(); 
    var xpos = (screen.width-430)/2;
	var ypos = (screen.height-600)/2;

    fenster=window.open( 'bestellformular.php','Bestellung','locationbar=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=no,width=430,height=600,screenY='+ypos+',screenX='+xpos+',top='+ypos+',left='+xpos);
    }	
	
function aufvariabel(datei,name,breite,hoehe) 
    {
    var xpos = (screen.width-breite)/2;
	var ypos = (screen.height-hoehe)/2;
    
    fenster=window.open( datei, + name,'locationbar=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,width='+breite+',height='+hoehe+',screenY='+ypos+',screenX='+xpos+',top='+ypos+',left='+xpos);
    }	
// ------------------------------------------------------------------------
// Flash ohne Rahmen
// ------------------------------------------------------------------------
function FlashMovie()
{
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='780' height='450' id='apo' align='middle'>"
		+ "<param name='allowScriptAccess' value='sameDomain' />"
		+ "<param name='wmode' value='transparent' />"
		+ "<param name='movie' value='apo.swf?variable=wert' />"
		+ "<param name='menu' value='false' />"
		+ "<param name='quality' value='high' />"
		+ "<param name='devicefont' value='true' />"
		+ "<param name='bgcolor' value='#ffffff' />"
		+ "<embed src='apo.swf?variable=wert' wmode='transparent' menu='false' quality='high' devicefont='true' bgcolor='#ffffff' width='780' height='450' name='apo' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"
+ "</object>");
}

// ------------------------------------------------------------------------
// Variablen an Flash uebergeben
// ------------------------------------------------------------------------
var flashId = 'apo';
function flashobj(flashId)	{
  if (navigator.appName.indexOf("Microsoft") !=-1)	{
    return window[flashId]
  }
  else  {
    return document[flashId]
  }
}

function setFlashVar(flash_variable, flash_value)	{
  flashobj(flashId).SetVariable(flash_variable, flash_value);
}

