/* */
// function to make an element appear and disappear
/* */
function changeDisplay(obj)
{
	var el = document.getElementById(obj);
	
	if ( el.style.display == "none" ) 
	{
		// show the element
		el.style.display = '';		
	}else {
		// make the element disappear
		el.style.display = 'none';
	}// end if else
}// end functon changeDisplay()


/* */
// function to swap image
/* */
function swapImage(obj, image)
{
	var el = document.getElementById(obj);
	
	el.src = image;
}


/* */
/* Ajax Function to Call PHP Script */
/* */

function ajaxFunction(targetObj, script)
{
	var xmlHttp;

	try
	{  
		// Firefox, Opera 8.0+, Safari  
		xmlHttp=new XMLHttpRequest();  
	}
	catch (e)
	{  
		// Internet Explorer  
		try
		{    
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
		}
		catch (e)
		{    
			try
			{      
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");      
			}
			catch (e)
			{      
				alert("Your browser does not support AJAX!");      
				return false;      
			}    
		}  
	}

	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById(targetObj).innerHTML=xmlHttp.responseText;
			// alert(xmlHttp.responseText);
		}
	}

	xmlHttp.open("POST",script,true);
	xmlHttp.send(null);	  		
}// end function
