<!-- All Scripts © by bfa solutions ltd. -->
<!--
function showWindow(path, scrolling) {
  var win = window.open(path,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + scrolling + ',resizable=no,copyhistory=no');
}

function resizeWindow(width, height) {
  var screenX = screen.width;
  var screenY = screen.height;
  var x = (screenX - width) / 2;
  var y = (screenY - height) / 2;
  resizeTo(width, height);
  moveTo(x, y);
}

function SendMail(mail) 
{
	var realMail = "mailto:" + mail.replace(" [at] ", "@").replace(" [dot] ", ".");
	parent.location.href = realMail;
}

function Execute(element, id) {
	document.getElementById(element).checked = true;
	document.getElementById(id).click();
}
				
function SetPosition(elementId, sortByDate, defaultValue) {
	var element = document.getElementById(elementId);
	if (sortByDate) 
	{
		element.className = 'InputFieldReadOnly';
		element.readOnly = true;
		element.value = defaultValue;
	} 
	else 
	{
		element.className = 'InputField';
		element.readOnly = false;
	}
}

function DeletePreviewImage(elementId)
{
	var element = document.getElementById(elementId);
	element.value = '';
	ChangePreviewImage(document, element);
}

function ChangePreviewImage(doc, element)
{
	var image = new Image();
	
	if (element.value == '')
		image.src = '/images/empty.gif';
	else
		image.src = element.value;
		
	var img = doc.getElementById(element.id + '_Preview');
	img.src = image.src;
	//img.width = image.width;
	//img.height = image.height;
}

//-->

