function snailbubble() {
	if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("FloatingWindow").innerHTML=xmlhttp.responseText;
		}
	}
	
	xmlhttp.open("GET","majorannouncement.php",true);
	xmlhttp.send();
	document.getElementById('FloatingWindow').style.visibility = "visible";
	document.getElementById('FloatingWindow').style.height = "auto";
	setTimeout ( "disappearingbubble()", 6000 );
}

function disappearingbubble() {
	document.getElementById('SnailThoughts').style.visibility = "hidden";
}

function openwhatisthis(words) {
	document.getElementById('WhatIsThis').style.visibility = "visible";
	document.getElementById('WhatIsThis').innerHTML = words;
}

// Simple follow the mouse script

var divName = 'WhatIsThis'; // div that is to follow the mouse
                       // (must be position:absolute)
var offX = 15;          // X offset from mouse position
var offY = 15;          // Y offset from mouse position

function mouseX(evt) {
	if (!evt) evt = window.event;
	if (evt.pageX) return evt.pageX; 
	else if (evt.clientX)return evt.clientX + (document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft);
	else return 0;
}

function mouseY(evt) {
	if (!evt) evt = window.event;
	if (evt.pageY) return evt.pageY;
	else if (evt.clientY)return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
	else return 0;
}

function follow(evt) {
	if (document.getElementById) {
		var obj = document.getElementById(divName).style;
		obj.left = (parseInt(mouseX(evt))+offX) + 'px';
		obj.top = (parseInt(mouseY(evt))+offY) + 'px';
	}
}
document.onmousemove = follow;
                    

function closewhatisthis() {
	document.getElementById('WhatIsThis').style.visibility = "hidden";
}

function openwhoarewe() {
	if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("FloatingWindow").innerHTML=xmlhttp.responseText;
		}
	}
	
	xmlhttp.open("GET","whoarewe.php",true);
	xmlhttp.send();
	document.getElementById('FloatingWindow').style.visibility = "visible";
	document.getElementById('FloatingWindow').style.height = "auto";
}

function openfullcalendar() {
	if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("FloatingWindow").innerHTML=xmlhttp.responseText;
		}
	}
	
	xmlhttp.open("GET","Events/index.php",true);
	xmlhttp.send();
	document.getElementById('FloatingWindow').style.visibility = "visible";
	document.getElementById('FloatingWindow').style.height = "auto";
}

function openofficers() {
	if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("FloatingWindow").innerHTML=xmlhttp.responseText;
		}
	}
	
	xmlhttp.open("GET","officers.php",true);
	xmlhttp.send();
	document.getElementById('FloatingWindow').style.visibility = "visible";
	document.getElementById('FloatingWindow').style.height = "auto";
}

function opennegotiations() {
	if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("FloatingWindow").innerHTML=xmlhttp.responseText;
		}
	}
	
	xmlhttp.open("GET","negotiations.php",true);
	xmlhttp.send();
	document.getElementById('FloatingWindow').style.visibility = "visible";
	document.getElementById('FloatingWindow').style.height = "auto";
}

function openpac() {
	if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("FloatingWindow").innerHTML=xmlhttp.responseText;
		}
	}
	
	xmlhttp.open("GET","pac.php",true);
	xmlhttp.send();
	document.getElementById('FloatingWindow').style.visibility = "visible";
	document.getElementById('FloatingWindow').style.height = "auto";
}

function openinvolved() {
	if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("FloatingWindow").innerHTML=xmlhttp.responseText;
		}
	}
	
	xmlhttp.open("GET","involved.php",true);
	xmlhttp.send();
	document.getElementById('FloatingWindow').style.visibility = "visible";
	document.getElementById('FloatingWindow').style.height = "auto";
}

function closefloatingwindow(){
	document.getElementById('FloatingWindow').style.visibility = "hidden";
}

function opennewpage(x){
	window.location = x;
}
