// mouseover
 (function(window, document, undefined){
    var XBTooltip = function( element, userConf, tooltip) {
      var config = {
        id: userConf.id|| undefined,
        className: userConf.className || undefined,
        x: userConf.x || 20,
        y: userConf.y || 20,
        text: userConf.text || undefined
      };
      var over = function(event) {
        tooltip.style.display = "block";
      },
      out = function(event) {
        tooltip.style.display = "none";
      },
      move = function(event) {
        event = event ? event : window.event;
        if ( event.pageX == null && event.clientX != null ) {
          var doc = document.documentElement, body = document.body;
          event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
          event.pageY = event.clientY + (doc && doc.scrollTop  || body && body.scrollTop  || 0) - (doc && doc.clientTop  || body && body.clientTop  || 0);
        }
        tooltip.style.top = (event.pageY+config.y) + "px";
        tooltip.style.left = (event.pageX+config.x) + "px";
      }
      if (tooltip === undefined && config.id) {
        tooltip = document.getElementById(config.id);
        if (tooltip) tooltip = tooltip.parentNode.removeChild(tooltip)
      }
      if (tooltip === undefined && config.text) {
        tooltip = document.createElement("div");
        if (config.id) tooltip.id= config.id;
        tooltip.innerHTML = config.text;
      }
      if (config.className) tooltip.className = config.className;
      tooltip = document.body.appendChild(tooltip);
      tooltip.style.position = "absolute";
      element.onmouseover = over;
      element.onmouseout = out;
      element.onmousemove = move;
      over();
    };
    window.XBTooltip = window.XBT = XBTooltip;
  })(this, this.document);


// language fenster
var win = null;


function productpop(aid){
h ='570';
w = '760';
LeftPosition = (screen.width) ? ((screen.width-w)/2)+70 : 0;
TopPosition = (screen.height) ? ((screen.height-h)/2)+5: 0;
settings =
'height='+h+',width='+ w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable,toolbar=no,location=no,status=no'
win = window.open("?id=47&aid=" + aid,"projekte",settings)
if(win.window.focus){win.window.focus();}
}

function artistpop(url){
	h ='600';
	w = '550';
	LeftPosition = (screen.width) ? ((screen.width-w)/2)+70 : 0;
	TopPosition = (screen.height) ? ((screen.height-h)/2)+5: 0;
	settings =
	'height='+h+',width='+ w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable,toolbar=no,location=no,status=no'
	win = window.open(url,"artist",settings)
	if(win.window.focus){win.window.focus();}
	}

function playerpopbig(aid){
h ='330';
w = '810';
LeftPosition = (screen.width) ? ((screen.width-w)/2)+1 : 0;
TopPosition = (screen.height) ? ((screen.height-h)/2)+5: 0;
LeftPosition = 0;
TopPosition = 0;
settings =
'height='+h+',width='+ w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,noresizable,toolbar=no,location=no,status=no'
win = window.open("player_pop.php?id=" + aid,"player",settings)
if(win.window.focus){win.window.focus();}
}

function playerpop(aid,size){
w ='405';
h = '465';
LeftPosition = (screen.width) ? ((screen.width-w)/2)+1 : 0;
TopPosition = (screen.height) ? ((screen.height-h)/2)+5: 0;
LeftPosition = 0;
TopPosition = 0;
settings =
'height='+h+',width='+ w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,noresizable,toolbar=no,location=no,status=no'
win = window.open("http://www.humpty.de/player_pop-mini.php?id=" + aid + "&size=" + size,"player",settings)
if(win.window.focus){win.window.focus();}
}

function coverpop(url,artist,h){

w = h;
LeftPosition = (screen.width) ? ((screen.width-w)/2)+1 : 0;
TopPosition = (screen.height) ? ((screen.height-h)/2)+5: 0;
settings =
'height='+h+',width='+ w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,noresizable,toolbar=no,location=no,status=yes'
win = window.open("cover.php?url=" + url + "&artist=" + artist,"cover",settings)
if(win.window.focus){win.window.focus();}
}

function downloadmp3(url){

h ='330';
w = '610';
LeftPosition = (screen.width) ? ((screen.width-w)/2)+1 : 0;
TopPosition = (screen.height) ? ((screen.height-h)/2)+5: 0;
settings =
'height='+h+',width='+ w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,noresizable,toolbar=no,location=no,status=yes'
win = window.open(url,"cover",settings)
if(win.window.focus){win.window.focus();}
}

function dlhelp(oid,aid,isrc){

h ='330';
w = '610';
LeftPosition = (screen.width) ? ((screen.width-w)/2)+1 : 0;
TopPosition = (screen.height) ? ((screen.height-h)/2)+5: 0;
settings =
'height='+h+',width='+ w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,noresizable,toolbar=no,location=no,status=yes'
win = window.open("?id=119&oid=" + oid + "&aid=" + aid + "&isrc=" + isrc,"dlhelp",settings)
if(win.window.focus){win.window.focus();}
}


function closer(){
window.close;
}


