var h = 0; 
var w = 0; 
if( typeof( window.innerHeight ) == 'number' ) {

h = window.innerHeight;
w = window.innerWidth;
} else if( document.body && document.body.clientHeight ) {
h = document.body.clientHeight;
w = document.body.clientWidth;
}

var carpetas = Array("100-400","200","300","500","600-700","800-900");
var nimg = Array(18,18,21,15,9,21);
var cfulli;
var cimg = document.createElement('div');
var cimgb = document.createElement('div');
function glprop(id) {
  contfull = document.getElementById('contenedor');
  cfulli = document.createElement('cfullimg');
  var bclost = document.getElementById('bclos');
  contfull.appendChild(cfulli);
  for(i = 1; i <= nimg[id]; i++){
  cimg = document.createElement('div');
  cimg.innerHTML = '<a href="javascript:bigimg('+id+','+i+')"><img src="'+carpetas[id]+'/'+i+'.jpg" style="border:none;"/></a>';
  cfulli.appendChild(cimg);
  cimg.style.width = "800px";
  cimg.style.marginLeft = 'auto';
  cimg.style.marginRight = 'auto';
  cimg.style.border = "1px solid #000000";
  }
  bclost.style.display = "block";
}
function closegp() {
var bclost = document.getElementById('bclos');
contfull = document.getElementById('contenedor');
contfull.removeChild(cfulli)
bclost.style.display = "none";
cimg.style.display = "none";
}
function bigimg(fl,id){
tcontbimg = document.getElementById('contbimg');
if( typeof( window.innerHeight ) == 'number' ) {

h = window.innerHeight;
w = window.innerWidth;
} else if( document.body && document.body.clientHeight ) {
h = document.body.clientHeight;
w = document.body.clientWidth;
}
  cimgb.innerHTML = '<div style="margin:0 0 0 250px;"><div style="float:left;"><img src="big/'+carpetas[fl]+'/'+id+'.jpg" border="3px" style="border-color:#000000;"/></div><div style="float:left;"><a href="javascript:cbigimg()"><img src="close.gif" style="border:none;"/></a></div><div style="clear:both;"></div></div>';
  tcontbimg.appendChild(cimgb);
  cimgb.style.width = "800px";
  cimgb.style.marginLeft = 'auto';
  cimgb.style.marginRight = 'auto';
  cimgb.style.border = "none";
  cimgb.style.display = "block";
}
function cbigimg(){
cimgb.style.display = "none";
}