

var init = function() {

	if ( $('overlaywrapper') == null )
	{
		//var elementx = new Element('div', { 'id' : 'overlaywrapper', 'class':'overlay' }); # nicht kompatibel zu IE 9
		var elementx = document.createElement('div');
		elementx.setAttribute("style", "position: absolute; z-index: 80; display: none;");
		elementx.setAttribute("id", "overlaywrapper");
		elementx.setAttribute("class", "overlay");
	   
	   document.body.appendChild(elementx);
	}
	var Tips3 = new mooTips($$('.Tips3'), {
		className: 'overlay',
		showDelay: 100,
		hideDelay: 100,
		offsets: {'x': 15, 'y': 10},
		fixed: true
	});
}
window.addEvent('domready', init);

function loadContent(that,steckbrief,freundschaft,nachricht,gaestebuch,merken,filename) {
		$('overlaywrapper').innerHTML = ajaxPhpCallFunc("ajax_pictureInfo", "get", "suserid="+that.rel+"&steckbrief="+steckbrief+"&freundschaft="+freundschaft+"&nachricht="+nachricht+"&gaestebuch="+gaestebuch+"&merken="+merken+"&filename="+filename);

      var Tips3 = new mooTips($$('.Tips3'), {
			className: 'overlay',
			showDelay: 100,
			hideDelay: 100,
			offsets: {'x': 15, 'y': 15},
			fixed: true
		});

}


/*

var activeInfoWindow = false;

  function showprop(objekt)
  { // copyright by Vö (V-o-E@gmx.de)
    var msg = "";
    var i = 1;

    for (prop in objekt)
    {
//      if ( prop.substr(0,2) != "on" && objekt[prop] != "" )
//      if ( prop.match(/^s/))
      {
        msg += i + ":   " + prop + " = " + objekt[prop] + "\n";
        i++;
        if (i % 10 == 0) { alert(msg); msg = ""; }
      }
    }
    alert(msg + "\n\ngesamt: " + (i-1));
  }

function showPictureBox(userid, action, that) {

	if (action == 'over') {
		overlays = $$('.overlay');
		$each(overlays,function(value,key){
			value.addClass("invisible");
		});

		setActiveInfoWindow(true,userid);
		if ($('infoWindowContent'+userid)) {
			$('infoWindowContent'+userid).removeClass('invisible');
		} else {
			var htmldata = ajaxPhpCallFunc("ajax_pictureInfo", "get", "userid="+userid);
			var elementx = new Element('div', { 'id' : 'infoWindowContent'+userid, 'class':'overlay', 'onmousemove':'setActiveInfoWindow(true,'+userid+');', 'onmouseout':'setActiveInfoWindow(false,'+userid+');' });
			elementx.innerHTML = htmldata;
			//showprop(that);

			elementx.setStyles ({'position':'absolute', 'z-index':99998, 'top':that.getOffsets().y + (that.height-10), 'left':that.getOffsets().x+(that.width/3)});
			//elementx.setStyles ({'position':'absolute', 'z-index':99998, 'top':'5', 'left':'10'});
			//console.log(elementx);
			document.body.appendChild(elementx);
		}
	}

	if (action == 'noover') {
		if (activeInfoWindow == false) {
			setTimeout("isActive("+userid+")" ,150);
		}
	}
}

function isActive(userid) {
	if (activeInfoWindow == false) {
		$('infoWindowContent'+userid).addClass('invisible');
	}
}


function setActiveInfoWindow(value,userid) {
	activeInfoWindow = value;
	if (activeInfoWindow == false) {

		showPictureBox(userid, 'noover', null);
	}
}

*/
