
function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;  var int_windowTop = (screen.height - a_int_windowHeight) / 2;  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)    if (parseInt(navigator.appVersion) >= 4) {      obj_window.window.focus();    }}




function go()
{
	
	box = document.forms[0].navi;
	destination = box.options[box.selectedIndex].value;
	
	if (destination) location.href = destination;
}





function createXMLHttpRequest() {

	var newConnector;

	if(window.XMLHttpRequest) {
		try {
			newConnector = new XMLHttpRequest();
		} catch(e) {
			newConnector = false;
		}
	} else if(window.ActiveXObject) {
		

		
		try {
			newConnector = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e){ 
		
		
		
		try {
			newConnector = new ActiveXObject("Microsoft.XMLHTTP");
		} catch(e) {
			
			newConnector = false;
		}
		
		
		}
		
		
		
		
		
	}
	return newConnector;
}

var req = createXMLHttpRequest();


/* ----------- Add Data to the mailing list database ------------- */

function signUp(theRequest) {



	/* list the variables we need to send to the backend */
	theEmail = document.getElementById("listEmail").value;

	req.open('get', 'func.php?requestType=' + theRequest +'&theEmail='+theEmail);
	req.onreadystatechange = handleResponse;
	req.send(null);
document.getElementById('formPrompt').innerHTML = "<div id='promptLeft'><img src='images/icon_rotate.gif'/></div><div id='promptRight'>Processing Request.</div>";

}


/* ----------- send Form Email ------------- */

function sendMsg(theRequest) {



	/* list the variables we need to send to the backend */
	thefName = document.getElementById("fName").value;
	thelName = document.getElementById("lName").value;
	theEmail2 = document.getElementById("eMail").value;
	theSubject = document.getElementById("subject").value;
	theMessage = document.getElementById("message").value;

	req.open('get', 'func.php?requestType=' + theRequest +'&thefName='+thefName +'&thelName='+thelName +'&theEmail2='+theEmail2 +'&theSubject='+theSubject +'&theMessage='+theMessage);
	req.onreadystatechange = handleResponse;
	req.send(null);
document.getElementById('formPrompt2').innerHTML = "<div id='promptLeft'><img src='images/icon_rotate.gif'/></div><div id='promptRight'>Processing Request.</div>";

}


/* -- handle the response and send it back to the front end -- */


function handleResponse() {
	
if(req.readyState == 4){
	
		var response = req.responseText;
		var update = new Array();
		if(response.indexOf('||' != -1)) {
			update = response.split('||');
			document.getElementById(update[0]).innerHTML = update[1];
			//clearForm();
			
	if((update[2]) == "success1"){
		
				
				clearForm1();
				  
   }
   
   if((update[2]) == "success2"){
		
				
				clearForm2();
				  
   }
		
			
		
			}
			
			
			
			
			
		
		}
		
			

	}
	
	
	
	
	/*
	else
	alert("loading" + req.readyState);
	//alert(crap);
	//document.getElementById('formPrompt').innerHTML = theCrap;
	
	*/





function clearForm1(){
	
	var theForm1 = document.forms[1];
	

 for(i=0; i<theForm1.elements.length; i++){
   theForm1.elements[i].value = "";

}
}

function clearForm2(){
	
	var theForm2 = document.forms[0];
	

 for(i=0; i<theForm2.elements.length; i++){
   theForm2.elements[i].value = "";

}
}


