﻿
    function homebrokerAlert(strMessage){

        var siteMsg = document.createElement("div");

        siteMsg.setAttribute("id", "siteMsgSkype");
        siteMsg.style["position"] = "fixed";
        siteMsg.style["left"] = siteMsgLeft();
        siteMsg.style["top"] = siteMsgTop();
        siteMsg.style["zIndex"] = 1000;
        siteMsg.className = "popup";

	var strHtml = '';
	strHtml += '<div class="greenBox">';
	strHtml +=     '<div>';
	strHtml +=         '<div>';
	strHtml +=             '<div>';
	strHtml +=                 '<div class="darkGreenBox">';
	strHtml +=                     '<p class="warning" style="text-transform:none;">O Skype não está acessível. Abra o skype ou acesse <a style="text-transform:lowercase; text-decoration:underline; color:white;" href="http://www.skype.com">www.skype.com</a> para instalar e adicione nosso usuário: mycapbrasil</p>';
	strHtml +=                     '<a href="#" class="buttom" onclick="homebrokerAlertRemove();return false;"><strong>Ok</strong></a>';
	strHtml +=                 '</div>';
	strHtml +=             '</div>';
	strHtml +=         '</div>';
	strHtml +=     '</div>';
	strHtml += '</div>';

        siteMsg.innerHTML = strHtml;

        document.getElementById("plcRoot_Layout_zoneAcount_CurrentUserIcap_upnPopErroCMA").appendChild(siteMsg);

    }
function homebrokerAlertRemove(){
	document.getElementById("plcRoot_Layout_zoneAcount_CurrentUserIcap_upnPopErroCMA").removeChild(document.getElementById("siteMsgSkype"));

}

    function siteMsgLeft(){

	var width = Math.floor(((document.compatMode && document.compatMode != "BackCompat") ? document.documentElement.clientWidth : document.body.clientWidth) / 2);

	return (width < 200) ? "0px" : ((width - 189) + "px");

    }

    function siteMsgTop(){

	return "200px";

    }
