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 PopWind(path, pageDesc, url, lang) 
{
	var newWindow = window.open(path + "/lavocedicarpi/html/send.html" + "?pageDesc=" + pageDesc + "&url=" +  url + "&lang=" + lang, "sendlink","height=420, width=400,toolbar=no,status=no,menubar=no,resizable=yes,scrollbars=yes");
}

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 = '#000099';
		document.forms[form].elements[ele].style.background = '#E4E4CB';
		}
	return msg;
}

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

}

function openPage(type, id, textsize, one, two, three) 
{
	var newWindow = window.open("/lavocedicarpi/html/openpage.html?id=" + id + "&type=" + type + "&ts=" + textsize + "&one=" + one + "&two=" + two, "openPage","height=550,width=600,toolbar=no,status=no,menubar=no,resizable=yes,scrollbars=yes");
}
