function popUpWindow(URLStr, width, height)
{
//  if(width >= screen.width)
//    width = 'full';
//  if(height >= screen.height)
//    height = 'full';
    
  if(width >= screen.width || height >= screen.height)
    var size = 'full';

/*
  if(width == "full"){
    width = window.screen.availWidth;
  }
  else
    var left = Math.round((screen.width - width) / 2);
  if(height == "full"){
    height = window.screen.availHeight;
  }
  else
    var top = Math.round((screen.height - height) / 2);
*/    
    
  if(size != "full"){
    var left = Math.round((screen.width - width) / 2);
    var top = Math.round((screen.height - height) / 2);
    popUpWin = open(URLStr, 'adsbxc_ss', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
    popUpWin.opener.name="1A2B3C4D";
  }
  else{
    
  }
  popUpWin = open(URLStr, 'adsbxc_ss', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
  popUpWin.opener.name="1A2B3C4D";
}

function popUp(URL, width, height, scroll)
{
  var top = 0;
  var left = 0;
  var original = 1;

  if(width >= screen.width){
    width = window.screen.availWidth;
    original = 0;
  }
  else{
    var left = Math.round((screen.width - width) / 2);
  }
    
  if(height >= screen.height){
    height = window.screen.availHeight;
    original = 0;
  }
  else{
    var top = Math.round((screen.height - height) / 2);
  }

  URL += '&width=' + width + '&height=' + height + '&original=' + original;

  var day = new Date();
  eval("page" + day.getTime() + " = window.open(URL, '" + day.getTime() + "', 'toolbar=0,scrollbars=' + scroll + ',location=0,statusbar=0,menubar=0,resizable=0, left= ' + left + ', top= ' + top + ', width= ' + width + ', height=' + height);");
}


function resizeImage(obj)
{
  var ratio;
  if(obj.width > 100 || obj.height > 100){
    ratio = setFloat(obj.width/obj.height);
    obj.width = 100;
    obj.height = Number(Math.round(obj.width/ratio));
  }  
}

function setFloat(value)
{
     value = Math.round(value*100)/100;
     if ((value - Math.round(value)) == 0)
          return Number(value + ".00");
     else
          if((value - Math.round(value*10)/10) == 0)
               return Number(value + "0");
          else
               return Number(value);
}