function centerWindow(file) {

var winheight=216
var winwidth=360
var x = 1
    if (document.all) //IE
        var xMax = screen.width, yMax = screen.height;
    else
        if (document.layers) //NS4
            var xMax = window.outerWidth, yMax = window.outerHeight;
        else
	        if (document.getElementById) //NS6
	            var xMax = window.innerWidth, yMax = window.innerHeight;
			else
	            var xMax = 640, yMax=480;

    var xOffset = (xMax - winwidth)/2, yOffset = (yMax - winheight)/2;

    var win2 = window.open(file,'OnlineStockCheck', 'width=0,height=0,screenX='+xOffset+',screenY='+yOffset+', top='+yOffset+',left='+xOffset+'');
//	win2.resizeTo(10,10)
	for (winheight = 1; winheight < 216; winheight +=4)
	win2.resizeTo(winheight,winheight);
	
	for (winwidth = 216; winwidth < 360; winwidth +=4)
	win2.resizeTo(winwidth,winheight);

}


function ResizeWindowToMatchContent(TableName)
{
		if (document.all) { //IE4
				if (TableName == "RECUPELTAXTABLE") {
					//Resize ONLY the height	
					 window.resizeTo(360,document.all.RECUPELTAXTABLE.clientHeight+70);
					  var  yMax = screen.height; //xMax = screen.width,
				      var yOffset = (yMax - document.all.RECUPELTAXTABLE.clientHeight)/2; // xOffset = (xMax - document.all.RECUPELTAXTABLE.clientWidth)/2,
					  window.moveTo(document.body.offsetWidth,yOffset);
				}

		}
		else if (document.getElementById) { //NS6

				if (TableName == "RECUPELTAXTABLE") {	
						window.resizeTo(360,document.getElementById("RECUPELTAXTABLE").scrollHeight+70);				
				}

		}		
}