// Keep track of active infobutton
var activeInfo;

function toggleInfo(where, which, xOffset, yOffset){
	//
	// commented out by larjen to get position working on new flash frontpage
	//
	
	//xPos = xsPos(where)+xOffset;
	//yPos = ysPos(where)+yOffset;
	//if(navigator.platform.indexOf("Mac")!=-1) {
	//	if(document.all) {
	//		temp = document.body.clientWidth;
	//		newPos = temp-772;
	//		newPos = newPos/2;
	//		xPos -= newPos;
	//	}
	//}	
	if(dom){
		infoLayer = document.getElementById("infoBox");
	} else if (ie4) {
		infoLayer = document.all.infoBox;
	}
	//infoLayer.style.left = xPos;
	//infoLayer.style.top = yPos;
	
	infoLayer.style.top = yOffset;
	
	if(infoLayer.style.visibility == "visible" && activeInfo==where){
		infoLayer.style.visibility = "hidden";
	} else {
		// *** infoBox layout start ***
		output ='';
		output+='<table border="0" cellpadding="0" cellspacing="0" width="180"><tr>';
		output+='<td><img src="'+staticPath+'/img/gx_findbook_corner_light_t_l.gif" width="5" height="5"></td>';
		output+='<td bgcolor="#EAEAEA"><img src="'+staticPath+'/img/dot_trans.gif" width="7" height="1"></td>';
		output+='<td bgcolor="#EAEAEA"><img src="'+staticPath+'/img/dot_trans.gif" width="156" height="1"></td>';
		output+='<td bgcolor="#EAEAEA"><img src="'+staticPath+'/img/dot_trans.gif" width="7" height="1"></td>';
		output+='<td><img src="'+staticPath+'/img/gx_findbook_corner_light_t_r.gif" width="5" height="5"></td>';
		output+='</tr><tr bgcolor="#EAEAEA"><td colspan="5"><img src="'+staticPath+'/img/dot_trans.gif" width="180" height="1"></td></tr>';
		output+='<tr bgcolor="#EAEAEA"><td colspan="2">&nbsp;</td><td><table border="0" cellpadding="0" cellspacing="0" width="156">';
		output+='<tr valign="top"><td><img src="'+staticPath+'/img/bn_info_icon_grey.gif"></td></tr></table></td>';
		output+='<td colspan="2">&nbsp;</td></tr>';
		output+='<tr bgcolor="#EAEAEA"><td colspan="5"><img src="'+staticPath+'/img/dot_trans.gif" width="180" height="6"></td></tr>';
		output+='<tr bgcolor="#FFFFFF"><td colspan="5"><img src="'+staticPath+'/img/dot_trans.gif" width="180" height="6"></td></tr>';
		output+='<tr bgcolor="#FFFFFF"><td colspan="2">&nbsp;</td><td>';
		output+='<table border="0" cellpadding="0" cellspacing="0" width="156">';
		output+='<tr valign="top"><td><b>' + infoTxt[which][0] + '</b><br>';
		output+= infoTxt[which][1];
		output+='</td></tr></table></td><td colspan="2">&nbsp;</td></tr>';
		output+='<tr bgcolor="#FFFFFF"><td colspan="5"><img src="'+staticPath+'/img/dot_trans.gif" width="180" height="6"></td></tr>';
		output+='</table><table border="0" cellpadding="0" cellspacing="0" width="180">';
		output+='<tr><td colspan="5" bgcolor="#EAEAEA"><img src="'+staticPath+'/img/dot_trans.gif" width="1" height="6"></td></tr>';
		output+='<tr bgcolor="#EAEAEA"><td colspan="2">&nbsp;</td><td align="right">';
		output+='<table border="0" cellpadding="0" cellspacing="0" width="44"><tr>';
		output+='<td height="16" class="tdOutStyle" onmouseover="tdOver(this)" onmouseout="tdOut(this)" onclick="hideInfo()" align="center">Close<br>';
		output+='<img src="'+staticPath+'/img/dot_trans.gif" width="1" height="1"></td></tr></table></td><td colspan="2">&nbsp;</td></tr>';
		output+='<tr><td colspan="5" bgcolor="#EAEAEA"><img src="'+staticPath+'/img/dot_trans.gif" width="1" height="5"></td></tr>';
		output+='<tr><td><img src="'+staticPath+'/img/gx_findbook_corner_light_b_l.gif" width="5" height="5"></td>';
		output+='<td bgcolor="#EAEAEA"><img src="'+staticPath+'/img/dot_trans.gif" width="7" height="1"></td>';
		output+='<td bgcolor="#EAEAEA"><img src="'+staticPath+'/img/dot_trans.gif" width="156" height="1"></td>';
		output+='<td bgcolor="#EAEAEA"><img src="'+staticPath+'/img/dot_trans.gif" width="7" height="1"></td>';
		output+='<td><img src="'+staticPath+'/img/gx_findbook_corner_light_b_r.gif" width="5" height="5"></td></tr></table>';
		// *** inforBox layout end ***
		infoLayer.innerHTML = output;
		infoLayer.style.visibility = "visible";
		activeInfo = where;
	}
}

function hideInfo(){
	if(dom){
		infoLayer = document.getElementById("infoBox");
	} else if (ie4) {
		infoLayer = document.all.infoBox;
	}
	infoLayer.style.visibility = "hidden";
}