﻿var intervalId = 0;
function windowFix() {
    if($(document).find("#d").length>0){
    var windowheight = $(window).height();
    var resultheight = windowheight;
    //var cheight=$("#c").attr("scrollHeight");
    var dheight = $("#d").offset().top;
    if(dheight>windowheight) { resultheight = dheight;}
    $("#a").css("height",resultheight);
    $("#b").css("height",resultheight);
    $("#c").css("height",resultheight);
    //inx.msg(cheight);
    //inx.msg(windowheight,1);
    }
}
intervalId = setInterval(windowFix,500);
$(windowFix);
