function openImagePopUp(imageURL)
{
	var imageWindow = document.open('imagepopup.asp?img=' + imageURL, 'imagePopUp', 'left=20,top=20,width=800,height=600,toolbar=0,resizable=0');
}

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_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
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_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_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];}
}
var bType;
var bleft;
var bleft2;
var bleft3;
var bleft4;
var bleft5;
var btop;
var blnMenuOn = false;
function browserType ()
{
if (navigator.userAgent.indexOf('Opera')!=-1 && document.getElementById)
return 'OP'; // Opera
if (navigator.userAgent.indexOf('Safari')!=-1)
return 'SA'; // Safari
if (document.all)
return 'IE'; // Internet Explorer
if (document.layers)
return 'NN'; //Netscape 4
if (!document.all && document.getElementById)
return 'MO'; // Mozilla (Netscape 6+, etc)
}
function setLayerDisplay (pstrID, pstrVisibility)
{
if (document.getElementById(pstrID)) {
if (bType == "IE")
eval("document.all." + pstrID + ".style.display='" + pstrVisibility + "'"); 
if (bType == "NN")
eval("document." + pstrID + ".display='" + pstrVisibility + "'"); 
if (bType == "MO" || bType == "OP" || bType == "SA") 
eval("document.getElementById('" + pstrID + "').style.display='" + pstrVisibility + "'"); 
}}
function setLayerVisibility (pstrID, pstrVisibility)
{
if (bType == "IE")
eval("document.all." + pstrID + ".style.visibility='" + pstrVisibility + "'"); 
if (bType == "NN")
eval("document." + pstrID + ".visibility='" + pstrVisibility + "'"); 
if (bType == "MO" || bType == "OP" || bType == "SA") 
eval("document.getElementById('" + pstrID + "').style.visibility='" + pstrVisibility + "'"); 
}



function setPosition (pstrID, pstrPOS)
{
if (bType == "IE")
eval("document.all." + pstrID + ".style.left='" + pstrPOS + "'"); 
if (bType == "NN")
eval("document." + pstrID + ".left='" + pstrPOS + "'"); 
if (bType == "MO" || bType == "OP" || bType == "SA") 
eval("document.getElementById('" + pstrID + "').style.left='" + pstrPOS + "'"); 
}
var a;
a = '';
var b;
b = '';
var c;
c = '';
function loadcontent()
{
document.getElementById("newcontent").innerHTML = document.getElementById("content").innerHTML
document.getElementById("content").innerHTML = ""
}
function doMenuClose ()
{
if(a.length > 1)
{
setLayerDisplay(a, 'none');
}
if(b.length > 1)
{
setLayerDisplay(b, 'none');
}
if(c.length > 1)
{
setLayerDisplay(c, 'none');
}
}
function doMenuCloseB ()
{
if(b.length > 1)
{
setLayerVisibility(b, 'hidden');
}
if(c.length > 1)
{
setLayerVisibility(c, 'hidden');
}
}
function doMenuCloseC ()
{
if(c.length > 1)
{
setLayerVisibility(c, 'hidden');
}
}


function doMenuOn (pstrSubID)
{
if(a.length > 1)
{
setLayerDisplay(a, 'none');
}
if(b.length > 1)
{
setLayerDisplay(b, 'none');
}
if(c.length > 1)
{
setLayerDisplay(c, 'none');
}
a = pstrSubID;
setLayerDisplay(pstrSubID, 'block');
}


function doMenuOnB (pstrSubID)
{
if(b.length > 1)
{
setLayerDisplay(b, 'none');
}
if(c.length > 1)
{
setLayerDisplay(c, 'none');
}
b = pstrSubID;
setLayerDisplay(pstrSubID, 'block');
}



function doMenuOnC (pstrID, pstrSubID)
{
if(c.length > 1)
{
setLayerVisibility(c, 'hidden');
}
c = pstrSubID;
setPosition(c, bleft5);
setLayerVisibility(pstrSubID, 'visible');
}
function offLayer (pstrLayer)
{
if (pstrLayer == 'Layer1')
{
if(a.length > 1)
{
setLayerVisibility(a, 'hidden');
}
if(b.length > 1)
{
setLayerVisibility(b, 'hidden');
}
if(c.length > 1)
{
setLayerVisibility(c, 'hidden');
}
}
}
function windowchange()
{
if (bType == 'IE')
{
bleft = document.body.clientWidth;
if (bleft <= 782)
{
bleft = 782;
}
bleft = bleft / 2 - 180;
bleft2 = bleft - 201;
setLayerVisibility('date', 'hidden');
setLayerVisibility('header', 'hidden');
setLayerVisibility('breadcrumbs', 'hidden');
eval('document.all.date.style.top=12');
eval('document.all.header.style.top=37');
eval('document.all.breadcrumbs.style.top=171');
eval('document.all.date.style.left=' + bleft2);
eval('document.all.header.style.left=' + bleft2 + 400);
eval('document.all.breadcrumbs.style.left=' + bleft2);
setLayerVisibility('date', 'visible');
setLayerVisibility('header', 'visible');
setLayerVisibility('breadcrumbs', 'visible');
}

if (bType == "NN")
	{
	bleft = window.innerWidth;
	if (bleft <= 782)
		{
		bleft = 782;
		}
	bleft = bleft / 2 - 224;
	bleft2 = bleft - 148;
	bleft3 = bleft2 + 184;
	bleft4 = bleft3 + 184;
	bleft5 = bleft4 + 184;

setLayerVisibility('date', 'hidden');
setLayerVisibility('header', 'hidden');
setLayerVisibility('breadcrumbs', 'hidden');
eval('document.date.left=' + bleft2);
eval('document.header.left=' + bleft2 + 400);
eval('document.breadcrumbs.left=' + bleft2);
setLayerVisibility('date', 'visible');
setLayerVisibility('header', 'visible');
setLayerVisibility('breadcrumbs', 'visible');
}
if (bType == "MO")
	{
	bleft = window.innerWidth;
	if (bleft <= 798)
		{
			bleft = 798;
		}
	bleft = bleft / 2 - 233;
	bleft2 = bleft - 158;
	bleft3 = bleft2 + 184;
	bleft4 = bleft3 + 184;
	bleft5 = bleft4 + 184;
setLayerVisibility('date', 'hidden');
setLayerVisibility('header', 'hidden');
setLayerVisibility('breadcrumbs', 'hidden');
eval("document.getElementById('date').style.left=" + bleft2);
eval("document.getElementById('header').style.left=" + bleft2 + 400);
eval("document.getElementById('breadcrumbs').style.left=" + bleft2);
setLayerVisibility('date', 'visible');
setLayerVisibility('header', 'visible');
setLayerVisibility('breadcrumbs', 'visible');
	}
if (bType == "SA")
	{
	bleft = window.innerWidth;
	if (bleft <= 798)
		{
			bleft = 798;
		}
	bleft = bleft / 2 - 223;
	bleft2 = bleft - 158;
	bleft3 = bleft2 + 184;
	bleft4 = bleft3 + 184;
	bleft5 = bleft4 + 184;
setLayerVisibility('date', 'hidden');
setLayerVisibility('header', 'hidden');
setLayerVisibility('breadcrumbs', 'hidden');
eval("document.getElementById('date').style.left=" + bleft2);
eval("document.getElementById('header').style.left=" + bleft2 + 400);
eval("document.getElementById('breadcrumbs').style.left=" + bleft2);
setLayerVisibility('date', 'visible');
setLayerVisibility('header', 'visible');
setLayerVisibility('breadcrumbs', 'visible');
	}
if (bType == "OP")
	{
	bleft = window.innerWidth;
	if (bleft <= 782)
		{
		bleft = 782;
		}
	bleft = bleft / 2 - 224;
	bleft2 = bleft - 148;
	bleft3 = bleft2 + 184;
	bleft4 = bleft3 + 184;
	bleft5 = bleft4 + 184;
setLayerVisibility('date', 'hidden');
setLayerVisibility('header', 'hidden');
setLayerVisibility('breadcrumbs', 'hidden');
eval("document.getElementById('date').style.left=" + bleft2);
eval("document.getElementById('header').style.left=" + bleft2 + 400);
eval("document.getElementById('breadcrumbs').style.left=" + bleft2);
setLayerVisibility('date', 'visible');
setLayerVisibility('header', 'visible');
setLayerVisibility('breadcrumbs', 'visible');
	}
}

function PostcodeCheck(Postcode, Match) {
  var re = new RegExp(Match);
  if (Postcode.match(re)) {
    return true;
  } else {
    return false;
  }
}

function checkcode() {
 var a = document.getElementById("form1");
 a.action = ""
 a.submit();
}
function checkagree() {
	var tt = document.getElementById("checker");
	if (tt.checked) {
		var tt = document.getElementById("continue");
		tt.disabled = false;
	} else {var tt = document.getElementById("continue");tt.disabled = true;}
}

function GetFranchise() {
var postcode = document.getElementById("Postcode").value

 if (postcode == "P21 8IP") {
  document.getElementById("Franchise").innerHTML = "<p><b>You didn't think it was going to be that simple.... did you?<br><br>Your next clue is SUB DOMAIN</b></p>"
 } else 


	var tstring = "";
	postcode = '' + postcode;
	splitstring = postcode.split(" ");
	for(i = 0; i < splitstring.length; i++)
	tstring += splitstring[i];
	postcode = tstring;





 postcode = postcode.substr(0, 3);
 postcode = postcode.toUpperCase();

 if ( PostcodeCheck(postcode, "AB[0-9]") ||  PostcodeCheck(postcode, "DD[0-9]") ||  PostcodeCheck(postcode, "DG[0-9]") ||  PostcodeCheck(postcode, "EH[0-9]") ||  PostcodeCheck(postcode, "FK[0-9]") ||  PostcodeCheck(postcode, "G[0-9][0-9]") ||  PostcodeCheck(postcode, "HS[0-9]") ||  PostcodeCheck(postcode, "IV[0-9]") ||  PostcodeCheck(postcode, "KA[0-9]") ||  PostcodeCheck(postcode, "KW[0-9]")||  PostcodeCheck(postcode, "KY[0-9]") ||  PostcodeCheck(postcode, "ML[0-9]") ||  PostcodeCheck(postcode, "PA[0-9]") ||  PostcodeCheck(postcode, "PH[0-9]") ||  PostcodeCheck(postcode, "TD[0-9]") ||  PostcodeCheck(postcode, "ZE[0-9]")) {
  document.getElementById("Franchise").innerHTML = "<p><b>NCS Office Systems (Scotland) Ltd</b><br>Glasgow<br>65 Rodney Street<br>Glasgow<br>G4 9SQ<br><br>Tel: 0141 353 0000<br>Fax: 0141 353 0011<br>Service: 0870 050 2233<br><br>Edinburgh<br>2nd Floor<br>44 Melville Street<br>Edinburgh<br>EH3 7HF<br><br><p>Tel: 0131 225 5505<br>Fax: 0131 225 5255</p>"
 } else 
if (PostcodeCheck(postcode, "BB[0-9]") || PostcodeCheck(postcode, "BD[0-9]") || PostcodeCheck(postcode, "BL[0-9]") || PostcodeCheck(postcode, "FY[0-9]") || PostcodeCheck(postcode, "HD[0-9]") || PostcodeCheck(postcode, "HX[0-9]") || PostcodeCheck(postcode, "L[0-9][0-9]") || PostcodeCheck(postcode, "LA[0-9]") || PostcodeCheck(postcode, "OL[0-9]") || PostcodeCheck(postcode, "PR[0-9]") || PostcodeCheck(postcode, "WA[0-9]") || PostcodeCheck(postcode, "WN[0-9]") || PostcodeCheck(postcode, "CA[0-9]") || PostcodeCheck(postcode, "DH[0-9]") || PostcodeCheck(postcode, "DL[0-9]") || PostcodeCheck(postcode, "DN[0-9]") || PostcodeCheck(postcode, "HG[0-9]") || PostcodeCheck(postcode, "HU[0-9]") || PostcodeCheck(postcode, "LN[0-9]") || PostcodeCheck(postcode, "LS[0-9]") || PostcodeCheck(postcode, "NE[0-9]") || PostcodeCheck(postcode, "S[0-9][0-9]") || PostcodeCheck(postcode, "SR[0-9]") || PostcodeCheck(postcode, "TS[0-9]") || PostcodeCheck(postcode, "WF[0-9]") || PostcodeCheck(postcode, "YO[0-9]") || PostcodeCheck(postcode, "CH[0-9]") || PostcodeCheck(postcode, "CW[0-9]") || PostcodeCheck(postcode, "DE[0-9]") || PostcodeCheck(postcode, "LL[0-9]") || PostcodeCheck(postcode, "M[0-9][0-9]") || PostcodeCheck(postcode, "SK[0-9]") || PostcodeCheck(postcode, "ST[0-9]") || PostcodeCheck(postcode, "SY[0-9]")) {
  document.getElementById("Franchise").innerHTML = "<p>FP Mailing (North West) Ltd<br>Southerly 7<br>Waterfold Business Park<br>Bury<br>Manchester<br>BL9 7BR<br><br>Tel: 0161 797 7778<br>  Fax: 0161 797 7797<br>Email: enquiries@fpmailingnorthwest.co.uk<br><a href=\"http://www.themailingroom.com\" target=\"_blank\">www.themailingroom.com</a></p>"
 } else
if ( PostcodeCheck(postcode, "B[0-9][0-9]") || PostcodeCheck(postcode, "CV[0-9]") || PostcodeCheck(postcode, "DY[0-9]") || PostcodeCheck(postcode, "LE[0-9]") || PostcodeCheck(postcode, "NG[0-9]") || PostcodeCheck(postcode, "TF[0-9]") || PostcodeCheck(postcode, "WR[0-9]") || PostcodeCheck(postcode, "WS[0-9]") || PostcodeCheck(postcode, "WV[0-9]")) {
  document.getElementById("Franchise").innerHTML = "<p><b>FP Mailing Midlands</b><br>The Barn<br>Little Hyde Hall<br>Hatfield Heath Road<br>Sawbridgeworth<br>CM21 9HX<br><br>Tel: 0844 264 0011<br>Fax: 0844 257 1270<br>Email: sales@fpmailingmidlands.co.uk<br><a href=\"http://www.fpmailingmidlands.co.uk\" target=\"_blank\">www.fpmailingmidlands.co.uk</a></p>"
 } else 
if (PostcodeCheck(postcode, "AL[0-9]") || PostcodeCheck(postcode, "HA[0-9]") || PostcodeCheck(postcode, "HP[0-9]") || PostcodeCheck(postcode, "LU[0-9]") || PostcodeCheck(postcode, "OX[0-9]") || PostcodeCheck(postcode, "SL[0-9]") || PostcodeCheck(postcode, "WD[0-9]") || PostcodeCheck(postcode, "BA[0-9]") || PostcodeCheck(postcode, "BS[0-9]") || PostcodeCheck(postcode, "CF[0-9]") || PostcodeCheck(postcode, "GL[0-9]") || PostcodeCheck(postcode, "HR[0-9]") || PostcodeCheck(postcode, "LD[0-9]") || PostcodeCheck(postcode, "NP[0-9]") || PostcodeCheck(postcode, "SA[0-9]") || PostcodeCheck(postcode, "GU[0-9]") || PostcodeCheck(postcode, "KT[0-9]") || PostcodeCheck(postcode, "NW[0-9]") || PostcodeCheck(postcode, "PO[0-9]") || PostcodeCheck(postcode, "TW[0-9]") || PostcodeCheck(postcode, "W[0-9][0-9]")) {
  document.getElementById("Franchise").innerHTML = "<p><b>FP Mailing (Southwest) Ltd</b><br>40 Alexandra Road<br>Windsor<br>Berkshire<br>SL4 1HU<br><br>Tel: 01753 621868<br>Fax: 01753 862566<br>Mob: 07970 846868<br>Email: sales@fpsouthwest.com</p>"
 } else 
if (  PostcodeCheck(postcode, "BH[0-9]") || PostcodeCheck(postcode, "DT[0-9]") || PostcodeCheck(postcode, "EX[0-9]") || PostcodeCheck(postcode, "PL[0-9]") || PostcodeCheck(postcode, "RG[0-9]") || PostcodeCheck(postcode, "SN[0-9]") || PostcodeCheck(postcode, "SO[0-9]") || PostcodeCheck(postcode, "SP[0-9]") || PostcodeCheck(postcode, "TA[0-9]") || PostcodeCheck(postcode, "TQ[0-9]") || PostcodeCheck(postcode, "TR[0-9]")) {
  document.getElementById("Franchise").innerHTML = "<p><b>FP - IMS Southern Ltd</b><br>Unit 4<br>Saturn House<br>Calleva Park<br>Aldermaston<br>RG7 8HA<br><br>Tel: 0118 982 0988 <br>Fax: 0118 982 0924<br>Email: info@ims-franking.co.uk<br><a href=\"http://www.ims-franking.co.uk\" target=\"_blank\">www.ims-franking.co.uk</a></p>"
 } else
if (PostcodeCheck(postcode, "EN[0-9]") || PostcodeCheck(postcode, "EC[0-9]") || PostcodeCheck(postcode, "EN[0-9]") || PostcodeCheck(postcode, "N[0-9][0-9]") || PostcodeCheck(postcode, "SG[0-9]") || PostcodeCheck(postcode, "WC[0-9]") || PostcodeCheck(postcode, "E[0-9][0-9]") || PostcodeCheck(postcode, "SE[0-9]") || PostcodeCheck(postcode, "EC[0-9]")) {
  document.getElementById("Franchise").innerHTML = "<p><b>FP Mailing Premier Ltd</b><br>Premier House<br>Great Queen Street<br>Dartford<br>Kent<br>DA1 1TJ<br><br>Tel: 0844 567 9010<br>Fax: 0844 567 9020<br>Email: enquiries@fpmailingcity.co.uk<br><a href=\"http://www.themailingroom.com\" target=\"_blank\">www.themailingroom.com</a></p>"
 } else
if (PostcodeCheck(postcode, "BN[0-9]") || PostcodeCheck(postcode, "BR[0-9]") || PostcodeCheck(postcode, "CR[0-9]") || PostcodeCheck(postcode, "CT[0-9]") || PostcodeCheck(postcode, "DA[0-9]") || PostcodeCheck(postcode, "ME[0-9]") || PostcodeCheck(postcode, "RH[0-9]") || PostcodeCheck(postcode, "SM[0-9]") || PostcodeCheck(postcode, "SW[0-9]") || PostcodeCheck(postcode, "TN[0-9]")) {
  document.getElementById("Franchise").innerHTML = "<p><b>FP Mailing (South)</b><br>Unit 15, Swan Business Park<br>Sandpit Road<br>Dartford<br>Kent<br>DA1 5ED<br><br>Tel: 01322 288890<br>Fax: 01322 288866<br>Email: enquiries@fpmailingcity.co.uk<br><a href=\"http://www.themailingroom.com\" target=\"_blank\">www.themailingroom.com</a></p>"
 } else
if (PostcodeCheck(postcode, "BT[0-9]")) {
  document.getElementById("Franchise").innerHTML = "<p>Copytext<br>4 Union Buildings<br>Union Place<br>Dungannon<br>Co Tyrone<br>N. Ireland<br>BT70 1DL<br><br>Tel: 028 87753939<br>Fax: 028 87753929<br>Email: phughes@copytextni.co.uk</p>"
 } else
if (PostcodeCheck(postcode, "CB[0-9]") || PostcodeCheck(postcode, "CM[0-9]") || PostcodeCheck(postcode, "CO[0-9]") || PostcodeCheck(postcode, "IG[0-9]") || PostcodeCheck(postcode, "IP[0-9]") || PostcodeCheck(postcode, "MK[0-9]") || PostcodeCheck(postcode, "NN[0-9]") || PostcodeCheck(postcode, "NR[0-9]") || PostcodeCheck(postcode, "PE[0-9]") || PostcodeCheck(postcode, "RM[0-9]") || PostcodeCheck(postcode, "SS[0-9]")  ) {
  document.getElementById("Franchise").innerHTML = "<p>FP Mailing (SouthEast) Ltd<br>Regus House<br>Victor Way<br>Admirals Park<br>Crossways<br>Dartford<br>Kent<br>DA2 6QD<br><br>Tel: 0844 880 2388<br>Fax: 0844 880 2505<br>Email: info@fpsystemsuk.com</p>"
 } 
};
var sTarget;
var sInput;
sInput = ""
sTarget = ""
function doPostcode(ID)
	{
	if (ID == "Outcode") {sInput = "Outcode";sTarget = "calender";}
	var d = document.getElementById('frm').Outcode.value;
	var e = document.getElementById('frm').Incode.value;
  	document.getElementById('frm1').action = "diary.asp?Outcode=" + d + "&Incode=" + e;
  	document.getElementById('frm1').target = "HDiary";
	document.getElementById('frm1').submit();
	}

function Loading()
	{
	sInput = "Outcode";sTarget = "calender";
	document.getElementById('frm1').action = "loading.asp"
	document.getElementById('frm1').target = "HDiary";
	document.getElementById('frm1').submit();
	}
var theInterval;
function doLoadCalender(newData) {
    if( theInterval ) { clearInterval(theInterval); }
    var d = document.getElementById(sTarget);
		d.style.display = 'none';
	d.innerHTML = newData;
		d.style.display = 'block';
}
function doSelect(dateSelected)
	{
	var d = document.getElementById(sInput);
	d.value = dateSelected;
	var d = document.getElementById(sTarget);
	d.style.display = 'none';
	}
	
sfHover = function()
{
	var sfEls = document.getElementById("levelzero").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++)
	{
		sfEls[i].onmouseover = function()
		{
			this.className += " sfhover";
		}
		sfEls[i].onmouseout = function()
		{
			this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);






function computesize(form)
{
letter_first_sav = form.letters_first.value;
letter_second_sav = form.letters_second.value;

large_first_sav = form.large_first.value;
large_second_sav = form.large_second.value;
totalletters = parseInt(letter_first_sav) + parseInt(letter_second_sav) + parseInt(large_first_sav) + parseInt(large_second_sav)
packet_100first = form.pack_100_first.value;
packet_100second = form.pack_100_second.value;
packet_250first = form.pack_250_first.value;
packet_250second = form.pack_250_second.value;
packet_500first = form.pack_500_first.value;
packet_500second = form.pack_500_second.value;
packet_750first = form.pack_750_first.value;
packet_750second = form.pack_750_second.value;
packet_1000first = form.pack_1000_first.value;
packet_1000second = form.pack_1000_second.value;

letter_first_sav = ((letter_first_sav * 2) /100 );
letter_second_sav = ((letter_second_sav * 2) /100 );
large_first_sav = ((large_first_sav * 4) /100 );
large_second_sav = ((large_second_sav * 4) /100 );

packet_100first_sav = ((packet_100first * 6) /100 );
packet_100second_sav = ((packet_100second * 5) /100 );
packet_250first_sav = ((packet_250first * 7) /100 );
packet_250second_sav = ((packet_250second * 6) /100 );
packet_500first_sav = ((packet_500first * 15) /100 );
packet_500second_sav = ((packet_500second * 13) /100 );
packet_750first_sav = ((packet_750first * 20) /100 );
packet_750second_sav = ((packet_750second * 16) /100 );
packet_1000first_sav = ((packet_1000first * 24) /100 );
packet_1000second_sav = ((packet_1000second * 19) /100 );





total_week_sav = (letter_first_sav + letter_second_sav + large_first_sav + large_second_sav + packet_100first_sav + packet_100second_sav + packet_250first_sav + packet_250second_sav + packet_500first_sav + packet_500second_sav + packet_750first_sav + packet_750second_sav + packet_1000first_sav + packet_1000second_sav );

total_week_sav = (total_week_sav * 100);

total_week_sav = Math.round(total_week_sav);

total_week_sav = (total_week_sav /100);


total_year_sav = (total_week_sav * 52);
total_year_sav = (total_year_sav * 100);

total_year_sav = Math.round(total_year_sav);

total_year_sav = (total_year_sav / 100);

results=window.open("","results","width=450,height=400")

results.document.write ("<center><font color='#666666'><h2>The Results of Your Survey</h2></center><p>In addition to all the benefits of using a franking machine, convenience, advertising, security, speed through the post, control, corporate professional image etc etc you would also make a saving of</p><p><font color='#993333'>£" + total_week_sav + " per week</font></p>");
results.document.write ("<p><font color='#993333'>or £" + total_year_sav + " per year</font></p>" );


if (totalletters <= 300)
     results.document.write ("<p><b> We recommend based purely on your postal volumes our world class mymail</b></p><a href=javascript:opener.location='index.asp';self.close()>Get more details of this solution and start saving now</a>");

if (totalletters > 300)
     results.document.write ("<br /><br /><b>In our experience of companies with your mail volume you will not only benefit from correct FP Franking Machine but also by maximizing the savings available from Royal Mail or DX. Please <a href=javascript:opener.location='information.asp';self.close()>click to receive further information</a>.</b><br /><br />");



results.document.write ("<center><a href='javascript:window.close();'>Close Window</a></center>");

}









function RateChangeInstructions (Movie, Width, Height) {
Width = parseInt(Width) + 10;
Height = parseInt(Height) + 10;

	window.open("RateChangeShow.asp?MovieSrc=" + Movie + "&Height=&Width=","ratechange","width=" + Width + ",height=" + Height)
}





function DiscCheck () {
	var tt = document.getElementById("iddcheck");
	if (tt.checked) {
		var tt = document.getElementById("continue");
		tt.disabled = false;
		var dd = document.getElementById("DiscDate")
		var currentTime = new Date()
		var month = currentTime.getMonth() + 1
		var day = currentTime.getDate()
		var year = currentTime.getFullYear()
		dd.innerHTML = day  + "/" + month + "/" + year;
	} else {
		var tt = document.getElementById("continue");
		tt.disabled = true;
		var dd = document.getElementById("DiscDate")
		dd.innerHTML = "";
	}
}


function SubmitIDD () {
	window.open("/images/ReturnsForm.pdf")
}







function CancelDownload () {
	var tt = document.getElementById("Terms");
	if (bType == "IE")
	tt.style.display='none'; 
	if (bType == "NN")
	tt.display='none'; 
	if (bType == "MO" || bType == "OP") 
	tt.style.display='none'; 
}

function DownloadCheck () {
	var tt = document.getElementById("iddcheck");
	if (tt.checked) {
		var aa = document.getElementById("AddressKey");
		var bb = document.getElementById("company");
		var cc = document.getElementById("tel");		
		var dd = document.getElementById("name");
		var errr = ""
		if (aa.value.length == 0) {errr = errr + "Please enter an Address\n";}
		if (bb.value.length == 0) {errr = errr + "Please enter a Company Name\n";}
		if (cc.value.length == 0) {errr = errr + "Please enter a Telephone Number\n";}
		if (dd.value.length == 0) {errr = errr + "Please enter a Contact Name\n";}
		if (errr != "") {
			var tt = document.getElementById("iddcheck");
			tt.checked = false;
			alert (errr);
		} else {
			var tt = document.getElementById("iddcontinue");
			tt.disabled = false;
		}
	}
}
function SubmitDownload () {
	window.open("/HelpCentre/Karat_demo.zip");
	var tt = document.getElementById("frm");
	tt.submit();
}
function SubmitDownload2 () {
	window.open("/HelpCentre/Infoprint12.zip");
	var tt = document.getElementById("frm");
	tt.submit();
}
function GetDownload () {
	var tt = document.getElementById("Terms");
	if (bType == "IE"){
		bleft = document.body.clientWidth;
		if (bleft <= 762)
			{
			bleft = 762;
			}
		bleft = bleft / 2 - 160;
		tt.style.left = bleft;
		tt.style.display='inline';}
	if (bType == "NN") {
		bleft = window.innerWidth;
		if (bleft <= 762)
			{
			bleft = 762;
			}
		bleft = bleft / 2 - 360;
		setPosition ('Terms', bleft)
		tt.display='inline';}
	if (bType == "MO" || bType == "OP") {
		bleft = window.innerWidth;
		if (bleft <= 762)
			{
			bleft = 762;
			}
		bleft = bleft / 2 - 160;
		setPosition ('Terms', bleft)
		tt.style.display='inline';}
}