﻿var computeHeight = "";

$(document).ready(function () {
    $(".glossaryItem").tooltip({
        delay: 0,
        showURL: false,
        bodyHandler: function () {
            var cId = $(this).attr("id").split("_")[1]
            return $("<div/>").addClass("glossaryPopup").html("<span>" + $(this).text() + "</span>").append($("#d2_" + cId).clone());
        }
    });

    $("#searchDiv input").watermark("Search", {
        className: 'wClass',
        useNative: false,
        hideBeforeUnload: false
    });
    $("#searchDiv a").bind("click", function () {
        var val = $("#searchDiv input:first").val();
        if (val != "" && val != "Search") {
            window.location="../home/search.aspx?w=" + encodeURI(val)
        };
    });
});


/* MENU */
$(document).ready(function () {
    $("#nav-one li").hover(
				function () { $("ul", this).fadeIn("fast"); },
				function () { }
			);
    if (document.all) {
        $("#nav-one li").hoverClass("sfHover");
    }
});

$.fn.hoverClass = function (c) {
    return this.each(function () {
        $(this).hover(
					function () { $(this).addClass(c); },
					function () { $(this).removeClass(c); }
				);
    });
};


/* SCHEMA */
function affich(Id) {

    document.getElementById("divcont").innerHTML = document.getElementById(Id).innerHTML
}

function del() {

    document.getElementById("divcont").innerHTML = ''
};
