﻿// JScript File

var bigsize = '215px';
var smallsize = '75px';
    
function SheJTipLoad()
{
    Tip('She-J Radio\'s Monthly Chart <br />This chart is compiled by She-J Radio\'s staff.<br />It contains the tracks that we consider to be more significant in the last month.<br />They are listed in alphabetical order.',DURATION,5000,FOLLOWMOUSE,0,TITLE, 'She-J chart',FADEIN, 300, FADEOUT, 300, STICKY, 1, CLOSEBTN,1,BGCOLOR,'#9abacd',FONTCOLOR,'#000000',BORDERCOLOR,'orange',WIDTH,200,LEFT, true);
}
function ListenersTipLoad()
{
    Tip('Listeners\' Monthly Chart <br />This chart is generated by listeners voting tracks that are played on She-J Radio.<br />They are listed in rating order.<br /><a href = \'Faq.htm\'>How to vote tracks</a>',DURATION,5000, FOLLOWMOUSE,0, TITLE, 'Listeners\' chart',FADEIN, 300, FADEOUT, 300, STICKY, 1, CLOSEBTN, 1, BGCOLOR, '#9abacd', FONTCOLOR, '#000000',BORDERCOLOR, 'orange',WIDTH,200,LEFT, true);
}

//function SheJFull(){ 
//    var SheJDiv = document.getElementById("contentShejChart"); 
//    var ListenersDiv = document.getElementById("contentUserChart"); 
//    var SheJop = document.getElementById("expSheJ"); 
//    var Listenersop = document.getElementById("expList"); 

//    SheJDiv.style.height = bigsize; 
//    SheJop.src = 'images/meno.gif';
//    ListenersDiv.style.height = smallsize; 
//    Listenersop.src ='images/piu.gif';  
//} 

//function ListenersFull(){ 
//    var SheJDiv = document.getElementById("contentShejChart"); 
//    var ListenersDiv = document.getElementById("contentUserChart"); 
//    var SheJop = document.getElementById("expSheJ"); 
//    var Listenersop = document.getElementById("expList"); 

//    SheJDiv.style.height = smallsize;     
//    SheJop.src = 'images/piu.gif';        
//    ListenersDiv.style.height = bigsize; 
//    Listenersop.src = 'images/meno.gif';
//} 


function ResizeDivs(){ 
    var SheJDiv = document.getElementsByName("contentShejChart")[0]; 
    var ListenersDiv = document.getElementsByName("contentUserChart")[0]; 
    var SheJop = document.getElementsByName("expSheJ")[0]; 
    var Listenersop = document.getElementsByName("expList")[0]; 

// grande sopra
if (SheJDiv.style.height == smallsize)
{
    SheJDiv.style.height = bigsize; 
    SheJop.src = 'images/meno.gif';
    ListenersDiv.style.height = smallsize; 
    Listenersop.src ='images/piu.gif';  
}
// grande sotto
else
{
    SheJDiv.style.height = smallsize;     
    SheJop.src = 'images/piu.gif';        
    ListenersDiv.style.height = bigsize; 
    Listenersop.src = 'images/meno.gif';
}
} 

// Over per le righe
var currentLine=-1;
var oldrow = null;
function thisLineSel(i,rid)
{
    var oldLine = currentLine;
    currentLine = i;    
    allLineVisible(oldLine,'hidden'); 
    if (oldrow!=null)
        oldrow.className='';
    document.getElementById(rid).className='evidenziato';
    oldrow = document.getElementById(rid);  
    
}

function allLineVisible(i,val)
{
    if (i==currentLine || document.getElementById('_website' + i)==null)return;
    document.getElementById('_website' + i).style.visibility = val;
    document.getElementById('_license' + i).style.visibility = val;
    document.getElementById('_save' + i).style.visibility = val;
    document.getElementById('_play' + i).style.visibility = val;
//    document.getElementById('player').style.top = document.getElementById('_play' + i).style.top;
//    document.getElementById('player').style.left = document.getElementById('_play' + i).style.left;    
}

function resizeOuterTo(w,h) {
 if (parseInt(navigator.appVersion)>3) {
   if (navigator.appName=="Netscape") {
    top.outerWidth=w;
    top.outerHeight=h;
   }
   else top.resizeTo(w,h);
 }
}
//resizeOuterTo(360,700);
function resizeElemTo(elem,w,h) {
    var melem = document.getElementById(elem);
    if (melem==null)return;
    if (h!=-1)melem.style.height= h+'px';
    if (w!=-1)melem.style.width = w+'px';
    
}
function openPlayer()
{
    window.open('http://shejradio.org/shejradio/player.aspx','SheJPlayerWindow','width=316,height=580, top=100, left=500');
    return false;
}