function pet(dogID) {	  
	xmlhttp.onreadystatechange=function(){
	if(xmlhttp.readyState==4){
	document.getElementById('dogInteraction').innerHTML = xmlhttp.responseText;
	document.getElementById('petStatus').innerHTML = document.getElementById('newStatus').innerHTML;
	setTimeout("document.getElementById('dogInteraction').innerHTML =''",1500);
	}
	else{
	document.getElementById('dogInteraction').innerHTML = "...";
	}
	}
	var url="muttz_work.php?pet=" + dogID;
	url=url + "&uniq="+Math.random();
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	}
	
function feed(dogID) {	  
	xmlhttp.onreadystatechange=function(){
	if(xmlhttp.readyState==4){
	document.getElementById('dogInteraction').innerHTML = xmlhttp.responseText;
	document.getElementById('equip').innerHTML = document.getElementById('newEquip').innerHTML;
	document.getElementById('need').innerHTML = document.getElementById('newNeed').innerHTML;
	setTimeout("document.getElementById('dogInteraction').innerHTML =''",1500);
	}
	else{
	document.getElementById('dogInteraction').innerHTML = "...";
	}
	}
	var url="muttz_work.php?feed=" + dogID;
	url=url + "&uniq="+Math.random();
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	}
	
function play(dogID) {	  
	xmlhttp.onreadystatechange=function(){
	if(xmlhttp.readyState==4){
	document.getElementById('dogInteraction').innerHTML = xmlhttp.responseText;
	document.getElementById('equip').innerHTML = document.getElementById('newEquip').innerHTML;
	document.getElementById('need').innerHTML = document.getElementById('newNeed').innerHTML;
	setTimeout("document.getElementById('dogInteraction').innerHTML =''",1500);
	}
	else{
	document.getElementById('dogInteraction').innerHTML = "...";
	}
	}
	var url="muttz_work.php?play=" + dogID;
	url=url + "&uniq="+Math.random();
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	}
	
function litter(litterID, action) {	  
	xmlhttp.onreadystatechange=function(){
	if(xmlhttp.readyState==4){
	document.getElementById('litterInfo').innerHTML = xmlhttp.responseText;
	setTimeout("document.getElementById('litterInfo').innerHTML =''",2000);
	}
	else{
	document.getElementById('litterInfo').innerHTML = "...";
	}
	}
	var url="litter_work.php?action=" + action + "&litterID=" + litterID;
	url=url + "&uniq="+Math.random();
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	}	
	
function userInfo() {	  
	xmlhttp.onreadystatechange=function(){
	if(xmlhttp.readyState==4){
	document.getElementById('userinfo').innerHTML = xmlhttp.responseText;
	}
	}
	var url="muttz_work.php?userInfo=yes";
	url=url + "&uniq="+Math.random();
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	}
function chat(URL) {
	var link="/chatroom.php"
	winpops=window.open(link,"","width=650, height=580,")
	}
function icon(URL) {
	var link="/emoticons.php"
	winpops=window.open(link,"","width=310, height=330,")
	}
function kennel_main(URL) {
	var link="/kennel.php?manage=main"
	winpops=window.open(link,"","width=310, height=330,")
	}	
function rules(URL) {
	var link="/chatrules.php"
	winpops=window.open(link,"","width=510, height=275,")
	}