function OpenKCAOverlay(cO) {
  var overlay;
  if ( cO && cO.length > 0 ) {
    overlay = "#" + cO;
  } else {
    overlay = "#KCA_Overlay";
 //Nicktropolis function
 if(typeof kcaOverlayCallback == 'function'){
  	kcaOverlayCallback();
    setTimeout(function() {
      document.location = "/kids-choice-awards/vote.jhtml";
    }, 1000);
 } else {
    document.location = "/kids-choice-awards/vote.jhtml";
 }
 return false;
  }

  $(window).unbind("scroll");
  $(window).scroll(function() {
    $(".KCA_Overlay:visible").css({
      top: ( $(window).height() - $(".KCA_Overlay:visible").height() ) / 2 +$(window).scrollTop() + "px",
      marginTop: 0
    });
  });

	//this function is in /dynamo/javascript/ajaxVote.js
  //if(typeof openOverlay == 'function' ){
    //openOverlay();
  //}

 	if(typeof pauseVideo == 'function'){
	 //Turbonick function (in fepServices.js)
  		pauseVideo(true); 
	 }
	 
	 //move the game off the screen in this page:/games/common/play_game.jhtml
	 $("#nickgameswf_content").css("margin-top", -500000);
	 $("#headerUni").css("margin-top", -500000);
	 $("#headerUni").css("position", "absolute");

    var clone = $(overlay).clone();
    $(overlay).remove();
    clone.appendTo($("body"));

	  var o = $(overlay);
	  $(overlay).css({
      "display": "block",
      "top": ( $(window).height() - $(overlay).height() ) / 2 +$(window).scrollTop() + "px",
      "marginTop": 0
	  });
	
    $("#KCA_BlankOut").remove();
	  $("<div>")
		.attr("id", "KCA_BlankOut")
		.css({
		  "opacity": 0.8,
		  "width": $(window).width(),
		  "height": $(document).height()
		})
		.appendTo($("body"));
	
	  //$("body,html").css("overflow-x", "hidden");
}

function CloseKCAOverlay() {
	//put game back on the screen in this page:/games/common/play_game.jhtml
	$("#nickgameswf_content").css("margin-top", 0);
	$("#headerUni").css("margin-top", 0);
	$("#headerUni").css("position", "relative");
  $("#KCA_Overlay").fadeOut("fast");
  $(".KCA_Overlay").hide();
  $("#KCA_BlankOut").remove();
 // $("body,html").css("overflow-x", "auto");
 
 //Nicktropolis function
 if(typeof kcaOverlayCallback == 'function'){
  	kcaOverlayCallback();
 }
 
 //Turbonick function (in fepServices.js)
 if(typeof pauseVideo == 'function'){
  	pauseVideo(false);
 }
}