function rate()
{
    return 1.2505
}
function dollar()
{
    return 2.0173
}
function dollareuro()
{
    return 1.60
}
function sqklick()
{
    return 2.58998811
}
function meter()
{
    return 10.7639104
}
function foot()
{
    return 3.2808399
}
function milage()
{
    return 1.60934
}
function date()
{
    return '3<sup>re</sup> July 2007';
}
function pad(x)
{
   xString=""; xString=x;
   if(x>=100) 
   {
      xString=""+x;
   }
   else
   {
      if(x>=10)
      {
         xString="0"+x;
      }
      else
      {
         xString="00"+x;
      }
   }
   return xString;
}
function exponent(x,e)
{
   i=0; r=x;
   if(e==0)
   {
      r=1;
   }
   else
   {
      for(i=1;i<e;i++)
      {
         r=r*x;
      }
   } 
   return r;
}

function format(n,sep)
{
   s=1000000000000000;
   i=0; p=16; 
   tReturn="";
   for(i=15;i>0;i--)
   {
      if ((s/n)>1)
      {
         s=s/10;
         p--;
      }
   };

   if(0!=(p%3))
   {
      t=Math.round((n/exponent(10,(p-(p%3))))-0.5);
      tReturn=t;
      n=n-t*exponent(10,(p-(p%3)));   
      p=p-(p%3);
      if(p>0) tReturn=tReturn+sep;
   }

   while(p>0)
   {
      t=Math.round((n/exponent(10,(p-3)))-0.5);
      tReturn=tReturn+pad(t);
      n=n-t*exponent(10,(p-3));   
      p=p-3;
      if(p>0) tReturn=tReturn+sep;
   }
   return tReturn;
}

function price(euro)
{
SterlingRate=rate();
i=0; s=0;
   sterling=Math.round((euro/SterlingRate)*1.07);  
document.write('<b><font size="3">'+'£'+format(sterling,",")+'.00'+'</font></b>');
document.write('<br>'+'at this morning&#146;s exchange');
document.write('<br> rate of <b>'+SterlingRate+' &euro;'+'</b> to the £.');
}

function price9(euro)
{
SterlingRate9=rate();
i=0; s=0;
   sterling=Math.round((euro/SterlingRate9)*1.07);
   eurolegal=Math.round(euro*1.07); 
document.write('<b><u><font color="#CC0000">'+format(eurolegal,",")+' €</font></u></b> or<br>');  
document.write('<b><u><font color="#0000FF">'+'£'+format(sterling,",")+'.00</font></u></b>');
document.write('<br>'+'at this morning&#146;s exchange rate');
}

function price9b(euro)
{
SterlingRate9=rate();
DollarRate4=dollareuro();
i=0; s=0;
   dollar12=Math.round(euro*DollarRate4);
   eurolegal2=Math.round(dollar12*1.07); 
   sterling=Math.round((euro/SterlingRate9)*1.07);
   eurolegal=Math.round(euro*1.07); 
document.write('<b><u><font color="#CC0000">'+format(eurolegal,",")+' €</font></u></b> or<br>');  
document.write('<b><u><font color="#0000FF">'+'£'+format(sterling,",")+'</font></u></b> or<br>');
document.write('<b><u><font color="#006633">US$ '+format(eurolegal2,",")+'</font></u></b>');
document.write('<br>'+'at this morning&#146;s exchange rate');
}

function price10(euro)
{
SterlingRate10=rate();
i=0; s=0;
   sterling=Math.round((euro/SterlingRate10)*1.07);
document.write('<b><u><font color="#CC0000">'+'£'+format(sterling,",")+'.00</font></u></b>');
}

function price4(euro3)
{
SterlingRate3=rate();
i=0; s=0;
   sterling=Math.round(euro3/SterlingRate3);
document.write('<b><font color="#0000FF">£'+format(sterling,",")+'.00</font></b> at');
document.write('<br>'+'this morning&#146;s exchange rate of');
document.write('<br><b>'+SterlingRate3+'&euro;'+'</b> to the £.');
}

function price4b(euro3)
{
SterlingRate3=rate();
i=0; s=0;
   sterling=Math.round(euro3/SterlingRate3);
document.write('<b><font color="#0000FF" size="3">£'+format(sterling,",")+'.00</font></b> at');
document.write('<br>'+'this morning&#146;s exchange rate of');
document.write('<br><b>'+SterlingRate3+'&euro;'+'</b> to the £.');
}

function price44(dollar3)
{
DollarRate3=dollar();
ActiveDate2=date();
i=0; s=0;
   dollar2=Math.round(dollar3/DollarRate3);
document.write('For our British clients<br>');
document.write('this would mean:<br>');
document.write('<b><font color="#0000FF">£'+format(dollar2,",")+'</font></b> at');
document.write('<br>'+'the exchange rate');
document.write('<br>of <b>'+'$'+DollarRate3+'</b> to the £.');
document.write('<br>on the '+ActiveDate2);
}

function price444(dollar5)
{
DollarRate4=dollareuro();
ActiveDate7=date();
i=0; s=0;
   dollar12=Math.round(dollar5*DollarRate4);
document.write('For our American clients<br>');
document.write('this would mean:<br>');
document.write('<b><font color="#0000FF">$'+format(dollar12,",")+'</font></b> at');
document.write('<br>'+'the exchange rate');
document.write('<br>of <b>'+'€'+DollarRate4+'</b> to the $.');
document.write('<br>on the '+ActiveDate2);
}

function taxrate(eurotax)
{
SterlingRate5=rate();
i=0; s=0;
   sterling=Math.round(eurotax/SterlingRate5);
document.write('<font color="#3366CC">[£'+format(sterling,",")+']</font>');
}

function price11(euro3)
{
SterlingRate11=rate();
i=0; s=0;
   sterling=Math.round(euro3/SterlingRate11);
document.write('<b><font color="#CC0000">£'+format(sterling,",")+'.00</font></b>');
}

function price2(euro2)
{
SterlingRate2=rate();
ActiveDate=date();
i=0; s=0;
   sterling=Math.round((euro2/SterlingRate2));
document.write('<b>'+'&euro;'+SterlingRate2+' = 1£ from');
document.write('<br>'+' <b><a href="http://www.thamescurrency.com/thames.php?ref=60011MR&p=enquiry" target="_blank">Thames Currency</a>');
document.write('<br>'+' <b>On Tuesday');
document.write('<br>'+ActiveDate);
document.write('</b><br>'+'<font color="#CC0000"><u>down 0.0025</u></font><img src="http://www.frenchhouses.co.uk/images/down.gif" width="24" height="10">');
document.write('<br>'+'On Monday 2<sup>nd</sup>');
}

function xrate(euro5)
{
SterlingRate2=rate();
ActiveDate=date();
i=0; s=0;
   sterling=Math.round((euro5/SterlingRate2));
document.write('<b>'+'&euro;'+SterlingRate2+'<br>= 1£ from');
document.write('<br>'+' <b><a href="http://www.thamescurrency.com/thames.php?ref=60011MR&p=enquiry" target="_blank">Thames Currency</a>');
document.write('<br>'+' <b>On Monday');
document.write('<br>'+ActiveDate);
}

function price3()
{
SterlingRate2=rate();
ActiveDate=date();
document.write('<b> &euro;'+SterlingRate2+' to the £ as at: '+ActiveDate+'</b> ');
}

function squaremeter(feet)
{
MeterToFeet=meter();
i=0; s=0;
   squarefeet=Math.round((feet*MeterToFeet));
document.write('<font color="#3333FF">['+squarefeet+' ft²]</font>');
}

function squaremeter2(feet)
{
MeterToFeet=meter();
i=0; s=0;
   squarefeet=Math.round((feet*MeterToFeet));
document.write(' m² <font color="#3333FF">['+squarefeet+' ft²]</font>');
}

function metertofoot(footin)
{
MeterToFoot=foot();
i=0; s=0;
   realfoot=Math.round((footin*MeterToFoot));
document.write('<font color="#009966">'+realfoot+' ft</font>');
}

function miles(klicks)
{
KlicksToMiles=milage();
i=0; s=0;
   finalmiles=Math.round(klicks/KlicksToMiles);
document.write('<font color="#3333FF">['+finalmiles+' miles]</font>');
}

function miles2(klicks2)
{
KlicksToMiles2=milage();
i=0; s=0;
   finalmiles2=Math.round(klicks2/KlicksToMiles2);
document.write('<font color="#3333FF">['+format(finalmiles2,",")+' miles]</font></b>');
}

function sqmiles(sqklicks)
{
sqKlicksTosqMiles=sqklick();
i=0; s=0;
   finalsqklicks=Math.round(sqklicks/sqKlicksTosqMiles);
document.write('<font color="#3333FF">['+format(finalsqklicks,",")+' sq miles]</font></b>');
}
function contacts(euro)
{
document.write('From UK: <b>0118 931 0832 | email</b> <a href="mailto:info@frenchhouses.co.uk">info@FrenchHouses.co.uk</a><br>');
document.write('Telephone From France: <b>00 44 118 931 0832</b><br>');
document.write('Telephone From USA: <b>011 44 118 931 0832</b><br>');
document.write('&nbsp;');
document.write('<font color="#FF0033"><u><b>Please Note:</b></u></font><br>');
document.write('If I am not in the UK: Calls will divert to my French number &#40;<u>at no additional cost to you</u>&#41;<br>');
document.write('&nbsp;');
}
function contacts2(euro)
{
document.write('<b>Tel from UK: 0118 931 0832 | Mobile: 07918 622 120</b><br>');
document.write('email <a href="mailto:info@frenchhouses.co.uk">info@FrenchHouses.co.uk</a></b><br>');
document.write('Telephone (From France): <b>00 44 118 931 0832</b><br>');
}
function contacts3(euro)
{
document.write('From UK: <b>0845 257 0832</b> - Just 2p per minute from a BT landline | email <a href="mailto:info@limousin-immobilier.co.uk">info@Limousin-Immobilier.co.uk</a><br>');
document.write('Telephone From France: <b>00 44 11 89 31 08 32</b><br>');
document.write('To get your cheap calls to France, Spain, US etc. with an 0844 number: <a href="http://www.cheapercallrate.com/?did=100146" target="_blank">Click HERE</a><br>');
document.write('&nbsp;');
}
function contacts4(euro)
{
document.write('<b>Tel from UK: 0845 257 0832 | Mobile: 07918 622 120</b><br>');
document.write('email <a href="mailto:info@limousin-immobilier.co.uk">info@Limousin-Immobilier.co.uk</a></b><br>');
document.write('Telephone (From France): <b>00 44 11 89 31 08 32</b><br>');
}
function judith(euro)
{
document.write('- <b>Judith KAHN</b> - <br>');
document.write('e-mail <a href="mailto:judith@limousinpropertysearch.com">judith@LimousinPropertySearch.com</a><br>');
document.write('Telephone de France: <b><font color="#339933">06 20 26 30 01</font><br><i><font color="#0099CC">From UK: 00 33 620 263 001</font></i></b><br>');
document.write('&nbsp;');
}
function louise(euro)
{
document.write('- <b>Louise FRANKLIN</b> - <br>');
document.write('e-mail <a href="mailto:louise@solutionsfrance.com">:Louise@SolutionsFrance.com</a><br>');
document.write('Telephone de France: <b><font color="#339933">05 46 70 72 44</font><br><i><font color="#0099CC">From UK: 00 33 546 707 244</font></i></b><br>');
document.write('Portable de France: <b><font color="#339933">06 75 93 02 36</font><br><i><font color="#0099CC">Mobile From UK: 00 33 675 930 236</font></i></b><br>');
document.write('<br><b>5 Place de la République | JONZAC | 17500</font></i></b>');
}
function louiseb(euro)
{
document.write('- <b>Louise FRANKLIN</b> - <br>');
document.write('e-mail <a href="mailto:louise@solutionsfrance.com">:Louise@SolutionsFrance.com</a><br>');
document.write('Telephone de France: <b><font color="#339933">05 46 70 72 44</font><br><i><font color="#0099CC">From UK: 00 33 546 707 244</font></i></b><br>');
document.write('Portable de France: <b><font color="#339933">06 75 93 02 36</font><br><i><font color="#0099CC">Mobile From UK: 00 33 675 930 236</font></i></b><br>');
}

function formatCurrency(strValue)
{
strValue = strValue.toString().replace(/\$|\,/g,'');
dblValue = parseFloat(strValue);

blnSign = (dblValue == (dblValue = Math.abs(dblValue)));
dblValue = Math.floor(dblValue*100+0.50000000001);
intCents = dblValue%100;
strCents = intCents.toString();
dblValue = Math.floor(dblValue/100).toString();
if(intCents<10)
	strCents = "0" + strCents;
for (var i = 0; i < Math.floor((dblValue.length-(1+i))/3); i++)
	dblValue = dblValue.substring(0,dblValue.length-(4*i+3))+','+
	dblValue.substring(dblValue.length-(4*i+3));
return (((blnSign)?'':'-') + '$' + dblValue + '.' + strCents);
}