var tooltip = document.createElement("div");
tooltip.style.position = 'absolute';
tooltip.style.display = 'none';

var wkn_tooltip = document.createElement("div");
wkn_tooltip.style.position = 'absolute';
wkn_tooltip.style.display = 'none';
wkn_tooltip.style.backgroundColor = 'white';
wkn_tooltip.style.backgroundImage = 'url(/i/wait.gif)';
wkn_tooltip.style.backgroundRepeat = 'no-repeat';
wkn_tooltip.style.backgroundPosition = 'center center';
wkn_tooltip.style.width = '220px';
wkn_tooltip.style.border = '1px solid black';
wkn_tooltip.setAttribute("id", "wkn_popup");

var firstWTT = true;
var firstTT = true;
var showTT = false;
var bodyLoaded = false;

var popupReq = false;

if(document.all) var ie=true;
else var ie=false;


function initTooltips() {
	bodyLoaded = true;
}

//Sicherstellen, dass die Zeile "document.body.appendChild( tooltip);" in der Funktion newTooltip()
//erst dann aufgerufen werden kann, wenn das DOM fertig erstellt wurde:

//alt:
//if (ie) { window.onload = initTooltips; }
//else { window.addEventListener ('DOMContentLoaded', initTooltips, false); }

// neu von http://www.kryogenix.org/days/2007/09/26/shortloaded
// DOM im IE viel frueher fertig als onload, ausserdem geht es nun mit ArivaPush.js (cs 06/2009)
(function(i) {var u =navigator.userAgent;var e=/*@cc_on!@*/false; var st =
setTimeout;if(/webkit/i.test(u)){st(function(){var dr=document.readyState;
if(dr=="loaded"||dr=="complete"){i()}else{st(arguments.callee,10);}},10);}
else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
document.addEventListener("DOMContentLoaded",i,false); } else if(e){     (
function(){var t=document.createElement('doc:rdy');try{t.doScroll('left');
i();t=null;}catch(e){st(arguments.callee,0);}})();}else{window.onload=i;}})(initTooltips);

function wknTooltip(wkn) {
	if(bodyLoaded) {
		
		if(firstWTT) {
			document.onmousemove = getMousePos;
			document.body.appendChild(wkn_tooltip);
			firstWTT = false;
		}
		wkn_tooltip.style.left = mouseX+20+'px';
		wkn_tooltip.style.top   = mouseY+12+'px';		
		wkn_tooltip.style.display = "block";		
		wkn_tooltip.innerHTML = '<div style="padding-top:70px">&nbsp;</div>';		

		if (popupReq && popupReq.readyState < 4) {
			popupReq.abort();
		}
		try {
			popupReq = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				popupReq = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(oc) {
				popupReq = null;
			}
		}
		if (!popupReq && typeof XMLHttpRequest != "undefined") {
			popupReq = new XMLHttpRequest();
		}
		if(!popupReq) { return }
		
		popupReq.onreadystatechange= wknTooltipChange;
		if (wkn.length == 6) {
			popupReq.open("GET", "/blocks/popupinfo.m?a=" + wkn);
		} else {
			popupReq.open("GET", "/blocks/popupinfo.m?secu=isin." + wkn);
		}
		popupReq.send(null);
	}
}

function wknTooltipChange() {
	
	if (popupReq.readyState == 4 && popupReq.responseText && document.getElementById("wkn_popup")) {
		document.getElementById("wkn_popup").innerHTML = popupReq.responseText;
		document.getElementById("wkn_popup").style.display = 'block';
		window.status = "Fertig";
	}
}

function wknTooltipHide() {
	if (document.getElementById("wkn_popup")) {
		document.getElementById("wkn_popup").style.display = "none";
	}
}

function tooltipContent(wkn) {
	return "<iframe frameborder=\"0\" width=\"220\" height=\"190\" scrolling=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" src=\"/blocks/popupinfo.m?a=" + wkn + "\"></iframe>";
}

function newTooltip(text, type, opacity, bgcol) {
	
	if(bodyLoaded) {
		
		if(firstTT) {
			document.onmousemove = getMousePos;
			document.body.appendChild(tooltip);
		}
		
		if(type=="admin") {
			tooltip.setAttribute("id", "tooltip_admin");
		}else if(type=="chart") {
			//Keine id, das Layout wird in diesem Fall in /blocks/_tooltip geregelt:
			tooltip.setAttribute("id", "");
		}else {
			tooltip.setAttribute("id", "tooltip");
		}
			
		var ja = tooltip.getAttribute("class");
		
		tooltip.style.left = mouseX+20+'px';
		tooltip.style.top   = mouseY+12+'px';		
		tooltip.style.display = 'block';
		if (bgcol) { tooltip.style.backgroundColor = bgcol; };
		tooltip.style.filter = "alpha(opacity:"+opacity+")";	//Transparenzwert des Tooltips im IE
		tooltip.style.opacity = "0."+opacity;				//Transparenzwert des Tooltips im FF
		tooltip.innerHTML = "<p>"+text+"</p>";
		
		showTT = true;
		firstTT = false;
	}
}

function showTooltip() {

	tooltip.style.left = mouseX+20+'px';
	tooltip.style.top   = mouseY+12+'px';	
}

function hideTooltip() {
	
	if(showTT) {
		
		tooltip.style.display = 'none';
		showTT = false;
	}
}


if (!ie) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMousePos;
var mouseX = 0;
var mouseY = 0;

function getMousePos(e) {
	if (ie) {		
		var scrollPosX;
		var scrollPosY;
		
		if (typeof window.pageYOffset != 'undefined') {
			scrollPosX = window.pageXOffset;
			scrollPosY = window.pageYOffset;
		}
		else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {
			scrollPosX = document.documentElement.scrollLeft;
			scrollPosY = document.documentElement.scrollTop;
		}
		else if (typeof document.body != 'undefined') {
			scrollPosX = document.body.scrollLeft;
			scrollPosY = document.body.scrollTop;
		}		
		mouseX = event.clientX + scrollPosX;
		mouseY = event.clientY + scrollPosY;
	}else {
		mouseX = e.pageX;
		mouseY = e.pageY;
	}  
}


menu_over_timer = null;
var hide = (document.layers) ? 'hide' : 'hidden';
var show = (document.layers) ? 'show' : 'visible';
var depots = false; // Sicherungsvariable für die DB-Abfrage des Depotmenüs (JB)


//----------------------------------------------------------------------------------------
function getvalues(obj) {
  var res = '';
  res += 'Objekt: '+obj+'\n\n';
  for(temp in obj) { res += temp +': '+escape(obj[temp])+'\n'; }
  debug(res);
}

//----------------------------------------------------------------------------------------
function menu_over(stat, full, elem) {
  if ( stat ) {
    if ( menu_over_timer != null ) window.clearTimeout(menu_over_timer);
    if ( document.getElementById("activemenu") ) document.getElementById("activemenu").style.display="none";
    if ( full && document.getElementById("menu_subs_active") ) document.getElementById("menu_subs_active").className = "menu_subs";
    elem = document.getElementById("drop_" + elem);
    if ( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ) {
      document.getElementById("dummy_menu").style.width = elem.style.width;
      document.getElementById("dummy_menu").innerHTML = elem.innerHTML;
      elem.style.width = document.getElementById("dummy_menu").offsetWidth + "px";
      elem.style.height = document.getElementById("dummy_menu").offsetHeight + "px"; 
    } 
    hide_em("hidden", "", elem);
  }
  else {
    document.getElementById("dummy_menu").innerHTML = "";
    menu_over_timer = window.setTimeout('set_menu_timer(' + full + ');hide_em("visible");', 100);
  }
}

//----------------------------------------------------------------------------------------
function set_menu_timer(full) {
  if ( full && document.getElementById("menu_subs_active") ) { document.getElementById("menu_subs_active").className = "menu_subs menu_subs_active"; }
  if ( document.getElementById("activemenu") ) { document.getElementById("activemenu").style.display="block"; }
}

//----------------------------------------------------------------------------------------
function imloe(e, handler) {
  if ( e.type != 'mouseout' && e.type != 'mouseover' ) return false;
  reltg = e.relatedTarget ? e.relatedTarget : e.type == 'mouseout' ? e.toElement : e.fromElement;
  while ( reltg && reltg != handler ) reltg = reltg.parentNode;
  return ( reltg != handler );
}

//----------------------------------------------------------------------------------------
function check_overdiv(elem, over_div) {
  over_div_pos = get_pos(over_div);
  over_div_pos.push(Number(over_div_pos[0])+Number(over_div.offsetWidth ? over_div.offsetWidth : over_div.style.width.replace(/px/, "")));
  over_div_pos.push(Number(over_div_pos[1])+Number(over_div.offsetHeight ? over_div.offsetHeight : over_div.style.height.replace(/px/, "")));
  elem_pos = get_pos(elem);
  elem_pos.push(Number(elem_pos[0])+Number(elem.offsetWidth));
  elem_pos.push(Number(elem_pos[1])+Number(elem.offsetHeight));
  point_mat = new Array(new Array(0,1),new Array(2,1),new Array(2,3),new Array(0,3));
  p1_l = 0;
  p1_h = 0;
  p2_l = 0;
  p2_h = 0;
  for ( j=0;j<point_mat.length;j++ ) {
    if ( over_div_pos[point_mat[j][0]] >= elem_pos[0] && over_div_pos[point_mat[j][0]] <= elem_pos[2] ) {
      if ( over_div_pos[point_mat[j][1]] >= elem_pos[1] && over_div_pos[point_mat[j][1]] <= elem_pos[3] ) { return 1; }
      if ( over_div_pos[point_mat[j][1]] <= elem_pos[1] ) { p1_l = 1; }
      if ( over_div_pos[point_mat[j][1]] >= elem_pos[3] ) { p1_h = 1; }
      if ( p1_l && p1_h ) { return 1; }
    }
    if ( elem_pos[point_mat[j][0]] >= over_div_pos[0] && elem_pos[point_mat[j][0]] <= over_div_pos[2] ) {
      if ( elem_pos[point_mat[j][1]] >= over_div_pos[1] && elem_pos[point_mat[j][1]] <= over_div_pos[3] ) { return 1; }
      if ( elem_pos[point_mat[j][1]] <= over_div_pos[1] ) { p2_l = 1; }
      if ( elem_pos[point_mat[j][1]] >= over_div_pos[3] ) { p2_h = 1; }
      if ( p2_l && p2_h ) { return 1; }
    }      
  }
}

//----------------------------------------------------------------------------------------
function get_pos(elem) {
  parent_elem = elem.offsetParent;
  pos_x = elem.offsetLeft;
  pos_y = elem.offsetTop;
  while ( parent_elem ) {
    pos_x = pos_x + parent_elem.offsetLeft;
    pos_y = pos_y + parent_elem.offsetTop;
    parent_elem = parent_elem.offsetParent;
  }
  return new Array(pos_x,pos_y);
}

//----------------------------------------------------------------------------------------
function hide_em(stat, elem, menu) {
  chk_pos = 1; 
  over_div = menu ? menu : document.getElementById("overDiv");
  if ( !menu && (document.getElementById("overDiv").style.visibility == "hidden" || !document.getElementById("overDiv").style.visibility) ) { chk_pos = 0; }
  sh_sel(stat, chk_pos, over_div);
  for ( i=0;i<=5;i++ ) {
    if ( document.getElementById("hidemely" + i) ) {
      if ( elem ) {
        while ( elem != null ) {
          if ( elem.id && elem.id.match(/hidemely/) ) { return; }
          elem = elem.parentNode;
        }
      }
      if ( chk_pos ) {
        if ( check_overdiv(document.getElementById("hidemely" + i), over_div) ) { document.getElementById("hidemely" + i).style.visibility = stat; }
        else { document.getElementById("hidemely" + i).style.visibility = stat == "hidden" ? "visible" : "hidden"; } 
      }
      else { document.getElementById("hidemely" + i).style.visibility = "visible"; }
    }
  }
}
//----------------------------------------------------------------------------------------
//Verstecke Selektboxen fuer Internetexplorer bis 6.x

// Link: http://www.tutorials.de/forum/webmaster-faq/248170-wie-kann-ich-im-internet-explorer-select-und-iframe-berdecken.html

function sh_sel(stat, chk_pos, over_div) {
	var agent = navigator.userAgent.toLowerCase();
	var ie_found = agent.indexOf( 'msie' );
	if ( ie_found > -1 && 0+agent.substring( ie_found+5, ie_found+6 ) <7 ) {	//IE bis Version 6.x
		var sel = document.getElementsByTagName("select");
		for (var i=0;i<sel.length;i++) {
			if ( chk_pos ) {
				if ( check_overdiv(sel[i], over_div) ) { 
					sel[i].style.visibility = stat; 
				}else{ 
					sel[i].style.visibility = stat == "hidden" ? "visible" : "hidden"; 
				}  
			}else{ 
				sel[i].style.visibility = "visible"; 
			}
		}
	}
}


//----------------------------------------------------------------------------------------
function getObject(name) {
  if(document.getElementById) return document.getElementById(name);
  else if(document.all) return document.all[name];
  else if(document.layers) return document.layers[name];
}


//----------------------------------------------------------------------------------------
function hideLyr(name) {
   var Lyr = getObject(name);
   if ( !document.layers && Lyr != null ) {
     Lyr = Lyr.style;
   }
   if (Lyr) {
   Lyr.visibility=hide;
   }
}


//----------------------------------------------------------------------------------------
function showLyr(name) {
   var Lyr = getObject(name);
   if ( !document.layers  && Lyr != null ) {
     Lyr = Lyr.style;
   }
   if (Lyr) {
     Lyr.visibility=show;
   }
}


//----------------------------------------------------------------------------------------
// Funktion zum Erzeugen des dynamsichen Inhalts der Depotnavigation  mit AJAX (JB)
function insertDepots() {

	var req = false;

	if (!depots && userid) {
		if (typeof ActiveXObject != "undefined") {
 		try {
				req=new ActiveXObject("Msxml2.XMLHTTP")
			} catch(e) {
				try {
					req=new ActiveXObject("Microsoft.XMLHTTP")
				} catch(oc) {
					req=null
				}
			}
		}
		if (!req && typeof XMLHttpRequest != "undefined") {
				req=new XMLHttpRequest()
		}

		// überprüfen, ob Request erzeugt wurde
 		if (!req) { return }
 		// Request auswerten
		req.onreadystatechange = function(){
 			if (req.readyState ==  4) {

			var dep = document.getElementById("drop_depot");
			var parent = dep.parentNode;
			parent.removeChild(dep);

			var newDep = document.createElement("div");
			newDep.id = "drop_depot";
			newDep.className = "dropmenu";
			newDep.style.width = "165px";
			newDep.innerHTML = req.responseText;

			parent.appendChild(newDep);
			window.status = "Fertig";
			}
 		}
		// Request öffnen 
 		req.open('GET', '/user/wkn/_depotmenu?id='+ userid);
 		// Request senden
 		req.send(null);

		// Merken, daß die Depots schon abgeholt wurden
		depots = true; 
	}
}

/*
// +----------------------------------------------------------------------+
// | Copyright (c) 2004 Bitflux GmbH                                      |
// +----------------------------------------------------------------------+
// | Licensed under the Apache License, Version 2.0 (the "License");      |
// | you may not use this file except in compliance with the License.     |
// | You may obtain a copy of the License at                              |
// | http://www.apache.org/licenses/LICENSE-2.0                           |
// | Unless required by applicable law or agreed to in writing, software  |
// | distributed under the License is distributed on an "AS IS" BASIS,    |
// | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or      |
// | implied. See the License for the specific language governing         |
// | permissions and limitations under the License.                       |
// +----------------------------------------------------------------------+
// | Author: Bitflux GmbH <devel@bitflux.ch>                              |
// +----------------------------------------------------------------------+

*/

// -- Änderungen zum Original: stark gekürzt

var liveSearchReq = false;
var t = null;
var liveSearchLast = "";

function liveSearchHideDelayed( ms ) {
	window.setTimeout("liveSearchHide()", (ms == undefined || ms == 0) ? 400 : undefined);
}

function liveSearchHide() {
	document.getElementById("LSResult").style.display = "none";
	//speziell fuer Livesuche ausgeblendet:
	var hm = document.getElementById("hidemely1");
	if (hm != null) {hm.style.visibility = "visible"};
	var hm = document.getElementById("cgiad");
	if (hm != null) {hm.style.visibility = "hidden"};
	sh_sel("visible", 0, document.getElementById("overDiv") );
}

function liveSearchStart() {
	if (t) {
		window.clearTimeout(t);
	}
	t = window.setTimeout("liveSearchDoSearch()",0); // vorher 200
}

function liveSearchDoSearch() {
	if (liveSearchLast != document.forms.megasuche.searchname.value) {
		if (liveSearchReq && liveSearchReq.readyState < 4) {
			liveSearchReq.abort();
		}
		if ( document.forms.megasuche.searchname.value == "") {
			liveSearchHide();
			return false;
		}

		try {
			liveSearchReq=new ActiveXObject("Msxml2.XMLHTTP")
		} catch(e) {
			try {
				liveSearchReq=new ActiveXObject("Microsoft.XMLHTTP")
			} catch(oc) {
				liveSearchReq=null
			}
		}
		if (!liveSearchReq && typeof XMLHttpRequest != "undefined") {
			liveSearchReq=new XMLHttpRequest()
		}
		if(!liveSearchReq) { return }
	
		liveSearchReq.onreadystatechange= liveSearchProcessReqChange;
		var search = escape(document.forms.megasuche.searchname.value);
		search = search.replace(/\+/g, "%2b");
		liveSearchReq.open("GET", "/search/livesearch.m?searchname=" + search);
		liveSearchLast = document.forms.megasuche.searchname.value;
		liveSearchReq.send(null);
	}
}

function liveSearchProcessReqChange() {
	
	if (liveSearchReq.readyState == 4 && liveSearchReq.responseText) {
		hide_em('hidden');
	        var hm = document.getElementById("hidemely1");
		if (hm != null) {hm.style.visibility = "hidden"};
		var hm = document.getElementById("cgiad");
		if (hm != null) { hm.style.visibility = "hidden" };
		sh_sel("visible", 1, document.getElementById("overDiv") );
		var res = document.getElementById("LSResult");
		res.style.display = "block";
		res.innerHTML = '<div style="padding:30px; ">'+liveSearchReq.responseText+'</div>';
		window.status = "Fertig";
	}
}


// --- Popupfunktion für das Profilbild (jb)

function imagePopup(popup) {
	var imagepop = document.getElementById("imagepopup");
	if (popup) {
		if (!imagepop.innerHTML) {
			imagepop.innerHTML = '<img align="left" src="/forum/user_image.m?file_id='+picture+'&amp;resize=760x500" alt="" onmouseout="imagePopup(0)"/>';
		}
		imagepop.style.visibility="visible";
	} else {
		imagepop.style.visibility="hidden";
	}
}
var nav = document.getElementById("navigation");if(nav) { nav.innerHTML="";document.write('<div class="menu_dropdown" style="width:58px;left:13px; z-index:90;" onmouseover="if (imloe(event, this)) menu_over(1, 1, \'aktien\' )" onmouseout ="if (imloe(event, this)) menu_over(0, 1)"><div class="menu_subs"><div style="width:50px;" class="menu_verw"><a href="/aktien/" >Aktien</a></div><div style="font-weight:normal">|</div></div><div id="drop_aktien" class="dropmenu" style="width:180px"><a href="/quote/aktienkurse.m?a=dax" >DAX</a><a href="/quote/aktienkurse.m?a=tecdax" >TecDAX</a><a href="/quote/aktienkurse.m?a=dow30" >Dow Jones</a><a href="/quote/aktienkurse.m?a=nasdaq" >Nasdaq 100</a><a href="/quote/aktienkurse.m" >weitere (Realtime-)Listen</a><hr style="height:1px; border:0px"><a href="/quote/ipo.m" >IPOs</a><a href="/aktien/eqs/cgi-bin/ircenter/show.ssp?fn=companies_list&amp;portal=ariva" >IR-Center</a><hr style="height:1px; border:0px"><a href="/devisen/" >Devisen</a><a href="/rohstoffe/" >Rohstoffe</a></div></div><div class="menu_dropdown" style="width:50px;left:71px; z-index:91;" onmouseover="if (imloe(event, this)) menu_over(1, 1, \'news\' )" onmouseout ="if (imloe(event, this)) menu_over(0, 1)"><div class="menu_subs"><div style="width:42px;" class="menu_verw"><a href="/news/" >News</a></div><div style="font-weight:normal">|</div></div><div id="drop_news" class="dropmenu" style="width:180px"><a href="/news/articles.m?a=dax" >DAX</a><a href="/news/articles.m?a=tecdax" >TecDAX</a><a href="/news/list.m" >weitere Indizes</a><hr style="height:1px; border:0px"><a href="/news/nachrichten.m" >Nachrichten</a><a href="/news/analysen.m" >Analysen</a><a href="/news/ad-hocs.m" >Ad-hocs</a><a href="/news/directors-dealings.m" >Directors&#x2019; Dealings</a><a href="/news/columns/" >Kolumnen</a><a href="/news/video/" >Videos</a><hr style="height:1px; border:0px"><a href="/news/businesswire.m" >Business Wire</a></div></div><div class="menu_dropdown" style="width:56px;left:121px; z-index:92;" onmouseover="if (imloe(event, this)) menu_over(1, 1, \'forum\' )" onmouseout ="if (imloe(event, this)) menu_over(0, 1)"><div class="menu_subs"><div style="width:48px;" class="menu_verw"><a href="/forum/community.m" >Forum</a></div><div style="font-weight:normal">|</div></div><div id="drop_forum" class="dropmenu" style="width:180px"><a href="/forum/board_all.m" >Gesamtforum</a><a href="/forum/index.m" >Börse</a><a href="/forum/board_hot.m" >Hot-Stocks</a><a href="/forum/board_talk.m" >Talkforum</a><hr style="height:1px; border:0px"><a href="/forum/buddy/" >Boardmail</a><a href="/forum/chat/" >Chat</a><hr style="height:1px; border:0px"><a href="/forum/watchlist/watchlist.m" >Lesezeichen </a><a href="/forum/voting/" >Abstimmungen</a><a href="/forum/statistik.m" >Statistik</a><a href="/articles/forum/" >Hilfe, Regeln</a></div></div><div class="menu_dropdown" style="width:54px;left:177px; z-index:93;" onmouseover="if (imloe(event, this)) menu_over(1, 1, \'fonds\' )" onmouseout ="if (imloe(event, this)) menu_over(0, 1)"><div class="menu_subs"><div style="width:46px;" class="menu_verw"><a href="/fonds/" >Fonds</a></div><div style="font-weight:normal">|</div></div><div id="drop_fonds" class="dropmenu" style="width:150px"><a href="/fonds/search/search.m" >Suche</a><hr style="height:1px; border:0px"><a href="/fonds/ranking/" >FondsRank</a><a href="/fonds/top_fonds.m" >Top-Performer</a><hr style="height:1px; border:0px"><a href="/fonds/kags/" >Fondsgesellschaften</a><a href="/fonds/etfs.m" >ETFs</a><a href="/fonds/neuemissionen.m" >Neuemissionen</a><a href="/fonds/wissen/" >Wissen</a></div></div><div class="menu_dropdown" style="width:81px;left:231px; z-index:94;" onmouseover="if (imloe(event, this)) menu_over(1, 1, \'zertifikate\' )" onmouseout ="if (imloe(event, this)) menu_over(0, 1)"><div class="menu_subs"><div style="width:73px;" class="menu_verw"><a href="/zertifikate/" >Zertifikate</a></div><div style="font-weight:normal">|</div></div><div id="drop_zertifikate" class="dropmenu" style="width:245px"><a href="/zertifikat/search/search.m?zertart_id=5" >Suche: Index/Tracker-Zertifikate</a><a href="/zertifikat/search/search.m?zertart_id=1" >Suche: Discount-Zertifikate</a><a href="/zertifikat/search/search.m?zertart_id=15&amp;zertsubart_id=1" >Suche: Bonus-Zertifikate</a><a href="/zertifikat/search/search.m" >Suche: Alle Zertifikate</a><a href="/zertifikat/strategie/" >Derivate-Führer (Intelligente Suche)&nbsp;</a><hr style="height:1px; border:0px"><a href="/zertifikat/emittenten/" >Emittenten</a><a href="/zertifikat/neuemissionen.m" >Neuemissionen</a><a href="/zertifikat/basiswerte.m?typ=IND" >Basiswerte</a><a href="/zertifikat/sparplan/?typ=IND" >Sparpläne</a><a href="/zertifikat/hilfe/" >Wissen</a></div></div><div class="menu_dropdown" style="width:109px;left:312px; z-index:95;" onmouseover="if (imloe(event, this)) menu_over(1, 1, \'hebelprodukte\' )" onmouseout ="if (imloe(event, this)) menu_over(0, 1)"><div class="menu_subs"><div style="width:101px;" class="menu_verw"><a href="/hebelprodukte/" >Hebelprodukte</a></div><div style="font-weight:normal">|</div></div><div id="drop_hebelprodukte" class="dropmenu" style="width:220px"><a href="/hebelprodukte/search/search.m" >Suche: Knock-Outs</a><a href="/hebelprodukte/searchos/search.m" >Suche: OS</a><a href="/hebelprodukte/searchcapos/search.m" >Suche: Capped OS</a><a href="/hebelprodukte/searchother/search.m" >Suche: exotische Produkte</a><hr style="height:1px; border:0px"><a href="/hebelprodukte/komap/index.m" >Knock-Out-Map</a><a href="/hebelprodukte/emittenten/index.m" >Emittenten</a><a href="/hebelprodukte/neuemissionen.m" >Neuemissionen</a><a href="/hebelprodukte/wissen/" >Wissen</a><hr style="height:1px; border:0px"><a href="http://ad.doubleclick.net/clk;219272188;36362997;y?http://www.ariva.de/ms21/" ><span style="color:#e00000">IG Markets - CFD trading</span></a></div></div><div class="menu_dropdown" style="width:71px;left:421px; z-index:96;" onmouseover="if (imloe(event, this)) menu_over(1, 1, \'anleihen\' )" onmouseout ="if (imloe(event, this)) menu_over(0, 1)"><div class="menu_subs"><div style="width:63px;" class="menu_verw"><a href="/anleihen/" >Anleihen</a></div><div style="font-weight:normal">|</div></div><div id="drop_anleihen" class="dropmenu" style="width:165px"><a href="/anleihen/search/search.m" >Suche</a><hr style="height:1px; border:0px"><a href="/anleihen/emittenten/" >Emittenten</a><a href="/anleihen/wissen/" >Wissen</a></div></div><div class="menu_dropdown" style="width:56px;left:492px; z-index:97;" onmouseover="if (imloe(event, this)) menu_over(1, 1, \'depot\' )" onmouseout ="if (imloe(event, this)) menu_over(0, 1)"><div class="menu_subs"><div style="width:48px;" class="menu_verw"><a href="/depot_neu/private/" onmouseover="insertDepots()">Depot</a></div><div style="font-weight:normal">|</div></div><div id="drop_depot" class="dropmenu" style="width:165px"><a href="/depot_neu/boersenspiel.m" >Börsenspiele</a><hr style="height:1px; border:0px"><a href="/online-broker-vergleich" >Online-Broker-Vergleich</a></div></div><div class="menu_dropdown" style="width:25px;left:548px; z-index:98;" onmouseover="if (imloe(event, this)) menu_over(1, 1, \'intern\' )" onmouseout ="if (imloe(event, this)) menu_over(0, 1)"><div class="menu_subs"><div style="width:17px;" class="menu_verw"><a href="/articles/" >?</a></div><div style="font-weight:normal"></div></div><div id="drop_intern" class="dropmenu" style="width:155px"><a href="/articles/" >Hilfe</a><a href="/extras/lexikon.m" >Lexikon</a><hr style="height:1px; border:0px"><a href="http://ag.ariva.de/" >ARIVA.DE AG</a><a href="http://ag.ariva.de/werbung/" >Werbung</a><a href="http://ag.ariva.de/asp/" >Inhalte für Ihre Website</a><a href="http://ag.ariva.de/nachrichten/" >Neuigkeiten</a></div></div><!--[if lt IE 7]><style type="text/css">.menu_dropdown { ie_fix: expression( this.onmouseenter = new Function ("this.className += \' menu_dropdown_hover\' ;"), this.onmouseleave = new Function ("this.className = this.className.replace( \'menu_dropdown_hover\' , \'\' );") );} .menu_dropdown_hover .dropmenu { display:block; }.menu_dropdown_hover .menu_subs .menu_verw { background-color:#f7f7f7;border-left:1px solid #a3a3a3; }.menu_dropdown_hover .menu_subs a { text-decoration:none;color:#000000; }</style><![endif]--><div id="dummy_menu" class="dropmenu" style="display:block;position:absolute;left:-500px;top:0px;"></div>');};if (typeof(vislayer) != "undefined") { var visl = document.getElementById("drop_"+vislayer).parentNode; visl.onMouseOver = new Function ("if (imloe(event, this)) menu_over(1,0,'"+vislayer+"')"); visl.onMouseOut = new Function ("if (imloe(event, this)) menu_over(0, 0)"); visl.firstChild.id = "menu_subs_active"; visl.firstChild.className = "menu_subs menu_subs_active"; }
var xmlHttp = null;
try {
	xmlHttp = new XMLHttpRequest();   // Mozilla, Opera, Safari, IE ab v7
}
catch(e) {
    try {
		xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");  //IE ab v6
    }
	catch(e) {
		try {
			xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");  //IE ab v5
		}
		catch(e) {
			xmlHttp  = null;
		}
    }
}


var socialPopupDisplay = 0;
var socialPopupDisplayLoc = 0;
var pageURL = "http://www.ariva.de";


function initSocialPopup(url) {
	pageURL = "http://www.ariva.de"+url;
	
	//HTML-Code in diesem Javascipt-File sollte vom Browser gecached werden:
	getObject('social_popup').innerHTML = 
		"<a onmouseover=\"showSocialPopup();\" onmouseout=\"hideSocialPopup();\" "+
		"	  href=\"#\" onclick=\"doPrint(); return false;\">"+
		"	<img src=\"/i/socialicons/print.gif\" class=\"social_icon\" style=\"border:none; padding-top:3px;\" \/>"+
		"<\/a>"+
		"<div class=\"social_link\" style=\"width:73px;\">"+
		"	<a href=\"#\" onclick=\"doPrint(); return false;\">Drucken<\/a>"+
		"<\/div>"+
		"<a onmouseover=\"showSocialPopup();\" onmouseout=\"hideSocialPopup();\""+
		"	 href=\"#\" onclick=\"showEmailFormPopup(); return false;\">"+
		"	<img src=\"/i/socialicons/email.gif\" class=\"social_icon\" style=\"border:none; padding-top:3px;\" \/>"+
		"<\/a>"+
		"<div class=\"social_link\" style=\"width:58px;\">"+
		"	<a href=\"#\" onclick=\"showEmailFormPopup(); return false;\">E-Mail<\/a>"+
		"<\/div>"+
		"<a onmouseover=\"showSocialPopup();\" onmouseout=\"hideSocialPopup();\""+
		"	  href=\"#\" onclick=\"doBookmark(); return false;\">"+
		"	<img src=\"/i/socialicons/bookmark.gif\" class=\"social_icon\" style=\"border:none;\" \/>"+
		"<\/a>"+
		"<div class=\"social_link\" style=\"width:60px;\">"+
		"	<a href=\"#\" onclick=\"doBookmark(); return false;\">Lesezeichen<\/a>"+
		"<\/div>"+
		"<div style=\"clear:both;\"><\/div>"+
		"<div style=\"background-color:grey; height:1px; margin: 4px 0px 8px 0px;\"><\/div>"+
		"<div style=\"padding-bottom:5px; font-weight:bold;\">Soziale Netzwerke<\/div>"+
		"<a onmouseover=\"showSocialPopup();\" onmouseout=\"hideSocialPopup();\""+
		"	 target=\"_blank\" href=\"http:\/\/twitter.com\" onclick=\"socialLinkRedirect('twitter'); return false;\">"+
		"	<img src=\"/i/socialicons/twitter.gif\" class=\"social_icon\" \/>"+
		"<\/a>"+
		"<div class=\"social_link\">"+
		"	<a target=\"_blank\" href=\"http:\/\/twitter.com\" onclick=\"socialLinkRedirect('twitter'); return false;\">Twitter<\/a>"+
		"<\/div>"+
		"<a onmouseover=\"showSocialPopup();\" onmouseout=\"hideSocialPopup();\""+
		"	  target=\"_blank\" href=\"http:\/\/facebook.com\" onclick=\"socialLinkRedirect('facebook'); return false;\">"+
		"	<img src=\"/i/socialicons/facebook.gif\" class=\"social_icon\" \/>"+
		"<\/a>"+
		"<div class=\"social_link\">"+
		"	<a target=\"_blank\" href=\"http:\/\/facebook.com\" onclick=\"socialLinkRedirect('facebook'); return false;\">Facebook<\/a>"+
		"<\/div>"+
		"<div style=\"clear:both;\"><\/div>"+
		"<a onmouseover=\"showSocialPopup();\" onmouseout=\"hideSocialPopup();\""+
		"	 target=\"_blank\" href=\"http:\/\/www.studivz.net\" onclick=\"socialLinkRedirect('studivz'); return false;\">"+
		"	<img src=\"/i/socialicons/studivz.gif\" class=\"social_icon\" \/>"+
		"<\/a>"+
		"<div class=\"social_link\">"+
		"	<a target=\"_blank\" href=\"http:\/\/www.studivz.net\" onclick=\"socialLinkRedirect('studivz'); return false;\">StudiVZ, MeinVZ<\/a>"+
		"<\/div>"+
		"<a onmouseover=\"showSocialPopup();\" onmouseout=\"hideSocialPopup();\""+
		"	  target=\"_blank\" href=\"http:\/\/www.mister-wong.de\" onclick=\"socialLinkRedirect('misterwong'); return false;\">"+
		"	<img src=\"/i/socialicons/misterwong.gif\" class=\"social_icon\" \/>"+
		"<\/a>"+
		"<div class=\"social_link\">"+
		"	<a target=\"_blank\" href=\"http:\/\/www.mister-wong.de\" onclick=\"socialLinkRedirect('misterwong'); return false;\">Mister Wong<\/a>"+
		"<\/div>"+
		"<div style=\"clear:both;\"><\/div>"+
		"<a onmouseover=\"showSocialPopup();\" onmouseout=\"hideSocialPopup();\""+
		"	   target=\"_blank\" href=\"http:\/\/www.webnews.de\" onclick=\"socialLinkRedirect('webnews'); return false;\">"+
		"	<img src=\"/i/socialicons/webnews.gif\" class=\"social_icon\" \/>"+
		"<\/a>"+
		"<div class=\"social_link\">"+
		"	<a target=\"_blank\" href=\"http:\/\/www.webnews.de\" onclick=\"socialLinkRedirect('webnews'); return false;\">Webnews<\/a>"+
		"<\/div>"+
		"<a onmouseover=\"showSocialPopup();\" onmouseout=\"hideSocialPopup();\""+
		"	  target=\"_blank\" href=\"http:\/\/favorites.live.com\" onclick=\"socialLinkRedirect('windowslive'); return false;\">"+
		"	<img src=\"/i/socialicons/windows.gif\" class=\"social_icon\" \/>"+
		"<\/a>"+
		"<div class=\"social_link\">"+
		"	<a target=\"_blank\" href=\"http:\/\/favorites.live.com\" onclick=\"socialLinkRedirect('windowslive'); return false;\">Windows Live<\/a>"+
		"<\/div>"+
		"<div style=\"clear:both;\"><\/div>"+
		"<a onmouseover=\"showSocialPopup();\" onmouseout=\"hideSocialPopup();\""+
		"	   target=\"_blank\" href=\"http:\/\/www.google.de\" onclick=\"socialLinkRedirect('google'); return false;\">"+
		"	<img src=\"/i/socialicons/google.gif\" class=\"social_icon\" \/>"+
		"<\/a>"+
		"<div class=\"social_link\">"+
		"	<a target=\"_blank\" href=\"http:\/\/www.google.de\" onclick=\"socialLinkRedirect('google'); return false;\">Google Bookmarks<\/a>"+
		"<\/div>"+
		"<a onmouseover=\"showSocialPopup();\" onmouseout=\"hideSocialPopup();\""+
		"	 target=\"_blank\" href=\"http:\/\/www.yahoo.com\" onclick=\"socialLinkRedirect('yahoo'); return false;\">"+
		"	<img src=\"/i/socialicons/yahoo.gif\" class=\"social_icon\" \/>"+
		"<\/a>"+
		"<div class=\"social_link\">"+
		"	<a target=\"_blank\" href=\"http:\/\/www.yahoo.com\" onclick=\"socialLinkRedirect('yahoo'); return false;\">Yahoo! Bookmarks<\/a>"+
		"<\/div>";
	
	showSocialPopup();
}

function showSocialPopup() {
	if(socialPopupDisplayLoc == 0 && getObject('social_popup') != null) {
		getObject('social_popup').style.display = "block";
		setPopupPosition('social_popup');
		socialPopupDisplay++;
	}
}


//Zeige Popup links-oberhalb des Buttons an:
function setPopupPosition(popupId) {
	var popupHeight = getObject(popupId).offsetHeight;
	getObject('social_popup_position').style.left = -184+"px";	//Popup nach links verschieben
	getObject('social_popup_position').style.top = -25-popupHeight+"px";	//Popup nach oben verschieben
}


function hideSocialPopup() {
	setTimeout( function() {
		socialPopupDisplay--;
		if(socialPopupDisplay <= 0) {
			socialPopupDisplay = 0;
			getObject('social_popup').style.display = "none";
		}
	}, 200);
}

function doPrint() {
	window.print();
	var title = document.title;
	ajaxSaveStatistics("print", title);
}

function doBookmark() {
	var title = document.title;
	if (window.sidebar) { 
		window.sidebar.addPanel(title, pageURL, ""); 
	} 
	else if(document.all) {
		window.external.AddFavorite(pageURL, title);
	} 
	else if(window.opera && window.print) {
		return true;
	}
	ajaxSaveStatistics("bookmark", title);
}

function socialLinkRedirect(site) {
	window.open("/blocks/_socialbutton?action=link_redirect&site="+site+"&url="+
							escape(pageURL)+"&title="+escape(document.title));
}

function showEmailFormPopup() {
	socialPopupDisplayLoc = 1;
	socialPopupDisplay = 1;
	
	if (xmlHttp) {
		xmlHttp.open('GET', '/blocks/_socialbutton?action=show_email&url='+escape(pageURL), true);
		xmlHttp.onreadystatechange = function () {
			if (xmlHttp.readyState == 4) {
				getObject('email_form_popup').innerHTML = xmlHttp.responseText;
				getObject('email_form_subject').value = document.title;
				getObject('email_form_popup').style.display = "block";
				setPopupPosition('email_form_popup');
				getObject('social_popup').style.display = "none";
			}
		};
		xmlHttp.send(null);
	}
}

function hideEmailFormPopup() {
	getObject('email_form_popup').style.display = "none";
	socialPopupDisplayLoc = 0;
	
	if(getObject('email_form_to') != null) {
		getObject('email_form_to').value = "E-Mail Adresse";
		getObject('email_form_to').style.color = "grey";
		getObject('email_form_from').value = "Ihre E-Mail Adresse";
		getObject('email_form_from').style.color = "grey";
		getObject('email_form_message').value = "optional";
		getObject('email_form_message').style.color = "grey";
	}
}

function resetEmailForm(field) {
	if(field.style.color == "grey") {
		field.value = "";
		field.style.color = "black";
	}
}

function ajaxSendMail(form) {
	if (xmlHttp) {
		var url = '/blocks/_socialbutton?action=send_email&from='+form.from.value+'&to='+
					form.to.value+'&subject='+form.subject.value+'&message='+
					form.message.value+'&page_url='+escape(form.page_url.value)+'&ISSC='+
					form.ISSC.value;
		xmlHttp.open('GET', url, true);
		xmlHttp.onreadystatechange = function () {
			if (xmlHttp.readyState == 4) {
				getObject('email_form_popup').innerHTML = xmlHttp.responseText;
				setPopupPosition('email_form_popup');
				setTimeout( function() { hideEmailFormPopup(); }, 2000);
			}
		};
		xmlHttp.send(null);
	}
}

function ajaxSaveStatistics(type, title) {
	if (xmlHttp) {
		var url = '/blocks/_socialbutton?action=save_statistics&type='+type+'&title='+
						title+'&page_url='+escape(pageURL);
		xmlHttp.open('GET', url, true);
		xmlHttp.send(null);
	}
}


