function showImg(img, w, h) 
{
	var scrollbars = 'no';
	var sW = window.screen.width;
	var sH = window.screen.height;
	
	if (w>(0.8*sW))
	{
		w = 0.8*sW;
		scrollbars = 'yes';
	}
	if (h>0.8*(sH))
	{
		h = 0.8*sH;
		scrollbars = 'yes';
	}
	
	var win = window.open('','','width=' + w + ',height=' + h + ',left=' + (sW-w)/2 + ',top=' + (sH-h)/2 + ',resizable=0,scrollbars=' + scrollbars + ',status=no,menubar=no' );
	
   	win.document.write('<html><head><title>'+img+'</title></head><body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0><img  src="'+img+'" boder=0></body></html>');

}


function openDialog(url, name, w, h,scrollbars) 
{
	var sW = window.screen.width;
	var sH = window.screen.height;
	
	var win = window.open(url,name,'width=' + w + ',height=' + h + ',left=' + (sW-w)/2 + ',top=' + (sH-h)/2 + ',resizable=0,scrollbars=' + scrollbars + ',status=yes,menubar=no' );
}

function openDialog(url, name, w, h,scrollbars,resize) 
{
	var sW = window.screen.width;
	var sH = window.screen.height;
	
	var win = window.open(url,name,'width=' + w + ',height=' + h + ',left=' + (sW-w)/2 + ',top=' + (sH-h)/2 + ',resizable=' + resize + ',scrollbars=' + scrollbars + ',status=yes,menubar=no' );
}
