function clearField(name, text) {
    if (document.search.elements[name].value == text) {
        document.search.elements[name].value = '';
    }
}

function fillField(name, text) {
    if (document.search.elements[name].value == '') {
        document.search.elements[name].value = text;
    }
}

$(function () {
    var containerheight = $(window).height();
    var headerheight = 160;
    var footerheight = $('.footer').height();

    var contentheight = containerheight - footerheight - headerheight;

    if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { //test for MSIE x.x;
        var ieversion = new Number(RegExp.$1) // capture x.x portion and store as a number
        if (ieversion < 8) contentheight = contentheight - 35;
    }

    $('.content').css("height", "auto"); // Eliminate the heights value
    $('.content').height(contentheight);

		$('.content_left, .content_middle, .content_right').find('.breakline:last').remove();

})

$(window).resize(function () {
    var containerheight = $(window).height();
    var headerheight = 160;
    var footerheight = $('.footer').height();

    var contentheight = containerheight - footerheight - headerheight;

    if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { //test for MSIE x.x;
        var ieversion = new Number(RegExp.$1) // capture x.x portion and store as a number
        if (ieversion < 8) contentheight = contentheight - 35;
    }

    $('.content').css("height", "auto"); // Eliminate the heights value
    $('.content').height(contentheight);
})

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2584505-3']);
_gaq.push(['_trackPageview']);

(function () {
    var ga = document.createElement('script');
    ga.type = 'text/javascript';
    ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(ga, s);
})();
