<!--
//##############################################################################
// File       : Java/clinic.js
// Description: Chislehurst Clinic navigation bar.
//
//              Note, used via a SCRIPT tag for efficency.
//==============================================================================
// Version History:
// Vers.   Date          Author    Description
//------------------------------------------------------------------------------
// 1.0     24/02/2008    GP        Original version
// 1.1     21/03/2008    GP        Highlight is now just colour
//##############################################################################

var win     = "";     // or win=null ?
var pxstyle = "1";

//------------------------------------------------------------------------------
// Close window
//------------------------------------------------------------------------------
function close_window()
{
if (! win.closed && win.location)
    win.close()
else if (window.opener && ! window.opener.closed && 
		 window.opener.location && window.opener.location.href != window.location.href) 
   window.close()
else
   {
    alert( "This is not a window - use the top right [X] to close" );
	return false
   }
win = "";
}

//------------------------------------------------------------------------------
// Highlight - On 
//------------------------------------------------------------------------------
function hiA( row )
{
var row, px;
if (pxstyle == "2")
   px = "16px"
else
   px = "14px";
//row.style.fontSize = px;
//row.style.color    = "#003300";
row.style.fontWeight = "bold";
}

//------------------------------------------------------------------------------
// Highlight - Off 
//------------------------------------------------------------------------------
function hiB( row ) 
{
var row, px;
if (pxstyle == "2")
   px = "14px"
else
   px = "12px";
//row.style.fontSize = px;
//row.style.color    = "#5C743D";
row.style.fontWeight = "normal";
}

//------------------------------------------------------------------------------
// Jump to page anchor
//------------------------------------------------------------------------------
function jumpto( tag )
{
var tag = tag + "";
if (tag != "")
   location.href = "#" + tag;
return false
}

//------------------------------------------------------------------------------
// Print current Page
//------------------------------------------------------------------------------
function printpage() 
{
if (window.print) 
   window.print()
else
	alert( "Please print this page by hitting [Ctrl][P]" )
}

//------------------------------------------------------------------------------
// Set default style
//------------------------------------------------------------------------------
function setpx( typ )
{
var typ = typ + "";
pxstyle = typ;
}

//------------------------------------------------------------------------------
// Launch streetmap window
//------------------------------------------------------------------------------
function streetmap()
{
var ht   = 600;
var wt   = 650;
var fmat = "height=" + ht + ",width=" + wt + ",menubar=yes,status=yes," +
           "scrollbars=yes,location=no,toolbar=yes,resizable=yes,"      +
		   "dependant=yes";
var url  = "http://www.streetmap.co.uk/streetmap.dll?postcode2map?BR7+5AG&The+Chislehurst+Clinic";
//
win = window.open( url, "popup", fmat );
if (! win.opener) win.opener = self;
//
return false
}

//------------------------------------------------------------------------------
// Swop More/Less details
//------------------------------------------------------------------------------
function swopmore( id )
{
var id = id + "";
if (id == "")
   {}     // do nothing!
else if (document.getElementById( id + "_less") && document.getElementById( id + "_more"))
   {	
    var row1 = document.getElementById( id + "_less" );
	var row2 = document.getElementById( id + "_more" );
    var str  = row1.innerHTML;
    row1.innerHTML = row2.innerHTML;
	row2.innerHTML = str
   }
return false
}
-->
