function overrideDashboardTDOnclick(object) {
    //override onclick in case of non IE
    if (!object.attachEvent)
        object.setAttribute('onclick', object.firstChild.href);
}

function changeColor(object, color) {
    if (object != null && color != null) {
        var thisChild = object.firstChild;
        if (thisChild != null) {
            thisChild.style.color = color;
        }
    }
}

function swapCss(object, newCss) {
    if (object != null && newCss != null)
        object.className = newCss;
}

function showPopup(url) {
    newwindow = window.open(url, 'name', 'height=500,width=600,top=200,left=300,resizable=yes,scrollbars=yes', false);
    newwindow.document.write('<html><head><title>Laborat&oacute;rio Sorol&oacute;gico</title></head><img src="' + url + '"/></html>');
    newwindow.document.close();
    if (window.focus) { newwindow.focus() }
}

function setcookie(c_name,value) {
    document.cookie=c_name+"="+value;
} 
