  

// subroutines
// --------------------------------------------------------------------------------------------


function showPic(picId, bookId){
    var url = "bookPic.php?id="+picId+"&bId="+bookId;
    //if (document.all&&window.print){
    //win=window.showModelessDialog(url,"schema","help:0;status:0;resizable:1;dialogWidth:800 px;dialogHeight:600 px");
    //}else{
    win=window.open(url,"pic","resizable=yes,height=450,width=800");
    //}
    win.focus();
}


//funzioni per il voto
var vote = 0;
var voteNr=0;
var x;
function setVoteGreen(voteId){
    clearTimeout(x);

	for (i=1; i<=voteId; i++){
	 pic = eval("document.v"+i);
	 pic.src='images/big_voteGreen.gif';
	}
	for (i>voteId; i<=5; i++){
	 pic = eval("document.v"+i);
	 pic.src='images/big_voteGray.gif';
	}
}

function setVoteCurrent(vote){
  this.vote=vote;
  x = setTimeout("setVote()", 500);
}

function setVote(){
  for (i=1; i<=vote; i++){
	 pic = eval("document.v"+i);
	 pic.src='images/big_voteGreen.gif';
  }
  for (i>vote; i<=5; i++){
	 pic = eval("document.v"+i);
	 pic.src='images/big_voteGray.gif';
  }        
}

function popPrivacy(){
    win=window.open("privacy.php","privacy","scrollbars,resizable=yes,height=550,width=600");
    win.focus();
}

function popTerms(){
    win=window.open("termsOfUse.php","terms","scrollbars,resizable=yes,height=550,width=600");
    win.focus();
}

function popReportAbuse(){
    win=window.open("reportAbuse.php","abuse","scrollbars,resizable=yes,height=550,width=600");
    win.focus();
}

function popContactUs(){
    win=window.open("contactUs.php","contact","scrollbars,resizable=yes,height=550,width=600");
    win.focus();
}

function popAdvertise(){
    win=window.open("advertise.php","contact","scrollbars,resizable=yes,height=550,width=600");
    win.focus();
}

//ingrandimento finestra slideshow
//----------------------------------------------------------
function fullScreen(theURL) {
window.open(theURL, '', 'fullscreen=yes, scrollbars=auto');
}


