var staticTip = new TipObj('staticTip');
with (staticTip)
{ 
 template = '<table bgcolor="#000000" cellpadding="0" cellspacing="0" width="%2%" border="0">' +
  '<tr><td><table cellpadding="3" cellspacing="1" width="100%" border="0">' +
  '<tr><td bgcolor="#7D90A5"><a href="#" onkeypress="realHideGSPSummary(\'close\');" onclick="realHideGSPSummary(\'close\');"><img src="/g/furn/closebutton.gif" width="20" height="18" alt="(close)" border="0" /></a></td>' +
  '<td bgcolor="#7D90A5" align="center" height="18" class="tipClass"><h3>%3%</h3></td></tr>' +
  '<tr><td colspan="2" bgcolor="#FFFFFF" align="center" height="*" class="tipClass">' +
  '<table style="border:1px solid gray;" cellpadding="3" cellspacing="0">' +
  '<tr class="tablerow0"><td class="bold" align="right">%4%</td><td>Impact</td><td width="14"><img onmouseover="showGlossary(\'91\',\'Impact\')" onmouseout=hideGlossary(\'91\') border="0" src="/g/furn/icon_help2.png" width="14" height="14" /></td></tr>' +
  '<tr class="tablerow1"><td class="bold" align="right">%5%</td><td>One Year Stress Balance</td><td width="14"><img onmouseover="showGlossary(\'92\',\'Stress Balance\')" onmouseout=hideGlossary(\'91\') border="0" src="/g/furn/icon_help2.png" width="14" height="14" /></td></tr>' +
  '<tr class="tablerow0"><td class="bold" align="right">%6%</td><td>One Year Stress Intensity</td><td width="14"><img onmouseover="showGlossary(\'93\',\'Stress Intensity\')" onmouseout=hideGlossary(\'91\') border="0" src="/g/furn/icon_help2.png" width="14" height="14" /></td></tr>' +
  '<tr class="tablerow1"><td class="bold" align="right">%7%</td><td>Five Year Stress Balance</td><td width="14"><img onmouseover="showGlossary(\'94\',\'Stress Balance\')" onmouseout=hideGlossary(\'91\') border="0" src="/g/furn/icon_help2.png" width="14" height="14" /></td></tr>' +
  '<tr class="tablerow0"><td class="bold" align="right">%8%</td><td>Five Year Stress Intensity</td><td width="14"><img onmouseover="showGlossary(\'95\',\'Stress Intensity\')" onmouseout=hideGlossary(\'91\') border="0" src="/g/furn/icon_help2.png" width="14" height="14" /></td></tr>' +
  '<tr class="tablerow1"><td class="bold" align="right"><img src="/g/furn/%9%.gif" height="16" width="16" align="absbottom" />%10%</td><td class="smallstandard">One Year Quarterly Stress Balance Change</td><td width="14"><img onmouseover="showGlossary(\'96\',\'3-month Running Difference\')" onmouseout=hideGlossary(\'91\') border="0" src="/g/furn/icon_help2.png" width="14" height="14" /></td></tr>' +
  '<tr class="tablerow0"><td class="bold" align="right">%11%</td><td class="smallstandard">One Year Quarterly Stress Balance Volatility</td><td width="14"><img onmouseover="showGlossary(\'97\',\'3-month Volatility\')" onmouseout=hideGlossary(\'91\') border="0" src="/g/furn/icon_help2.png" width="14" height="14" /></td></tr>' +
  '<tr class="smallgray" style="background-color:#F0F0F0;"><td class="smallstandard" colspan="3"><em>Last updated: %12%</em></td></tr>' +  
  '<tr class="smallgray" style="background-color:#F0F0F0;"><td class="smallstandard" colspan="3" align="center"><a href="/display.aspx?ItemID=%13%">Click for full detail</a></td></tr>' +
  '<tr style="background-color:white;"><td class="smallstandard" colspan="3"><a href="#" onkeypress="realHideGSPSummary(\'close\');" onclick="realHideGSPSummary(\'close\');">Close this box</a></td></tr>' +
  '</table></td></tr>' +
  '</table></td></tr></table>'
  
  showDelay=50;
  hideDelay=100;
  doFades=false;
  tipStick=0;
}

var GSPGtimerID=null;
var GSPGon=null;
var GSPpermitInterventions=1;
//var alertText='';

function showGSPSummary (num,doTip,argsplit) {
	var setTimer=GSPpermitInterventions;
	//alertText=alertText + '\n' + new Date().getTime() + ' 1. call show ' + num;
	if (setTimer==1 && GSPGtimerID!=null) {
		clearTimeout(GSPGtimerID);
		if (GSPGon!=num) {
//			alertText=alertText+'\n 1a. inshow change ' + GSPGon + ' to ' + num;			
		} else {
			//alertText=alertText+'\n 1a. inshow do not display ' + GSPGon;
			setTimer=0;
		}
		GSPGtimerID=null
	}
	if (setTimer==1) {
		GSPGon=num;
		//alertText=alertText+'\n 1b. inshow display ' + num;
		args=argsplit.split("@:@");
		var area=document.getElementById('area' + num);
		if (area) {
			var coords=area.coords.split(',');
			GSPshowImage(num,coords[0],coords[1],coords[2]);
		}
		if (doTip) {
			staticTip.newTip(num,50,50,350,args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10]);
		}
		hideGSPSummaryTimed(num,15000,1);
	}
}
function hideGSPSummary (num) {
	hideGSPSummaryTimed(num,5000,1);
}
function hideGSPSummaryTimed(num,timerInterval,permitInterventions) {
	GSPpermitInterventions=permitInterventions;
//	alertText=alertText+'\n' + new Date().getTime() + ' 2. call hide timer start ' + num;
	if (num==GSPGon) {
//		alertText=alertText+' STARTED';
		if (GSPGtimerID) {
			clearTimeout(GSPGtimerID);
		}
		GSPGtimerID=setTimeout('realHideGSPSummary(0);',timerInterval);
	}
}

function realHideGSPSummary(num) {
	GSPpermitInterventions=1;
	if (num!='null') {
		//alertText=alertText+'\n' +new Date().getTime() + ' 3. call real hide ' + num;
		GSPrealHideImage();
		staticTip.hide();
		document.getElementById('staticTipLayer').visibility='hidden';
		if (GSPGtimerID) {
			clearTimeout(GSPGtimerID);
		}
	}
	GSPGon=null;
	
	
}

function GSPshowImage(num,thisleft,thistop,size) {
	if (size>0) {
		var imgID='tmpImg';
		var img=document.getElementById(imgID);
		var container=document.getElementById(imgID + 'Container');
		var anch=document.getElementById(imgID + 'Anchor');
		container.style.left=(thisleft - (size)).toString() +"px";
		container.style.top=(thistop - (size)).toString() +"px";
		container.style.visibility='visible';
		img.src = '/images/stresspoint/WhiteCircle.aspx?no=1&radius=' + (size * 2).toString();
		img.width=size*2;
		img.height=size*2;
		anch.href='/oxweb/GlobalStressPoints.aspx?a=a=&1yv=true&displaymode=Summary&ItemID=' + num;
	}
}
function GSPrealHideImage() {
	var imgID='tmpImg';
	var container=document.getElementById(imgID + 'Container');
	container.style.visibility='hidden';
}