function ToogleSub(divID, imgID) {
    var tDiv = document.getElementById(divID);
    var img = document.getElementById(imgID);
    
    if (tDiv.style.display == 'block') {
        tDiv.style.display = 'none';
        img.src = '/images/up.png';
    }
    else {
        tDiv.style.display = 'block';
        img.src = '/images/down.png';
    }
}

function ToogleSub(divID, imgID, hash) {
    var tDiv = document.getElementById(divID);
    var img = document.getElementById(imgID);

    if (tDiv.style.display == 'block') {
        tDiv.style.display = 'none';
        img.src = '/images/up.png';

        document.location.hash = "";
    }
    else {
        tDiv.style.display = 'block';
        img.src = '/images/down.png';

        document.location.hash = hash;
    }
}

function ToogleAnswer(divID) {
    var tDiv = document.getElementById(divID);

    if (tDiv.style.display == 'block') {
        tDiv.style.display = 'none';
    }
    else {
        tDiv.style.display = 'block';
    }
}

function ToogleAnswer(divID, hash) {
    var tDiv = document.getElementById(divID);

    if (tDiv.style.display == 'block') {
        tDiv.style.display = 'none';

        document.location.hash = "";
    }
    else {
        tDiv.style.display = 'block';

        document.location.hash = hash;

        //t1._trackEvent('sss', 'tiklama', hash);
        _gaq.push(['t1._trackEvent', 'sss', 'tiklama', hash]);
    }
}

$(document).ready(function () {
    var hash = document.location.hash.replace(/^#/, '');
    var obj = $("div[rel=" + hash + "]");

    $(obj).parent().show();
    $(obj).show();
});
