function gup( name )
{
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var tmpURL = window.location.href;
  var results = regex.exec( tmpURL );
  if( results == null )
    return "";
  else
    return results[1];
}

function resize() {

  var agt = navigator.userAgent.toLowerCase();
  
  var div = document.getElementById("checkdiv");
  
  if (document.foto.width > 500) {
    document.getElementById("testo").style.clear = "both";
  }
  
  var o_style = "820";
  
  if (agt.indexOf("msie") != -1) {
    h_style = div.offsetHeight;
    //o_style = div.offsetWidth;
    
    var extraHeight = 20;		
  }
  else {
    h_style = document.defaultView.getComputedStyle(div, '').getPropertyValue("height");	
    //o_style = document.defaultView.getComputedStyle(div, '').getPropertyValue("width");
    
    check   = h_style.split('px');
    h_style = check[0];

    //checko  = o_style.split('px');
    //o_style = checko[0];
    var extraHeight = 50;
  }
  
  if (gup("size") != "noresize") {
	  window.resizeTo(Number(o_style), Number(h_style) + extraHeight);
  }
  
}