function trimString (str) { str = this != window? this : str; return str.replace(/^\s+/g, '').replace(/\s+$/g, ''); } function populate(txtSchoolId, pnlResultsId) { var arr = new Array('Aberdeen School','Adventure School','Akaroa Area School','Albany Junior High School','Alfriston School','Amberley School','Amuri Area School','Aquinas College','Arthur Street School','Ashburton Christian School','Ashgrove School','Ashley School','Avondale College','Avonside Girls\' High School','Awatapu College','Banks Avenue School','Baradene College','Beachlands School','Beckenham School','Belmont School (Lower Hutt)','Bethlehem College','Blockhouse Bay Primary','Bombay School','Botany Downs Secondary College','Breens Intermediate','Burnham School','Burnside High School','Burnside Primary School','Cambridge High School','Carmel College','Carncot Independant School for Girls','Chapman College','Chisnallwood Intermediate','Christchurch Adventist School','Christchurch Adventist School - Senior','Christchurch Girls\' High School','Clarkville School','Clayton Park School','Clearview Primary School','Cobham Intermediate','College Street Normal School','Conifer Grove School','Craighead Diocesan School','Crofton Downs Primary','Dairy Flat School','Darfield School','De La Salle College','Devonport School','Diocesan School for Girls','Donovan Primary School','Elim Christian College','Elm Park School','Epsom Girls Grammar School','Excellere College','Fairfield College','Farm Cove Intermediate','Fergusson Intermediate School','Francis Douglas Memorial College','Geraldine High School','Geraldine Primary School','Gladstone Primary School (Auckland)','Glenbervie School','Glendowie College','Goodwood School','Hamilton Girls\' High School','Hampden Street School','Hautapu School','Hebron Christian College (Junior/Middle)','Hebron Christian College (Senior)','Henley School','Highlands Intermediate School','Hikurangi School','Hillcrest High School','Hillcrest Normal School','Hillview Christian School','Hokowhitu School','Holy Cross School - Henderson','Huanui College','Hunua Primary','Hurupaki School','Hutt Intermediate School','Hutt International Boys\' School','Iona College','John McGlashan College','John Paul College','Johnsonville School','Kadimah College','Kaiapoi Borough School','Kaiapoi High School','Kaitao Middle School','Kamo High School','Kamo Intermediate School','Kamo Primary School','Karori Normal School','Kaurihohore School','Kawaha Point School','Kings High School','KingsWay School','Kohia Terrace School','Kohimarama School','Lindisfarne College','Liston College','Longburn Adventist College','Lyttelton West Primary School','Mairangi Bay School','Mairehau High School','Mangaroa School','Mangawhai Beach School','Maniototo Area School','Maraetai Beach School','Marian College','Marina View School','Marlborough Girls\' College','Matamata Christian School','Matarau School','Meadowbank School','Middleton Grange School','Milford School (Auckland)','Mission Heights Jnr College','Mount Pleasant School','Mt Hobson Middle School','Murchison Area School','Muritai School','Murrays Bay School','Myross Bush School','Napier Girls\' High School','Nayland College','Nelson College','Nelson College for Girls','New Plymouth Boys\' High School','New Plymouth Girls High School - NPGHS','Newton Central School','Ngaio School','Northland School','Ohoka School','Onerahi Primary School','Onslow College','Opaheke School','Ormiston College','Otago Girls\' High School','Otamatea High School','Otonga Road School','Otumoetai College','Our Lady of Assumption School (Christchurch)','Our Lady of Fatima School (Christchurch)','Our Lady of Victories','Owhiro Bay School','Oxford Area School','Pakuranga College','Pakuranga Heights School','Palmerston North Boys\' High School','Papanui High School','Paparoa Street School','Pigeon Mountain Primary','Pinehaven School','Pinehill School','Pompallier Catholic College','Ponsonby Intermediate','Ponsonby Primary School','Prebbleton School','Queen Margaret College','Queenspark School','Queenstown School','Rangi Ruru Girls\' School','Rangiora High School Years 9-11','Rangiora High School Years12-13','Rangiora New Life School','Rangitoto College','Ranzau School','Raroa Normal Intermediate','Raumati Beach School','Redwood School (Christchurch)','Redwood School (Tawa)','Redwoodtown School','Reignier Catholic School','Reporoa Primary School','Reremoana Primary School','Riccarton High School','Riverlands School','Rolleston School','Roncalli College','Rotorua Boys High School','Sacred Heart College (Auckland)','Sacred Heart Girls\' College (New Plymouth)','Saint Kentigern College','Samuel Marsden Collegiate School (Karori)','Samuel Marsden Collegiate School (Whitby)','Sancta Maria Catholic Primary School','Sandspit Road School','Selwyn House School','Selwyn Ridge Primary School','Sherwood School (Auckland)','Shirley Boys\' High School','Silverdale Primary School','Silverstream School','Southland Boys High School','Springston School','St Albans School','St Bedes College','St Benedict\'s School (Khandallah)','St Bernard\'s School','St Brendan\'s School','St Cuthbert\'s College','St Dominic\'s Catholic Primary School','St Dominic\'s College','St Francis Xavier School (Whangarei)','St Heliers School','St John Bosco School (New Plymouth)','St John\'s College (Hastings)','St Joseph\'s Primary School (Hastings)','St Joseph\'s School (New Plymouth)','St Joseph\'s School (Takapuna)','St Kevin\'s College (Oamaru)','St Leonard\'s School (Dunedin)','St Margaret\'s College','St Marks Catholic School','St Mary\'s College (Ponsonby)','St Mary\'s School (Blenheim)','St Mary\'s School (Hastings)','St Mary\'s School (Northcote)','St Mary\'s School (Rotorua)','St Michael\'s School (Remuera)','St Oran\'s College','St Patrick\'s College (Silverstream)','St Patrick\'s School (Kaiapoi)','St Patricks College - Kilbirnie','St Peter\'s College (Gore)','St Peter\'s College (Palmerston North)','St Peters School (Christchurch)','St Pius X School (New Plymouth)','Stanley Bay School','Star of the Sea School (Christchurch)','Stonefields School','Sumner School','Sunnybrae Normal School','Sunnyhills School','Swannanoa School','Swanson School','Tamahere Model Country School','Tapanui School','Taradale High School','Tauhara College','Taupo nui-a-Tia College','Tauranga Girls\' College','Tawa Intermediate School','Te Aroha Primary School','Te Kauwhata College','Te Kura Kaupapa Maori o Manawatu','Te Totara School (Hamilton)','The Gardens Primary School','Thorndon School','Timaru Boys\' High School','Torbay School','Vauxhall School','Villa Maria College','Wadestown School','Waiau Pa School','Waiheke High School','Waiheke Primary School','Waikato Diocesan School for Girls','Waimairi School','Wairakei School (Taupo)','Waitakere Primary School','Waiuku College','Waiuku Primary School','Wakaaranga Primary School','Wanganui Intermediate School','Waterlea School','Wellington College','Wellington East Girls\' College','Wellington Girls\' College','Wellington High School','Wesley College','West End School','West Melton School','Whangarei Boys\' High School','Whangarei Girls\' High School','Whangaroa College','Whenuapai School','Willowbank School','Winchester School','Windsor Primary School (Christchurch)','Witherlea School','Woodend School','Woodleigh School','Wyndham School'); var arr2 = new Array('351','759','377','86','40','251','384','19','419','720','213','347','41','550','110','332','246','65','689','387','36','189','250','42','258','658','274','175','672','197','402','290','364','357','762','59','331','283','279','436','422','352','365','275','284','439','761','441','96','195','531','594','631','109','146','442','61','267','362','548','190','448','87','286','97','360','33','133','145','168','149','99','79','429','214','553','749','667','282','437','234','199','572','248','113','229','247','255','237','55','426','91','438','600','90','686','182','764','205','430','391','105','551','112','423','344','533','432','241','108','215','342','27','348','431','613','60','690','666','252','210','173','520','23','693','204','81','82','119','541','185','88','207','270','767','444','209','18','401','224','433','399','132','157','265','757','166','249','337','619','54','285','222','575','397','571','89','427','378','440','183','159','425','151','245','522','383','45','329','295','201','254','375','24','677','163','758','747','136','260','674','519','272','292','73','363','324','361','345','144','336','691','369','191','323','435','756','216','239','405','178','620','29','156','48','98','618','753','413','417','291','240','420','765','276','670','206','32','563','230','289','288','200','278','273','392','238','321','380','752','597','346','695','187','737','256','341','416','350','268','263','521','114','22','233','287','101','411','269','107','193','100','212','184','396','202','277','428','370','70','169','180','203','262','340','223','14','242','445','235','232','186','403','125','160','62','63','745','220','39','554','244','135','253','748','656'); var text = document.getElementById(txtSchoolId).value; var results = document.getElementById(pnlResultsId); text = text.toLowerCase(); text = trimString(text); results.innerHTML = ""; results.className = "resultsNone"; if(text!=""){ for(var i=0; i-1){ url = '/MySchool/SearchResults.aspx?school=' + arr[i]; results.innerHTML += "

" + arr[i]+ "

"; } } } if(results.innerHTML != ""){ results.className = "results"; } }