window.onload = function() 

{
newsevents(jsCNETAB);	
init;

var d = new Date();
var jsdt = (d.getDate() + "/" + (d.getMonth() +1) + "/" + d.getFullYear())
requestDay(jsdt);

calDateSel('keydates');

$(function() {
	$('a[rel=tipsy]').tipsy({fade: true, gravity: 'n'});
	$('#pressRSS1').tipsy({fade: true, gravity: 'n'});
	$('#pressArchive').tipsy({fade: true, gravity: 'n'});
	$('#calRSS1').tipsy({fade: true, gravity: 'n'});
//	$('#FaceBook').tipsy({fade: true, gravity: 'n'});
//	$('#TWITTER').tipsy({fade: true, gravity: 'n'});
//	$('#CoursesTAB').tipsy({fade: true, gravity: 'n'});
//	$('#WebTVTAB').tipsy({fade: true, gravity: 'n'});
//	$('#NewsTAB').tipsy({fade: true, gravity: 'n'});
//	$('#CalendarTAB').tipsy({fade: true, gravity: 'n'});
});



}



function calDateSel(dt) {

//var dtID 		= document.getElementById(dt);
//dtID.className='selDT';

requestDay(dt);

}

// ajax stuff

function createDocument() {
    var aVersions = [ "MSXML2.DOMDocument.5.0",
        "MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0",
        "MSXML2.DOMDocument","Microsoft.XmlDom"
    ];
    for (var i = 0; i < aVersions.length; i++) {
        try {
            var oXmlDom = new ActiveXObject(aVersions[i]);
            return oXmlDom;
        } catch (oError) {
            //Do nothing
        }	
    }
    throw new Error("MSXML is not installed.");
 }
 
function TIMESTAMP() {
var nowDate 	= new Date();
var nowHour 	= nowDate.getHours();
var nowMinute 	= nowDate.getMinutes();
var nowSecond 	= nowDate.getSeconds();
var TIMESTAMP 	= (nowHour + nowMinute + nowSecond);
return TIMESTAMP;

this.noDate 	= null;
this.nowHour 	= null;
this.nowMinute 	= null;
this.nowSecond 	= null;
}


function requestDay(dt) {

var dt;
//alert(dt);

strTIMESTAMP = TIMESTAMP();

var oXmlHttp = zXmlHttp.createRequest();
	oXmlHttp.open("get", "/calendar/dayDisplay.asp?selecteddt=" + dt + "&TSTAMP=" + strTIMESTAMP, true);

      oXmlHttp.onreadystatechange = function () {
                if (oXmlHttp.readyState == 4) {
                    if (oXmlHttp.status == 200) {
                        dispDay(oXmlHttp.responseText);		

                    } else {
                        dispDay("<font color=#ff0000>Error description:  (" + oXmlHttp.statusText + ")</font>"); //statusText is not always accurate

                    }
                }            
            };
            oXmlHttp.send(null);

        }


function dispDay(sText) {
var dispDay = document.getElementById("displayDay");
dispDay.innerHTML = (sText);
}



function ajaxSession(content) {
//alert(content);
var content;
strTIMESTAMP = TIMESTAMP();

var oXmlHttp = zXmlHttp.createRequest();
	oXmlHttp.open("get", "/fpContent.asp?content=" + content + "&TSTAMP=" + strTIMESTAMP, true);

      oXmlHttp.onreadystatechange = function () {
                if (oXmlHttp.readyState == 4) {
                    if (oXmlHttp.status == 200) {
                    //    dispDay(oXmlHttp.responseText);		

                    } else {
                      //  dispDay("<font color=#ff0000>Error description:  (" + oXmlHttp.statusText + ")</font>"); //statusText is not always accurate

                    }
                }            
            };
            oXmlHttp.send(null);

        }

