function Popup(url, h, w, l, t) {
	poph = + h + 35 
	popw = + w
	disp = window.open(url,"pop","height=" + poph + ",width=" + popw + ",left=" + l + ",top=" + t + "");
	content = '<HTML>';
	content += '<HEAD>';
	content += '<title>Tehnopolis</title>';
	content += '</HEAD>';
	content += '<BODY link="black" alink="black" vlink="black" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" background="#ffffff">';
	content += '<table cellspacing="0" cellpadding="0" border="0"><tr><td align="center" colspan="2">';
	content += '<img src="' + url + '" height="' + h + '" width="' + w + '" border="0"></td></tr>';
	content += '<tr><td align="left" valign="middle" style="padding-left: 10px;"><a href="javascript:print();"><img src="upload/Image/print_icon.gif" border="0" align="absmiddle"></a>&nbsp;<font size="2" face="Tahoma"><a href="javascript:print();">Natisni</a></font></td>';
	content += '<td align="right" style="padding-right: 10px;"><font size="2" face="Tahoma"><a href="#" onClick="self.close()">Zapri okno</a></font></td></tr></table></BODY></HTML>';
	disp.document.write(content);
	disp.document.close();
}

function openwindow(url, width, height, left, top)
{						
	window.open(url,"popup","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + width + ", height=" + height + ", left=" + left +", top=" + top)
}

/*/
/ /  Author: Jeremy Falcon
/ /    Date: November 08, 2001
/ / Version: 1.4
/*/

/*/ THIS FILE CONTAINS FUNCTIONS THAT WILL WRAP THE POP-UP PROCESS /*/

// this variable will hold the window obect
// we only allow one pop-up at a time
var popup = null;

/*/
/ / PURPOSE:
/ /		To create and center a pop-up window.
/ /
/ / COMMENTS:
/ /		It will replace to old pop-up if called
/ / 	without calling DestroyWnd() first..
/*/

function CreateWnd (file, width, height, resize)
{
	var doCenter = false;

	if((popup == null) || popup.closed)
	{
		attribs = "";

		/*/ there's no popup displayed /*/

		// assemble some params
		if(resize) size = "yes"; else size = "no";

		/*/
		/ / We want to center the pop-up; however, to do this we need to know the
		/ / screen size.  The screen object is only available in JavaScript 1.2 and
		/ / later (w/o Java and/or CGI helping), so we must check for the existance
		/ / of it in the window object to determine if we can get the screen size.
		/ /
		/ / It is safe to assume the window object exists because it was implemented
		/ / in the very first version of JavaScript (that's 1.0).
		/*/
		for(var item in window)
			{ if(item == "screen") { doCenter = true; break; } }

		if(doCenter)
		{	/*/ center the window /*/

			// if the screen is smaller than the window, override the resize setting
			if(screen.width <= width || screen.height <= height) size = "yes";

			WndTop  = (screen.height - height) / 2;
			WndLeft = (screen.width  - width)  / 2;

			// collect the attributes
			attribs = "width=" + width + ",height=" + height + ",resizable=" + size + ",scrollbars=" + size + "," + 
			"status=no,toolbar=no,directories=no,menubar=no,location=no,top=" + WndTop + ",left=" + WndLeft;
		}
		else
		{
			/*/
			/ / There is still one last thing we can do for JavaScrpt 1.1
			/ / users in Netscape.  Using the AWT in Java we can pull the
			/ / information we need, provided it is enabled.
			/*/
			if(navigator.appName=="Netscape" && navigator.javaEnabled())
			{	/*/ center the window /*/

				var toolkit = java.awt.Toolkit.getDefaultToolkit();
				var screen_size = toolkit.getScreenSize();

				// if the screen is smaller than the window, override the resize setting
				if(screen_size.width <= width || screen_size.height <= height) size = "yes";

				WndTop  = (screen_size.height - height) / 2;
				WndLeft = (screen_size.width  - width)  / 2;

				// collect the attributes
				attribs = "width=" + width + ",height=" + height + ",resizable=" + size + ",scrollbars=" + size + "," + 
				"status=no,toolbar=no,directories=no,menubar=no,location=no,top=" + WndTop + ",left=" + WndLeft;
			}
			else
			{	/*/ use the default window position /*/

				// override the resize setting
				size = "yes";

				// collect the attributes
				attribs = "width=" + width + ",height=" + height + ",resizable=" + size + ",scrollbars=" + size + "," + 
				"status=no,toolbar=no,directories=no,menubar=no,location=no";
			}
		}

		// create the window
		popup = open(file, "", attribs);
	}
	else
	{
		// destory the current window
		DestroyWnd();
		// recurse, just once, to display the new window
		CreateWnd(file, width, height, resize);
	}
}

/*/
/ / PURPOSE:
/ /		To destroy the pop-up window.
/ /
/ / COMMENTS:
/ /		This is available if wish to destroy
/ / 	the pop-up window manually.
/*/

function DestroyWnd ()
{
	// close the current window
	if(popup != null)
	{
		popup.close();
		popup = null;
	}
}

// skripta za barvanje izmeničnih vrstic pri tabelah

window.onload = colorRows;
function colorRows() {
		  var myTR = document.getElementsByTagName('tr');
		  for (var i=0;i<myTR.length;i++) {
				  if (i%2) {
						   myTR[i].className = 'rowTint';
				  }
		  }
}
