///Toggle the visibility of an HTML object
function toggleView(obj) {
   var currentView = obj.style.display;
   obj.style.display = currentView == "block" ? "none" : "block";
}

///Toggles the image to an image within the same folder as the originalSrc
///img == The Image object
///newImg == The image object within the same folder as the Current Src
/// i.e. someImage.jpg -- No other pathing required
///Solves problems with ASP.NET Image Control Toggling and works with standard images too
function toggleImage(img, newImg) {
   img.src = img.src.replace(/\w+\.\w{3}$/gi, newImg);
}

///Resizes an image to a certain percentage aspect ratio
///img == The Image Object
///percent == The total percentage to be removed from the total Size Ratio
/// example : 80 will resize the image to remove 80% of its original size
function getThumbNail(img, percent) {
   img.height -= (percent / 100) * img.height;
   img.Width -= (percent / 100) * img.Width;
}
