Utils = {};

Utils.isIE = function() {
    return navigator.appName.indexOf('Microsoft') > -1;
}

Utils.isIE7 = function() {
    return navigator.userAgent.indexOf("MSIE 7.") > -1;
}

function teaser(idOne, classOne, idTwo, classTwo) {
    document.getElementById(idOne).className = classOne;
    document.getElementById(idTwo).className = classTwo;
}

getPosition = function(pixelPos) {
    return parseInt(pixelPos.replace("px", ""));
}

function justSwapImg(imgSrc, id) {
    document.getElementById(id).src = imgSrc;
}

function swapBackground(src, id) {
    document.getElementById(id).style.background = "url(" + src + ")";
}
function toggleShowLayer(id) {
     document.getElementById(id).style.display = "none" ? "block" : "none";
}
function showLayer(id) {
     document.getElementById(id).style.display = "block";
}
function hideLayer(id) {
     document.getElementById(id).style.display = "none";
}

function clearInputBox(id) {
    if(document.getElementById(id).value == "Search") {
        document.getElementById(id).value = "";
    }
}

function resetInputBox(id,string) {
    if(document.getElementById(id).value == "") {
        document.getElementById(id).value = string;
    }
}

Utils.swapImg = function(id,imgSrc) {
	document.getElementById(id).src = imgSrc;
}
