function clearElement(field) {
	//if(document.getElementById(field).value ==  value) {
		// value = "";
	//}
	document.getElementById(field).value = "";
}
function clearField(field) {
	document.getElementById(field).innerHTML="";
}
function delRec(url) {
	if(confirm("Ieraksts tiks neatgriezeniski izdzēsts!!! \n\n Vai Jūs tiešām vēlaties izdzēst šo ierakstu? \n ")) {
	window.location.href = url;
	}
	return false;
}
function openwin(url, name, width, height) {
	newwindow=window.open(url,name,'height='+height+',width='+width+'');
	if (window.focus) {newwindow.focus()}
	return false;
}
function Twitter(title, url) {
	window.open('http://twitter.com/home?status='+encodeURIComponent(title)+' '+encodeURIComponent( url ),'twitter','location=1,status=1,scrollbars=0,resizable=0');
	return false;
}
function FaceBook(title, url) {
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent( url )+'&t='+encodeURIComponent(title),'sharer','location=1,status=1,scrollbars=0,resizable=0,width=530,height=400');
	return false;
}