

/* SIG kept in memory */
var SIG;

/* For the fadeout */
var lastRun;

/* Defaulting this var */
var hasVoted = 0;

/* Is vote in progress or not */
var isVoting = false;

/* Fullscreen popup */
var full_popup;

/* Type of errors to display (alert/div) */
var error_type = 'div';

/* For the rating */
var is_note = false;

/* Avoids having many redirects */
var being_redirected = false;


function setUpFade(ename, callback) {
	lastRun = false
	fader(ename,2,50,300, callback);
}

// Fades an element
// elName - id of the element
// start - time in ms when the fading should start
// steps - number of fading steps
// time - the length of the fade in ms
var timer
function fader(elName,start,steps,time, callback) {
  setOpacity(elName,100); // To prevent flicker in Firefox
                          // The first time the opacity is set
                          // the element flickers in Firefox
  fadeStep = 100/steps;
  timeStep = time/steps;
  opacity = 100;
  time = start + 100;
  while (opacity >=0) {
   	window.setTimeout("setOpacity('"+elName+"',"+opacity+","+callback+")",time);
    opacity -= fadeStep;
    time += timeStep;
  }
}


function openCopyVideo2()
{
    $('#export_video_player_blog').css('visibility', 'visible');
}

function closeCopyVideo2()
{
    if($('#export_video_player_blog').css('visibility') == 'visible')
	{
		setUpFade('export_video_player_blog');
	}
}
