window.___gcfg = {lang: 'en-GB'};

var siteName = "Business Accounting Basics";
var hostName = "http://www.BusinessAccountingBasics.co.uk";
var hostServer = "http://www.businessaccountingbasics.co.uk"
var facebookID = "1173524527"

function Menu()
{
 		document.write("<div id=Header>");
		document.write("</div>");
		document.write("<div id=Content>");
		
		document.write("<img src=" + hostServer + "/images/logo.gif align=left hspace=20 vspace=0 border=0 alt=Business Accounting Basics>");
		document.write("<div id=headline>");
		document.write("		 Free accounting basics<br />");
		document.write("		 and bookkeeping<br />");
		document.write("		 support for small business");
		document.write("</div>");
		document.write("</div>");
		
		document.write("<div id=menu>");
		document.write("<a href=" + hostServer + "/index.html>Business Accounting Basics</a>");
		document.write("<a href=" + hostServer + "/accounting-basics.html>Accounting Basics</a>");
		document.write("<a href=" + hostServer + "/bookkeeping-basics.html>Bookkeeping Basics</a>");
		document.write("<a href=" + hostServer + "/business-accounting-software.html>Business Accounting Software</a>");
		document.write("<a href=" + hostServer + "/starting-a-small-business.html>Starting a Small Business</a>");
		document.write("<a href=" + hostServer + "/small-business-advice.html>Small Business Advice</a>");
		document.write("<a href=" + hostServer + "/free-stuff.html>Free Business Resources</a>");
		document.write("<a href=" + hostServer + "/accounting-search.html>Accounting Search</a>");
		document.write("</div>");	
}



function Footer()
{
 		document.write("</div>");							 /* Closing down the 'Content' div opened in the Menu() function */
		document.write("<div id=footer>");
		document.write("		 <p>");
		document.write("					 The Business Accounting Basics website is &copy; copyright 2008-2011 by <a href=" + hostServer + "/business-accounting-basics.html>Angela Boxwell</a>.");
		document.write("					 <br />");
		
		
		document.write("					 All rights reserved.  Use of this web site is subject to our <a href=" + hostServer + "/disclaimer.html>terms and conditions.</a>");
		document.write("		 </p>");
		document.write("</div>");
		document.write("<br />");
}

/* Social Media functions */
function FacebookSetup(title, image)
{
		GooglePlusOne();
 		var url=window.location.host + window.location.pathname;
		document.write("<meta property='og:title' content='" + title + "' />");
		document.write("<meta property='og:type' content='article' />");
		document.write("<meta property='og:url' content='" + url + "' />");
		document.write("<meta property='og:image' content='" + hostName + "/images/" + image + "' />");
		document.write("<meta property='og:site_name' content='" + siteName + "' />");
		document.write("<meta property='fb:admins' content='" + facebookID + "' />");
}

function SocialMedia(tweetMessage)
{
		var url=window.location.host + window.location.pathname;
		var facebook="http://www.facebook.com/plugins/like.php?href=" + url + "&amp;layout=standard&amp;show_faces=false&amp;width=250&amp;action=like&amp;font&amp;colorscheme=light&amp;height=35";
		
		document.write("<p>");
		document.write("  <center>");
		document.write("		<a href='http://twitter.com/home/?status=" + tweetMessage + "' target='_new'><img src=" + hostServer + "/images/tweet-this.jpg border=0 alt='Tweet This' hspace=30></a>");
		document.write("		<iframe src=" + facebook + " scrolling=no height=35 frameborder=0 style=border:none; overflow:hidden; width:250px; height:35px; allowTransparency=true></iframe>");
		document.write("		<br />");
		document.write("		<g:plusone></g:plusone>");
		document.write("	</center>");
		document.write("</p>");
}

function GooglePlusOne() 
{
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
}

function FacebookButton()
{
 		var url=window.location.host + window.location.pathname;
    document.write("<iframe src='http://www.facebook.com/plugins/like.php?href=" + url + "&amp;layout=standard&amp;show_faces=false&amp;width=300&amp;action=like&amp;font&amp;colorscheme=light&amp;height=35' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:300px; height:35px;' allowTransparency='true'></iframe>");
}

function Kashflow()
{
/*
		document.write("		<a href='http://www.kashflow.co.uk/?code=AFF2100816' target='_new'><img src='http://www.kashflow.co.uk/images/bans/anim460x60.gif' alt='Free accounting software'></a>");		 */
		
		document.write("		<a href='http://www.anrdoezrs.net/click-5552482-10986573' target='_new'><img src='http://www.tqlkg.com/image-5552482-10986573' alt='QuickBooks Online 30 day Free Trial'></a>");
}

function straight() {
var depreciation = document.straightline.historicalcost.value / document.straightline.years.value;
var depreciation = depreciation.toFixed(2);
document.straightline.depreciation.value=depreciation;
var monthlydepreciation = document.straightline.depreciation.value / 12;
var monthlydepreciation = monthlydepreciation.toFixed(2);
document.straightline.monthlydepreciation.value=monthlydepreciation;
var months = document.straightline.years.value * 12;
var months = months.toFixed(0);
document.straightline.months.value=months+" months";
}

function reducing() {
var year1depn = document.reducingbalance.originalcost.value * (document.reducingbalance.annual.value/100);
var year1depn = year1depn.toFixed(2);
document.reducingbalance.year1depn.value=year1depn;
var year1value = document.reducingbalance.originalcost.value - document.reducingbalance.year1depn.value;
var year1value = year1value.toFixed(2);
document.reducingbalance.year1value.value=year1value;
var year2depn = document.reducingbalance.year1value.value * (document.reducingbalance.annual.value/100);
var year2depn = year2depn.toFixed(2);
document.reducingbalance.year2depn.value=year2depn;
var year2value = document.reducingbalance.year1value.value - document.reducingbalance.year2depn.value;
var year2value = year2value.toFixed(2);
document.reducingbalance.year2value.value=year2value;
var year3depn = document.reducingbalance.year2value.value * (document.reducingbalance.annual.value/100);
var year3depn = year3depn.toFixed(2);
document.reducingbalance.year3depn.value=year3depn;
var year3value = document.reducingbalance.year2value.value - document.reducingbalance.year3depn.value;
var year3value = year3value.toFixed(2);
document.reducingbalance.year3value.value=year3value;
var year4depn = document.reducingbalance.year3value.value * (document.reducingbalance.annual.value/100);
var year4depn = year4depn.toFixed(2);
document.reducingbalance.year4depn.value=year4depn;
var year4value = document.reducingbalance.year3value.value - document.reducingbalance.year4depn.value;
var year4value = year4value.toFixed(2);
document.reducingbalance.year4value.value=year4value;
var year5depn = document.reducingbalance.year4value.value * (document.reducingbalance.annual.value/100);
var year5depn = year5depn.toFixed(2);
document.reducingbalance.year5depn.value=year5depn;
var year5value = document.reducingbalance.year4value.value - document.reducingbalance.year5depn.value;
var year5value = year5value.toFixed(2);
document.reducingbalance.year5value.value=year5value;
}
