pic0= new Image(220,19); 
pic0.src="images/ajax-loader2.gif";
pic1= new Image(16,16);
pic1.src="images/ajax-loader.gif";

sfHover = function() { 
		var sfEls = document.getElementById("nav").getElementsByTagName("LI"); 
		for (var i=0; i<sfEls.length; i++) { 
			sfEls[i].onmouseover=function() { 
				this.className+=" sfhover"; 
			} 
			sfEls[i].onmouseout=function() { 
				this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); 
			} 
		} 
	} 
	
if (window.attachEvent) window.attachEvent("onload", sfHover);

function changemonths(){
		var yearmonth = document.cal.change.value;
		var year = yearmonth.substring(0,4);
		var month = yearmonth.substring(7,5);
		
		document.getElementById('calchange').innerHTML = '<img src="images/ajax-loader.gif" width="16" height="16"> <span style=\"font-size:9pt;\">Loading... please wait</span>';
		var xmlhttp=false; //Clear our fetching variable
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
        var file = 'includes/changemonths.php?month='; //This is the path to the file we just finished making *
		var file2 = '&year=';
    xmlhttp.open('GET', file + month + file2 + year, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4) { //Check if it is ready to recieve data
                var content = xmlhttp.responseText; //The content data which has been retrieved ***
                if( content ){ //Make sure there is something in the content variable
                      document.getElementById('calchange').innerHTML = content; //Change the inner content of your div to the newly retrieved content ****
                }
        }
        }
        xmlhttp.send(null) //Nullify the XMLHttpRequest
return;
}

function getevent(eventid){
		getElementByClass('balloonstyle');
	
		var element = 'event' + eventid;
		
		document.getElementById(element).innerHTML = '<img src="images/ajax-loader.gif" width="16" height="16"> <span style=\"font-size:9pt;\">Loading... please wait</span>';
		document.getElementById(element).style.display='block';
		var xmlhttp=false; //Clear our fetching variable
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
        var file = 'getevent.php?eid='; //This is the path to the file we just finished making *
    xmlhttp.open('GET', file + eventid, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4) { //Check if it is ready to recieve data
                var content = xmlhttp.responseText; //The content data which has been retrieved ***
                if( content ){ //Make sure there is something in the content variable
                      document.getElementById(element).innerHTML = content; //Change the inner content of your div to the newly retrieved content ****
                }
        }
        }
        xmlhttp.send(null) //Nullify the XMLHttpRequest
		
return;
}

var allHTMLTags = new Array();

function getElementByClass(theClass) {
	//Create Array of All HTML Tags
	var allHTMLTags=document.getElementsByTagName("*");
	//Loop through all tags using a for loop
	for (i=0; i<allHTMLTags.length; i++) {
		//Get all tags with the specified class name.
		if (allHTMLTags[i].className==theClass) {
			//Place any code you want to apply to all
			//pages with the class specified.
			//In this example is to “display:none;” them
			//Making them all dissapear on the page.
			allHTMLTags[i].style.display='none';
		}
	}
}
