﻿    var x 
    var y
    var i = 0
	function mouseMove(e) {
	try {
	if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
			x =  event.x+document.documentElement.scrollLeft ;
			y =  event.y+document.documentElement.scrollTop ;
		} else {
		
			x = e.pageX ;
			y = e.pageY ;
		}
	    } catch(ex) {}	
	}
document.onmousemove=mouseMove;

function youtubevideo(youtubeurl){
    document.write('<object ')
    document.write('classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ')
    document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" ')
    document.write('width="219"')
    document.write('height="188">')
    document.write('<param name="movie" value="'+ youtubeurl +'" />')
    document.write('<param name="wmode" value="transparent" />')
    document.write('<embed src="'+ youtubeurl +'" quality="high" bgcolor="#000000" ')
    document.write('width="188" ')
    document.write('height="188" ')
    document.write('allowScriptAccess="sameDomain" ')
    document.write('type="application/x-shockwave-flash" ')
    document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" />')
    document.write('</object>')
}
function youtubeBig(youtubeurl){
    document.write('<object ')
    document.write('classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ')
    document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" ')
    document.write('width="300"')
    document.write('height="269">')
    document.write('<param name="movie" value="'+ youtubeurl +'" />')
    document.write('<param name="wmode" value="transparent" />')
    document.write('<embed src="'+ youtubeurl +'" quality="high" bgcolor="#000000" ')
    document.write('width="300" ')
    document.write('height="269" ')
    document.write('allowScriptAccess="sameDomain" ')
    document.write('type="application/x-shockwave-flash" ')
    document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" />')
    document.write('</object>')
}
function addVideoComment(id,u,t){
    location.href = 'AddVideoComment.aspx?ID='
}

function showRegister(){
    var Register = document.getElementById('Register');
    if  (Register.style.display != 'block'){
        iframeHTML='\<iframe id="Registerwin" scrolling="0" allowtransparency="true" src="" frameborder="0" style="';
        iframeHTML+='border:0px;';
        iframeHTML+='width:100%;';
        iframeHTML+='height:322px;';
        iframeHTML+='"><\/iframe>';     
        Register.innerHTML =  iframeHTML;   
        Register.style.display = 'block' ;
        Register.style.top = y-230 + 'px' ;
        
        //resizeParent
        if (x>=(document.body.clientWidth-500)){
            Register.style.left= (x-380) + 'px';
        }
        else {
            Register.style.left= (x-380) + 'px';
        }
        
        document.getElementById('Registerwin').src = '/EL/Register.aspx'
    }
    else {
        Register.style.display = 'none';
        document.getElementById('Registerwin').src = ''
    
    }
}

function hideRegister(){
    var Register = document.getElementById('Register');
    Register.style.display = 'none';
    document.getElementById('Registerwin').src = ''
}

function swf(w,h,flash){
        document.write('<object ')
        document.write('classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ')
        document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" ')
        document.write('width="'+ w +'"')
        document.write('height="'+ h +'">')
        document.write('<param name="movie" value="'+ flash +'" />')
        document.write('<param name="wmode" value="transparent" />')
        document.write('<param name="menu" value="false" />')
        document.write('<embed wmode="transparent" ')
        document.write('src="'+ flash +'" quality="high" ')
        document.write('width="'+ w +'" menu="no" ')
        document.write('height="'+ h +'" ')
        document.write('allowScriptAccess="sameDomain" ')
        document.write('type="application/x-shockwave-flash" ')
        document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" />')
        document.write('</object>')
}

function getVotes(v,a) {     
      http_request = false;
      //document.getElementById('loader').innerHTML = '<div style="FILTER: progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=80); width:25px; padding:5px; border:1px #FFF solid;"><img src="/images/loader.gif" /></div>'
      if (window.XMLHttpRequest) { 
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { 
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }

     http_request.onreadystatechange = parseVotes;

      http_request.open('GET','/EL/pushvotes.aspx?v=' + v + '&a=' + a , true);
      http_request.send(null);
}

function parseVotes() {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
        	if (http_request.responseText=='OK'){
        	alert('Ευχαριστούμε για την ψήφο σας!');
        	//document.getElementById('loader').innerHTML = '';
        	//location.href = '/EL/default.aspx';
        	}
        	else if(http_request.responseText=='ERROR'){
            	//document.getElementById('loader').innerHTML = '';
            	alert('Εχετε ξαναψηφίσει το Top20');            	
            	}
        	else {
        	    alert('Εχετε ξαναψηφίσει το Top20');
        	}
         } 
      }
   } 
   
function openGuestPlayer(url){
    var win;
    win = window.open(url, "mplayer", "width=300,height=70,personalbar=yes,locationbar=yes,status=no,titlebar=no, left=400, top=250, screenX=50,screenY=100");
}

function swfBattle(w,h,flash,ID){
        document.write('<object ')
        document.write('classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ')
        document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" ')
        document.write('width="'+ w +'"')
        document.write('height="'+ h +'">')
        document.write('<param name="movie" value="'+ flash +'" />')
        document.write('<param name="FlashVars" value="myvar1='+ ID +'">')
        document.write('<param name="wmode" value="transparent" />')
        document.write('<param name="menu" value="false" />')
        document.write('<embed wmode="transparent" ')
        document.write('src="'+ flash +'" quality="high" ')
        document.write('width="'+ w +'" menu="no" ')
        document.write('height="'+ h +'" ')
        document.write('flashvars="myvar1='+ ID +'"')
        document.write('allowScriptAccess="sameDomain" ')
        document.write('type="application/x-shockwave-flash" ')
        document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" />')
        document.write('</object>')
}

function openDjWindow(){
    myRef = window.open('/EL/battleContest.aspx','mywin','left=300,top=150,width=350,height=450,toolbar=0,resizable=0');
}

function openTop500(){
    myRef = window.open('/EL/Top500.aspx','mywin','left=200,top=120,width=950,height=710,toolbar=0,resizable=0');
}


function showLyrics(){
    var Lyrics = document.getElementById('Lyrics');
    if  (Lyrics.style.display != 'block'){
        iframeHTML='\<iframe id="Lyricswin" scrolling="0" allowtransparency="true" src="" frameborder="0" style="';
        iframeHTML+='border:0px;';
        iframeHTML+='width:100%;';
        iframeHTML+='height:330px;';
        iframeHTML+='"><\/iframe>';     
        Lyrics.innerHTML =  iframeHTML;   
        Lyrics.style.display = 'block' ;
        Lyrics.style.overflow = 'hidden';
        Lyrics.style.top = y+10 + 'px' ;
        
        //resizeParent
        if (x>=(document.body.clientWidth-500)){
            Lyrics.style.left= (x-380) + 'px';
        }
        else {
            Lyrics.style.left= (x-380) + 'px';
        }
        
        document.getElementById('Lyricswin').src = '/EL/Lyrics.aspx'
    }
    else {
        Lyrics.style.display = 'none';
        document.getElementById('Lyricswin').src = ''
    
    }
}

function hideLyrics(){
    var Lyrics = document.getElementById('Lyrics');
    Lyrics.style.display = 'none';
    document.getElementById('Lyricswin').src = ''
}

function podcasts(w,h,flash,flashvars){
        document.write('<object ')
        document.write('classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ')
        document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" ')
        document.write('width="'+ w +'"')
        document.write('height="'+ h +'">')
        document.write('<param name="movie" value="'+ flash +'" />')
        document.write('<param name="FlashVars" value="'+ flashvars +'">')
        document.write('<param name="wmode" value="transparent" />')
        document.write('<param name="menu" value="false" />')
        document.write('<embed wmode="transparent" ')
        document.write('src="'+ flash +'" quality="high" ')
        document.write('width="'+ w +'" menu="no" ')
        document.write('height="'+ h +'" ')
        document.write('flashvars="'+ flashvars +'"')
        document.write('allowScriptAccess="sameDomain" ')
        document.write('type="application/x-shockwave-flash" ')
        document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" />')
        document.write('</object>')
}
function openPlayer(){
    var win;
    win = window.open("/newplayer/livehijack2.aspx", "mplayer", "width=320,height=440,personalbar=yes,locationbar=yes,status=no,titlebar=no, left=400, top=250, screenX=50,screenY=100");
}

function openPlayerRock(){
    var winRock;
    winRock = window.open("/newplayer/liveRock2.aspx", "mplayer", "width=320,height=440,personalbar=yes,locationbar=yes,status=no,titlebar=no, left=400, top=250, screenX=50,screenY=100");
}

function t_contest(){
    var win1;
    win1 = window.open("/t_contest/t_contest.aspx", "t_contest", "width=410,height=490,personalbar=yes,locationbar=yes,status=no,titlebar=no, left=400, top=250, screenX=50,screenY=100");
}


function showAgenda(id){
    var AgendaDiv = document.getElementById('AgendaDiv');
    if  (AgendaDiv.style.display != 'block'){
        iframeHTML='\<iframe id="Agendawin" scrolling="0" allowtransparency="true" src="" frameborder="0" style="';
        iframeHTML+='border:0px;';
        iframeHTML+='width:100%;';
        iframeHTML+='height:250px;';
        iframeHTML+='"><\/iframe>';     
        AgendaDiv.innerHTML =  iframeHTML;   
        AgendaDiv.style.display = 'block' ;
        AgendaDiv.style.top = (y-50) + 'px' ;
        
        //resizeParent
        if (x>=(document.body.clientWidth-200)){
            AgendaDiv.style.left= (x-20) + 'px';
        }
        else {
            AgendaDiv.style.left= (x-20) + 'px';
        }
        document.getElementById('Agendawin').src = '/EL/AgendaDetails.aspx?id=' + id;
    }
    else {
        AgendaDiv.style.display = 'none';
        document.getElementById('Agendawin').src = '';    
    }
}
function hidemeAgenda(){
    var AgendaDiv = document.getElementById('AgendaDiv');
    AgendaDiv.style.display = 'none';
    document.getElementById('Agendawin').src = ''
}

function getSongInfo() {     
      http_request = false;
      if (window.XMLHttpRequest) { 
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { 
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }

     http_request.onreadystatechange = parseSong;

      http_request.open('GET','/songINF.aspx', true);
      http_request.send(null);
}

function parseSong() {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) 
            {
        	document.getElementById("mySong").innerHTML = http_request.responseText;
        	}
         } 
   }


