/* Copyright 2004 Louis Jean­Richard (www.ljr.ch). All Rights Reserved. */
//	-----------------------------------
function											squoted(s){
	return "'" + s + "'"
}
//	-----------------------------------
var	cardWindow = undefined
function 						showCard(cardText,width,height)
{
	if (width == undefined)
		width = 400
	if (height == undefined)
		height = 300
	width += 16
	height += 16
	var	windowParameters = "width=" + width
	windowParameters += ",height=" + height
	windowParameters += ",dependent=yes,scrollbars=no,status=no"
	closeCard()
	cardWindow = window.open(cardText, "ShowCard", windowParameters )
}
//	-----------------------------------
function 											closeCard()
{
	if ((cardWindow != undefined)  && (!cardWindow.closed))
		cardWindow.close()
}
//	-----------------------------------
function 					cardLink(href, text, width, height)
{
	var output = '<a href="javascript:showCard('
	output += squoted(href)
	if (width != undefined) {
		output += ','+width
		if (height != undefined)
			output += ','+height
	}
	output += ')">' + text + '</a>'
	document.open()
	document.write(output)
	document.close()
}
//	-----------------------------------
function 									closeButton(label)
{
	var output = '<form class="backFunction"><input type="button" value="'
	output += label
	output += '" name="closeButton" onClick="window.close()" /></form>'

	document.open()
	document.write(output)
	document.close()
}
