function cadrfalse()
{  var pop = document.getElementById('poper');
  pop.style.display = 'none';
}

function popil(it, src, width, height)
{  var pop = document.getElementById('poper');

  y = (window.scrollY) ? window.scrollY : document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
  pop.style.top = (y+(window.screen.height-170-height)/2)+'px';
  pop.style.left = ((document.documentElement.scrollWidth-width)/2)+'px';
  pop.style.display = 'block';

  pop.style.height = height + 'px';
  pop.style.width = width + 'px';
  pop.style.background = 'url(' + src +')';
  return false;
}


function previewerfalse()
{
  var pop = document.getElementById('previewer');
  pop.style.display = 'none';
}

function previewer_tut(it, src, width, height, flash)
{
  var pop = document.getElementById('previewer');
  var imageneer = document.getElementById('imageneer');

  y = (window.scrollY) ? window.scrollY : document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
  ElWidth = (window.scrollWidth) ? window.scrollWidth : document.documentElement.scrollWidth;
//  alert(document.documentElement.scrollWidth);
 // y = 200;
  pop.style.top = parseInt(y) + 'px';//(y+(window.screen.height-170-height)/2)+'px';
  pop.style.left = parseInt(((ElWidth-width)/2))+'px';
  pop.style.display = 'block';

  pop.style.height = (parseInt(height) + 180) + 'px';
  pop.style.width = (parseInt(width) + 70) + 'px';
//  imageneer.style.background = 'url(' + src +') no-repeat';
  imageneer.style.height = (height) + 'px';
  imageneer.style.width = (width ) + 'px';

  if (flash == true)
  {    	document.getElementById('genplan').style.display = 'block';  }
  else
    imageneer.style.background = 'url(' + src +') no-repeat';


  return false;
}




function popup(link)
{
  window.open(this.document.location+link+'/',null,"height=800,width=980,status=no,toolbar=no,menubar=no,location=no,scrollbars=1,resizable=yes");
}

function fleha(link, width, height)
{
  window.open(link,null,"height="+ height +",width=" + width + ",status=no,toolbar=no,menubar=no,location=no,scrollbars=1,resizable=yes,background=FEFBE8");
}

