var topbtnCount = 6;
var topstaCount = 3;
var topbtnImages = new Array();
function topbtnMouseOut(img)
{
	document.images[img].src = topbtnImages[img.substring(img.indexOf('mbtn')+4,img.length)][0].src;
};
function topbtnMouseOver(img)
{
	document.images[img].src = topbtnImages[img.substring(img.indexOf('mbtn')+4,img.length)][1].src;
};
function topbtnMouseDown(img)
{
	document.images[img].src = topbtnImages[img.substring(img.indexOf('mbtn')+4,img.length)][2].src;
};
function topgen_td(iIndex,sLink,sTarget,iWidth,iHeight,sHint,imgFolder) {
str="<td style=\"padding-bottom:0px\" id=\"topmbtn_td"+iIndex+"\">";
str+="<a onMouseOver=\"topbtnMouseOver('topmbtn"+iIndex+"')\" onMouseOut=\"topbtnMouseOut('topmbtn"+iIndex+"')\" onMouseDown=\"topbtnMouseDown('topmbtn"+iIndex+"')\" href=\""+sLink+"\"";
if (sTarget.length >0)
	str+=" target=\""+sTarget+"\"";
str+=">";
str+="<img src=\""+imgFolder+"/topmbtn"+iIndex+"_0.gif\" name=topmbtn"+iIndex+" border=0 width=\""+iWidth+"\" height=\""+iHeight+"\" alt=\""+sHint+"\">";
str+="</a></td>";
return str;
};
function topget_table(bHor,imgFolder) {
str="<table id=\"topmbtn_tb\" cellpadding=0 cellspacing=0 border=0>";
str+="<tr>";
str+=topgen_td(0,"studsavailable.htm","","154","28","Studs Available",imgFolder);
if (bHor==false) str+="</tr><tr>";
str+=topgen_td(1,"studservice.htm","","154","28","Stud Service",imgFolder);
if (bHor==false) str+="</tr><tr>";
str+=topgen_td(2,"available.htm","","154","28","Available Puppies",imgFolder);
if (bHor==false) str+="</tr><tr>";
str+=topgen_td(3,"process.htm","","154","28","Breeding Process",imgFolder);
if (bHor==false) str+="</tr><tr>";
str+=topgen_td(4,"approval.htm","","154","28","Approval Process",imgFolder);
if (bHor==false) str+="</tr><tr>";
str+=topgen_td(5,"newborncare.htm","","154","28","Newborn Care",imgFolder);
str+="</tr>";
str+="</table>";
return str;
};
function draw_buttons(imgFolder,divID,iPressed)
{
for (i= 0; i< topbtnCount; i++)
{
	topbtnImages[i] = new Array();
	for (j= 0; j< topstaCount; j++)
	{
		topbtnImages[i][j] = new Image();
		topbtnImages[i][j].src = imgFolder + '/topmbtn' + i + '_' + j + '.gif';
	}
}
result=topget_table(false,imgFolder);
document.write(result);
}
