var infoArray = new Array("All plans reside on Windows 2003 servers and provide an excellent array of features including multiple domains, aliases, sub-domains, ASP, FrontPage, Cold Fusion, PHP support, Email addresses, webmail access, Control panel for administering your site and more.", 
"Disk storage to store your HTML files, graphics, audio clips, e-mail, and all other files that make up your website. Each of our shared servers includes a specified allotment of disk storage space.", 
"Control access to pages and site directories.", 
"Interland can support MS Access on the Windows Platforms.");



var rowTrack;
var tblTrack;
function showInfoRow(tblID,rowIndex,infoIndex) {
//alert(infoIndex);
/*
params: the table element
rowIndex: the position in the table to write or delete
infoIndex: the position in the infoArray for this related content
tblId: 

*/
var imgID;
var tdID;

// lets see if the user is clicking a row from a different table
if(tblTrack != tblID && tblTrack!=null){
	imgID = tblTrack + "IMG" + rowTrack;
	tdID = tblTrack + "TD" + rowTrack;
	document.getElementById(tdID).style.fontWeight = "normal";
	document.images[imgID].src = "../images/img_info.gif";
	document.getElementById(tblTrack).deleteRow(rowTrack);
}else{

// determines if user is clicking a different info icon than the one for the row already expanded - is do, delete the old info row and set all the parent row's styles back to default
	if(rowTrack != rowIndex && rowTrack!=null){
		imgID = tblID + "IMG" + rowTrack;
		tdID = tblID + "TD" + rowTrack;
		document.getElementById(tdID).style.fontWeight = "normal";
		document.images[imgID].src = "../images/img_info.gif";
		document.getElementById(tblID).deleteRow(rowTrack);
	}
}
// determines if user is clicking the expanded rows info icon again to close the row - if so, delete the row and set the parent row's styles to default and exit the function
if(rowTrack == rowIndex){
	imgID = tblID + "IMG" + rowTrack;
	tdID = tblID + "TD" + rowTrack;
	document.getElementById(tdID).style.fontWeight = "normal";
	document.images[imgID].src = "../images/img_info.gif";
	document.getElementById(tblID).deleteRow(rowIndex);
	rowTrack = null;
	tblTrack = null;
	return;

}	

// the position in the array for the expanded info row content
var info = infoArray[infoIndex];

// insert row based on the desired index, insert the actual cell, set some style rules for the info row
var x=document.getElementById(tblID).insertRow(rowIndex);
var y=x.insertCell(0);
y.style.fontSize="10";
y.width="598";
y.colSpan="4";
y.cellPadding="5";
y.className="infoRow";
y.innerHTML=info;
//y.innerText=info;

// turn info row's parent row's font to bold
tdID = tblID + "TD" + rowIndex;
/* document.getElementById(tdID).style.fontWeight = "bold";  */

// turn info row's parent row's info icon to on
imgID = tblID + "IMG" + rowIndex;
document.images[imgID].src = "../images/img_info.gif";

//set the rowTrack and tblTrack vars to the currently expanded info row's index
rowTrack = rowIndex;
tblTrack = tblID;
}