<!-- JavaScript:Essentials code snippet 1. -->
<!-- Calling a function from a hyperlink to open a window.
Controlling the characteristics of the new window with the
function arguments. -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Code source: http://www.justfigures.co.uk/ -->
<!-- A resource for web developers using XHTML, CSS, JavaScript, PHP -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>View code snippet page</title>
<script language="JavaScript" type="text/javascript">
<!-- begin
// function with arguments to open a new window
// note the use of the quotes
function winOpen(url) {
	window.open(url,'_blank','toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=200,height=100')
}
// end -->
</script>

</head>

<body>
<!-- call function from a link using 
JavaScript pseudo-protocol 'javascript:' -->

<a href="javascript:winOpen('functionLink.html')">Open a new window.</a>
</body>
</html>