/**
* @author Lukas Foldyna, mailto: lfoldyna@gmail.com
* @license http://www.arat.cz/licence
* @license type: is NOT Open Source Software and Limitations Apply
* @copyright Copyright (c) 2005-2006 ARaT http://www.arat.cz
*/

function logDebug (msg) {
	if (typeof(window) != "undefined" && window.console && window.console.log) {
		// Safari
		window.console.log(msg);
	} else if (typeof(opera) != "undefined" && opera.postError) {
		// Opera
		opera.postError(msg);
	} else if (typeof(printfire) == "function") {
		// FireBug
		printfire(msg);
	} else {
		//alert(msg);
	}
}

var formValue;

function w_clearAndSave(el, def)
{
	if (el.value != def) {
		return;
	}
	formValue = el.value;
	el.value = '';
}

function w_isEmpty(el)
{
	if (!el.value || el.value.length == 0) {
		el.value = formValue;
	}
}
