function elimina2 (msg)
{
	var conferma=null;
	conferma=confirm (msg + '\n');
	if (conferma==false)
	{
		return (false);
	}
}

function checkNumeric(field, origvalue)
{
	pattern = /^[0-9]*$/;
	if(pattern.test(field.value)==false || field.value < 1)
	{
		//alert("Not numeric in " + field.name);
		field.value = origvalue;
	}
}


function ColorBg(id,clr)
{
	id.bgColor = clr;
}

function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()


hours=hours
if (minutes<=9)
minutes="0"+minutes

//change font size here
var cdate=hours+":"+minutes
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",60000)
}


function validate(form) {
	//alert(form);
	var j = 0;
	msg = "";
	for(var i = 0;i < ele.length;i++) {
		if(isBlank(form, ele[i])) {
			invalid(form, ele[i]);
			msg = msg + msgs[i] +"\n";
			j = j +1;
		}
	}
	if(j == 0) {
		return true;
	}
	else {
		alert(alertMsg + "\n"+ msg);
		return false;
	}
}
function invalid(form, ele) {
	if(!document.layers) {
		document.forms[form].elements[ele].style.borderColor = '#E10915';
		document.forms[form].elements[ele].style.background = '#f4f4f4';
		}
	return msg;
}

function isBlank(form,ele) {
	str = document.forms[form].elements[ele].value;
	if(str == "") {
		return true;
	}
	else {
		return false;
	}

}
function popUp(page, width, height, lang)
{
	var newWindow = window.open(page,"GenericPage","height=" + height + ",width=" + width + ",toolbar=no,status=no,menubar=no,resizable=yes,scrollbars=yes");
}

function popImage(page, width, height, lang)
{
	var newWindow = window.open(page,"GenericPage","height=" + height + ",width=" + width + ",toolbar=no,status=no,menubar=no,resizable=yes,scrollbars=no");
}

function PopSend(path, pageDesc, url, lang)
{
	var newWindow = window.open(path + "html/send.html" + "?pageDesc=" + pageDesc + "&url=" +  url + "&lang=" + lang, "sendlink","height=430, width=350,toolbar=no,status=no,menubar=no,resizable=yes,scrollbars=no");
}

function getID (id) {
	return document.getElementById(id).style;
}
function showDontShow(close, open) {
	var positions;
	positions= {block: "none", none: "block"};
	getID(open).display = positions[getID(open).display]
	getID(close).display = positions[getID(close).display]
}