function ajaxFunction(){

 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;
	}

      }  
 }	

	return xmlHttp;
	
}
function cbaUpdateElement(element,url,img){
	xmlHttp=ajaxFunction();
			
	xmlHttp.onreadystatechange=function(){
	
		if(xmlHttp.readyState==0){
		
			alert("Not Intialised");
			
		}
		if(xmlHttp.readyState==1){
		
			document.getElementById(""+element+"").innerHTML=img;
			
		}

		if(xmlHttp.readyState==2){
		
		//alert("Has been sent");
		
		}
		if(xmlHttp.readyState==3){
		
		//alert("In process....");
		
		}

		if(xmlHttp.readyState==4){
		
			document.getElementById(""+element+"").innerHTML=xmlHttp.responseText;
			
			if(document.getElementById("aControlIDoff").style.display!=""){
			
			document.getElementById("boldStuff").innerHTML='<font face=arial size=2><br><a href="http://support.memorystock.com/Chat/frmClientPreChat.aspx?config=1" target="_blank" title="Memorystock Live Chat Support" onclick="newWindow = window.open(\'http://support.memorystock.com/Chat/frmClientPreChat.aspx?config=1\', \'LiveChat1\', 		\'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=480\'); 		if (newWindow) { newWindow.focus(); newWindow.opener=window; } return false;"><b>Need further assistance? Please click...</b></a></font>';
			
			}
			
		}
	}	
	
      	var url=url;
      	xmlHttp.open("GET",url,true);
    	xmlHttp.send(null);
    
}


