

/*
<!--
============================================================
Capturing The Mouse Position in IE4-6 & NS4-6
(C) 2000 www.CodeLifter.com
Free for all users, but leave in this  header
//-->
*/


/* 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;
/* Temporary variables to hold mouse x-y pos.s */
var tempX = 0;var tempY = 0;
/* Main function to retrieve mouse x-y pos.s */
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;} 
/* show the position values in the form named Show *//* in the text fields named MouseX and MouseY */
//	if(getElementObject('xpos')) getElementObject('xpos').innerHTML = "X: " + tempX; //mod by jrh
//	if(getElementObject('ypos')) getElementObject('ypos').innerHTML = "Y: " + tempY; //mod by jrh
return true;}
function getElementObject(eid) { if (document.all) {  return document.all[eid]; } if (document.getElementById) { return document.getElementById(eid); } if(document.layers) {  return document.layers[div_id]; }}
var lastDivID = false;
var dd = new Date();
var lastHit = dd.getMilliseconds();
function ajaxgetimage(divObj,imgname){ var d = new Date(); var curr_msec = d.getMilliseconds(); /*do not allow real quck image display *Flicker effect*/ 
	if( ( curr_msec - lastHit ) < 31 && ( curr_msec - lastHit ) > 0 )
		return true; 
	lastHit = curr_msec; 
	
	if( getElementObject('infobox') ){ 
		
		getElementObject('infobox').innerHTML = '<img id="co_img" src="' + imgname + '" />'; 
		getElementObject('infobox').className='cs_info_holder'; 
		getElementObject('infobox').style.top = tempY - 50; 
		getElementObject('infobox').style.left = tempX + 50; 
		return true; 
	}else{ 
		
		if( lastDivID != false && getElementObject('infobox22') ){ 
			getElementObject('infobox22').innerHTML = '';
			hidebox();			 
		} 
		if( imgname == '' ) 
			return true; 
		
		lastDivID = divObj.id; 

		var coinfo_img = new Image(); 
		coinfo_img.src = imgname;		

		var dv = document.createElement('div'); 
		dv.setAttribute('id',"infobox22"); 
		dv.className="cs_info_holder"; 
		dv.style.position="absolute"; 
		dv.innerHTML = '<img id="co_img" src="' + imgname + '" />'; 
		
		if (typeof document.body.style.maxHeight != "undefined"){
			dv.innerHTML = '<img id="co_img" src="' + imgname + '" >'; 
		}else{
			dv.style.background = '#FFFFFF url(' + imgname + ') no-repeat left center';
			dv.style.width = coinfo_img.width + "px";
			dv.style.height = coinfo_img.height + "px";
		}	
			
		divObj.appendChild(dv); return true; 
	} 
}
function hidebox(){
		if( getElementObject('infobox') ){ 

			getElementObject('infobox').innerHTML = '';
			getElementObject('infobox').className='cs_info_hidden';
		}else{

			if( lastDivID != false && getElementObject('infobox22') ){
				getElementObject( lastDivID ).removeChild( getElementObject('infobox22') );	
			}else{
				//alert("No" + lastDivID);
			}
		}
}

function hideDeff( lookupReq ){lookupReq = lookupReq == 2 ? 1 : lookupReq;var div_name = 'ambest_' + lookupReq;if( getElementObject( div_name ) ){getElementObject( div_name ).style.display = "none";}}	
function getDeff( lookupReq ){var thisObj; var div_copy = '';lookupReq = lookupReq == 2 ? 1 : lookupReq;var div_ex_copy = '<br /><br /><div align="right"><a href="javascript:hideDeff(' + lookupReq + ');"> - Close Box - </a></div>';var div_name = 'ambest_' + lookupReq;if( getElementObject( div_name ) ){thisObj = getElementObject( div_name );switch( lookupReq ){case '3': div_copy = 'Demotech, Inc. is an actuarial consulting<br> and financial analysis firm located in<br> Columbus, Ohio. their rating process<br> provides an objective baseline for assessing<br> solvency which in turn provides insight<br> into changes in financial stability.  Financial<br> Stability Ratings&reg; are based upon a series<br> of quantitative ratios and quantitative<br> considerations which together comprise our<br> Financial Stability Analysis Model&reg;.<br><br /><a href="http://demotech.com" target="_blank">http://demotech.com</a>';break;case '1':case '2':default:div_copy = 'A worldwide insurance-rating and information<br />agency with more than 100 years of history.<br /><br />The largest and longest-established company<br />devoted to issuing in-depth reports and financial-<br />strength ratings about insurance organizations.<br /><a href="http://www.ambest.com" target="_blank">http://www.ambest.com</a>';break;}if( div_copy != '' ){ thisObj.innerHTML = div_copy + div_ex_copy; thisObj.className = 'cs_info_holder_am'; thisObj.style.display = "block";}}}
