var global_country_names = new Array();
global_country_names['ENG'] = 'England';
global_country_names['WAL'] = 'Wales';
global_country_names['SCO'] = 'Scotland';
global_country_names['FRA'] = 'France';
global_country_names['NED'] = 'Netherlands';
global_country_names['SVK'] = 'Slovakia';

var global_uk_historic_county_data  = new Array(
'ABN','Aberdeenshire',
'AGL','Anglesey',
'ANG','Angus',
'ANM','Antrim',
'ARG','Aygyllshire',
'ARH','Armagh',
'AYS','Ayrshire',
'BNF','Banffshire',
'BED','Bedfordshire',
'BER','Berkshire',
'BRW','Berwickshire',
'BRN','Brecknockshire',
'BUC','Buckinghamshire',
'BTE','Buteshire',
'CRN','Caernarfonshire',
'CTN','Caithness',
'CMB','Cambridgeshire',
'CRD','Cardiganshire',
'CRM','Carmarthenshire',
'CHE','Cheshire',
'CLM','Clackmannanshire',
'CNW','Cornwall',
'CRT','Cromartyshire',
'CUM','Cumberland',
'DBH','Denbighshire',
'DRB','Derbyshire',
'DVN','Devon',
'DRS','Dorset',
'DWN','Down',
'DMF','Dumfriesshire',
'DUN','Dunbartonshire',
'DRH','Durham',
'ELT','East Lothian',
'ESE','Essex',
'FRM','Fermanagh',
'FFE','Fife',
'FLT','Flintshire',
'GLM','Glamorgan',
'GLC','Gloucesterhsire',
'HMP','Hampshire',
'HRF','Herefordshire',
'HTF','Hertfordshire',
'HNT','Huntingdonshire',
'INS','Inverness-shire',
'KNT','Kent',
'KNC','Kincardineshire',
'KNR','Kinross-shire',
'KCB','Kirkcudbrightshire',
'LNK','Lanarkshire',
'LCS','Lancashire',
'LCR','Leicestershire',
'LNC','Lincolnshire',
'LDR','Londonderry',
'MRN','Merionethshire',
'MSX','Middlesex',
'MLT','Midlothian',
'MNM','Monmouthshire',
'MTG','Montgomeryshire',
'MOY','Morayshire',
'NRN','Nairnshire',
'NRF','Norfolk',
'NHP','Northamptonshire',
'NHB','Northumberland',
'NOT','Nottinghamshire',
'ORN','Orkney',
'OXD','Oxfordshire',
'PBS','Peebleshire',
'PMB','Pembrokeshire',
'PRT','Perthshire',
'RDN','Radnorshire',
'RNF','Renfrewshire',
'RSS','Ross-shire',
'RXB','Roxburghshire',
'RTL','Rutland',
'SKK','Selkirkshire',
'SHT','Shetland',
'SHP','Shropshire',
'SMS','Somerset',
'STF','Staffordshire',
'STL','Stirlingshire',
'SFF','Suffolk',
'SUR','Surrey',
'SUS','Sussex',
'SRL','Sutherland',
'TYN','Tyrone',
'WRW','Warwickshire',
'WLT','West Lothian',
'WML','Westmorland',
'WGT','Wigtownshire',
'WTS','Wiltshire',
'WRC','Worcestershire',
'YRK','Yorkshire');

var global_uk_historic_county_names = new Array();

for(var i=0; i<global_uk_historic_county_data.length; i+=2)
{
    global_uk_historic_county_names[global_uk_historic_county_data[i]] = global_uk_historic_county_data[i+1];
}




function Castle(name, zoom, lat, long, os_east, os_north, country, hist_cty, county, type, built, info)
{
    this.index    = -1;
    this.name     = name;
    this.zoom     = zoom;
    this.lat      = lat;
    this.long     = long;
    this.os_east  = os_east;
    this.os_north = os_north;
    this.hist_cty = hist_cty;
    this.country  = country;
    this.county   = county;
    this.type     = type;
    this.built    = built;
    this.info     = info;
}


Castle.prototype.type_key = [];
Castle.prototype.type_key['tc']  = 'Timber Castle';
Castle.prototype.type_key['mc']  = 'Masonry Castle';
Castle.prototype.type_key['sw']  = 'Siege Works';
Castle.prototype.type_key['fmh'] = 'Fortified Manor House';
Castle.prototype.type_key['fth'] = 'Fortified Town House';
Castle.prototype.type_key['p']   = 'Palace';
Castle.prototype.type_key['th']  = 'Tower House';
Castle.prototype.type_key['pt']  = 'Pele Tower';
Castle.prototype.type_key['b']   = 'Bastle';
Castle.prototype.type_key['af']  = 'Artillery Fort';
Castle.prototype.type_key['ct']  = 'Chain Tower';
Castle.prototype.type_key['fe']  = 'Fortified Ecclesiastical';
Castle.prototype.type_key['ud']  = 'Urban Defence';
Castle.prototype.type_key['ldd'] = 'Linear Defence or Dyke';
Castle.prototype.type_key['gr']  = 'Gothic Revival';
Castle.prototype.type_key['f']   = 'Folly';


Castle.prototype.build_key = [];
Castle.prototype.build_key['XXX'] = 'Unknown';
for (var i=10; i<=20; ++i)
{
	Castle.prototype.build_key['X' + i] =            i + 'th Century';
	Castle.prototype.build_key['E' + i] = 'Early ' + i + 'th Century';
	Castle.prototype.build_key['M' + i] = 'Mid '   + i + 'th Century';
	Castle.prototype.build_key['L' + i] = 'Late '  + i + 'th Century';
}


var global_castle_data = new Array(
new Castle("Aberystwyth Castle"      ,17,52.413376,-4.089864,257948,281550,'WAL','CRD',        "Ceredigion",['mc'],               ['L13'],"Built to secure dominance over the last prince of an independent Wales."),
new Castle("Acton Burnell Castle"    ,17,52.612867,-2.689741,353390,301900,'ENG','SHP',        "Shropshire",['p','fmh'],          ['L13'],"The warm red sandstone shell of a fortified manor house, with an important role in Parliament."),
new Castle("Alnwick Castle"          ,17,55.415685,-1.706024,418709,613569,'ENG','NHB',    "Northumberland",['tc','mc'],               [],"Built to protect England's northern border against the Scottish invasions and border reivers."),
new Castle("Alton Towers"            ,17,52.986129,-1.893522,407250,343213,'ENG','STF',     "Staffordshire",['gr'],         ['E19','M19'],""),
new Castle("Ashby-de-la-Zouch Castle",17,52.746451,-1.466449,436107,316654,'ENG','LCR',    "Leicestershire",['th'],                    [],""),
new Castle("Baddesley Clinton"       ,17,52.340993,-1.708640,419960,271480,'ENG','WRW',      "Warwickshire",['fmh'],                   [],"A haven for persecuted Catholics in the Elizabethan era with three priest's holes."),
new Castle("Baginton Castle"         ,17,52.369668,-1.500200,434100,274750,'ENG','WRW',      "Warwickshire",['tc','mc'],               [],""),
new Castle("Baile Hill"              ,17,53.953908,-1.083071,460260,451260,'ENG','YRK',         "Yorkshire",['tc','mc'],               [],""),
new Castle("Bamburgh Castle"         ,17,55.609148,-1.710370,418339,635097,'ENG','NHB',    "Northumberland",['tc','mc'],               [],""),
new Castle("Barden Tower"            ,17,54.010725,-1.923857,405067,457192,'ENG','YRK',         "Yorkshire",['th'],         ['X12','M17'],"Built for the Cliffords of Skipton, a principle lodge of noblemen and the setting for Forest Courts."),
new Castle("Bayard's Cove Fort"      ,17,50.347890,-3.577453,287850, 50965,'ENG','DVN',             "Devon",['af'],               ['E16'],"A small artillery fort built in the 16th century to defend Dartmouth harbour."),
new Castle("Beaudesert Castle"       ,17,52.292983,-1.773155,415500,266000,'ENG','WRW',      "Warwickshire",['tc','mc'],               [],""),
new Castle("Beaumaris Castle"        ,17,53.264819,-4.089741,260729,376248,'WAL','AGL',          "Anglesey",['mc'],                    [],""),
new Castle("Beaumont Castle"         ,17,52.001819,-1.112741,461001,234076,'ENG','OXD',       "Oxfordshire",['tc','mc'],               [],""),
new Castle("Beeston Castle"          ,17,53.128711,-2.693474,353693,359286,'ENG','CHE',          "Cheshire",['mc'],                    [],"A dramatically sited fortress crowning a sandstone crag towering above the Cheshire Plain."),
new Castle("Belsay Castle"           ,17,55.101274,-1.868853,408466,578547,'ENG','NHB',    "Northumberland",['th'],                    [],"A fine castle dominated by a massive pele tower, enlarged into a Jacobean mansion by the Middleton family. "),
new Castle("Berkhamsted Castle"      ,17,51.763817,-0.559251,499500,208200,'ENG','HTF',     "Hertfordshire",['tc','mc'],               [],"Substantial remains of a strong and important motte and bailey lived in by Thomas Becket in the 12th Century."),
new Castle("Berry Pomeroy Castle"    ,17,50.449207,-3.636603,283897, 62320,'ENG','DVN',             "Devon",['mc'],         ['L15','M17'],"Built in a secluded wooded valley, a late-medieval fortified house steeped in mystery and folklore."),
new Castle("Berwick Castle"          ,17,55.773595,-2.012488,399382,653415,'ENG','NHB',    "Northumberland",['tc','mc'],    ['M12','L16'],"Occupying a strategic position on the Scottish border, Berwick was fought over for 300 years."),
new Castle("Bodiam Castle"           ,17,51.002406, 0.543534,578530,125600,'ENG','SUS',       "East Sussex",['mc'],               ['L14'],"One of the most romantic and picturesque of all England's castles."),
new Castle("Boulougne-Sur-Mer Castle",17,50.725603, 1.617265,     0,     0,'FRA',   '',"Nord-Pas-de-Calais",[],             ['E13','X16'],"A keep-less castle of irregular polygonal from with nine towers."),
new Castle("Brandon Castle"          ,17,52.379798,-1.402270,440700,275900,'ENG','WRW',      "Warwickshire",['tc','mc'],               [],""),
new Castle("Bratislava Castle"       ,17,48.143046,17.100434,     0,     0,'SVK',   '', "Bratislavský kraj",[],                        [],""),
new Castle("Bridgnorth Castle"       ,17,52.532181,-2.419347,371665,292780,'ENG','SHP',        "Shropshire",['tc','mc'],    ['E12','L12'],"Built by the notorious Robert de Belesme, who plotted to overthrow King Henry I."),
new Castle("Brinklow Castle"         ,17,52.412494,-1.357434,443804,279582,'ENG','WRW',      "Warwickshire",['tc'],                    [],""),
new Castle("Broadway Tower"          ,17,52.024204,-1.835763,411400,236300,'ENG','WRC',    "Worcestershire",['f'],                     [],""),
new Castle("Broughton Castle"        ,17,52.040566,-1.392195,441785,238200,'ENG','OXD',       "Oxfordshire",['fmh'],        ['E14','M16'],"A medieval house with a military appearance, home to Lord and Lady Saye and Sele."),
new Castle("Caernarfon Castle"       ,17,53.139357,-4.276900,247780,362670,'WAL','CRN',           "Gwynedd",['tc','mc','p'],['L13','E14'],"The most famous of Wales's many castles, its sheer scale and presence easily set it apart from the rest."),
new Castle("Caludon Castle"          ,17,52.418020,-1.451617,437393,280144,'ENG','WRW',      "Warwickshire",['fmh'],                   [],""),
new Castle("Castell-Y-Bere"          ,17,52.658191,-3.971257,266772,308565,'WAL','MRN',           "Gwynedd",['mc'],                    [],""),
new Castle("Chester Castle"          ,17,53.185317,-2.892505,340455,365665,'ENG','CHE',          "Cheshire",['tc','mc'],               [],""),
new Castle("Chipping Ongar Castle"   ,17,51.705153, 0.247686,555400,203100,'ENG','ESE',             "Essex",['tc','mc'],               [],""),
new Castle("Clifford's Tower"        ,17,53.955849,-1.080088,460465,451475,'ENG','YRK',         "Yorkshire",['tc','mc'],               [],"An unusual four-lobed keep that played an important part in controlling northern England."),
new Castle("Clun Castle"             ,17,52.421706,-3.032635,329873,280915,'ENG','SHP',        "Shropshire",['tc','mc'],               [],"Dramatic riverside ruins and extensive earthworks of a Welsh Border castle."),
new Castle("Cockermouth Castle"      ,17,54.665204,-3.362337,312227,530866,'ENG','CUM',           "Cumbria",['tc','mc'],               [],"Sited by the junction of rivers Cocker and Derwent, played a significant role in the War of the Roses and Civil War."),
new Castle("Cocklaw Tower"           ,17,55.034808,-2.096653,393920,571147,'ENG','NHB',    "Northumberland",['th'],                    [],""),
new Castle("Colchester Castle"       ,17,51.890577, 0.903057,599860,225325,'ENG','ESE',             "Essex",['mc'],                    [],""),
new Castle("Compton Castle"          ,17,50.472542,-3.600270,286547, 64860,'ENG','DVN',             "Devon",['fmh'],        ['M14','E16'],"A magical fortified manor house once owned by the coloniser of Newfoundland."),
new Castle("Conisbrough Castle"      ,17,53.484337,-1.226177,451445,398905,'ENG','YRK',         "Yorkshire",['tc','mc'],               [],"Spectacular magnesian limestone keep nearly 100 foot high built for Hamelin Plantagenet."),
new Castle("Conwy Castle"            ,17,53.280072,-3.825683,278389,377468,'WAL','CRN',             "Conwy",['mc','p'],                [],""),
new Castle("Croft Castle"            ,17,52.284401,-2.808528,344940,265442,'ENG','HRF',     "Herefordshire",['mc'],                    [],"A place of power, politics and pleasure nestled in the Herefordshire countryside."),
new Castle("Dartmouth Castle"        ,17,50.342367,-3.566032,288690, 50270,'ENG','DVN',             "Devon",['af'],         ['L14','M16'],"A brilliantly positioned defensive castle jutting into the narrow enterance to the Dart estuary."),
new Castle("Daws Castle"             ,17,51.181798,-3.343256,306200,143400,'ENG','SMS',          "Somerset",['ud'],                    [],"Where the people of the Saxon town of Watchet sought refuge against the threat of Viking attack."),
new Castle("Deal Castle"             ,17,51.219410, 1.403562,637772,152195,'ENG','KNT',              "Kent",['af'],                    [],"Designed to deflect incoming cannon balls this is amongst the earliest and most elaborate chain of coastal forts."),
new Castle("Deddington Castle"       ,17,51.980708,-1.314250,447130,231575,'ENG','OXD',       "Oxfordshire",['tc','mc'],          ['X12'],"Extensive earthworks conceal the remains of a 12th century castle."),
new Castle("Denbigh Castle"          ,17,53.180591,-3.420686,305140,365775,'WAL','DBH',      "Denbighshire",['mc'],         ['L13','X15'],"The ruins dominating the Vale of Clwyd include a circuit of town walls over half a mile long."),
new Castle("Dolbadarn Castle"        ,17,53.116623,-4.114321,258599,359818,'WAL','CRN',           "Gwynedd",['mc'],                    [],""),
new Castle("Donnington Castle"       ,17,51.419642,-1.338339,446000,169100,'ENG','BER',         "Berkshire",['mc'],         ['XXX','L14'],"The striking twin-towered gatehouse of this castle is a proud survivor of parliamentary guns."),
new Castle("Dover Castle"            ,17,51.129156, 1.321911,632625,141795,'ENG','KNT',              "Kent",['tc','mc','p'],           [],"The first concentric fortress in Western Europe seen as 'Key to England' for over nine centuries."),
new Castle("Duddo Tower"             ,17,55.676788,-2.100135,393792,642605,'ENG','NHB',    "Northumberland",['pt'],               ['L16'],"A ruined strong house built from roughly-coursed stone in the late 16th centry."),
new Castle("Dudley Castle"           ,17,52.514536,-2.079667,394691,290742,'ENG','STF',     "West Midlands",['tc','mc'],               [],""),
new Castle("Dunbar Castle"           ,17,56.005985,-2.517226,367844,679348,'SCO','ELT',                  "",[],                        [],""),
new Castle("Dunster Castle"          ,17,51.181422,-3.444782,299100,143400,'ENG','SMS',          "Somerset",['tc','mc'],               [],"Dramatically sited on a wooded hill with an impressive medieval gatehouse."),
new Castle("Durham Castle"           ,17,54.775442,-1.576248,427357,542363,'ENG','DRH',            "Durham",['tc','mc','p'],           [],""),
new Castle("Edinburgh Castle"        ,17,55.948540,-3.200305,325145,673515,'SCO','MLT',                  "",[],                        [],""),
new Castle("Edlingham Castle"        ,17,55.376770,-1.818363,411608,609214,'ENG','NHB',    "Northumberland",['mc'],                    [],"Manor house progressively fortified against the Scots during the 14th century."),
new Castle("Etal Castle"             ,17,55.647335,-2.120469,392462,639330,'ENG','NHB',    "Northumberland",['mc'],                    [],"Built as a defence against Scots raiders in a strategic position by a ford over the River Till."),
new Castle("Ewloe Castle"            ,17,53.200000,-3.067063,328817,367523,'WAL','FLT',        "Flintshire",['mc'],                    [],""),
new Castle("Eynsford Castle"         ,17,51.370478, 0.213375,554170,165830,'ENG','KNT',              "Kent",['mc'],                    [],"Substantial stone walls of a very early Norman enclosure castle unusually little-altered by later building works."),
new Castle("Farne Island Tower"      ,17,55.617068,-1.655728,421785,635995,'ENG','NHB',    "Northumberland",['th'],                    [],""),
new Castle("Flint Castle"            ,17,53.251703,-3.129913,324705,373335,'WAL','FLT',        "Flintshire",['mc'],                    [],""),
new Castle("Floors Castle"           ,17,55.605003,-2.460374,371093,634695,'SCO','RXB',                  "",[],                        [],""),
new Castle("Hadleigh Castle"         ,17,51.544352, 0.608926,581015,186055,'ENG','ESE',             "Essex",['mc'],         ['E13','M14'],"A 13th century castle overlooking the Essex marshes, home to three of Herny VIII wives."),
new Castle("Harlech Castle"          ,17,52.859984,-4.109203,258094,331252,'WAL','MRN',           "Gwynedd",['mc'],                    [],""),
new Castle("Hartlebury Castle"       ,17,52.339001,-2.241635,383670,271295,'ENG','WRC',    "Worcestershire",['mc','p'],                [],""),
new Castle("Hedingham Castle"        ,17,51.992498, 0.601158,578700,235865,'ENG','ESE',             "Essex",['tc','mc'],               [],""),
new Castle("Helmsley Castle"         ,17,54.244987,-1.064065,461100,483640,'ENG','YRK',         "Yorkshire",['tc','mc'],               [],"Impressive ruins of a great medieval castle surrounded by spectacular banks and ditches."),
new Castle("Hermitage Castle"        ,14,55.256040,-2.793373,349670,596050,'SCO','RXB',                  "",[],                        [],""),
new Castle("Kendal Castle"           ,17,54.324921,-2.736475,352198,492400,'ENG','WML',           "Cumbria",['tc','mc'],               [],""),
new Castle("Kenilworth Castle"       ,17,52.347988,-1.592539,427860,272297,'ENG','WRW',      "Warwickshire",['tc','mc','p'],['E12','L16'],"The largest castle ruin in England, with an impressive keep, great hall and Tudor gardens."),
new Castle("King John's Castle"      ,17,52.155426,-1.519407,432960,250890,'ENG','WRW',      "Warwickshire",['tc'],                    [],""),
new Castle("Knaresborough Castle"    ,17,54.006902,-1.469389,434855,456895,'ENG','YRK',         "Yorkshire",['tc','mc'],               [],""),
new Castle("Leeds Castle"            ,17,51.248755, 0.630083,583635,153225,'ENG','KNT',              "Kent",['tc','mc','p'],           [],""),
new Castle("Lindisfarne Castle"      ,17,55.669036,-1.784865,413632,641752,'ENG','NHB',    "Northumberland",['af'],         ['M16','L16'],"A Tudor fortress perched atop a rocky crag on Holy Island to defend against seafaring Scots."),
new Castle("Lord's Mount"            ,17,55.775366,-2.003645,399867,653565,'ENG','NHB',    "Northumberland",['af'],               ['M16'],"A massive curved stone bulwark built to protect the weakest point of Berwick's town walls."),
new Castle("Ludlow Castle"           ,17,52.367245,-2.722882,350877,274601,'ENG','SHP',        "Shropshire",['mc','p'],                [],""),
new Castle("Lullingstone Castle"     ,17,51.358048, 0.195656,552960,164390,'ENG','KNT',              "Kent",['fmh'],                   [],"One of Englands oldest family estates."),
new Castle("Middleham Castle"        ,17,54.284057,-1.806886,412670,487625,'ENG','YRK',         "Yorkshire",['mc','p'],                [],"Childhood and favourite home of Richard III spending part of his youth here in the guardianship of 'Warwick the Kingmaker'."),
new Castle("Moreton Corbet Castle"   ,17,52.804182,-2.652222,356125,323150,'ENG','SHP',        "Shropshire",['tc','mc'],    ['E13','M16'],"Picturesque ruins of castle and Elizabethan mansion house located in the Shropshire Marshes."),
new Castle("Norham Castle"           ,17,55.721526,-2.150981,390617,647580,'ENG','NHB',    "Northumberland",['tc','mc','p','af'],['E12','L16'],"One of the strongest of the border castles, which was stormed by James IV and largely destroyed."),
new Castle("Okehampton Castle"       ,17,50.730730,-4.008282,258365, 94275,'ENG','DVN',             "Devon",['tc','mc'],    ['L11','E14'],"The ruins of the largest castle in Devon, which played a primarily administrative role."),
new Castle("Old Sarum Castle"        ,16,51.093215,-1.804783,413768,132674,'ENG','WTS',         "Wiltshire",['tc','mc','p'],           [],"Mighty ramparts, with a Norman castle and royal palace on the inner mound, stand on the edge of Wiltshire's chalk plains."),
new Castle("Old Wardour Castle"      ,17,51.036349,-2.088851,393866,126336,'ENG','WTS',         "Wiltshire",['mc'],                    [],"Hexagonal tower house ranged around a central courtyard, a very unusual form in England."),
new Castle("Oxford Castle"           ,17,51.751962,-1.263106,450900,206100,'ENG','OXD',       "Oxfordshire",['tc','mc'],    ['L11','X13'],"Earliest Norman occupation in the upper Thames area to control crossing of the River Thames."),
new Castle("Peckforton Castle"       ,17,53.117605,-2.699043,353311,358054,'ENG','CHE',          "Cheshire",['gr'],               ['M19'],"Designed in the Gothic style and often described as the last serious fortified home built in England."),
new Castle("Pendennis Castle"        ,17,50.146096,-5.046595,182430, 31782,'ENG','CNW',          "Cornwall",['af'],                    [],"One of a chain of coastal castles built by Henry VIII to counter a threat from France and Spain."),
new Castle("Pickering Castle"        ,17,54.250177,-0.775867,479845,484525,'ENG','YRK',         "Yorkshire",['tc','mc'],               [],"Classic well-preserved example of an early earthwork castle with spectacular views from the motte top."),
new Castle("Pleshey Castle"          ,17,51.803693, 0.413811,566500,214400,'ENG','ESE',             "Essex",['tc','mc'],               [],""),
new Castle("Polruan Blockhouse"      ,17,50.329692,-4.638104,212334, 51080,'ENG','CNW',          "Cornwall",['af','ct'],               [],""),
new Castle("Portland Castle"         ,17,50.568222,-2.446741,368458, 74373,'ENG','DRS',            "Dorset",['af'],                    [],"Overlooking Portland harbour, built by Henry VIII to defend the anchorage against possible French and Spanish invasion."),
new Castle("Raglan Castle"           ,17,51.770386,-2.850083,341400,208300,'WAL','MNM',     "Monmouthshire",['tc','mc'],               [],""),
new Castle("Ratley Castle"           ,17,52.122744,-1.444817,438085,247300,'ENG','WRW',      "Warwickshire",['tc','mc'],          ['M12'],"A motte with two baileys built by the de Arden family to protect their valuable farmland."),
new Castle("Restormel Castle"        ,17,50.421769,-4.670429,210401, 61399,'ENG','CNW',          "Cornwall",['tc','mc','p'],           [],"Circular shell-keep on a Norman mound surrounded by a deep dry ditch, atop a high spur beside the River Fowey."),
new Castle("Rhuddlan Castle"         ,17,53.289169,-3.464652,302462,377912,'WAL','DBH',      "Denbighshire",['mc'],                    [],""),
new Castle("Richard's Castle"        ,17,52.328039,-2.759639,348328,270266,'ENG','SHP',        "Shropshire",['tc','mc'],               [],""),
new Castle("Richmond Castle"         ,17,54.401710,-1.737621,417145,500715,'ENG','YRK',         "Yorkshire",['mc'],                    [],"Among the oldest Norman stone fortresses in Britain, sited on a rocky promontory above the River Swale."),
new Castle("Ripley Castle"           ,17,54.040224,-1.570519,428230,460570,'ENG','YRK',         "Yorkshire",['th'],                    [],""),
new Castle("Roxburgh Castle"         ,17,55.596421,-2.456839,371309,633739,'SCO','RXB',                  "",[],                        [],""),
new Castle("Sandsfoot Castle"        ,17,50.595254,-2.460814,367479, 77383,'ENG','DRS',            "Dorset",['af'],                    [],""),
new Castle("Scarborough Castle"      ,17,54.287330,-0.389457,505040,489160,'ENG','YRK',         "Yorkshire",['tc','mc'],    ['M12','X14'],"Spectacular costal views from this dramatic castle, where Richard III courted his beloved wife."),
new Castle("Shrewsbury Castle"       ,17,52.710989,-2.749618,349455,312850,'ENG','SHP',        "Shropshire",['tc','mc','p'],['L11','L18'],""),
new Castle("Skipsea Castle"          ,17,53.978660,-0.229543,516210,455065,'ENG','YRK',         "Yorkshire",['tc','mc'],          ['L11'],"A fine Norman motte and bailey castle built to control the Spurn Peninsular."),
new Castle("St Andrews Castle"       ,17,56.342180,-2.789937,351295,716930,'SCO','FFE',                  "",[],                        [],""),
new Castle("St Catherine's Castle"   ,17,50.328284,-4.644559,211869, 50940,'ENG','CNW',          "Cornwall",['af'],                    [],"A small artillery fort built by Henry VIII to defend Fowey Harbour."),
new Castle("St Michael's Mount"      ,17,50.116526,-5.478154,151450, 29844,'ENG','CNW',          "Cornwall",['tc','mc','af','fe'],     [],"Iconic rocky island crowned by a medieval church and castle with stunning views of Mount's Bay."),
new Castle("Stokesay Castle"         ,17,52.430258,-2.831286,343570,281685,'ENG','SHP',        "Shropshire",['fmh'],                   [],"The finest and best preserved fortified medieval manor house in England."),
new Castle("Swerford Castle"         ,17,51.977996,-1.459218,437241,231197,'ENG','OXD',       "Oxfordshire",['tc'],                    [],"A motte and bailey surrounded by a deep ditch probably in use in the 12th century."),
new Castle("Tamworth Castle"         ,17,52.632654,-1.696784,420600,303900,'ENG','STF',     "Staffordshire",['tc','mc'],               [],""),
new Castle("Thirlwall Castle"        ,17,54.988804,-2.533762,365944,566154,'ENG','NHB',    "Northumberland",['th'],                    [],""),
new Castle("Tilbury Fort"            ,16,51.452812, 0.374649,565092,175322,'ENG','ESE',             "Essex",['af'],                    [],"Built on the Thames estuary by Charles II on a site originally used by Henry VIII to protect London's seaward approach."),
new Castle("Tintagel Castle"         ,17,50.667600,-4.759060,205123, 88959,'ENG','CNW',          "Cornwall",['mc'],                    [],"Joined to the mainland by an isthmus on the Atlantic coast and linked with Arthurian Legend."),
new Castle("Totnes Castle"           ,17,50.432421,-3.691106,280005, 60515,'ENG','DVN',             "Devon",['tc','mc'],    ['L11','E14'],"A particularly fine and well-preserved example of a large, early Norman motte-and-bailey castle."),
new Castle("Tower Of Tears"          ,17,52.376405, 4.902296,     0,     0,'NED',   '',     "Noord-Holland",[],                        [],""),
new Castle("Tynemouth Castle"        ,17,55.017733,-1.419833,437210,569385,'ENG','NHB',    "Northumberland",['tc','mc','af','fe'],     [],"Set in an almost impregnable position on a steep headland between the river and the North Sea."),
new Castle("Urquhart Castle"         ,17,57.324075,-4.442017,253058,828586,'SCO','INS',                  "",[],             ['E13','E17'],"Located beside Loch Ness in Scotland's Great Glen, an impressive ruin in a majestic setting."),
new Castle("Warkworth Castle"        ,17,55.345376,-1.611782,424725,605765,'ENG','NHB',    "Northumberland",['tc','mc'],               [],"A magnificent cross-shaped keep dominates one of the largest fortresses in Northern England."),
new Castle("Warwick Castle"          ,17,52.279415,-1.585464,428380,264680,'ENG','WRW',      "Warwickshire",['tc','mc','p','af'],['L11','L18'],"Overlooking the river Avon, a shell keep that is incorporated into the walls of a later castle."),
new Castle("Weeting Castle"          ,17,52.471200, 0.616291,577800,289125,'ENG','NRF',           "Norfolk",['fmh'],        ['E12','M13'],"The ruins of a substantial early medieval manor house within a shallow rectangular moat."),
new Castle("William's Hill"          ,17,54.280968,-1.809783,412490,487265,'ENG','YRK',         "Yorkshire",['tc'],                    [],""),
new Castle("Wray Castle"             ,17,54.400635,-2.964294,337496,501003,'ENG','WML',           "Cumbria",['gr'],               ['M19'],"")


);

for(var i in global_castle_data)
{
    global_castle_data[i].index = i;
}

