// JavaScript Document


function picOpen(pic,width,height,description)
{
	var l,t,w,h;
	w = (width>(screen.availWidth-10))?(screen.availWidth-10):width;
	h = (height>(screen.availHeight-30))?(screen.availHeight-30):height;
	l = (width>(screen.availWidth-10))?0:((screen.availWidth - 10 - w)/2);
	t = (height>(screen.availHeight-30))?0:((screen.availHeight - 30 - h)/2);
	if(height+16>(screen.availHeight-30) && (width+16)<=(screen.availWidth-10)) w += 16;
	if(width+16>(screen.availWidth-10) && (height+16)<=(screen.availHeight-30)) h += 16;
	str_buffer = '<html>      \
									<head>    \
										<title>Oil Terminal</title>    \
										<link rel="stylesheet" type="text/css" href="style.css">  \
									</head>         \
									<body style="margin: 0px;">     \
									<div align="center" style="width: ' + w + '; height: ' + h + '; overflow: auto; padding: 0px;">   \
									<a href="javascript: window.close();"><img src="' + pic + '" alt="' + pic + '" border="0"></a></div>               \
									</body>              \
								</html>                \
							 ';
	var picWin = window.open("","bigpic","statusbar=no, toolbar=no, menubar=no, directories=no, scrollbars=yes, resizable=no, top=" + t + ", left=" + l + ", width=" + w + ", height=" + h);
	var pic_doc = picWin.document;
	pic_doc.write (str_buffer);
	pic_doc.close();
}