function showHide(element){
    element = document.getElementById(element);
    if(element.style.display==''){
        element.style.display='none';
        return 0;
    }else{
        element.style.display='';
        return 1;
    }
}

function setFrameSrc(frame,url){
    frame = document.getElementById(frame);
    frame.src = url;
}

function adjustIFrameSize (iframeWindow) {
    if (iframeWindow.document.height) {
        var iframeElement = document.getElementById(iframeWindow.name);
        if (iframeElement) {
            iframeElement.style.height = iframeWindow.document.height + 10 + 'px';
        }

    } else if (document.all) {
        var iframeElement = document.all[iframeWindow.name];
        if (iframeElement) {
            if (iframeWindow.document.compatMode &&
                iframeWindow.document.compatMode != 'BackCompat') 
            {
              iframeElement.style.height = iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
        
            }
            else {
              iframeElement.style.height = iframeWindow.document.body.scrollHeight + 5 + 'px';
            }
        }
    }
}

function raise_msg(msg,type) {
    $('#msg_container').fadeOut().children(':first').children(':first').removeClass().addClass(type).children(':last').html(msg);
    $('#msg_container').fadeIn().fadeOut(9000);    
}
