var xmlHttp_pci

function selectmake(make){
if (make!='lexmark'){
		document.getElementById('lexmark').oSrc='images/lexmark.jpg';
		document.getElementById('lexmark').src='images/lexmark.jpg';
		document.getElementById('lexmark').style.border='1px solid #FBFBFB';
}
if (make!='brother'){
		document.getElementById('brother').oSrc='images/brother.jpg';
		document.getElementById('brother').src='images/brother.jpg';
		document.getElementById('brother').style.border='1px solid #FBFBFB';
}
if (make!='canon'){
		document.getElementById('canon').oSrc='images/canon.jpg';
		document.getElementById('canon').src='images/canon.jpg';
		document.getElementById('canon').style.border='1px solid #FBFBFB';
}
if (make!='epson'){
		document.getElementById('epson').oSrc='images/epson.jpg';
		document.getElementById('epson').src='images/epson.jpg';
		document.getElementById('epson').style.border='1px solid #FBFBFB';
}
if (make!='hp'){
		document.getElementById('hp').oSrc='images/hp.jpg';
		document.getElementById('hp').src='images/hp.jpg';
		document.getElementById('hp').style.border='1px solid #FBFBFB';
}

if (make!=""){
var ID=document.getElementById(make);
ID.src='images/'+make+'-on.jpg';
ID.oSrc='images/'+make+'-on.jpg';
ID.style.border='1px solid #000000';
}else{
document.cartridge_form.id_make.value='';
}
}


function doCartridge(pagename)
{ 
if (document.getElementById('ajax_div').value=="do_cartridges"){
	
}else{
	document.getElementById("printer_cartridges").style.display = "block";
	document.getElementById("show_service_overlay").style.display = "block";
}
xmlHttp_pci=GetXmlHttpObject()

if (xmlHttp_pci==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="do_cartridges.php"
url=url+"?pagename="+pagename
url=url+"&sid="+Math.random()
xmlHttp_pci.onreadystatechange=stateChanged_pci 
xmlHttp_pci.open("GET",url,true)
xmlHttp_pci.send(null)
}

function stateChanged_pci() 
{ 
if (xmlHttp_pci.readyState==4 || xmlHttp_pci.readyState=="complete")
 { 
	var ajax_div="printer_cartridges";
	if (document.getElementById('ajax_div').value=="do_cartridges"){
		var ajax_div="do_cartridges";
	}
 	document.getElementById(ajax_div).innerHTML=xmlHttp_pci.responseText;
 } 
}

