function doEndorsements()
{
	if (endorsementStructures.length > 0 )
	{
	document.writeln('<p class="title">This quotation has the following endorsements</p>')
	document.writeln('<table width="600" class="stripesColour" id="theTable" border="0" cellpadding="0" cellspacing="0">')						
	}		

	if (endorsementStructures.length == 0 )
	{
		document.writeln('<p class="title">There are no endorsements on this policy</p>')
		return;
	}
	
	for ( i=0; i < endorsementStructures.length; i++ )
		{	
			{			
			div1 = "'"
			div1 = div1 + endorsementStructures[i].Code
			div1 = div1 + '' +  endorsementStructures[i].PropertyId
			div1 = div1 + "'"
			div2 = "'"
			div2 = div2 + endorsementStructures[i].Code
			div2 = div2 + '' +  endorsementStructures[i].PropertyId
			div2 = div2 + "ALL'"

document.writeln('<div id=' + div1 + ' class="show"><a href="javascript:void(0)" target="_self" class="qnavb" onclick="hideXtra (' + div1 + '); showXtra (' + div2 + ');"><strong>' + endorsementStructures[i].Code + ' - ' + endorsementStructures[i].Title + '</strong>')

if (endorsementStructures[i].PropertyId > 0)
{
document.writeln('&nbsp;&nbsp;(Applicable to premises ' +  endorsementStructures[i].PropertyId + ')')	
}

document.writeln('&nbsp;&nbsp;(click for more detail) </a></div><div id=' + div2 + ' class="hide"><a href="javascript:void(0)" target="_self" class="qnavb" onclick="hideXtra (' + div2 + '); showXtra (' + div1 + ');"><strong>' + endorsementStructures[i].Code + ' - ' + endorsementStructures[i].Title + '</strong>')

if (endorsementStructures[i].PropertyId > 0)
{
document.writeln('&nbsp;&nbsp;(Applicable to premises ' +  endorsementStructures[i].PropertyId + ')')	
}

document.writeln('(click to hide detail) </a><br/><br/>' + endorsementStructures[i].Wording + '</div><br>');			
			}								
		}
	
	if (endorsementStructures.length > 0 )
	{
	document.writeln('</table>')
	}		
	
}


function doRenewalEndorsements(sameInsurer, IsRenewal)
{
	if (IsRenewal)
	{
		if (sameInsurer) 
		{

if (renewalEndorsementStructures.length > 0 )
			{
			document.writeln('<DIV id=renewals name=renewals class=show>')		
			document.writeln('<br><p class="title"><a href="#" onclick="showXtra(\'renewals1\'); hideXtra(\'renewals\');" class="red" >Click here to show the endorsements applicable to last year&acute;s policy</a></p>')
			document.writeln('</DIV>')
			}

			if (renewalEndorsementStructures.length == 0 )
			{
					document.writeln('<p class="title">There were no endorsements on the expiring policy</p>')
				return;
			}

			document.writeln('<DIV id=renewals1 name=renewals1 class=hide>')
			document.writeln('<br><p class="title"><a href="#" onclick="hideXtra(\'renewals1\'); showXtra(\'renewals\');" class="red">Click here to hide the endorsements applicable to last year&acute;s policy</a></p>')

			for ( i=0; i < renewalEndorsementStructures.length; i++ )
				{	
					{			
					
					div1 = "'renew"
					div1 = div1 + renewalEndorsementStructures[i].Code
					div1 = div1 + '' +  renewalEndorsementStructures[i].PropertyId
					div1 = div1 + "'"
					div2 = "'renew"
					div2 = div2 + renewalEndorsementStructures[i].Code
					div2 = div2 + '' +  renewalEndorsementStructures[i].PropertyId
					div2 = div2 + "ALL'"
		
		document.writeln('<div id=' + div1 + ' class="show"><a href="javascript:void(0)" target="_self" class="qnavb" onclick="hideXtra (' + div1 + '); showXtra (' + div2 + ');"><strong>' + renewalEndorsementStructures[i].Code + ' - ' + renewalEndorsementStructures[i].Title + '</strong>&nbsp;&nbsp;(click for more detail) </a></div><div id=' + div2 + ' class="hide"><a href="javascript:void(0)" target="_self" class="qnavb" onclick="hideXtra (' + div2 + '); showXtra (' + div1 + ');"><strong>' + renewalEndorsementStructures[i].Code + ' - ' + renewalEndorsementStructures[i].Title + '</strong>&nbsp;&nbsp;(click to hide detail) </a><br/><br/>' + renewalEndorsementStructures[i].Wording + '</div><br>');			
					}								
				}

			document.writeln('</DIV>')

		}
		{
		}
		return;
	}
	{	
	return;
	}
}


function showFQimage(Qset,page,paymentResult)
{
if (Qset == 1)
	{
	 if (page == 1)	
	 {
		document.writeln('<img src="/images/title_shops' + page + 'a.gif"  alt="Get a Quote - Retail &amp; Shops" border="0" />')
		return;		
	 }
	 else (paymentResult==0)
	 {
		document.writeln('<img src="/images/title_shops3.gif"  alt="Get a Quote - Retail &amp; Shops" border="0" />')
		return;
	 }
	 {
		document.writeln('<img src="/images/title_shops' + page + '.gif"  alt="Get a Quote - Retail &amp; Shops" border="0" />')
		return;
	 }
	}
	else if (Qset == 2)
	{
	document.writeln('<img src="/images/title_office' + page + '.gif"  alt="Get a Quote - Retail &amp; Shops" border="0" />')
	}
	else if (Qset == 3)
	{
		 if (page == 1)	
			 {
				document.writeln('<img src="/images/title_surgery' + page + 'a.gif"  alt="Get a Quote - Surgery &amp; Clinics" border="0" />')
				return;
			 }
			 else (paymentResult==0)
			 {
				document.writeln('<img src="/images/title_surgery3.gif"  alt="Get a Quote - Surgery &amp; Clinics" border="0" />')
				return;
			 }
			 {
				document.writeln('<img src="/images/title_surgery' + page + '.gif"  alt="Get a Quote - Surgery &amp; Clinics" border="0" />')
				return;
			 }
	}
	else if (Qset == 4)
	{
	 if (page == 1)	
	 {
		document.writeln('<img src="/images/title_trades' + page + 'a.gif"  alt="Get a Quote - Tradesmen &amp; Contractors" border="0" />')
		return;
	 }
		else (paymentResult==0)
	 {
		document.writeln('<img src="/images/title_trades3.gif"  alt="Get a Quote - Tradesmen &amp; Contractors" border="0" />')
		return;
	 }	 
	 {
		document.writeln('<img src="/images/title_trades' + page + '.gif"  alt="Get a Quote - Tradesmen &amp; Contractors" border="0" />')
		return;

	 }
	}
	else if (Qset == 5)
	{
 if (page == 1)	
	 {
		document.writeln('<img src="/images/title_rpo' + page + 'a.gif"  alt="Get a Quote - Residential Property Owners" border="0" />')
		return;
	 }
	 else (paymentResult==0)
	 {
		document.writeln('<img src="/images/title_rpo3.gif"  alt="Get a Quote - Residential Property Owners" border="0" />')
		return;
	 }	 
	 {
		document.writeln('<img src="/images/title_rpo' + page + '.gif"  alt="Get a Quote - Residential Property Owners" border="0" />')
		return;

	 }	}
	else if (Qset == 7)
	{
	document.writeln('<img src="/images/title_tutors' + page + '.gif"  alt="Get a Quote - Retail &amp; Shops" border="0" />')
	}
	else if (Qset == 8)
	{
	 if (page == 1)	
	 {
		document.writeln('<img src="/images/title_pubs' + page + 'a.gif"  alt="Get a Quote - Restuarants, Wine Bars &amp; Public Houses" border="0" />')
		return;
	 }
	  else (paymentResult==0)
	 {
		document.writeln('<img src="/images/title_pubs3.gif"  alt="Get a Quote - Restuarants, Wine Bars &amp; Public Houses" border="0" />')
		return;
	 }	 
	 {
		document.writeln('<img src="/images/title_pubs' + page + '.gif"  alt="Get a Quote - Restuarants, Wine Bars &amp; Public Houses" border="0" />')
		return;

	 }
	}
	else if (Qset == 17)
	{
	 if (page == 1)	
	 {
		document.writeln('<img src="/images/title_directors' + page + 'a.gif"  alt="Get a Quote - Directors &amp; Officers" border="0" />')
		return;
	 }
	   else (paymentResult==0)
	 {
		document.writeln('<img src="/images/title_directors3.gif"  alt="Get a Quote - Directors &amp; Officers" border="0" />')
		return;
	 }	 
	 {
		document.writeln('<img src="/images/title_directors' + page + '.gif"  alt="Get a Quote - Directors &amp; Officers" border="0" />')
		return;

	 }
	}
	else if (Qset == 19)
	{
	 if (page == 1)	
	 {
		document.writeln('<img src="/images/title_prof' + page + 'a.gif"  alt="Get a Quote - Professionals" border="0" />')
		return;
	 }
	    else (paymentResult==0)
	 {
		document.writeln('<img src="/images/title_prof3.gif"  alt="Get a Quote - Professionals" border="0" />')
		return;
	 }	 
	 {
		document.writeln('<img src="/images/title_prof' + page + '.gif"  alt="Get a Quote - Professionals" border="0" />')
		return;

	 }
	}
	
	

}


function showrenewals()
{
	
	if (renewalList.length > 0 )
	{
	document.writeln('<p class="title">Renewals :</p><br>')
	document.writeln('<table width="600" class="stripesColour" id="theTable" border="0" cellpadding="0" cellspacing="0">')						
	}		
		
	for ( i=0; i < renewalList.length; i++ )
	{	
	
		{
			for ( j=0; j < renewalList[i].Quotes.length; j++ )	
			{

				
				onclicklink = "javascript:SubmitClickConfirm('NAVGOTORENEWAL', '"
															 
				onclicklink = onclicklink + (renewalList[i].Quotes[j].FirstPage)
				onclicklink = onclicklink + "|"
				onclicklink = onclicklink + (renewalList[i].Quotes[j].ProposalNo)
				
				onclicklink = onclicklink + "', true, '')"
				
			document.writeln('<tr height="25px" >')
				document.writeln('<td><img src="/images/bullet-r.gif" width="7" height="11" border="0" />&nbsp;&nbsp;<a href="#" onclick="' + onclicklink + '" target="_self" class="black">' + (renewalList[i].COB) + ' <strong>' + (renewalList[i].Quotes[j].ProposalNo) + ' (' + (renewalList[i].Quotes[j].ShortCode) + ')</strong> ' + (renewalList[i].Quotes[j].Effective) + ' ' + (renewalList[i].Quotes[j].CompanyName) + ' </a></td>')
			document.writeln('</tr>')
			}
		}
							

}
	if (renewalList.length > 0 )
	{
	document.writeln('</table>')
	}		
}

function doclaims()
{
	for ( i=0; i < claimsNumbers.length; i++ )
	{
		document.writeln ('<tr>');
					document.writeln ('<td width=50% ><img src="/images/bullet-r.gif" width="7" height="11" border="0" />&nbsp;&nbsp;');		
						document.writeln (claimsNumbers[i].InsurerName)
					document.writeln ('</td>');		
					document.writeln ('<td width=50% align=right>');		
						document.writeln (claimsNumbers[i].PhoneNo)
					document.writeln ('</td>');		
		document.writeln ('</tr>');
		}	
}


function showpolicies()
{
	for ( i=0; i < policyList.length; i++ )
	{	
		{
			for ( j=0; j < policyList[i].Quotes.length; j++ )	
			{
								
				onclick="javascript:SubmitClickConfirm('NAVSUBMIT', 'policy.htm|IP08ASURG00000150600', true, '')"
				
				onclicklink = "javascript:SubmitClickConfirm('NAVSUBMIT', 'policy.htm|"
				
				onclicklink = onclicklink + (policyList[i].Quotes[j].PolicyNo)
				
				onclicklink = onclicklink + "', true, '')"
								
			document.writeln('<tr valign="bottom">')
				document.writeln('<td><img src="/images/bullet-r.gif" width="7" height="11" border="0" />&nbsp;&nbsp;<a href="#" onclick="' + onclicklink + '" target="_self" class="black">' + (policyList[i].COB) + ' <strong>' + (policyList[i].Quotes[j].PolicyNo) + ' (' + (policyList[i].Quotes[j].ShortCode) + ')</strong> ' + (policyList[i].Quotes[j].Effective) + ' ' + (policyList[i].Quotes[j].CompanyName) + ' </a></td>')
			document.writeln('</tr>')
			}
		}
	}
}



function showquotes()
{
	for ( i=0; i < quoteList.length; i++ )
	{	
		{
			for ( j=0; j < quoteList[i].Quotes.length; j++ )	
			{
				
				onClick="javascript:SubmitClickConfirm('NAVGOTOPROPOSAL', 'FQResult.htm|IP08XX00000000013243', true, '')"
				
				onclicklink = "javascript:SubmitClickConfirm('NAVGOTOPROPOSAL', 'FQResult.htm|"
				
				onclicklink = onclicklink + (quoteList[i].Quotes[j].ProposalNo)
				
				onclicklink = onclicklink + "', true, '')"
								
			document.writeln('<tr valign="bottom" align="left">')
				document.writeln('<td><img src="/images/bullet-r.gif" width="7" height="11" border="0" />&nbsp;&nbsp;<a href="#" onclick="' + onclicklink + '" target="_self" class="black">' + (quoteList[i].COB) + ' <strong>' + (quoteList[i].Quotes[j].ProposalNo) + ' (' + (quoteList[i].Quotes[j].ShortCode) + ')</strong> ' + (quoteList[i].Quotes[j].ValidFrom) + ' ' + (quoteList[i].Quotes[j].CompanyName) + ' </a></td>')
			document.writeln('</tr>')
	
			}
		}
	}
}


function showinfo()
	{

	off = "''"	
	helppanel = "'hideBubble()'"


for ( i=0; i < insurerResults.length; i++ )
	{

insurertext = "'"
//insurertext = ""
				insurertext = insurertext + '' + (insurerResults[i].Blurb) + "'"
				
				insurertext = insurertext.replace("^","&acute;")
				
document.writeln ('<table cellspacing="0" cellpadding="0" border="0" class="quote_bg"><tr valign="middle"><td class="q_left">&nbsp;</td>');
document.writeln ('<td class="q_insurer"><a href=javascript:NewWindow("..' + (insurerResults[i].BlurbURL) + '","",634,440,"no","yes","yes","yes","yes") class="rotxtbk" onmouseover="showBubble(' + insurertext + ')" onmouseout="setTimeout(' + helppanel + ',0);return true" onclick="this.blur()"><img src=' + (insurerResults[i].Icon) + ' alt=' + (insurerResults[i].Insurer) + ' ></a></td>');
					document.writeln ('<td class="q_price">');
					
						if(insurerResults[i].Status == "Quote") {
					document.writeln('<strong>&pound;' + (insurerResults[i].Price) + '</Strong><br /><font style="font-size:0.7em"> Annual Premium</a>');
							}

					
						else if (insurerResults[i].Status == "Refer") {
							
							refertext = "'The price shown is indicative only and we need to clarify some aspects of the cover you require before you take up this quotation.<br><br><b>Please call us on 0845 505 5000.<br><br>Alternatively, we can call you. Please click &acute;Need Help?&acute; above and email us with a convenient time.</b><br><br>Please quote the following reference number when you contact us:<br /><br />Quotation Reference:"
														
							refertext = refertext + '<br>' + (insurerResults[i].QuoteRef) + '<br><br>PLEASE NOTE : Telephone calls may be recorded for quality and training purposes<br><br><b>The referral is for the following reasons</b>:'
							
							
							for ( j=0; j < insurerResults[i].Referrals.length; j++ )					
							{
								refertext = refertext + '<br>' + (insurerResults[i].Referrals[j].Reason) + '<br>'
							}
							
							refertext = refertext + "'"					
							document.writeln('<strong>&pound;' + (insurerResults[i].Price) + '<font style="font-size:0.7em"></Strong><br />Please Call Us<br /></font>');
							document.writeln('<a href="javascript:void(0)" class="red" onmouseout="setTimeout(' + helppanel + ',0);return true" onmouseover="showBubble(' + refertext + ')"  onclick=this.blur()><font style="font-size:0.7em">See Details Here</font></a>');								

						} 
						else if (insurerResults[i].Status == "Decline") {

							refertext = "'We are sorry that this Insurer has declined to quote.  However, we can still assist in arranging cover for you. <br><br><b>Please call us on 0845 505 5000.<br><br>Alternatively, we can call you. Please click &acute;Need Help?&acute; above and email us with a convenient time.</b><br><br><b>The Insurer has declined for the following reasons:</b>"
																					
							for ( j=0; j < insurerResults[i].Declines.length; j++ )					
							{
								refertext = refertext + '<br />' + (insurerResults[i].Declines[j].Reason) + '<br />'

							}
							
							refertext = refertext + "'"
							document.writeln('<strong><font style="font-size:0.7em">Please Call Us</font></Strong><br />');
							document.writeln('<a href="javascript:void(0)" class="red" onmouseout="setTimeout(' + helppanel + ',0);return true" onmouseover="showBubble(' + refertext + ')"  onclick=this.blur()><font style="font-size:0.7em">See Details Here</font></a>');								

						}				
					document.writeln ('</td>');
					document.writeln ('<td class="q_monthly" align="center">');			
						if(insurerResults[i].Status == "Quote" || insurerResults[i].Status == "Refer") {
							document.writeln ('1st Payment: &pound;' + (insurerResults[i].Deposit) + ' + <br />9 Monthly Payments<br />of <strong>&pound;' + (insurerResults[i].Instalment) + '</strong>');
						} else {
							document.writeln ('No premium<br />information<br />available')	;
						}			
					document.writeln ('</td>');
					document.writeln ('<td class="q_docs" align="left">');
						if (insurerResults[i].Status == "Quote" || insurerResults[i].Status == "Refer") 
						{
						document.writeln('<img src="../images/bullet-r.gif" border="0" />');
						document.writeln('<a href=javascript:NewWindow("..' +  (insurerResults[i].TermsURL) + '","termsWin",700,440,"no","yes","yes","yes","yes")  class="black">Terms/Base Excess</a><br />');
						}
						document.writeln('<img src="../images/bullet-r.gif" border="0" />');
						document.writeln('<a href=javascript:NewWindow("..' +  (insurerResults[i].SummaryURL) + '","socWin",700,440,"no","yes","yes","yes","yes")  class="black">Sums Insured Summary</a><br />');
						if (insurerResults[i].Status == "Quote") 
						{
						document.writeln('<img src="../images/bullet-r.gif" border="0" /> <a href="#" onclick=javascript:doSOFDownload("' + (insurerResults[i].SchemeRef) + '")  class="black">Statement of Facts</a><br />');
						document.writeln('<img src="../images/bullet-r.gif" border="0" /> <a href="#" onclick=javascript:doQScheduleDownload("' + (insurerResults[i].SchemeRef) + '") class="black">Quotation Schedule</a><br />');
						document.writeln('<img src="../images/bullet-r.gif" border="0" /> <a href="#" onclick=javascript:doKeyFactsDownload("' + (insurerResults[i].SchemeRef) + '") class="black">Summary of Cover</a>');
						}
					document.writeln ('</td>');
					document.writeln ('<td align="left">');
					if(insurerResults[i].Status == "Quote") 
							{							
					
					imgname = "'buypolicy"
					imgname = imgname + (insurerResults[i].SchemeRef) + "'"
					imgreplace = "'../images/buy-quote-o.gif'"
					nothing = "''"
				
	document.writeln ('<a href="#" onmouseout="MM_swapImgRestore()" onclick="' + (insurerResults[i].BuyLink) + '" class="btn_buy">BUY NOW</a><br>');
							} 
					
									save = "'savequote.htm'"
									imgname = "'savepolicy"
									imgname = imgname + (insurerResults[i].SchemeRef) + "'"
									imgreplace = "'../images/saveq-o.gif'"
									nothing = "''"
									
							document.writeln('<a href="javascript:doSubmit(' + save + ', 0, 0)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(' + imgname + ',' + nothing + ',' + imgreplace + ',1)" class="btn_saveq">Save</a>');
					document.writeln ('</td>');
				document.writeln ('</tr>');
				document.writeln ('</table>');
		}	
}

function dologos()
{
	for ( i=0; i < insurerLogoInfo.length; i++ )
	{

			if((insurerLogoInfo[i].Icon == "/images/mond.gif") || (insurerLogoInfo[i].Icon == "/images/hl-sterling.gif"))
			{
			
			}
			else
			{
				
				
					off = "''"	
					helppanel = "hideBubble()"
					
						insurertext = "'"
		
						insurertext = insurertext + '' + (insurerLogoInfo[i].Blurb) + "'"
						
						insurertext = insurertext.replace("^","&acute;")
				
							document.writeln ('<a style="cursor:default;" href="javascript:void(0)" onmouseout="' + helppanel + '" onmouseover="showBubble(' + insurertext + ');return true"><img src=' + (insurerLogoInfo[i].Icon) + '></a><br />');
			
			}
	}	
}



function doproperty()
{
	
	for ( i=0; i < propertyList.length; i++ )
	{		

				document.writeln ('<table width="600" border="0" cellpadding="0" cellspacing="0" class="bodytxt"><colgroup><col width="20px" /><col width="20px" /><col width="190px" /><col width="250px" /><col width="20px" /><col width="120px" /></colgroup><tr valign="top"><td align="right"><strong>')
				document.writeln (propertyList[i].PropertyID)
				document.writeln ('</strong></td><td>&nbsp;&nbsp;<img src="/images/bullet-r.gif" width="7" height="11" border="0" /></td><td>')
				document.writeln (propertyList[i].Address1)
				document.writeln ('<br>')
				document.writeln (propertyList[i].Address2)
				document.writeln ('<br>')
				document.writeln (propertyList[i].Address3)
				document.writeln ('<br>')
				document.writeln (propertyList[i].Address4)
				document.writeln ('<br>')
				document.writeln (propertyList[i].Address5)
				document.writeln ('<br>')
				document.writeln (propertyList[i].Address6)
				document.writeln ('<br>')
				document.writeln (propertyList[i].AddressPC)
				document.writeln ('</td><td align="right">')
				document.writeln ('Buildings:<br />Inflation Protection:<br />Communal contents:<br />Landlord&quot;s contents:<br />Subsidence cover:<br />Loss of Rent:<br />Loss of Rent Indemnity period:</td><td>&nbsp;<img src="/images/bullet-r.gif" width="7" height="11" border="0" /><br />&nbsp;<img src="/images/bullet-r.gif" width="7" height="11" border="0" /><br />&nbsp;<img src="/images/bullet-r.gif" width="7" height="11" border="0" /><br />&nbsp;<img src="/images/bullet-r.gif" width="7" height="11" border="0" /><br />&nbsp;<img src="/images/bullet-r.gif" width="7" height="11" border="0" /><br />&nbsp;<img src="/images/bullet-r.gif" width="7" height="11" border="0" /><br />&nbsp;<img src="/images/bullet-r.gif" width="7" height="11" border="0" /></td><td><strong>')
				document.writeln ((propertyList[i].Buildings) + '<br />' + (propertyList[i].Inflation) + '<br />' + (propertyList[i].Communal) + '<br />' + (propertyList[i].Landlord) + '<br />' + (propertyList[i].Subsidence) + '<br />' + (propertyList[i].LossOfRent) + '<br />' + (propertyList[i].LossOfRentIndemnity) + '</strong></td></tr><tr><td colspan="6"><img src="/13/images/shim.gif" width="1" height="12" border="0" /></td></tr><td colspan="3">&nbsp;</td><td></td><td>&nbsp;</td><td></td><tr><td colspan="4"><img src="/13/images/shim.gif" alt="" width="1" height="7" border="0" /></td></tr></table><table width="600" border="0" cellpadding="0" cellspacing="0" class="bodytxt" ><tr><td width=345 align=center><a href="#" onclick="' + (propertyList[i].EditLink) + '">Edit Details</a></td><td width=345  align=center><a href="#" onclick="' + (propertyList[i].RemoveLink) + '">Remove Details</a></td></tr></table><br>')
		}	
}


function doSubmit(url, save, Qset) {
     if ((save == 1) && (Qset != 0)) {
	SubmitClickConfirm('NAVSUBMIT',url, true, 'This will leave the quote. Information you have changed on this page will not be saved.\n Are you sure you want to continue?');}
     else {	
     	SubmitClickConfirm('NAVSUBMIT',url, true, '');}
}

function doDocumentSubmit(url, save, Qset) {
var windowname = url;
var	position = windowname.indexOf('|');
	windowname = windowname.substr(position+1, windowname.length-position);
	
	if (Qset != 0) {
		NewPDF('/documentprogress.htm', windowname, 660, 440, 'no', 'yes', 'yes', 'yes', 'yes');
		SubmitClickConfirm('NAVDOCSUBMIT',url, false, '');}
	else {
		NewPDF('/documentprogress.htm', windowname, 660, 440, 'no', 'yes', 'yes', 'yes', 'yes');
		SubmitClickConfirm('NAVSUBMIT',url, true, '');}
}

function doKeyFactsDownload(url) {
	NewPDF('/documentprogress.htm', 'DOC_KEYFACTS', 660, 440, 'no', 'yes', 'yes', 'yes', 'yes');
	return SubmitClickConfirm('NAVKEYFACTS',url, false, '');
	
}

function doDocumentDownload(url) {
var windowname = url;
var	position = windowname.indexOf('|');
	windowname = windowname.substr(0, position-1);	
	NewPDF('/documentprogress.htm', 'POLICY_DOCUMENT', 660, 440, 'no', 'yes', 'yes', 'yes', 'yes');
	SubmitClickConfirm('NAVDOCDOWNLOAD',url, false, '');
}

function doMTADocumentDownload(url) {
	NewPDF('/documentprogress.htm', 'MTA_DOCUMENT', 660, 440, 'no', 'yes', 'yes', 'yes', 'yes');
	SubmitClickConfirm('NAVMTADOCDOWNLOAD',url, false, '');
	return false;
}

function doQScheduleDownload(url) {
	NewPDF('/documentprogress.htm', 'DOC_PSCHED', 660, 440, 'no', 'yes', 'yes', 'yes', 'yes');
	return SubmitClickConfirm('NAVQSCHEDULE',url, false, '');
	
}

function doSOFDownload(url) {
	NewPDF('/documentprogress.htm', 'DOC_SOF', 660, 440, 'no', 'yes', 'yes', 'yes', 'yes');
	return SubmitClickConfirm('NAVSOF',url, false, '');
	
}

function NewPDF(mypage, myname, w, h, tools, menu, scrolling, resize, stat) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar='+tools+',menubar='+menu+',scrollbars='+scrolling+',resizable='+resize+',status='+stat;
	win = window.open(mypage, myname, winprops)
	if (!win) { alert('You must disable your browser\'s pop-up blocker for this site in order to access this function correctly');}
	//if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


function mailto(user, domain) { window.location = "mailto:" + user + "@" + domain; }


function doFooter (loggedin) {
	document.writeln ('<table width="960" cellspacing="0" cellpadding="0" border="0">');
		document.writeln ('<tr><td align="center"><img src="/images/shim.gif" alt="" width="1" height="10" /></td></tr>');
		document.writeln ('<tr><td align="center"><img src="/images/purple.gif" alt="" width="944" height="3" /></td></tr>');
		document.writeln ('<tr>');
			document.writeln ('<td align="center" valign="top" class="doNotPrint">');
				document.writeln ('<p class="footer"><strong>');
	if (loggedin) {
					document.writeln ('<a href="javascript:doSubmit(\'logoutclose\', 0, 0)" accesskey="L" class="footlink">Log Out</a> &nbsp;|&nbsp;'); 
					document.writeln ('<a href="javascript:doSubmit(\'about.htm\', 0, 0)" accesskey="U" class="footlink">About Us</a> &nbsp;|&nbsp;');
					document.writeln ('<a href="javascript:doSubmit(\'feedback.htm\', 0, 0)" accesskey="F" class="footlink">Feedback</a> &nbsp;|&nbsp;');
					document.writeln ('<a href="javascript:doSubmit(\'contact.htm\', 0, 0)" accesskey="C" class="footlink">Contact</a> &nbsp;|&nbsp;');
					document.writeln ('<a href="javascript:doSubmit(\'sitemap.htm\', 0, 0)" accesskey="S" class="footlink">Site Map</a> &nbsp;|&nbsp;'); 
					document.writeln ('<a href="javascript:doSubmit(\'access.htm\', 0, 0)" accesskey="A" class="footlink">Accessibility</a> &nbsp;|&nbsp;');
					document.writeln ('<a href="javascript:doSubmit(\'privacy.htm\', 0, 0)" accesskey="P" class="footlink">Privacy</a> &nbsp;|&nbsp;');
					document.writeln ('<a href="javascript:doSubmit(\'legal.htm\', 0, 0)" accesskey="T" class="footlink">Terms &amp; Conditions</a></p></td>');
	} else {
					document.writeln ('<a href="javascript:doSubmit(\'login.htm\', 0, 0)" accesskey="L" class="footlink">Log In</a> &nbsp;|&nbsp;'); // FUDGED
					document.writeln ('<a href="javascript:doSubmit(\'about.htm\', 0, 0)" accesskey="U" class="footlink">About Us</a> &nbsp;|&nbsp;'); // FUDGED
					document.writeln ('<a href="javascript:doSubmit(\'feedback.htm\', 0, 0)" accesskey="F" class="footlink">Feedback</a> &nbsp;|&nbsp;'); // FUDGED
					document.writeln ('<a href="javascript:doSubmit(\'contact.htm\', 0, 0)" accesskey="C" class="footlink">Contact</a> &nbsp;|&nbsp;'); // FUDGED
					document.writeln ('<a href="javascript:doSubmit(\'sitemap.htm\', 0, 0)" accesskey="S" class="footlink">Site Map</a> &nbsp;|&nbsp;'); // FUDGED
					document.writeln ('<a href="javascript:doSubmit(\'access.htm\', 0, 0)" accesskey="A" class="footlink">Accessibility</a> &nbsp;|&nbsp;');  // FUDGED
					document.writeln ('<a href="javascript:doSubmit(\'privacy.htm\', 0, 0)" accesskey="P" class="footlink">Privacy</a> &nbsp;|&nbsp;'); // FUDGED
					document.writeln ('<a href="javascript:doSubmit(\'legal.htm\', 0, 0)" accesskey="T" class="footlink">Terms &amp; Conditions</a></strong></p></td>'); // FUDGED
	}
		document.writeln ('</tr>');
		document.writeln ('<tr><td align="center" valign="top"><p class="footer">click2compare.com is a trading style of iprism Underwriting Agency Limited who is authorised and regulated by the Financial Services Authority (FSA).</p></td></tr>');
		document.writeln ('<tr><td align="center"><img src="/images/shim.gif" alt="" width="1" height="10" /></td></tr>');
	document.writeln ('</table>');
}

function doFooter1 (loggedin) {
	document.writeln ('<table width="960" cellspacing="0" cellpadding="0" border="0">');
		document.writeln ('<tr><td align="center"><img src="/images/shim.gif" alt="" width="1" height="10" /></td></tr>');
		document.writeln ('<tr><td align="center"><img src="/images/purple.gif" alt="" width="944" height="3" /></td></tr>');
		document.writeln ('<tr>');
			document.writeln ('<td align="center" valign="top" class="doNotPrint">');
				document.writeln ('<p class="footer"><strong>');
					document.writeln ('<a href="/ipdirect.dll/ENTER?page=login.htm" accesskey="L" class="footlink">Log In</a> &nbsp;|&nbsp;'); // FUDGED
					document.writeln ('<a href="/ipdirect.dll/ENTER?page=about.htm" accesskey="U" class="footlink">About Us</a> &nbsp;|&nbsp;'); // FUDGED
					document.writeln ('<a href="/ipdirect.dll/ENTER?page=feedback.htm" accesskey="F" class="footlink">Feedback</a> &nbsp;|&nbsp;'); // FUDGED
					document.writeln ('<a href="/ipdirect.dll/ENTER?page=contact.htm" accesskey="C" class="footlink">Contact</a> &nbsp;|&nbsp;'); // FUDGED
					document.writeln ('<a href="/ipdirect.dll/ENTER?page=sitemap.htm" accesskey="S" class="footlink">Site Map</a> &nbsp;|&nbsp;'); // FUDGED
					document.writeln ('<a href="/ipdirect.dll/ENTER?page=access.htm" accesskey="A" class="footlink">Accessibility</a> &nbsp;|&nbsp;');  // FUDGED
					document.writeln ('<a href="/ipdirect.dll/ENTER?page=privacy.htm" accesskey="P" class="footlink">Privacy</a> &nbsp;|&nbsp;'); // FUDGED
					document.writeln ('<a href="/ipdirect.dll/ENTER?page=legal.htm" accesskey="T" class="footlink">Terms &amp; Conditions</a></strong></p></td>'); // FUDGED
		document.writeln ('</tr>');
		document.writeln ('<tr><td align="center" valign="top"><p class="footer">click2compare.com is a trading style of iprism Underwriting Agency Limited who is authorised and regulated by the Financial Services Authority (FSA).</p></td></tr>');
		document.writeln ('<tr><td align="center"><img src="/images/shim.gif" alt="" width="1" height="10" /></td></tr>');
	document.writeln ('</table>');
}


function panelTop () {
	document.writeln ('<div id="panel_top"><img src="/images/shim.gif" alt="" width="1" height="14" /></div>');
	document.writeln ('<table width="632" border="0" cellspacing="0" cellpadding="0">');
	document.writeln ('<tr><td class="panel_left"><img src="/images/shim.gif" alt="" width="16" height="1" /></td><td align="left" class="panel">');	
}

function panelBottom () {
	document.writeln ('</td><td class="panel_right"><img src="/images/shim.gif" alt="" width="16" height="1" /></td>');
	document.writeln ('</tr></table><div id="panel_btm"></div>');
}

function help_instruct () {
	document.writeln ('<p style="margin: 91px 3px 0px 12px; font-size: 1.2em;"><strong>Help:</strong><br>Roll over <span class="purple"><strong>any<br />purple text</strong></span> to see help information for that question or assumption.</p>');
}


function panelTopFW () {
	document.writeln ('<div id="panel_topFW"><img src="/images/shim.gif" alt="" width="1" height="14" /></div>');
	document.writeln ('<table width="960" border="0" cellspacing="0" cellpadding="0">');
	document.writeln ('<tr><td class="panel_leftFW"><img src="/images/shim.gif" alt="" width="22" height="1" /></td><td align="left" class="panelFW">');	
}

function panelBottomFW () {
	document.writeln ('</td><td class="panel_rightFW"><img src="/images/shim.gif" alt="" width="22" height="1" /></td>');
	document.writeln ('</tr></table><div id="panel_btmFW"></div>');
}

// Externalisation of ActiveX content to avoid the user having to Activate interactivity every time the Flash loads.
// Necessary due to forthcoming IE update by Microsoft as a result of their patent dispute with Eolas Technologies.
// For further info see http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/activating_activex.asp
var help = 2;

function createProgressBar (Qset, page, loop) {
document.write ('<object id=progressBar classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 width=632 height=64><param name=movie value=/progressBar.swf /><param name=FlashVars value=movieid=progressBar&Qset=' + Qset + '&page=' + page + '&loopanim=' + loop +' /><param name=allowScriptAccess VALUE=always /><param name=quality value=high /><param name=bgcolor value=#ffffff /><param name=wmode value=transparent /><embed src=/progressBar.swf swLiveConnect=true name=progressBar FlashVars=progressBar=helppanel&Qset=' + Qset + '&page=' + page + ' allowScriptAccess=always quality=high wmode=transparent bgcolor=#ffffff width=632 height=64 type=application/x-shockwave-flash pluginspage=https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></embed></object>');
}

function showFlashWaitAnim1 () {
document.write ('<object id=pleaseWaitAnim classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=https://download.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 width=600 height=200><param name=movie value=/pleaseWaitAnim1.swf /><param name=allowScriptAccess VALUE=always /><param name=quality value=high /><param name=bgcolor value=#ffffff /><param name=wmode value=transparent /><embed src=/pleaseWaitAnim1.swf swLiveConnect=true name=pleaseWaitAnim allowScriptAccess=always quality=high wmode=transparent bgcolor=#ffffff width=600 height=200 type=application/x-shockwave-flash pluginspage=https://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></embed></object>');
}


function showFlashWaitAnim2 () {
document.write ('<object id=pleaseWaitAnim classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=https://download.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 width=600 height=200><param name=movie value=/pleaseWaitAnim2.swf /><param name=allowScriptAccess VALUE=always /><param name=quality value=high /><param name=bgcolor value=#ffffff /><param name=wmode value=transparent /><embed src=/pleaseWaitAnim2.swf swLiveConnect=true name=pleaseWaitAnim allowScriptAccess=always quality=high wmode=transparent bgcolor=#ffffff width=600 height=200 type=application/x-shockwave-flash pluginspage=https://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></embed></object>');
}

function doFlashCardCheckAnim () {
document.write ('<object id=cardCheckAnim classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=https://download.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 width=166 height=22><param name=movie value=/cardCheckAnim.swf /><param name=FlashVars value=movieid=cardCheckAnim /><param name=allowScriptAccess VALUE=always /><param name=quality value=high /><param name=bgcolor value=#ffffff /><param name=wmode value=transparent /><embed src=/cardCheckAnim.swf swLiveConnect=true name=cardCheckAnim FlashVars=movieid=cardCheckAnim allowScriptAccess=always quality=high wmode=transparent bgcolor=#ffffff width=166 height=22 type=application/x-shockwave-flash pluginspage=https://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></embed></object>');
}

function doFlashAddressCheckAnim (pc1, pc2) {
document.write ('<object id=addressCheckAnim classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=https://download.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 width=166 height=22><param name=movie value=/addressCheckAnim.swf /><param name=FlashVars value=movieid=addressCheckAnim /><param name=allowScriptAccess VALUE=always /><param name=quality value=high /><param name=bgcolor value=#ffffff /><param name=wmode value=transparent /><embed src=/addressCheckAnim.swf swLiveConnect=true name=addressCheckAnim FlashVars=movieid=addressCheckAnim allowScriptAccess=always quality=high wmode=transparent bgcolor=#ffffff width=166 height=22 type=application/x-shockwave-flash pluginspage=https://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></embed></object>');
}

// these 2 functions are for showing / hiding content
function showXtra(theid){
	if (document.getElementById) {
		var switch_id = document.getElementById(theid);
		if (switch_id) { switch_id.className = 'show'; }
    	}
}
function hideXtra(theid){
	if (document.getElementById) {
		var switch_id = document.getElementById(theid);
		if (switch_id) { switch_id.className = 'hide'; }
	}
}

// these 4 functions are bog-standard Dreamweaver functions for button rollover images
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// opens a new window centered on screen
function NewWindow(mypage, myname, w, h, tools, menu, scrolling, resize, stat) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar='+tools+',menubar='+menu+',scrollbars='+scrolling+',resizable='+resize+',status='+stat;
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function AlertCallUs () {
	alert ('As you cannot confirm this we are unable to give you a quotation online.    \n\nPlease call one of our Account Executives on 0845 505 5000 Monday to \nFriday 9.00am to 5.30pm, and we will provide you with a quotation in a\nmatter of minutes.');
}


function AlertAssumpsFail () {
	alert ('Please confirm that you agree to the assumptions in all of the sections to proceed.\n\nIf you cannot confirm any of the assumptions, contact one of our Account Executives     \non 0845 505 5000 Monday to Friday 9.00am to 5.30pm, and we will provide you with a more\ntailored quotation in a matter of minutes.');
}

function prodUnavailable(){
	alert ("Sorry - this product is not yet available.  ");
}

function linkUnavailable(){
	alert ("Sorry - this link is not yet available.  ");
}

function underConstruction(){
	alert ("Sorry - this Product is under development.  ");
}

function doAlreadyLoggedIn(){
	alert ("\n\rYou are already Logged In!\n\r\n\rTo Log In to a different click2compare.com account, please Log Out first.    ");
}

function doAlreadyLoggedOut(){
	alert ("You are not currently Logged In!    ");
}

// ----------------------------
// stripey tables
// ----------------------------
addEvent(window, "load", stripes_init);

function stripes_init() {
	// Find all tables with class sortable and make them sortable
	if (!document.getElementsByTagName) return;
	tbls = document.getElementsByTagName("table");
	for (ti=0; ti<tbls.length; ti++) {
		thisTbl = tbls[ti];
		if (((' '+thisTbl.className+' ').indexOf("stripesColour") != -1) && (thisTbl.id)) { doStripes(thisTbl); }
		if (((' '+thisTbl.className+' ').indexOf("stripesFaded") != -1) && (thisTbl.id)) { doStripes(thisTbl); }
		if (((' '+thisTbl.className+' ').indexOf("stripesGrey") != -1) && (thisTbl.id)) { doStripes(thisTbl); }
	}
}

function doStripes(table) {
	// Take object table and get all its tbodies.
	var tableBodies = table.getElementsByTagName("tbody");
	// Loop through these tbodies
	for (var i = 0; i < tableBodies.length; i++) {
		// Take the tbody, and get all its rows
		var tableRows = tableBodies[i].getElementsByTagName("tr");
		// Loop through these rows
		for (var j = 0; j < tableRows.length; j++) {
			// Check if j is even, and apply classes for both possible results
			if ( (j % 2) == 0  ) {
				if (tableRows[j].className == 'odd' || !(tableRows[j].className.indexOf('odd') == -1) ) {
					tableRows[j].className = swap(tableRows[j].className, 'odd', 'even');
				} else {
					tableRows[j].className += " even";
				}
			} else {
				if (tableRows[j].className == 'even' || !(tableRows[j].className.indexOf('even') == -1) ) {
					tableRows[j].className = swap(tableRows[j].className, 'even', 'odd');
				}
				tableRows[j].className += " odd";
			} 
		}
	}
}

function addEvent(elm, evType, fn, useCapture)
// addEvent and removeEvent
// cross-browser event handling for IE5+, NS6 and Mozilla
{
	if (elm.addEventListener){
		elm.addEventListener(evType, fn, useCapture);
		return true;
	} else if (elm.attachEvent){
		var r = elm.attachEvent("on"+evType, fn);
		return r;
	} else {
		alert("Handler could not be removed");
	}
} 

function swap(s, t, u) {
  /*
  **  Replace a token in a string
  **    s  string to be processed
  **    t  token to be found and removed
  **    u  token to be inserted
  **  returns new String
  */
  i = s.indexOf(t);
  r = "";
  if (i == -1) return s;
  r += s.substring(0,i) + u;
  if ( i + t.length < s.length)
    r += replace(s.substring(i + t.length, s.length), t, u);
  return r;
}
// ----------------------------
// end of stripey tables
// ----------------------------


// -----------------
// Flash set vars
// -----------------
var ua        = navigator.userAgent.toLowerCase(); 
var is_pc_ie  = ( (ua.indexOf('msie') != -1 ) && ( ua.indexOf('win') != -1 ) && ( ua.indexOf('opera') == -1 ) && ( ua.indexOf('webtv') == -1 ) );

/* -----------------------------------------------------------
function setFlashVariables(movieid, flashquery)

movieid: id of object tag, name of movieid passed in through FlashVars
flashquery: querystring of values to set. example( var1=foo&var2=bar )
----------------------------------------------------------- */
function setFlashVariables(movieid, flashquery){
	var i,values;
	if(is_pc_ie){
		var chunk = flashquery.split("&");
		for(i in chunk){
			values = chunk[i].split("=");
			document[movieid].SetVariable(values[0],values[1]);
		}
	}else{
		var divcontainer = "flash_setvariables_"+movieid;
		if(!document.getElementById(divcontainer)){
			var divholder = document.createElement("div");
			divholder.id = divcontainer;
			document.body.appendChild(divholder);
		}
		document.getElementById(divcontainer).innerHTML = "";
		var divinfo = "<embed src='gateway.swf' FlashVars='lc="+movieid+"&fq="+escape(flashquery)+"' width='0' height='0' type='application/x-shockwave-flash'></embed>";
		document.getElementById(divcontainer).innerHTML = divinfo;
	}
}
// ----------------------
// end of Flash set vars
// ----------------------


// ****************** start of BUBBLE HELP code ******************
overdiv="0";
xMouse=0;
yMouse=0;
MSIE=document.all //prepare for IE kludge

if (!MSIE) { document.captureEvents(Event.MouseMove); }

document.onmousemove=getMouse; // initiate event handler

function getMouse(Event){ //set globals for mouse coordinates
	MSIE?xMouse=event.clientX+document.body.scrollLeft:xMouse=Event.pageX;
	MSIE?yMouse=event.clientY+document.body.scrollLeft:yMouse=Event.pageY;
}



function showBubble(content,xpos){
	
	desc="<table cellspacing='0' cellpadding='0' border='0'><tr id='poptop'><td></td></tr>";
	desc+="<tr id='popmid'><td><p class='pop'>"+content+"</p></td></tr>";
	desc+="<tr id='popbtm'><td><img src='/images/shim.gif' width='312' height='15'></td></tr></table>";
	
	document.getElementById("object1").innerHTML = desc;
	if ((GetBrowserType == "ie") && (ieVersion < 7)) {
		hideSelectLists(); // *** for IE (pre v7) Select layering headache ***
		document.getElementById("object1").style.backgroundColor = "#FFFFFF"; // use instead of PNG
		document.getElementById("object1").style.border = "solid 1px #762283"; // use instead of PNG
	} 

	// ie: -document.body- won't work with DTD XHTML 1.0 DocType so use -document.documentElement- instead
	if (GetBrowserType == "ie") { // ie code
		scrollDepth = document.documentElement.scrollTop;
		activeHeight = document.documentElement.clientHeight;
		activeWidth = document.documentElement.clientWidth;
	} else { // non-ie code
		scrollDepth = window.pageYOffset;
		activeHeight = window.innerHeight;
		activeWidth = window.innerWidth;
	}
	popupHeight = document.getElementById("object1").clientHeight;
	popupWidth = 312; // as set in CSS
	
	
	if (yMouse + popupHeight - 30 > activeHeight) { // if the popup's going to fall off the bottom of the page, move it up
		if (GetBrowserType == "ie") {
			yPos = yMouse + scrollDepth - popupHeight;
		} else {
			yPos = yMouse - popupHeight;
		}
		if (yPos < scrollDepth) { yPos = scrollDepth + 2; } // make sure it doesn't fall off the top of the screen
		document.getElementById("object1").style.top = yPos + 'px';
	} else { // otherwise display it below the cursor
		if (GetBrowserType == "ie") {
			document.getElementById("object1").style.top = yMouse + scrollDepth - 30 + 'px';
		} else {
			document.getElementById("object1").style.top = yMouse - 30 + 'px';
		}
	}	
	/*
	//if (yMouse + popupHeight + 20 > activeHeight) { // if the popup's going to fall off the bottom of the page, move it up
		if (GetBrowserType == "ie") {
			yPos = 143;
		} else {
			yPos = 143;
		}
		//if (yPos < scrollDepth) { yPos = scrollDepth + 2; } // make sure it doesn't fall off the top of the screen
		//document.getElementById("object1").style.top = yPos + 'px';
	//} else { // otherwise display it below the cursor
		if (GetBrowserType == "ie") {
			document.getElementById("object1").style.top = yPos + 'px';
		} else {
			document.getElementById("object1").style.top = yPos + 'px';
		}
	//}
	*/


	if (xMouse > Math.round((activeWidth/2))) { // if cursor on right hand side of window
		document.getElementById("object1").style.left = 2 + 'px';
	} else { // if cursor on left hand side of window
		if (GetBrowserType == "ie") {
			document.getElementById("object1").style.left = activeWidth - popupWidth - 2 + 'px';
		} else {
			document.getElementById("object1").style.left = activeWidth - popupWidth - 20 + 'px';
		}
	}
}

function hideBubble(){
	if ((GetBrowserType == "ie") && (ieVersion < 7)) { showSelectLists(); } // *** for IE (pre v7) Select layering headache ***
	if (overdiv == "0") { document.getElementById("object1").style.top = "-1000px"; }
}
// ****************** end of BUBBLE HELP code ******************