function addOption(selectbox, text, value, vSelected){ vSelected = (vSelected == null) ? 0 : vSelected; /* var optn = document.createElement("Option"); optn.text = text; optn.value = value; optn.selected = (vSelected > 0) ? true : false; selectbox.options.add(optn); */ selectbox.options[selectbox.options.length] = new Option(text, value); selectbox.options[selectbox.options.length - 1].selected = vSelected; } function removeAllOptions(selectbox){ var selectedItem = (selectbox.options[selectbox.selectedIndex].value != null) ? selectbox.options[selectbox.selectedIndex].value : 0; /* var i; for(i=selectbox.options.length-1; i>=0; i--){ selectbox.remove(i); } */ selectbox.options.length = 0; return selectedItem; } //All Options var vProc = new Array(); vProc[1] = new Array('25:Breast augmentation/enhancement', '296:Breast reconstruction', '24:Breast reduction', '22:Duct clearance', '18:Immediate breast reconstruction', '19:Mastectomy', '26:Mastopexy', '23:Microduchectomy', '17:Sentinel node biopsy (SLNB)', '21:Skin sparing mastectomy', '20:Wide local excision of breast cancer'); vProc[2] = new Array('36:Banded gastroplasty', '41:Cholecystectomy', '30:Gastrectomy', '35:Gastric bypass surgery', '50:Laparoscopic appendicectomy', '40:Laparoscopic cholecystectomy', '48:Laparoscopic repair of hernia', '29:Nissen fundoplication', '28:Oesophagectomy', '27:Oesophagoscopy', '49:Open appendicectomy', '39:Open cholecystectomy', '47:Open repair of hernia', '43:Pancreatectomy - Whipple’s procedure', '44:Pancreatic resection', '32:Partial gastrectomy', '38:Removal of duodenal ulcer', '37:Removal of duodenum', '45:Removal of jejunum', '33:Repair of hernia', '46:Resection of jejunum', '34:Stomach reduction', '42:Surgery of bile duct'); vProc[3] = new Array('238:Anterior cervical disectomy', '235:Carotid endarterectomy', '239:Cervical disc replacement', '318:Cervical laminectomy', '233:Clipping of aneurysm', '129:Decompression for carpal tunnel syndrome', '236:Discectomy', '234:Excision of acoustic neuroma', '232:Excision of tumours in head / neck / brain', '319:Exercise of tumours in spine', '237:Lumbar decompression incl. laminectomy', '241:Lumbar disc replacement', '240:Spinal fusion surgery'); vProc[4] = new Array('4:Aortic (valve) surgery', '13:Bronchoscopy', '1:Coronary artery bypass graft (CABG)', '2:Heart transplant', '12:Lung transplant', '3:Mitral (valve) surgery', '5:Pulmonary (valve) surgery', '16:Removal of cervical rib', '7:Repair of ASD (Atrio-septal defect)', '8:Repair of VSD (Ventriculo-septal defect)', '9:Replacement of aneurismal segment', '11:Resection of lung', '15:Resection of oesophageal cancer', '6:Tricuspid (valve) surgery'); vProc[5] = new Array('154:Arthroscopy - elbow', '160:Arthroscopy - foot / ankle', '136:Arthroscopy - hip', '140:Arthroscopy - knee', '146:Arthroscopy - shoulder', '164:Arthroscopy - sport injury to the ankle', '156:Arthroscopy - sports injury to the elbow', '142:Arthroscopy - sports injury to the knee', '148:Arthroscopy - sports injury to the shoulder', '202:Correct deformity of hands', '131:Correction of deformity - wrist', '129:Decompression for carpal tunnel syndrome', '125:Disc surgery for prolapsed disc', '127:Discetomy', '161:Fusion of foot / ankle', '162:Injection in foot / ankle', '130:Joint replacement - wrist', '137:Manipulation and injection - hip', '165:Metatarsal osteotomy', '143:Patella realignment', '204:Procedure to improve hand function', '150:Repair of dislocated shoulder', '155:Repair of ligaments - elbow', '141:Repair of ligaments - knee', '147:Repair of ligaments - shoulder', '163:Repair of ligaments in foot / ankle', '152:Replacement surgery - elbow', '158:Replacement surgery - foot / ankle', '133:Replacement surgery - hip', '138:Replacement surgery - knee', '144:Replacement surgery - shoulder', '134:Resurfacing surgery - hip', '159:Revision ankle replacement', '153:Revision of elbow replacement', '135:Revision of hip replacement', '139:Revision of knee replacement', '145:Revision of shoulder replacement', '173:Rhinoplasty', '149:Rotator Cuff Repair', '126:Spinal fusion for prolapsed', '123:Spinal surgery for demormity', '124:Spinal surgery for scoliosis', '128:Spinal surgery for spina bifida', '151:Stabilisation of dislocated shoulder', '157:Surgical release of tennis elbow', '166:Treatment of ingrown toenail'); vProc[6] = new Array('195:Abdominoplasty', '172:Blepharoplasty', '25:Breast augmentation/enhancement', '183:Breast balancing procedure', '24:Breast reduction', '169:Brow lift', '320:Carpal tunnel decompression', '181:Chin implant - face', '178:Chin Implant - jaw', '170:Cleft lip/palate', '184:Correct breast development problems', '202:Correct deformity of hands', '205:Correct hypospadias', '174:Correction of bat ears', '185:Correction of gynaecomastia', '171:Cosmetic facial surgery', '321:Cubital tunnel decompression', '192:Excise mole', '180:Excise skin cancer', '176:Excision of intraoral tumour', '167:Facelift', '18:Immediate breast reconstruction', '206:Labial reduction', '189:Laser removal', '196:Liposuction', '26:Mastopexy', '168:Neck lift', '204:Procedure to improve hand function', '177:Reconstruction of the jaw', '194:Release contracture in burns', '200:Release of Dupuytren’s contracture', '199:Release of trigger finger', '191:Removal of mole', '201:Repair of hand injury', '175:Repair of split ear lobe', '173:Rhinoplasty', '179:Scar revision - face', '187:Scar revision - general skin', '128:Spinal surgery for spina bifida', '186:Surgical correction of inverted nipple', '188:Tattoo removal', '198:Thigh lift', '193:Wide excision of malignant melanoma +/- reconstruction'); vProc[7] = new Array('120:Cataract surgery', '122:Retinal surgery', '121:Squint correction'); vProc[8] = new Array('54:Closure of colostomy', '56:Colonoscopy - Sigmoidoscopy', '53:Colostomy', '68:Drainage of anal fistula', '67:Hermorrhoidectomy', '52:Laparoscopic colectomy', '48:Laparoscopic repair of hernia', '51:Open Colectomy', '47:Open repair of hernia', '70:Repair of anal prolapse', '71:Resection of cancer', '72:Sphincter repair', '69:Surgery of anal fissure', '55:Total Mesorectal excision (TME)'); vProc[9] = new Array('231:Circumcision', '217:Colposuspension', '210:Corrective surgery of the kidneys', '213:Cystectomy', '215:Cystoscopic removal', '214:Cystoscopy', '225:Excision of epidimyl cysts', '224:Excision/drainage of hydrocoele', '208:Laparoscopic nephrectomy', '221:Laparoscopic prostatectomy', '211:Laparoscopic Pyeloplasty', '209:Laparoscopic resection of cysts', '223:Laser Prostatectomy - HoLEP', '226:Ligation', '207:Open nephrectomy', '220:Open prostatectomy', '229:Orchidectomy', '212:Removal of kidney / ureteric stones', '228:Reversal Vasectomy', '230:Surgical correction of pevronies disease', '222:Transurethral resection', '218:Transvaginal tape', '219:TRUS Prostate biopsy', '216:Urodynamics', '227:Vasectomy'); vProc[10] = new Array('79:Adrenalectomy', '78:Focused parathyroidectomy', '75:Lymph node dissection', '80:Pancreatectomy - Whipple’s procedure', '81:Pancreatic resection', '77:Parathyroidectomy', '73:Thyroidectomy'); vProc[11] = new Array('85:Bypass graft', '84:Endarterectomy', '83:Endoscopic stenting', '82:Replacement of aneurysmal segment', '87:Sclero-therapy', '86:Varicose veins surgery'); vProc[12] = new Array('102:Abdominal suspension procedures', '116:Amniocentesis', '119:Caesarean section', '118:Cervical cerclage', '117:Chorion villus biopsy', '106:Colposcopy', '97:Colposuspension', '105:Excision of vulvar and / or vaginal skin', '104:Faparoscopy', '91:Hysterectomy', '89:Hysteroscopic resection', '88:Hysteroscopy', '100:Insertion of mesh for prolapse', '206:Labial reduction', '95:Laparoscopic oophorectomy', '94:Laparoscopic ovarian cystectomy', '103:Laparoscopic suspension procedures', '93:Laparoscopy - therapeutic', '92:Laparoscopy – diagnostic', '90:Microwave ablation of endometrium', '107:Removal of ovaries and uterus', '109:Removal of pelvic lymph nodes', '115:Surgical evacuation of the uterus', '112:Trachelectomy', '96:Transvaginal tape', '98:Vaginal repair', '101:Vaginal suspension procedures', '114:Vulvectomy (total)', '113:Wide local excision of cancer in vulvar skin'); vProc[13] = new Array('254:Adenoidectomy', '172:Blepharoplasty', '181:Chin implant - face', '178:Chin Implant - jaw', '247:Cochlear implantation', '174:Correction of bat ears', '171:Cosmetic facial surgery', '250:Endolymphatic sac decompression', '180:Excise skin cancer', '249:Excision of acoustic neuroma', '265:Excision of branchial cyst', '248:Excision of cholesteatoma', '176:Excision of intraoral tumour', '264:Excision of thyroglossal cyst', '78:Focused parathyroidectomy', '244:Grommets', '270:Laryngeal resection', '261:Laryngeal resection for cancer', '75:Lymph node dissection', '262:Mandibular resection for cancer', '253:Nasal polypectomy', '256:Nasal resection', '260:Operation on pharyngeal pouch', '245:Ossiculoplasty', '243:Palatal stiffining operation', '77:Parathyroidectomy', '271:Pharyngeal resection', '177:Reconstruction of the jaw', '263:Removal tumours of salivary glands', '175:Repair of split ear lobe', '257:Resection of maxilla', '173:Rhinoplasty', '179:Scar revision - face', '268:Selective dissection of cervical lymph node', '252:Septoplasty', '255:Sinus surgery for facial pain', '246:Stapedectomy', '267:Thyroid cancer surgery', '269:Thyroid surgery for Graves disease', '266:Thyroid surgeryto remove lump', '73:Thyroidectomy', '258:Tonsillectomy', '251:Tympanoplasty', '242:Uvulopalatopharyngoplasty', '259:Voice surgery for hoarse voice'); vProc[14] = new Array('274:CT Scan - abdomen / pelvis', '283:CT Scan - breast', '286:CT Scan - cardiology', '277:CT Scan - head / neck / brain', '280:CT Scan - neurology', '289:CT Scan - thorasic', '275:MRI - abdomen / pelvis', '284:MRI - breast', '287:MRI - cardiology', '278:MRI - head / neck / brain', '281:MRI - neurology', '290:MRI - thorasic', '273:Ultrasound - abdomen / pelvis', '282:Ultrasound - breast', '285:Ultrasound - cardiology', '276:Ultrasound - head / neck / brain', '279:Ultrasound - neurology', '288:Ultrasound - thorasic'); vProc[17] = new Array('309:Alveolar bone graft', '317:Alveolar bone graft and sinus lift', '170:Cleft lip/palate', '305:Cranioplasty', '303:Dental implant', '312:Dental implant and/or bone graft', '315:Excision lesion of jaw', '298:Excision of cancer of the face', '300:Excision of cancer of the jaw', '299:Excision of cancer of the mouth', '314:Excision of cyst of jaw', '308:Fistula repair', '307:Glossectomy', '304:Jaw corrective surgery', '301:Orthognathic surgery', '306:Osteotomy of maxilla or madible', '302:Parotidectomy', '316:Removal comlicated tooth roots', '313:Removal of impacted teeth', '173:Rhinoplasty', '311:Sublingual salivary gland excision', '310:Submandibular salivary gland excision', '297:Surgery for jaw pain'); vProc[18] = new Array(); vProc[19] = new Array('320:Carpal tunnel decompression', '335:Corrective osteotomy (hand / finger)', '329:Cubital tunnel release', '327:DeQuervains release', '325:Dupuytrens fasciectomy', '334:PIP join replacement', '330:Primary repair of hand / finger tendon', '332:Repair of hand / finger fracture', '324:Resection of ganglion', '331:Secondary repair of hand / finger tendon transfer', '333:Synovestomy of hand / finger', '326:Thumb base arthroplasty', '323:Trigger finger release', '328:Wrist arthroscopy'); vProc[20] = new Array(); vProc[21] = new Array(); vProc[22] = new Array(); vProc[23] = new Array(); vProc[24] = new Array(); var vCondit = new Array(); vCondit[1] = new Array('84:Carotid artery disease', '1:Coronary artery disease', '3:Disorder of heart valves', '2:Heart failure', '4:Hole in the heart'); vCondit[2] = new Array('9:Aortic aneurysm', '82:Aortic aneurysms'); vCondit[3] = new Array('12:Benign lung disease', '11:Lung failure'); vCondit[4] = new Array('27:Cancer of oesophagus', '29:Gastro-oesophageal reflux', '15:Oesophageal cancer'); vCondit[5] = new Array('16:Cervical rib'); vCondit[6] = new Array('30:Gastric (stomach) cancer', '32:Gastric (stomach) ulcer', '31:Gastro-oesophageal reflux', '33:Hiatus hernia', '34:Obesity'); vCondit[7] = new Array('37:Duodenal cancer', '38:Duodenal ulcer'); vCondit[8] = new Array('41:Gall bladder cancer', '39:Gall stones', '42:Stricture'); vCondit[9] = new Array('44:Pancreatic benign tumours', '43:Pancreatic cancer'); vCondit[10] = new Array('46:Diverticular disease of jejunum', '45:Jejunal-ileal cancer'); vCondit[11] = new Array('195:Excess tissue', '47:Hernia'); vCondit[12] = new Array('49:Appendicitis'); vCondit[13] = new Array('51:Colorectal cancer', '62:Diverticular disease', '57:Inflammatory colon'); vCondit[14] = new Array('71:Anal cancer', '69:Anal fissure', '68:Anal fistula', '72:Anal incontinence', '70:Anal prolapse', '67:Haemorrhoids'); vCondit[15] = new Array('76:Grave’s disease', '74:Thyroid cancer', '73:Thyroid lump'); vCondit[16] = new Array('77:Hyperparathyroidism'); vCondit[17] = new Array('79:Tumours of the Adrenal gland'); vCondit[18] = new Array('85:Arterial disease of the leg', '235:Carotid artery disease'); vCondit[19] = new Array('86:Varicose veins'); vCondit[20] = new Array('240:Back pain', '238:Cervical disc prolapse', '318:Cervical spondylotic', '236:Lumbar disc prolapse', '237:Lumbar stenosis', '319:Metastatic and primary spinal tumours', '125:Prolapsed disc', '124:Scoliosis', '128:Spina Bifida', '123:Spinal deformity'); vCondit[21] = new Array('202:Arthritis - hands', '334:Arthritis of the fingers', '129:Carpal tunnel', '320:Carpal tunnel syndrome', '204:Congenital hand problem', '200:Dupuytren’s contracture', '331:Failed hand / finger tendon repair', '332:Hand / finger repair', '201:Hand injury', '324:Hand swelling or pain', '323:Locking / catching / pain at the base of the finger', '329:Lost function on the small finger side of the hand', '335:Mal-united fracture of hand / finger', '326:Osteoarthritis of the thumb base', '130:Pain/arthritis - wrist', '325:Progressive curling of the finger', '333:Rheumatoid arthritis of hand / finger', '330:Ruptured or lacerated hand / finger tendon', '199:Trigger finger', '327:Wrist pain'); vCondit[22] = new Array('133:Pain/arthritis - hip'); vCondit[23] = new Array('141:Knee injury (sports)', '138:Pain/arthritis - knee', '143:Patella pain'); vCondit[24] = new Array('144:Pain/arthritis - shoulder', '150:Recurrent dislocation of shoulder', '149:Rotator cuff injury', '147:Shoulder injury (sports)'); vCondit[25] = new Array('155:Elbow injury (sports)', '152:Pain/arthritis - elbow', '157:Tennis elbow', '321:Ulnar nerve compression'); vCondit[26] = new Array('163:Ankle injury (sports)', '165:Bunion/hallux valgus', '166:Ingrown toe nail', '158:Pain/arthritis - foot / ankle'); vCondit[27] = new Array('234:Acoustic neuroma', '233:Aneurysm', '174:Bat ears', '317:Bone grafts for implants', '169:Brow - cosmetic changes', '316:Buried tooth roots', '298:Cancer of the face', '300:Cancer of the jaw', '299:Cancer of the mouth', '308:Cleft lip', '314:Cyst of jaw', '167:Face - cosmetic changes', '301:Facial deformity', '270:Head and neck cancer', '313:Impacted teeth / wisdom teeth', '177:Jaw - change of shape / size', '176:Jaw cancer', '297:Jaw pain', '315:Lesion of jaw', '170:Lips - cosmetic changes', '303:Missing teeth', '168:Neck - cosmetic changes', '264:Neck lump', '173:Nose - change of shape / size', '172:Saggy Eyelids', '302:Salivary glan disease', '310:Salivary gland disease', '179:Scar', '180:Skin cancer', '304:Sleep apnoea', '175:Split ear lobe', '232:Tumor - head / neck / brain', '263:Tumours of salivary glands'); vCondit[28] = new Array('17:Breast cancer', '185:Breast problems in men', '184:Development breast problems', '186:Inverted nipples', '22:Nipple discharge', '24:Oversized breasts', '26:Saggy breasts', '25:Undersized breasts', '183:Uneven breasts size or shape'); vCondit[29] = new Array('194:Burns', '192:Melanoma', '187:Scar', '190:Skin cancer', '188:Tattoo', '191:Unsightly mole'); vCondit[30] = new Array('198:Excess tissue'); vCondit[31] = new Array('227:Contraception', '225:Epidimyal cysts', '224:Hydrocoele', '205:Hypospadias', '228:Male fertility', '230:Pevronies disease', '231:Phimosis', '229:Testicle cancer', '226:Varicoele'); vCondit[32] = new Array('113:Cancer of vulvar skin', '105:Cysts of vulvar and vaginal skin', '206:Enlarged labia', '98:Prolapse'); vCondit[33] = new Array('209:Cysts - kidneys', '212:Kidney /ureteric stones', '210:Obstruction of kidneys', '207:Tumours - kidneys'); vCondit[34] = new Array('215:Bladder stones', '213:Cancer of the bladder'); vCondit[35] = new Array('222:Benign enlargement - prostate', '219:Cancer - prostate'); vCondit[36] = new Array('251:Ear discharge', '244:Hearing loss', '242:Snoring', '250:Vertigo / dizzy'); vCondit[37] = new Array('257:Cancer - maxilla', '256:Cancer - nasal', '255:Facial pain', '252:Nasal blockage'); vCondit[38] = new Array('258:Chronic tonsillitis', '260:Difficult swallowing', '261:Head and neck cancer', '259:Hoarse voice'); vCondit[39] = new Array(); vCondit[40] = new Array('119:Complicated delivery', '108:Endometrial cancer', '88:Heavy periods', '115:Miscarriage', '116:Prenatal diagnosis'); vCondit[41] = new Array('107:Cancer of ovary', '104:Infertility', '94:Ovarian cysts'); vCondit[42] = new Array('106:Abnormal cervical smear', '110:Cancer of cervix', '118:Incompetent cervix'); vCondit[44] = new Array('92:Pelvic pain'); vCondit[45] = new Array('215:Bladder stones', '213:Cancer of the bladder', '216:Incontinence - female', '96:Urinary incontinence'); vCondit[46] = new Array('120:Cataract', '122:Retinal detachment', '121:Squint'); function fBodyUpdate(vID, vFormName, vProcList, vSwitch){ vFormName = (vFormName == null) ? 'searchForm' : vFormName vProcList = (vProcList == null) ? 'sprocedures' : vProcList; if(vSwitch == null){ vListArray = vProc; }else{ vListArray = vCondit; } vID = parseInt(vID); //var oProc = document.getElementById(vProcList); var oProc = document[vFormName][vProcList]; selectedItem = removeAllOptions(oProc); addOption(oProc, 'Please select...', '', 0); if(vListArray[vID] != null && vListArray[vID].length > 0){ for(vJ=0; vJ < vListArray[vID].length; vJ++){ vOptionInfo = vListArray[vID][vJ].split(":"); if( vOptionInfo[0] == selectedItem || parseInt(vOptionInfo[0]) == parseInt(selectedItem) ){ addOption(oProc, vOptionInfo[1], vOptionInfo[0], 1); }else{ addOption(oProc, vOptionInfo[1], vOptionInfo[0], 0); } } } } function fUpdateOptions(e){ var target = document.searchForm; //window.event ? window.event.srcElement : e ? e.target : null; if (!target) return; /* Check if this form is already in the process of being submitted. /* If so, don't allow it to be submitted again. */ if (target.ajaxInProgress) return; /* Set up the request */ //var xmlhttp = new XMLHttpRequest(); if(window.XMLHttpRequest && !(window.ActiveXObject)) { try { var xmlhttp = new XMLHttpRequest(); } catch(e) { var xmlhttp = false; } // branch for IE/Windows ActiveX version } else if(window.ActiveXObject) { try { var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { var xmlhttp = false; } } } xmlhttp.open('POST', 'index.php?p=sys&s=updateform', true); /* The callback function */ xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4) { if (xmlhttp.status == 200){ setFormUpdate(xmlhttp.responseXML, target); }else{ target.submit(); } } } /* Send the POST request */ vDesc = ""; vBanned = new Array("p", "s", '', ' '); for(i= 0; i < target.elements.length; i++){ vOK = 1; for(k=0; k < vBanned.length; k++){ if(vBanned[k] == target.elements[i].name){ vOK = 0; } } if(vOK){ //Store Debug Values if( target.elements[i].type.indexOf('select') != -1 ){ if(target.elements[i].name != null){ vDesc += target.elements[i].name + '=' + target.elements[i].options[target.elements[i].selectedIndex].value + "&"; //xmlhttp.send(target.elements[i].name + '=' + target.elements[i].options[target.elements[i].selectedIndex].value); } }else{ if(target.elements[i].name != null){ vDesc += target.elements[i].name + '=' + target.elements[i].value + "&"; //xmlhttp.send(target.elements[i].name + '=' + target.elements[i].value); } } } } /* Add temporary feedback that the request has been sent */ oForm = document.searchForm; if(oForm.message != null){ oForm.message.value = "Checking search options...\n" + vDesc; } xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlhttp.send(vDesc); //target.ajaxInProgress = true; } function setFormUpdate(responseXML, target) { oForm = document.searchForm; selectbox = oForm['scity']; removeAllOptions(selectbox); if(responseXML.getElementsByTagName('cities')[0].firstChild != null && responseXML.getElementsByTagName('cities')[0].firstChild.data != null && responseXML.getElementsByTagName('cities')[0].firstChild.data != undefined){ var vReturn = responseXML.getElementsByTagName('cities')[0].firstChild.data; if(vReturn != null){ vReturn = (vReturn.indexOf('}{') != -1) ? vReturn.split('}{') : Array(vReturn); addOption(selectbox, 'Please select...', '', 0); for(i=0; i < vReturn.length; i++){ if(vReturn[i] != null){ vRet = vReturn[i].split('{').join('').split('}').join('').split('|'); addOption(selectbox, vRet[1], vRet[0], 0); } } } if(oForm.message != null){ oForm.message.value = "Returned: " + responseXML.getElementsByTagName('cities')[0].firstChild.data; } }else{ addOption(selectbox, 'Sorry, No surgeons in any cities', '', 0); if(oForm.message != null){ oForm.message.value = "No results found"; } } //target.ajaxInProgress = false; }