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 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)
{
setLayerVisibility(a, 'hidden');
}
if(b.length > 1)
{
setLayerVisibility(b, 'hidden');
}
if(c.length > 1)
{
setLayerVisibility(c, 'hidden');
}
}
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 (pstrID, pstrSubID)
{
if(a.length > 1)
{
setLayerVisibility(a, 'hidden');
}
if(b.length > 1)
{
setLayerVisibility(b, 'hidden');
}
if(c.length > 1)
{
setLayerVisibility(c, 'hidden');
}
a = pstrSubID;
setPosition(a, bleft3);
setLayerVisibility(pstrSubID, 'visible');
}
function doMenuOnB (pstrID, pstrSubID)
{
if(b.length > 1)
{
setLayerVisibility(b, 'hidden');
}
if(c.length > 1)
{
setLayerVisibility(c, 'hidden');
}
b = pstrSubID;
setPosition(b, bleft4);
setLayerVisibility(pstrSubID, 'visible');
}
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);
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);
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);
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);
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);
eval("document.getElementById('breadcrumbs').style.left=" + bleft2);
setLayerVisibility('date', 'visible');
setLayerVisibility('header', 'visible');
setLayerVisibility('breadcrumbs', 'visible');
	}
}


function GetFranchise() {
var postcode = document.getElementById("Postcode").value
 postcode = postcode.substr(0, 2);
 postcode = postcode.toUpperCase();

 if (postcode == "AB" || postcode == "DD" || postcode == "DG" || postcode == "EH" || postcode == "FK" || postcode == "G1" || postcode == "G2" || postcode == "G3" || postcode == "G4" || postcode == "G5" || postcode == "G6" || postcode == "G7" || postcode == "G8" || postcode == "G9" || postcode == "G0" || postcode == "IV" || postcode == "KA" || postcode == "KW" || postcode == "KY" || postcode == "ML" || postcode == "PA" || postcode == "PH" || postcode == "TD" || postcode == "ZE") {
  document.getElementById("Franchise").innerHTML = "<p><b>Tom Nolan<br>NCS Office Systems (Scotland) Ltd</b><br>Glasgow<br>65 Rodney Street<br>Glasgow<br>G4 9SY<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 (postcode == "BB" || postcode == "BD" || postcode == "BL" || postcode == "FY" || postcode == "HD" || postcode == "HX" || postcode == "L1" || postcode == "L2" || postcode == "L3" || postcode == "L4" || postcode == "L5" || postcode == "L6" || postcode == "L7" || postcode == "L8" || postcode == "L9" || postcode == "L0" || postcode == "LA" || postcode == "OL" || postcode == "PR" || postcode == "WA" || postcode == "WN") {
  document.getElementById("Franchise").innerHTML = "<p>George W. Bevan<br><br>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>Mobile: 07740 617915<br>Email: enquiries@fpmailingnorthwest.co.uk</p>"
 } else 

if (postcode == "CA" || postcode == "DH" || postcode == "DL" || postcode == "DN" || postcode == "HG" || postcode == "HU" || postcode == "LN" || postcode == "LS" || postcode == "NE" || postcode == "S1" || postcode == "S2" || postcode == "S3" || postcode == "S4" || postcode == "S5" || postcode == "S6" || postcode == "S7" || postcode == "S8" || postcode == "S9" || postcode == "S0" || postcode == "SR" || postcode == "TS" || postcode == "WF" || postcode == "YO") {
  document.getElementById("Franchise").innerHTML = "<p>George W. Bevan<br><br>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>Mobile: 07740 617915<br>Email: enquiries@fpmailingnorthwest.co.uk</p>"
 } else 

if (postcode == "CV" || postcode == "LE" || postcode == "NG") {
  document.getElementById("Franchise").innerHTML = "<p><b>Steve Suckling<br><br>FP - IMS (Central) Ltd</b><br>Central House<br>89 High Street<br>Bassingbourn<br>Hertforshire<br>SG8 5OF<br><br>Tel: 01279 817244<br>Fax: 01279 817245<br>Mobile: 07976 525464<br>Email: stevesuckling@aol.com</p>"
 } else 

if (postcode == "CH" || postcode == "CW" || postcode == "DE" || postcode == "LL" || postcode == "M1" || postcode == "M2" || postcode == "M3" || postcode == "M4" || postcode == "M5" || postcode == "M6" || postcode == "M7" || postcode == "M8" || postcode == "M9" || postcode == "M0" || postcode == "SK" || postcode == "ST" || postcode == "SY") {
  document.getElementById("Franchise").innerHTML = "<p>George W. Bevan<br><br>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>Mobile: 07740 617915<br>Email: enquiries@fpmailingnorthwest.co.uk</p>"
 } else 

if (postcode == "B1" || postcode == "B2" || postcode == "B3" || postcode == "B4" || postcode == "B5" || postcode == "B6" || postcode == "B7" || postcode == "B8" || postcode == "B9" || postcode == "B0" || postcode == "DY" || postcode == "TF" || postcode == "WR" || postcode == "WS" || postcode == "WV") {
  document.getElementById("Franchise").innerHTML = "<p><b>Steve Suckling<br><br>FP - IMS (Central) Ltd</b><br>Central House<br>89 High Street<br>Bassingbourn<br>Hertforshire<br>SG8 5OF<br><br>Tel: 01279 817244<br>Fax: 01279 817245<br>Mobile: 07976 525464<br>Email: stevesuckling@aol.com</p>"
 } else 

if (postcode == "AL" || postcode == "HA" || postcode == "HP" || postcode == "LU" || postcode == "OX" || postcode == "SL" || postcode == "UB" || postcode == "WD") {
  document.getElementById("Franchise").innerHTML = "<p><b>Bob Good<br><br>FP IMS (Windsor) Ltd</b><br>40 Alexandra Road<br>Windsor<br>Berkshire<br>SL4 1HU<br><br>Tel: 01753 621868<br>Fax: 01753 862566<br>Mobile: 07970 846868<br>Email: fpwindso@globalnet.co.uk</p>"
 } else 

if (postcode == "BA" || postcode == "BS" || postcode == "CF" || postcode == "GL" || postcode == "HR" || postcode == "LD" || postcode == "NP" || postcode == "SA" || postcode == "SN") {
  document.getElementById("Franchise").innerHTML = "<p><b>John Lafferty<br><br>FP - IMS (Southern) Ltd</b><br>Unit 6 Railway Wharf<br>Station Road<br>Wrington<br>Bristol<br>BS40 5LL<br><br>Tel: 01934 861100<br>Fax: 01934 861195<br>Mobile: 07971 878382<br>Email: info@ims-franking.co.uk</p>"
 } else 

if (postcode == "BH" || postcode == "DT" || postcode == "EX" || postcode == "PL" || postcode == "RG" || postcode == "SO" || postcode == "SP" || postcode == "TA" || postcode == "TQ" || postcode == "TR") {
  document.getElementById("Franchise").innerHTML = "<p><b>John Lafferty<br><br>FP - IMS (Southern) Ltd</b><br>Unit 6 Railway Wharf<br>Station Road<br>Wrington<br>Bristol<br>BS40 5LL<br><br>Tel: 01934 861100<br>Fax: 01934 861195<br>Mobile: 07971 878382<br>Email: info@ims-franking.co.uk</p>"
 } else 

if (postcode == "GU" || postcode == "KT" || postcode == "NW" || postcode == "PO" || postcode == "TW" || postcode == "W0" || postcode == "W1" || postcode == "W2" || postcode == "W3" || postcode == "W4" || postcode == "W5" || postcode == "W6" || postcode == "W7" || postcode == "W8" || postcode == "W9") {
  document.getElementById("Franchise").innerHTML = "<p><b>Bob Good<br><br>FP IMS (Windsor) Ltd</b><br>40 Alexandra Road<br>Windsor<br>Berkshire<br>SL4 1HU<br><br>Tel: 01753 621868<br>Fax: 01753 862566<br>Mobile: 07970 846868<br>Email: fpwindso@globalnet.co.uk</p>"
 } else 

if (postcode == "CB" || postcode == "CM" || postcode == "CO" || postcode == "EN" || postcode == "IG" || postcode == "IP" || postcode == "MK" || postcode == "NN" || postcode == "NR" || postcode == "PE" || postcode == "RM" || postcode == "SG" || postcode == "SS") {
  document.getElementById("Franchise").innerHTML = "<p><b>Nick Clement<br><br>FP Mailing (South East) Ltd</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 2888664<br>Mobile: 07976 931281<br>Email: franking@fpmailing.fsnet.co.uk</p>"
 } else 

if (postcode == "BN" || postcode == "BR" || postcode == "CR" || postcode == "CT" || postcode == "DA" || postcode == "ME" || postcode == "RH" || postcode == "SM" || postcode == "SW" || postcode == "TN") {
  document.getElementById("Franchise").innerHTML = "<p><b>Steve Rogers<br><br>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 2888664<br>Mobile: 07976 931281<br>Email: franking@fpmailing.fsnet.co.uk</p>"
 } else 

if (postcode == "BT") {
  document.getElementById("Franchise").innerHTML = "<p>Paul Hughes<br><br>Copytext<br>29 Irish Street<br>Dungannon<br>Co. Tyrone<br>N.Ireland<br>BT70 1DB<br><br>Tel: 02887 729277<br>Fax: 02887 753929<br>Mobile: 07970 777744<br>Email: phughes@copytextni.co.uk</p>"
 } else 

if (postcode == "E0" || postcode == "E1" || postcode == "E2" || postcode == "E3" || postcode == "E4" || postcode == "E5" || postcode == "E6" || postcode == "E7" || postcode == "E8" || postcode == "E9" || postcode == "EC" || postcode == "N0" || postcode == "N1" || postcode == "N2" || postcode == "N3" || postcode == "N4" || postcode == "N5" || postcode == "N6" || postcode == "N7" || postcode == "N8" || postcode == "N9" || postcode == "SE" || postcode == "WC") {
  document.getElementById("Franchise").innerHTML = "<p><b>Nick Clement<br>Steve Rogers<br><br>FP Mailing (City) Ltd</b><br>Unit 15, Swan Business Park<br>Sandpit Road<br>Dartford<br>Kent<br>DA1 5ED<br><br>Tel: 01322 288 890<br>Fax: 01322 288 866<br>Mobile: 07976 931281 (Nick)<br>Mobile: 07956 454730 (Steve)<br>Email: franking@fpmailing.fsnet.co.uk</p>"
 }
};


