Javascript If..else statement too long -
i writing code identify school google form. function not run unless reduce amount of if..else statements. there 204. when delete chunk of these function run leading me believe because if..else construct large.
how can simplify code below able run. appreciated :)
if (school == "abernethy primary") {group ="/primary/abernethy primary/"; domain ="grantowngrammar.org.uk"; schooltype ="primary";} else if (school == "acharacle primary") {group ="/primary/acharacle primary/"; domain ="ardnamurchanhigh.org.uk"; schooltype ="primary";} else if (school == "achiltibuie primary") {group ="/primary/achiltibuie primary/"; domain ="ullapoolhigh.org.uk"; schooltype ="primary";} else if (school == "aldourie primary") {group ="/primary/aldourie primary/"; domain ="invernessroyalacademy.org.uk"; schooltype ="primary";} else if (school == "alness academy") {group ="/secondary/alness academy/"; domain ="alnessacademy.org.uk"; schooltype ="secondary";} else if (school == "altnaharra primary") {group ="/primary/altnaharra primary/"; domain ="farrhigh.org.uk"; schooltype ="primary";} else if (school == "alvie primary") {group ="/primary/alvie primary/"; domain ="kingussiehigh.org.uk"; schooltype ="primary";} else if (school == "applecross primary") {group ="/primary/applecross primary/"; domain ="plocktonhigh.org.uk"; schooltype ="primary";} else if (school == "ardersier primary") {group ="/primary/ardersier primary/"; domain ="cullodenacademy.org.uk"; schooltype ="primary";} else if (school == "ardgour primary") {group ="/primary/ardgour primary/"; domain ="ardnamurchanhigh.org.uk"; schooltype ="primary";} else if (school == "ardnamurchan high school") {group ="/secondary/ardnamurchan high school/"; domain ="ardnamurchanhigh.org.uk"; schooltype ="secondary";} else if (school == "ardross primary") {group ="/primary/ardross primary/"; domain ="alnessacademy.org.uk"; schooltype ="primary";} else if (school == "arisaig primary") {group ="/primary/arisaig primary/"; domain ="mallaighigh.org.uk"; schooltype ="primary";} else if (school == "auchtertyre primary") {group ="/primary/auchtertyre primary/"; domain ="plocktonhigh.org.uk"; schooltype ="primary";} else if (school == "auldearn primary") {group ="/primary/auldearn primary/"; domain ="nairnacademy.net"; schooltype ="primary";} else if (school == "aviemore primary") {group ="/primary/aviemore primary/"; domain ="kingussiehigh.org.uk"; schooltype ="primary";} else if (school == "avoch primary") {group ="/primary/avoch primary/"; domain ="fortroseacademy.org.uk"; schooltype ="primary";} else if (school == "badcaul primary") {group ="/primary/badcaul primary/"; domain ="ullapoolhigh.org.uk"; schooltype ="primary";} else if (school == "ballachulish primary") {group ="/primary/ballachulish primary/"; domain ="kinlochlevenhigh.org.uk"; schooltype ="primary";} else if (school == "balloch primary") {group ="/primary/balloch primary/"; domain ="cullodenacademy.org.uk"; schooltype ="primary";} else if (school == "balnain primary") {group ="/primary/balnain primary/"; domain ="glenurquharthigh.org.uk"; schooltype ="primary";} else if (school == "banavie primary") {group ="/primary/banavie primary/"; domain ="lochaberhigh.org.uk"; schooltype ="primary";} else if (school == "beauly primary") {group ="/primary/beauly primary/"; domain ="charlestonacademy.org.uk"; schooltype ="primary";} else if (school == "ben wyvis primary") {group ="/primary/ben wyvis primary/"; domain ="dingwallacademy.org.uk"; schooltype ="primary";} else if (school == "bishop eden primary") {group ="/primary/bishop eden primary/"; domain ="invernesshigh.org.uk"; schooltype ="primary";} else if (school == "black isle education centre") {group ="/special/black isle education centre/"; domain ="highlandschools.net"; schooltype ="special";} else if (school == "bonar bridge primary") {group ="/primary/bonar bridge primary/"; domain ="dornochacademy.org.uk"; schooltype ="primary";} else if (school == "bower primary") {group ="/primary/bower primary/"; domain ="wickhigh.org.uk"; schooltype ="primary";} else if (school == "bridgend primary") {group ="/primary/bridgend primary/"; domain ="alnessacademy.org.uk"; schooltype ="primary";} else if (school == "broadford primary") {group ="/primary/broadford primary/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "brora primary") {group ="/primary/brora primary/"; domain ="golspiehigh.org.uk"; schooltype ="primary";} else if (school == "bualnaluib primary") {group ="/primary/bualnaluib primary/"; domain ="gairlochhigh.org.uk"; schooltype ="primary";} else if (school == "bun-sgoil ghaidhlig inbhir nis") {group ="/primary/bun-sgoil ghaidhlig inbhir nis/"; domain ="invernessroyalacademy.org.uk"; schooltype ="primary";} else if (school == "bun-sgoil ghaidhlig loch abar") {group ="/primary/bun-sgoil ghaidhlig loch abar/"; domain ="lochaberhigh.org.uk"; schooltype ="primary";} else if (school == "bun-sgoil shll-ite") {group ="/primary/bun-sgoil shll-ite/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "canisbay primary") {group ="/primary/canisbay primary/"; domain ="wickhigh.org.uk"; schooltype ="primary";} else if (school == "canna primary") {group ="/primary/canna primary/"; domain ="mallaighigh.org.uk"; schooltype ="primary";} else if (school == "cannich bridge primary") {group ="/primary/cannich bridge primary/"; domain ="glenurquharthigh.org.uk"; schooltype ="primary";} else if (school == "caol primary") {group ="/primary/caol primary/"; domain ="lochaberhigh.org.uk"; schooltype ="primary";} else if (school == "carbost primary") {group ="/primary/carbost primary/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "carrbridge primary") {group ="/primary/carrbridge primary/"; domain ="grantowngrammar.org.uk"; schooltype ="primary";} else if (school == "castletown primary") {group ="/primary/castletown primary/"; domain ="thursohigh.org.uk"; schooltype ="primary";} else if (school == "cauldeen primary") {group ="/primary/cauldeen primary/"; domain ="invernessroyalacademy.org.uk"; schooltype ="primary";} else if (school == "cawdor primary") {group ="/primary/cawdor primary/"; domain ="nairnacademy.net"; schooltype ="primary";} else if (school == "central primary") {group ="/primary/central primary/"; domain ="invernesshigh.org.uk"; schooltype ="primary";} else if (school == "charleston academy") {group ="/secondary/charleston academy/"; domain ="charlestonacademy.org.uk"; schooltype ="secondary";} else if (school == "coulhill primary") {group ="/primary/coulhill primary/"; domain ="alnessacademy.org.uk"; schooltype ="primary";} else if (school == "cradlehall primary") {group ="/primary/cradlehall primary/"; domain ="cullodenacademy.org.uk"; schooltype ="primary";} else if (school == "craighill primary") {group ="/primary/craighill primary/"; domain ="tainroyalacademy.net"; schooltype ="primary";} else if (school == "cromarty primary") {group ="/primary/cromarty primary/"; domain ="fortroseacademy.org.uk"; schooltype ="primary";} else if (school == "crossroads primary") {group ="/primary/crossroads primary/"; domain ="thursohigh.org.uk"; schooltype ="primary";} else if (school == "crown primary") {group ="/primary/crown primary/"; domain ="millburnacademy.org.uk"; schooltype ="primary";} else if (school == "croy primary") {group ="/primary/croy primary/"; domain ="cullodenacademy.org.uk"; schooltype ="primary";} else if (school == "culbokie primary") {group ="/primary/culbokie primary/"; domain ="fortroseacademy.org.uk"; schooltype ="primary";} else if (school == "culloden academy") {group ="/secondary/culloden academy/"; domain ="cullodenacademy.org.uk"; schooltype ="secondary";} else if (school == "dalneigh primary") {group ="/primary/dalneigh primary/"; domain ="invernesshigh.org.uk"; schooltype ="primary";} else if (school == "daviot primary") {group ="/primary/daviot primary/"; domain ="millburnacademy.org.uk"; schooltype ="primary";} else if (school == "deshar primary") {group ="/primary/deshar primary/"; domain ="grantowngrammar.org.uk"; schooltype ="primary";} else if (school == "dingwall academy") {group ="/secondary/dingwall academy/"; domain ="dingwallacademy.org.uk"; schooltype ="secondary";} else if (school == "dingwall primary") {group ="/primary/dingwall primary/"; domain ="dingwallacademy.org.uk"; schooltype ="primary";} else if (school == "dochgarroch primary") {group ="/primary/dochgarroch primary/"; domain ="charlestonacademy.org.uk"; schooltype ="primary";} else if (school == "dornoch academy") {group ="/secondary/dornoch academy/"; domain ="dornochacademy.org.uk"; schooltype ="secondary";} else if (school == "dornoch primary") {group ="/primary/dornoch primary/"; domain ="dornochacademy.org.uk"; schooltype ="primary";} else if (school == "drakies primary") {group ="/primary/drakies primary/"; domain ="millburnacademy.org.uk"; schooltype ="primary";} else if (school == "drummond school") {group ="/special/drummond school/"; domain ="highlandschools.net"; schooltype ="special";} else if (school == "dunbeath primary") {group ="/primary/dunbeath primary/"; domain ="wickhigh.org.uk"; schooltype ="primary";} else if (school == "duncan forbes primary") {group ="/primary/duncan forbes primary/"; domain ="cullodenacademy.org.uk"; schooltype ="primary";} else if (school == "dunvegan primary") {group ="/primary/dunvegan primary/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "durness primary") {group ="/primary/durness primary/"; domain ="kinlochberviehigh.org.uk"; schooltype ="primary";} else if (school == "duror primary") {group ="/primary/duror primary/"; domain ="kinlochlevenhigh.org.uk"; schooltype ="primary";} else if (school == "edderton primary") {group ="/primary/edderton primary/"; domain ="tainroyalacademy.net"; schooltype ="primary";} else if (school == "edinbane primary") {group ="/primary/edinbane primary/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "eigg primary") {group ="/primary/eigg primary/"; domain ="mallaighigh.org.uk"; schooltype ="primary";} else if (school == "elgol primary") {group ="/primary/elgol primary/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "farr high school") {group ="/secondary/farr high school/"; domain ="farrhigh.org.uk"; schooltype ="secondary";} else if (school == "farr primary (inv)") {group ="/primary/farr primary (inv)/"; domain ="invernessroyalacademy.org.uk"; schooltype ="primary";} else if (school == "farr primary (suth)") {group ="/primary/farr primary (suth)/"; domain ="farrhigh.org.uk"; schooltype ="primary";} else if (school == "ferintosh primary") {group ="/primary/ferintosh primary/"; domain ="dingwallacademy.org.uk"; schooltype ="primary";} else if (school == "fortrose academy") {group ="/secondary/fortrose academy/"; domain ="fortroseacademy.org.uk"; schooltype ="secondary";} else if (school == "foyers primary") {group ="/primary/foyers primary/"; domain ="invernessroyalacademy.org.uk"; schooltype ="primary";} else if (school == "gairloch high school") {group ="/secondary/gairloch high school/"; domain ="gairlochhigh.org.uk"; schooltype ="secondary";} else if (school == "gairloch primary") {group ="/primary/gairloch primary/"; domain ="gairlochhigh.org.uk"; schooltype ="primary";} else if (school == "gergask primary") {group ="/primary/gergask primary/"; domain ="kingussiehigh.org.uk"; schooltype ="primary";} else if (school == "gledfield primary") {group ="/primary/gledfield primary/"; domain ="tainroyalacademy.net"; schooltype ="primary";} else if (school == "glen urquhart high school") {group ="/secondary/glen urquhart high school/"; domain ="glenurquharthigh.org.uk"; schooltype ="secondary";} else if (school == "glencoe primary") {group ="/primary/glencoe primary/"; domain ="kinlochlevenhigh.org.uk"; schooltype ="primary";} else if (school == "glenelg primary") {group ="/primary/glenelg primary/"; domain ="plocktonhigh.org.uk"; schooltype ="primary";} else if (school == "glenurquhart primary") {group ="/primary/glenurquhart primary/"; domain ="glenurquharthigh.org.uk"; schooltype ="primary";} else if (school == "golspie high school") {group ="/secondary/golspie high school/"; domain ="golspiehigh.org.uk"; schooltype ="secondary";} else if (school == "golspie primary") {group ="/primary/golspie primary/"; domain ="golspiehigh.org.uk"; schooltype ="primary";} else if (school == "grantown grammar school") {group ="/secondary/grantown grammar school/"; domain ="grantowngrammar.org.uk"; schooltype ="secondary";} else if (school == "grantown primary") {group ="/primary/grantown primary/"; domain ="grantowngrammar.org.uk"; schooltype ="primary";} else if (school == "halkirk primary") {group ="/primary/halkirk primary/"; domain ="thursohigh.org.uk"; schooltype ="primary";} else if (school == "helmsdale primary") {group ="/primary/helmsdale primary/"; domain ="golspiehigh.org.uk"; schooltype ="primary";} else if (school == "hill of fearn primary") {group ="/primary/hill of fearn primary/"; domain ="tainroyalacademy.net"; schooltype ="primary";} else if (school == "hilton of cadboll primary") {group ="/primary/hilton of cadboll primary/"; domain ="tainroyalacademy.net"; schooltype ="primary";} else if (school == "hilton primary") {group ="/primary/hilton primary/"; domain ="invernessroyalacademy.org.uk"; schooltype ="primary";} else if (school == "holm primary") {group ="/primary/holm primary/"; domain ="invernessroyalacademy.org.uk"; schooltype ="primary";} else if (school == "inshes primary") {group ="/primary/inshes primary/"; domain ="millburnacademy.org.uk"; schooltype ="primary";} else if (school == "inver primary") {group ="/primary/inver primary/"; domain ="tainroyalacademy.net"; schooltype ="primary";} else if (school == "invergarry primary") {group ="/primary/invergarry primary/"; domain ="lochaberhigh.org.uk"; schooltype ="primary";} else if (school == "invergordon academy") {group ="/secondary/invergordon academy/"; domain ="invergordonacademy.org.uk"; schooltype ="secondary";} else if (school == "inverie primary") {group ="/primary/inverie primary/"; domain ="mallaighigh.org.uk"; schooltype ="primary";} else if (school == "inverlochy primary") {group ="/primary/inverlochy primary/"; domain ="lochaberhigh.org.uk"; schooltype ="primary";} else if (school == "inverness high school") {group ="/secondary/inverness high school/"; domain ="invernesshigh.org.uk"; schooltype ="secondary";} else if (school == "inverness royal academy") {group ="/secondary/inverness royal academy/"; domain ="invernessroyalacademy.org.uk"; schooltype ="secondary";} else if (school == "keiss primary") {group ="/primary/keiss primary/"; domain ="wickhigh.org.uk"; schooltype ="primary";} else if (school == "kilchoan primary") {group ="/primary/kilchoan primary/"; domain ="ardnamurchanhigh.org.uk"; schooltype ="primary";} else if (school == "kilchuimen academy") {group ="/secondary/kilchuimen academy/"; domain ="kilchuimenacademy.org.uk"; schooltype ="secondary";} else if (school == "kilchuimen primary") {group ="/primary/kilchuimen primary/"; domain ="kilchuimenacademy.org.uk"; schooltype ="primary";} else if (school == "kilmuir primary") {group ="/primary/kilmuir primary/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "kiltearn primary") {group ="/primary/kiltearn primary/"; domain ="alnessacademy.org.uk"; schooltype ="primary";} else if (school == "kingussie high school") {group ="/secondary/kingussie high school/"; domain ="kingussiehigh.org.uk"; schooltype ="secondary";} else if (school == "kingussie primary") {group ="/primary/kingussie primary/"; domain ="kingussiehigh.org.uk"; schooltype ="primary";} else if (school == "kinlochbervie high school") {group ="/secondary/kinlochbervie high school/"; domain ="kinlochberviehigh.org.uk"; schooltype ="secondary";} else if (school == "kinlochbervie primary") {group ="/primary/kinlochbervie primary/"; domain ="kinlochberviehigh.org.uk"; schooltype ="primary";} else if (school == "kinlochewe primary") {group ="/primary/kinlochewe primary/"; domain ="gairlochhigh.org.uk"; schooltype ="primary";} else if (school == "kinlochleven high school") {group ="/secondary/kinlochleven high school/"; domain ="kinlochlevenhigh.org.uk"; schooltype ="secondary";} else if (school == "kinlochleven primary") {group ="/primary/kinlochleven primary/"; domain ="kinlochlevenhigh.org.uk"; schooltype ="primary";} else if (school == "kinmylies primary") {group ="/primary/kinmylies primary/"; domain ="charlestonacademy.org.uk"; schooltype ="primary";} else if (school == "kirkhill primary") {group ="/primary/kirkhill primary/"; domain ="charlestonacademy.org.uk"; schooltype ="primary";} else if (school == "knockbreck primary (dunvegan)") {group ="/primary/knockbreck primary (dunvegan)/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "knockbreck primary (tain)") {group ="/primary/knockbreck primary (tain)/"; domain ="tainroyalacademy.net"; schooltype ="primary";} else if (school == "kyle primary") {group ="/primary/kyle primary/"; domain ="plocktonhigh.org.uk"; schooltype ="primary";} else if (school == "kyleakin primary") {group ="/primary/kyleakin primary/"; domain ="plocktonhigh.org.uk"; schooltype ="primary";} else if (school == "lady lovat primary") {group ="/primary/lady lovat primary/"; domain ="mallaighigh.org.uk"; schooltype ="primary";} else if (school == "lairg primary") {group ="/primary/lairg primary/"; domain ="golspiehigh.org.uk"; schooltype ="primary";} else if (school == "loch duich primary") {group ="/primary/loch duich primary/"; domain ="plocktonhigh.org.uk"; schooltype ="primary";} else if (school == "lochaber high school") {group ="/secondary/lochaber high school/"; domain ="lochaberhigh.org.uk"; schooltype ="secondary";} else if (school == "lochaline primary") {group ="/primary/lochaline primary/"; domain ="ardnamurchanhigh.org.uk"; schooltype ="primary";} else if (school == "lochardil primary") {group ="/primary/lochardil primary/"; domain ="invernessroyalacademy.org.uk"; schooltype ="primary";} else if (school == "lochcarron primary") {group ="/primary/lochcarron primary/"; domain ="plocktonhigh.org.uk"; schooltype ="primary";} else if (school == "lochinver primary") {group ="/primary/lochinver primary/"; domain ="ullapoolhigh.org.uk"; schooltype ="primary";} else if (school == "lundavra primary") {group ="/primary/lundavra primary/"; domain ="lochaberhigh.org.uk"; schooltype ="primary";} else if (school == "lybster primary") {group ="/primary/lybster primary/"; domain ="wickhigh.org.uk"; schooltype ="primary";} else if (school == "macdiarmid primary") {group ="/primary/macdiarmid primary/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "mallaig high school") {group ="/secondary/mallaig high school/"; domain ="mallaighigh.org.uk"; schooltype ="secondary";} else if (school == "mallaig primary") {group ="/primary/mallaig primary/"; domain ="mallaighigh.org.uk"; schooltype ="primary";} else if (school == "marybank primary") {group ="/primary/marybank primary/"; domain ="dingwallacademy.org.uk"; schooltype ="primary";} else if (school == "melvich primary") {group ="/primary/melvich primary/"; domain ="farrhigh.org.uk"; schooltype ="primary";} else if (school == "merkinch primary") {group ="/primary/merkinch primary/"; domain ="invernesshigh.org.uk"; schooltype ="primary";} else if (school == "millbank primary") {group ="/primary/millbank primary/"; domain ="nairnacademy.net"; schooltype ="primary";} else if (school == "millburn academy") {group ="/secondary/millburn academy/"; domain ="millburnacademy.org.uk"; schooltype ="secondary";} else if (school == "miller academy primary") {group ="/primary/miller academy primary/"; domain ="thursohigh.org.uk"; schooltype ="primary";} else if (school == "milton of leys primary") {group ="/primary/milton of leys primary/"; domain ="millburnacademy.org.uk"; schooltype ="primary";} else if (school == "milton primary") {group ="/primary/milton primary/"; domain ="invergordonacademy.org.uk"; schooltype ="primary";} else if (school == "mount pleasant primary") {group ="/primary/mount pleasant primary/"; domain ="thursohigh.org.uk"; schooltype ="primary";} else if (school == "muck primary") {group ="/primary/muck primary/"; domain ="mallaighigh.org.uk"; schooltype ="primary";} else if (school == "muirtown primary") {group ="/primary/muirtown primary/"; domain ="charlestonacademy.org.uk"; schooltype ="primary";} else if (school == "mulbuie primary") {group ="/primary/mulbuie primary/"; domain ="dingwallacademy.org.uk"; schooltype ="primary";} else if (school == "munlochy primary") {group ="/primary/munlochy primary/"; domain ="fortroseacademy.org.uk"; schooltype ="primary";} else if (school == "nairn academy") {group ="/secondary/nairn academy/"; domain ="nairnacademy.net"; schooltype ="secondary";} else if (school == "newmore primary") {group ="/primary/newmore primary/"; domain ="invergordonacademy.org.uk"; schooltype ="primary";} else if (school == "newton park primary") {group ="/primary/newton park primary/"; domain ="wickhigh.org.uk"; schooltype ="primary";} else if (school == "newtonmore primary") {group ="/primary/newtonmore primary/"; domain ="kingussiehigh.org.uk"; schooltype ="primary";} else if (school == "north kessock primary") {group ="/primary/north kessock primary/"; domain ="fortroseacademy.org.uk"; schooltype ="primary";} else if (school == "noss primary") {group ="/primary/noss primary/"; domain ="wickhigh.org.uk"; schooltype ="primary";} else if (school == "obsdale primary") {group ="/primary/obsdale primary/"; domain ="alnessacademy.org.uk"; schooltype ="primary";} else if (school == "park primary school") {group ="/primary/park primary school/"; domain ="invergordonacademy.org.uk"; schooltype ="primary";} else if (school == "pennyland primary") {group ="/primary/pennyland primary/"; domain ="thursohigh.org.uk"; schooltype ="primary";} else if (school == "plockton high school") {group ="/secondary/plockton high school/"; domain ="plocktonhigh.org.uk"; schooltype ="secondary";} else if (school == "plockton primary") {group ="/primary/plockton primary/"; domain ="plocktonhigh.org.uk"; schooltype ="primary";} else if (school == "poolewe primary") {group ="/primary/poolewe primary/"; domain ="gairlochhigh.org.uk"; schooltype ="primary";} else if (school == "portree high school") {group ="/secondary/portree high school/"; domain ="portreehigh.org.uk"; schooltype ="secondary";} else if (school == "portree primary") {group ="/primary/portree primary/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "raasay primary") {group ="/primary/raasay primary/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "raigmore primary") {group ="/primary/raigmore primary/"; domain ="millburnacademy.org.uk"; schooltype ="primary";} else if (school == "reay primary") {group ="/primary/reay primary/"; domain ="thursohigh.org.uk"; schooltype ="primary";} else if (school == "resolis primary") {group ="/primary/resolis primary/"; domain ="fortroseacademy.org.uk"; schooltype ="primary";} else if (school == "rogart primary") {group ="/primary/rogart primary/"; domain ="golspiehigh.org.uk"; schooltype ="primary";} else if (school == "rosebank primary") {group ="/primary/rosebank primary/"; domain ="nairnacademy.net"; schooltype ="primary";} else if (school == "rosehall primary") {group ="/primary/rosehall primary/"; domain ="golspiehigh.org.uk"; schooltype ="primary";} else if (school == "roybridge primary") {group ="/primary/roybridge primary/"; domain ="lochaberhigh.org.uk"; schooltype ="primary";} else if (school == "rum primary") {group ="/primary/rum primary/"; domain ="mallaighigh.org.uk"; schooltype ="primary";} else if (school == "scoraig school") {group ="/primary/scoraig school/"; domain ="ullapoolhigh.org.uk"; schooltype ="primary";} else if (school == "scourie primary") {group ="/primary/scourie primary/"; domain ="kinlochberviehigh.org.uk"; schooltype ="primary";} else if (school == "shieldaig primary") {group ="/primary/shieldaig primary/"; domain ="gairlochhigh.org.uk"; schooltype ="primary";} else if (school == "smithton primary") {group ="/primary/smithton primary/"; domain ="cullodenacademy.org.uk"; schooltype ="primary";} else if (school == "south lodge primary") {group ="/primary/south lodge primary/"; domain ="invergordonacademy.org.uk"; schooltype ="primary";} else if (school == "spean bridge primary") {group ="/primary/spean bridge primary/"; domain ="lochaberhigh.org.uk"; schooltype ="primary";} else if (school == "st bride's primary") {group ="/primary/st bride's primary/"; domain ="kinlochlevenhigh.org.uk"; schooltype ="primary";} else if (school == "st clement's school") {group ="/special/st clement's school/"; domain ="highlandschools.net"; schooltype ="special";} else if (school == "st columba's rc primary") {group ="/primary/st columba's rc primary/"; domain ="lochaberhigh.org.uk"; schooltype ="primary";} else if (school == "st duthus school") {group ="/special/st duthus school/"; domain ="highlandschools.net"; schooltype ="special";} else if (school == "st joseph's rc primary") {group ="/primary/st joseph's rc primary/"; domain ="invernesshigh.org.uk"; schooltype ="primary";} else if (school == "staffin primary") {group ="/primary/staffin primary/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "strathconon primary") {group ="/primary/strathconon primary/"; domain ="dingwallacademy.org.uk"; schooltype ="primary";} else if (school == "strathdearn primary") {group ="/primary/strathdearn primary/"; domain ="millburnacademy.org.uk"; schooltype ="primary";} else if (school == "stratherrick primary") {group ="/primary/stratherrick primary/"; domain ="invernessroyalacademy.org.uk"; schooltype ="primary";} else if (school == "strathgarve primary") {group ="/primary/strathgarve primary/"; domain ="dingwallacademy.org.uk"; schooltype ="primary";} else if (school == "strathpeffer primary") {group ="/primary/strathpeffer primary/"; domain ="dingwallacademy.org.uk"; schooltype ="primary";} else if (school == "strontian primary") {group ="/primary/strontian primary/"; domain ="ardnamurchanhigh.org.uk"; schooltype ="primary";} else if (school == "struan primary") {group ="/primary/struan primary/"; domain ="portreehigh.org.uk"; schooltype ="primary";} else if (school == "tain royal academy") {group ="/secondary/tain royal academy/"; domain ="tainroyalacademy.net"; schooltype ="secondary";} else if (school == "tarbat old primary") {group ="/primary/tarbat old primary/"; domain ="tainroyalacademy.net"; schooltype ="primary";} else if (school == "tarradale primary") {group ="/primary/tarradale primary/"; domain ="dingwallacademy.org.uk"; schooltype ="primary";} else if (school == "teanassie primary") {group ="/primary/teanassie primary/"; domain ="charlestonacademy.org.uk"; schooltype ="primary";} else if (school == "the bridge") {group ="/special/the bridge/"; domain ="highlandschools.net"; schooltype ="special";} else if (school == "thrumster primary") {group ="/primary/thrumster primary/"; domain ="wickhigh.org.uk"; schooltype ="primary";} else if (school == "thurso high school") {group ="/secondary/thurso high school/"; domain ="thursohigh.org.uk"; schooltype ="secondary";} else if (school == "tomnacross primary") {group ="/primary/tomnacross primary/"; domain ="charlestonacademy.org.uk"; schooltype ="primary";} else if (school == "tongue primary") {group ="/primary/tongue primary/"; domain ="farrhigh.org.uk"; schooltype ="primary";} else if (school == "tore primary") {group ="/primary/tore primary/"; domain ="fortroseacademy.org.uk"; schooltype ="primary";} else if (school == "ullapool high school") {group ="/secondary/ullapool high school/"; domain ="ullapoolhigh.org.uk"; schooltype ="secondary";} else if (school == "ullapool primary") {group ="/primary/ullapool primary/"; domain ="ullapoolhigh.org.uk"; schooltype ="primary";} else if (school == "watten primary") {group ="/primary/watten primary/"; domain ="wickhigh.org.uk"; schooltype ="primary";} else if (school == "wick high school") {group ="/secondary/wick high school/"; domain ="wickhigh.org.uk"; schooltype ="secondary";}
just put data object
var schools = { "abernethy primary": { "group":"/primary/abernethy primary/", "domain":"grantowngrammar.org.uk", "schooltype":"primary" }, ... };
and required vars by
var group = schools[school].group; var domain = schools[school].domain; var schooltype = schools[school].schooltype;
and better way put data separate file.
Comments
Post a Comment