<!--
// pricing.js
// Javascript code for storing product pricing
// by Mick Todd VK6JMA
// Free for use as long as the author name is kept

var arcomp = 30;
var arcant = 35;

// rates updated 17/02/07
var nzdexch = 1.35; //was 1.23
var usdexch = 0.974; //was 0.810
var gbpexch = 0.503; //was 0.421
var eurexch = 0.639; //was 0.624

var ausmail1 = 2.95;
var ausmail2 = 5.00;
var nzmail1 = 4.95;
var nzmail2 = 8.00;
var othmail1 = 9.95;
var othmail2 = 15.00;

//var nzd = "$" + (Math.ceil((20 + 0.5) * nzdexch * 10) / 10 + nzmail1);
var nzd = "$" + calcbaseconv(arcomp,nzdexch,nzmail1);
var usd = "$" + calcbaseconv(arcomp,usdexch,othmail1);
var gbp = "&pound;" + calcbaseconv(arcomp,gbpexch,othmail1);
var eur = "&euro;" + calcbaseconv(arcomp,eurexch,othmail1);

var nzdant = "$" + calcbaseconv(arcant,nzdexch,nzmail1);
var usdant = "$" + calcbaseconv(arcant,usdexch,othmail1);
var gbpant = "&pound;" + calcbaseconv(arcant,gbpexch,othmail1);
var eurant = "&euro;" + calcbaseconv(arcant,eurexch,othmail1);

var usdupg = "$" + calcbaseconv(arcomp-5,usdexch,othmail1);
var gbpupg = "&pound;" + calcbaseconv(arcomp-5,gbpexch,othmail1);
var eurupg = "&euro;" + calcbaseconv(arcomp-5,eurexch,othmail1);

var usdantupg = "$" + calcbaseconv(arcant-5,usdexch,othmail1);
var gbpantupg = "&pound;" + calcbaseconv(arcant-5,gbpexch,othmail1);
var eurantupg = "&euro;" + calcbaseconv(arcant-5,eurexch,othmail1);


function calcbaseconv (baseprice,baserate,mailrate) {
  var alttotal;
  alttotal = Math.ceil((baseprice + mailrate + 0.5) * baserate * 10) / 10;
  if ( (alttotal == Math.ceil(alttotal * 10)/10) && !(alttotal == Math.ceil(alttotal)) ) {
    alttotal = alttotal +"0";
  }
  return alttotal;
}

function toggleDisplay(me){
	if (me.style.display=="block"){
		me.style.display="none";
		}
	else {
		me.style.display="block";
	}
}

function ddinfo () {

document.write ("<form method=\"POST\" action=\"http:\/\/arcompanion.com\/cgi-sys\/FormMail.pl\">");
document.write ("<input type=\"hidden\" name=\"recipient\" value=\"sales@arcompanion.com\">");
document.write ("<input type=\"hidden\" name=\"email\" value=\""+email1+"\">");
document.write ("<input type=\"hidden\" name=\"subject\" value=\"ARCSuite Order\">");
document.write ("<input type=\"hidden\" name=\"order_details\" value=\"" +ref1+ "\">");

document.write ("<input type=\"hidden\" name=\"buyername\" value=\"" +buyername+ "\">");
document.write ("<input type=\"hidden\" name=\"address1\" value=\"" +address1+ "\">");
document.write ("<input type=\"hidden\" name=\"address2\" value=\"" +address2+ "\">");
document.write ("<input type=\"hidden\" name=\"suburb\" value=\"" +suburb1+ "\">");
document.write ("<input type=\"hidden\" name=\"postcode\" value=\"" +postcode1+ "\">");
document.write ("<input type=\"hidden\" name=\"country\" value=\"" +country1+ "\">");

document.write ("<input type=hidden name=\"redirect\" value=\"javascript:void(0)\">");

document.write("<div style='display:none;border:solid 1px;' id='ddinfopane'>");
document.write("<p><font size=4>Banking details for direct deposit<\/font><\/p>");
document.write("<table border=0 align=center><tr><td><b>SWIFT Code:<\/b><\/td><td><font color=#00006f>BKWAAU6PXXX<\/font><\/td><\/tr>");
document.write("<tr><td><b>Bank:<\/b><\/td><td><font color=#00006f>Bankwest (Bank of Western Australia)<\/font><\/td><\/tr>");
document.write("<tr><td><b>BSB:<\/b><\/td><td><font color=#00006f>&#0051;&#0048;&#0054;&#0045;&#0048;&#0048;&#0054;<\/font><\/td><\/tr>");
document.write("<tr><td><b>Acct No:<\/b><\/td><td><font color=#00006f>&#0051;&#0048;&#0048;&#0052;&#0049;&#0053;&#0045;&#0050;<\/font><\/td><\/tr>");
document.write("<tr><td><b>Acct Name:<\/b><\/td><td><font color=#00006f>&#0077;&#0105;&#0099;&#0104;&#0097;&#0101;&#0108;&#0032;&#0084;&#0111;&#0100;&#0100;<\/font><\/td><\/tr><\/table>");
document.write("<FORM><CENTER><INPUT type='Submit' value='Close' onClick = 'toggleDisplay(ddinfopane)'><\/CENTER><\/FORM>");
document.write("<font face='Arial' size=2 color=red><center><b>Important: If you pay for a purchase by bank <br>transfer it is vital that you email us your details!<br><font color=black>Please click 'Close' when finished.</font>&nbsp;<\/b><\/center><\/font><\/div><\/FORM>");

}

function adinfo () {
  var popupWindow=null;
  var LeftPosition=200;
  var TopPosition=100;
  var w=350;
  var h=350;

  settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
   
  popupWindow=window.open('',"ddinfo",settings);
  popupWindow.close();
  popupWindow=window.open('',"ddinfo",settings);

  popupWindow.document.write("<head><title>Advertising information</title><LINK href=\"style.css\" type=text/css rel=stylesheet></head>");
  //popupWindow.document.write ("<body><p align=center><font size=4>Advertising information<\/font><\/p>");
  popupWindow.document.write ("<table border=0 align=center>");
  popupWindow.document.write ("<tr><td><font color=#00006f>The advertising banners displayed on this site are to promote organisations and businesses which promote and support those of us who enjoy radio and electronics as a hobby.<\/font><\/td><\/tr>");
  popupWindow.document.write ("<tr><td>Michael Todd <font color=#00006f>reserves the right to accept or refuse advertising on this site at our discretion. We may choose to provide advertising, either paid or unpaid, if a graphic is provided but we reserve the right to remove an advertisement from rotation without notice.<\/font><\/td><\/tr>");
  popupWindow.document.write ("<tr><td><font color=#00006f>For further details email <a href='mailto:advertising&#0064;toddcomputers&#0046;com?CC=sales&#0064;arcompanion&#0046;com' class=deflinknav>advertising&#0064;toddcomputers&#0046;com<\/a>.<\/font><\/td><\/tr>");
  popupWindow.document.write ("<\/table>");
  popupWindow.document.write ("<FORM><CENTER><INPUT type='button' value='Close' onClick = 'self.close()'></CENTER></FORM>");
  popupWindow.document.write ("<\/body><\/html>");

}

//old stuff

//var nzd = "$29.95";
//var usd = "$20.50";
//var gbp = "&pound;12.50";
//var eur = "&euro;18.00";

var nzdunit = "$24.00";
var nzdupg = "$18.00";
var nzph1 = "$5.95";
var nzph2 = "$9.95";

//var usdupg = "$17.00"
//var gbpupg = "&pound;10.50";
//var eurupg = "&euro;15.00";

var drevise = "31st July 2003";
var deffect = "7th August 2003";


// -->
