/*arrWords = new Array();
arrDescription = new Array();
var strRtext = "";
var tempX = 0
var tempY = 0*/
var intFontSize=11;

/*arrWords[0] = "Max New York Life";
arrWords[1] = "premium";
arrWords[2] = "Insurance";

arrDescription[0] = "Max new york life description fdf df dfd fdfd fdf dfd fdf dfdfdf s fdf sdf sdfsd fsdf sdfsd fsdfsd fsdf sfsd fsdf sdf sdfsd fsdf";
arrDescription[1] = "premium description";
arrDescription[2] = "fsfsdfsfsfsdfsdfsdf description";

fDiv = document.getElementById("divSearchableText");
strText = fDiv.innerHTML;

for(i=0; i < arrWords.length; i++){
	strSearch = eval("/"+arrWords[i]+"/gi");
	strRText=strText.replace(strSearch,'<span  style="color:#0000FF;cursor:pointer" onMouseOver="showDiv('+i+');" onMouseOut="hideDiv('+i+');"><u>'+arrWords[i]+'</u></span>'); 
	strText = strRText;
}	
fDiv.innerHTML=strText;*/

function showDiv(pDes){
	fsDiv = document.getElementById("divFSdescription");
	
	fsHTML = fsDiv.innerHTML
	temp = fsHTML.replace("Text",arrDescription[pDes]);
	fsDiv.innerHTML=temp;
	fsDiv.style.display = "block";
	tt = fsDiv.offsetHeight + 15;
	fsDiv.style.left = tempX;
	fsDiv.style.top = tempY - tt;
	
	window.status = " xMousePos=" + fsDiv.style.left + ", yMousePos=" + fsDiv.style.top;
	
	

}
function hideDiv(pDes){
	fsDiv = document.getElementById("divFSdescription");
	
	fsHTML = fsDiv.innerHTML
	temp = fsHTML.replace(arrDescription[pDes],"Text");
	fsDiv.innerHTML=temp;
	fsDiv.style.display = "none";
}


/*strDiv='<div id="divFSdescription" style="position:absolute;width:200px;height:auto;z-index:1000;display:none" onMouseOut="this.style.display=\'none\'">';
strDiv+='<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">';
  strDiv+='<tr>';
    strDiv+='<td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
      strDiv+='<tr>';
        strDiv+='<td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
          strDiv+='<tr>';
            strDiv+='<td valign="top"><img src="../images/images/topLft-cornr.gif" width="5" height="5" /></td>';
            strDiv+='<td style="background-image:url(../images/images/top-bg.gif);background-repeat:repeat-x;width:100%;"><img src="../images/images/spacer.gif" width="1" height="1" /></td>';
            strDiv+='<td valign="top"><img src="../images/images/righttop-corner.gif" width="6" height="5" /></td>';
          strDiv+='</tr>';
        strDiv+='</table></td>';
      strDiv+='</tr>';
      strDiv+='<tr>';
        strDiv+='<td><table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:1px #bababa solid;border-top:none;">';
          strDiv+='<tr>';
            strDiv+='<td style="background:#FFFFFF url(../images/images/main_bg.gif) repeat-x;font-family:Arial, Helvetica, sans-serif;font-size:11px;padding:8px 5px 8px 5px;"><p>Text</p>';
              //strDiv+='<p>&nbsp;</p>';
            strDiv+='</td>';
          strDiv+='</tr>';
        strDiv+='</table></td>';
      strDiv+='</tr>';
      strDiv+='<tr>';
        strDiv+='<td bgcolor="#FFFFFF"><img src="../images/images/spacer.gif" width="1" height="1" /></td>';
      strDiv+='</tr>';
      strDiv+='<tr>';
        strDiv+='<td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
         strDiv+=' <tr>';
            strDiv+='<td><img src="../images/images/lftOrang-crnr.gif" width="6" height="6" /></td>';
            strDiv+='<td style="background-image:url(../images/images/orang_bg.gif);background-repeat:repeat-x;width:100%;"><img src="../images/images/spacer.gif" width="1" height="1" /></td>';
           strDiv+='<td><img src="../images/images/orangRght-crnnr.gif" width="6" height="6" /></td>';
          strDiv+='</tr>';
        strDiv+='</table></td>';
      strDiv+='</tr>';
      strDiv+='<tr>';
        strDiv+='<td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
          strDiv+='<tr>';
            strDiv+='<td valign="top"><img src="../images/images/spacer.gif" width="20" height="1" /></td>';
            strDiv+='<td><img src="../images/images/orange_arrow.gif" width="19" height="10" /></td>';
            strDiv+='<td width="100%"><img src="../images/images/spacer.gif" width="1" height="1" /></td>';
          strDiv+='</tr>';
        strDiv+='</table></td>';
      strDiv+='</tr>';
    strDiv+='</table></td>';
  strDiv+='</tr>';
strDiv+='</table>';
strDiv+='</div>';

document.write(strDiv);


// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;


function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0} 
  window.status = "xMousePos=" + tempX + ", yMousePos=" + tempY;
  return true
}*/

var min=11;
var max=15;
var arrElements = new Array("a","p","span","div","td","ul","li","u")
function increaseFontSize() {
	fDiv = document.getElementById("divSearchableText");
   for(j=0; j < arrElements.length; j++) {
	   var p = fDiv.getElementsByTagName(arrElements[j]);
	   for(i=0;i<p.length;i++) {
		  if(p[i].style.fontSize) {
			 var s = parseInt(p[i].style.fontSize.replace("px",""));
		  } else {
			 var s = 11;
		  }
		  if(s!=max) {
			 s += 1;
		  }
		  p[i].style.fontSize = s+"px"
	   }
	}   
}
function decreaseFontSize() {
	fDiv = document.getElementById("divSearchableText");
	for(j=0; j < arrElements.length; j++) {
	   var p = fDiv.getElementsByTagName(arrElements[j]);
	   for(i=0;i<p.length;i++) {
		  if(p[i].style.fontSize) {
			 var s = parseInt(p[i].style.fontSize.replace("px",""));
		  } else {
			 var s = 11;
		  }
		  if(s!=min) {
			 s -= 1;
		  }
		  p[i].style.fontSize = s+"px"
	   }
	}	      
}