function showHide(id){
	if (document.getElementById(id).style.display=='none'){
		document.getElementById(id).style.display='block';
	}else{
		document.getElementById(id).style.display='none';
	}
}

function confirmClick(message){
	var agree=confirm(message);
	if (agree)
		return true ;
	else
		return false ;
}


function swapImage(idName,imageName){
	document.getElementById(idName).src='./images/'+imageName;
}
function setBackground(iValue){
	document.getElementById('menu_'+iValue+'-ddheader').style.background='#000000';
}
function clearBackground(iValue){
	document.getElementById('menu_'+iValue+'-ddheader').style.background='none';
}
function hoverBackgroundOver(iValue){
	document.getElementById('menu_'+iValue+'_a').style.background='#000000';
}
function hoverBackgroundOut(iValue){
	document.getElementById('menu_'+iValue+'_a').style.background='#788940';
}
function moduleSwapOver(iValue){
	document.getElementById('module_'+iValue).style.backgroundImage='url(images/fsc_button_over.gif)';
}
function moduleSwapOut(iValue){
	document.getElementById('module_'+iValue).style.backgroundImage='url(images/fsc_button.gif)';
}


function swapMainLogo(){
	var fileArray =document.getElementById('mainLogo').src.split('/');
	var file=fileArray.pop();
	if (file=="main_logo_norm.gif"){
		document.getElementById('mainLogo').src="./images/main_logo_over.gif";
	}else{
		document.getElementById('mainLogo').src="./images/main_logo_norm.gif";
	}
}
//Start Ajax Stuff...

var divName = ''//Declare global variable for div name

var fpws_http = fpws_getHTTPObject(); // We create the HTTP Object

function handleHttpResponse() {
	if (fpws_http.readyState == 4) {
    	results = fpws_http.responseText;
  		document.getElementById(divName).innerHTML = results;
	  }
}
function fpwsAjax(getUrl,getValue,passedDiv) {
	
 	var url = getUrl+getValue+'&z='+new Date().getTime();
	divName = passedDiv; //Update global vairable to div name we wrtie back to..
	/*var divName = 'ajaxDiv2';*/
	fpws_http.open("GET", url, true);

	fpws_http.onreadystatechange = handleHttpResponse;
	
	fpws_http.send(null);
	
}
function fpws_getHTTPObject() {
	fpwsHttpCon = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         fpwsHttpCon = new XMLHttpRequest();
         if (fpwsHttpCon.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            fpwsHttpCon.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            fpwsHttpCon = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               fpwsHttpCon = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!fpwsHttpCon) {
         alert('Unable to establish AJAX connection');
         return false;
      } else {
      	return fpwsHttpCon;
      }
}


