
function oggi()
{
	var  d  = new Date ();
	var gs  = d.getDay();
	var gg  = d.getDate();
	var mm  = d.getMonth()+1;
	var aa  = d.getFullYear();
	var hh  = d.getHours();
	var min = d.getMinutes();
	
	var giorni = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
	var mesi = new Array("January", "February", "March", "April", "May", "June", "July", "August","September",
						"October","November","December");
        var ordinals = new Array ("0th", "1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th","10th","11th","12th","13th","14th","15th","16th","17th","18th","19th","20th","21st","22nd","23rd","24th","25th","26th","27th","28th","29th","30th","31st");


	if (gg < 10)
		gg = "0"+gg;

	if (mm < 10)
		mm = "0"+mm;

	if (hh < 10)
		hh = "0"+hh;

	if (min < 10)
		min = "0"+min;

	document.write (giorni[gs]+ ", " +gg+" "+mesi[mm-1]+" "+aa+"  " +hh+ ":" +min);
	


}

function images(nome, wid, hei){
window.open('/images/'+nome,'','menubar=no,location=no,toolbar=no,status=no,scrollbars=auto,resizable=no,width='+wid+', height='+hei)
}

function popitup(url)
{
	newwindow=window.open(url,'name','menubar=no,location=no,toolbar=no,status=no,scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}
function popitup2(url,width,height)
{
	newwindow=window.open(url,'name','menubar=no,location=no,toolbar=no,status=no,scrollbars=no,resizable=no,width='+width+', height='+height);
	if (window.focus) {newwindow.focus()}
}

function imgpopitup(url)
{
	newwindow=window.open(url,'name','height=399,width=320');
	if (window.focus) {newwindow.focus()}
}



 
originalColorArray = new Array();

function changeBg(tr) {
	if (isTrMarked(tr)) return;
	var children = tr.childNodes;
	tmpArray = new Array();
	for (var i=0;i < children.length; i++) {
		tmpArray[i] = tr.children[i].bgColor;
		tr.children[i].bgColor='e2e2e2';
	}
	originalColorArray[tr.rowIndex] = tmpArray;
}

function resetBg(tr) {
	if (isTrMarked(tr)) return;
	tmpArray = originalColorArray[tr.rowIndex];
	var children = tr.childNodes;
	for (var i=0;i < children.length; i++) {
		tr.children[i].bgColor=tmpArray[i];
	}	
}

function isTrMarked(tr) {
	if (tr.children[0].bgColor=='#437ca7') {
		return true;
	}
	return false;
}

function markTr(tr) {
	var children = tr.childNodes;
	var doStyle = true;
	if (isTrMarked(tr)) {
		unMarkTr(tr);
	} else {
		tmpArray = new Array();
		for (var i=0;i < children.length; i++) {
			tr.children[i].bgColor='437CA7';
			if (tr.children[i].style.color == "red") {
				tr.children[i].style.color="ffff00";
			} else {
				tr.children[i].style.color="ffffff";
			}
			if (tr.children[i].childNodes[0].nodeName == "A") {
				tr.children[i].childNodes[0].style.color="ffffff";
			}
		}
	}
}

function unMarkTr(tr) {
	var children = tr.childNodes;
	tmpArray = originalColorArray[tr.rowIndex];
	for (var i=0;i < children.length; i++) {
		tr.children[i].bgColor=tmpArray[i];
		if (tr.children[i].style.color == "#ffff00") {
			tr.children[i].style.color="red";
		} else {
			tr.children[i].style.color="000000";
		}
		if (tr.children[i].childNodes[0].nodeName == "A") {
			tr.children[i].childNodes[0].style.color="305E80";
		}		
	}
}




function doNothing() {}