function getTotalHeight() {

  // firefox is ok
  var height = document.documentElement.scrollHeight;

  // now IE 7 + Opera with "min window"
  if(document.documentElement.clientHeight > height ) {
    height  = document.documentElement.clientHeight;
  }
  // last for safari
  if(document.body.scrollHeight > height) {
    height = document.body.scrollHeight;
  }
  return height;
}

function show_popup_setup_project() {
  display_bg_for_popup();
	$('popup').appear();
}

function close_popup_setup_project() {
	$('bg_for_popup').fade();
	$('popup').fade();
}

function display_bg_for_popup() {
  var win_width = document.viewport.getWidth();
  var win_height = getTotalHeight();
  
  $('bg_for_popup').style.width = win_width+'px';
  $('bg_for_popup').style.height = win_height+'px';
  
	$('bg_for_popup').show();
}