-Changed loadXMLorJSON function to use async=false.