function trace( msg ){
if( typeof( jsTrace ) != 'undefined' ){
jsTrace.send( msg );
}
}
function openForm()
{
$("#welcome").hide("normal");
$("#app-form").show("normal");
}
function otherCheck(val, box)
{
trace(val);
trace(box);
if(val == "Other")
{
trace("Other Selected");
$(box).show("normal");
$(box).css({'margin-top':'5px'});
}
else
{
$(box).hide("normal");
$(box).css({'margin-top':'0px'});
}
}
function chainedOtherCheck(val, divItem)
{
if(val == "Other")
{
$(divItem).animate({height:'80px'}, 500);
$(divItem).find('#acad-other').show("normal");
}
else
{
$(divItem).animate({height:'50px'}, 500);
$(divItem).find('#acad-other').hide("normal");
}
}
function chainedBox(val, divItem)
{
var options = '';
trace(val);
trace(divItem);
function showElements()
{
$(divItem).animate({height:'50px'}, 500);
$(divItem).find('#acad-sub').html(options);
$(divItem).find('#acad-sub').show("normal");
$(divItem).find('#acad-other').hide("normal");
}
if(val == "Anesthesiology")
{
var subs = ["ANES: Ambulatory Surgery","ANES: Cardiac","ANES: Critical Care","ANES: General","ANES: Neuro","ANES: Obstetrics","ANES: Pain Management","ANES: Pediatric","ANES: Regional","ANES: Thoracic","ANES: Transplant","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Dermatology")
{
var subs = ["DERM: Dermatopathology","DERM: General","DERM: Mohs","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Dentistry")
{
var subs = ["DENT: Endodontics","DENT: General","DENT: Oncology","DENT: Orthodontics","DENT: Pediatric","DENT: Periodontics","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Emergency Medicine")
{
var subs = ["EMER: Cardiac","EMER: General","EMER: Infectious Disease","EMER: Medical Toxicology","EMER: Neurologic Emergencies","EMER: Pediatric","EMER: Trauma","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Family Medicine")
{
var subs = ["FAM: General","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Neurology")
{
var subs = ["NEUR: Behaviorial and Cognitive","NEUR: Cerebrovascular Disease","NEUR: Epilepsy","NEUR: General","NEUR: Movement Disorders","NEUR: Neuroendocrinology","NEUR: Neuroimmunology","NEUR: Neuromascular Diseases","NEUR: Neuropharmacology","NEUR: Neurophysiology","NEUR: Oncology","NEUR: Pediatric","NEUR: Peripheral Nerve Disease","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "OB/GYN")
{
var subs = ["OB/GYN: General","OB/GYN: Gynecologic Oncology","OB/GYN: Maternal & Fetal","OB/GYN: Reproductive Endocrinology","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Ophthalmology")
{
var subs = ["OPHTH: Cornea","OPHTH: General","OPHTH: Glaucoma","OPHTH: Neuro-Ophthalmology","OPHTH: Oculoplastics","OPHTH: Opthalmic Pathology","OPHTH: Pediatric","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Otolaryngology")
{
var subs = ["ENT: Audiology & Balance","ENT: Facial Plastic & Reconstructive","ENT: General","ENT: Laryngology","ENT: Oncology","ENT: Otology & Neurotology","ENT: Pediatric","ENT: Rhinology & Language Pathology","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Pathology")
{
var subs = ["PATH: Anatomic","PATH: General Clinical","PATH: Neuropathology","PATH: Surgical & Cytopathology","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Physical Medicine & Rehabilitation")
{
var subs = ["PMR: General","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Psychiatry")
{
var subs = ["PSYCH: Adult","PSYCH: Child & Adolescent","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Medicine")
{
var subs = ["MED: Allergy/Immunology","MED: Cardiology","MED: Critical/Intensive Care","MED: Endocrinology","MED: Gastroenterology","MED: General Internal Medicine","MED: Geriatrics","MED: Hematology/Oncology","MED: Infectious Disease","MED: Nephrology","MED: Pulmonary","MED: Rheumatology","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Pediatrics")
{
var subs = ["PEDS: Allergy/Immunology","PEDS: Cardiology","PEDS: Critical/Intensive Care","PEDS: Emergency Medicine","PEDS: Endocrinology","PEDS: Gastroenterology","PEDS: General","PEDS: Genetics","PEDS: Hematology/Oncology","PEDS: Infectious Disease","PEDS: Neonatology","PEDS: Nephrology","PEDS: Neurology","PEDS: Pulmonary","PEDS: Rheumatology","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Radiology")
{
var subs = ["RAD: Angiography-Interventional","RAD: Breast Imaging","RAD: General Intervention","RAD: General Non-Intervention","RAD: Musculoskeletal","RAD: Neuroradiology and Intervention","RAD: Non-Invasive Cardiovascular Imaging","RAD: Nuclear Medicine","RAD: Pediatric","RAD: Thoraco-Abdominal","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Radiation Oncology")
{
var subs = ["RONC: General Radiation Oncology","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Neurosurgery")
{
var subs = ["NSUR: Cerebrovascular","NSUR: Complex Spine","NSUR: Epilepsy","NSUR: Functional","NSUR: Gamma Knife","NSUR: General","NSUR: Minimally Invasive Spine","NSUR: Neuro-Oncology","NSUR: Neuropsychology","NSUR: Pediatric","NSUR: Peripheral Nerve","NSUR: Pituitary","NSUR: Trauma","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Orthopaedic Surgery")
{
var subs = ["ORTH: Adult Reconstruction","ORTH: Ambulatory","ORTH: Foot & Ankle","ORTH: General","ORTH: Hand & Microvascular","ORTH: Oncology","ORTH: Pediatric","ORTH: Prosthetics & Orthotics","ORTH: Spine","ORTH: Sports","ORTH: Trauma","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Plastic Surgery")
{
var subs = ["PLAS: Cosmetic","PLAS: General Plastic Surgery","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Surgery")
{
var subs = ["SURG: General","SURG: Pediatric","SURG: Pediatric","SURG: Thoracic & Cardiovascular","SURG: Transplant","SURG: Trauma/Critical Care","SURG: Vascular","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Urology")
{
var subs = ["UROL: General","UROL: Pediatric","Other"];
for(var i = 0; i < subs.length; i++)
{
options += '';
}
showElements();
}
else if(val == "Other")
{
$(divItem).animate({height:'50px'}, 500)
$(divItem).find('#acad-sub').hide("normal")
$(divItem).find('#acad-other').show("normal");
}
else
{
$(divItem).animate({height:'30px'}, 500);
$(divItem).find('#acad-sub').hide("normal");
$(divItem).find('#acad-other').hide("normal");
}
}
$(document).ready(function()
{
var validate = new Array("first_name","middle_name","last_name","");
$(".form-group").find("input").each(function(i)
{ if($(this).attr("name").substring(0, 6)!='resume') {
var targ = $(this);
var val = $(this).attr("name");
$(targ).example(val);
} })
$("#suffix-other").style.display = "none";
});