// JavaScript Document for Event Page
function show_photo( pFileName, pTitle, pCaption) {

// specify window parameters
  photoWin = window.open( "", "photo", "width=660,height=500,status,scrollbars,resizable,screenX=20,screenY=40,left=20,top=40");

// wrote content to window
  photoWin.document.write('<center>');
  photoWin.document.write('<img src="' + pFileName + '"><p>');
  photoWin.document.close();	
	
// If we are on NetScape, we can bring the window to the front
	if (navigator.appName.substring(0,8) == "Netscape") photoWin.focus();

}
// done hiding from old browsers -->
function tabchange() {
	document.getElementById(arguments[0]).style.display = "block";
	document.getElementById(arguments[1]).style.display = "none";
}

var req;
function eventData() {
    var url = "eventcal.php";
	 req = false;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest && !(window.ActiveXObject)) {
    	try {
			req = new XMLHttpRequest();
        } catch(e) {
			req = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
       	try {
        	req = new ActiveXObject("Msxml2.XMLHTTP");
      	} catch(e) {
        	try {
          		req = new ActiveXObject("Microsoft.XMLHTTP");
        	} catch(e) {
          		req = false;
        	}
		}
    }
	if(req) {
        var params = "";
		req.open("POST", url, true);
		req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		req.setRequestHeader("Content-length", params.length);
		req.setRequestHeader("Connection", "close");
		req.onreadystatechange = processReqChange;
		req.send(params);
	}
             else{
               //you need to do a normal form submission
             }
}

function processReqChange() {
    // only if req shows "loaded"
    if (req.readyState == 4) {
        // only if "OK"
        if (req.status == 200) {			
          document.getElementById("content2").innerHTML = req.responseText;		 
        } else {
            alert("Sorry For the Inconvenience\nPlease Try Again.");
        }
    }
}
