/** * toggleDivBlock() * * @param string showId * @param string prefix * @param integer numEl * @param string hideStyle * @param string showStyle * @access public * @return void **/ function toggleDivBlock(showId,prefix,numEl,hideStyle,showStyle){ try { // Hide everything first for (i=0; i<=numEl; i++) { if (checkElementExists(prefix+i)) { toggleDisplay(prefix+i,hideStyle); } } // Display the one we want to show toggleDisplay(showId,showStyle); } catch(err) { handleException(err); } } /** * * @access public * @return void **/ function prViewImage(aName){ try { ajaxRequest("ajax/image.php?i="+aName,"prDisplayImage"); } catch (err) { handleException(err); } } function prViewArticleImage(aName,aNum){ try { ajaxRequest("/ajax/image.php?n="+aNum+"&a="+aName,"prDisplayImage"); } catch (err) { handleException(err); } } /** * prDisplayImage() * * @access public * @return void **/ function prDisplayImage(response){ try { if (checkElementExists('fullImage') && response) { document.getElementById('fullImage').innerHTML = response; toggleDisplay('fullImage','show'); toggleDisplay('mp3Player','hide'); } } catch (err) { handleException(err); } } /** * * @access public * @return void **/ function getGalleryTab(tab){ try { ajaxRequest("ajax/tab.php?o="+tab,"prDisplayTab"); } catch (err) { handleException(err); } } /** * prDisplayTab() * * @access public * @return void **/ function prDisplayTab(response){ try { if (checkElementExists('thumbnails') && response) { document.getElementById('thumbnails').innerHTML = response; } } catch (err) { handleException(err); } } /** * * @access public * @return void **/ function setAndShow(anEl,aValue){ try { if (checkElementExists(anEl) && aValue) { document.getElementById(anEl).innerHTML = aValue; toggleDisplay(anEl,'show'); } } catch (err) { handleException(err); } }