function mq_over(img,event){
	img.src='static/pics/table_mq_on.gif';
	
	
	
	/*
	document.getElementById('mq').style.top=event.screenY;
	document.getElementById('mq').style.left=event.screenX+50;
	document.getElementById('mq').style.visibility='visible';
	*/
}

function mq_out(img,event){
	img.src='static/pics/table_mq.gif';
	/*
	document.getElementById('mq').style.visibility='hidden';	
	*/
}

function mq_click(img,event,songId,songIndex){
	new Ajax.Updater('mq_world_content', 'youtube_world.dhtm', { method: 'get' ,parameters: { songId: songId,songIndex: songIndex }});
	xOff=getScrollXY()[0];
	yOff=getScrollXY()[1];
	xSize=getInnerDimension()[0];
	ySize=getInnerDimension()[1];
	$('mq_world').style.top=yOff+(ySize/2)-(250);
	$('mq_world').style.left=xOff+(xSize/2)-($('mq_world').getWidth()/2);
	Effect.Appear('mq_world');
	new Draggable('mq_world',{starteffect:null,endeffect:null,handle:$('mq_world_title')});
	startYoutube();
}

function getInnerDimension() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return [myWidth,myHeight];
}

function getScrollXY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  return [ scrOfX, scrOfY ];
}

function startYoutube(){
    window.setTimeout('Try.these(function() { $(\'youtube\').remove();$(\'youtube_over\').show() })',45000);
}