function ajustaWid(obj,h,w) {
  var myWidth = 0, myHeight = 0;
  if (document.getElementById(obj)) {
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
   if ((myWidth-w)  > 0) document.getElementById(obj).style.width  = myWidth-w;
   if ((myHeight-h) > 0) document.getElementById(obj).style.height = myHeight-h+600;
 }
}

function Telamodal(win){
    var x = 0;
    
    if (win.document.getElementById("div")){
       var div = win.document.getElementById("div");
       x = 1;
    } else {
       var div = win.document.createElement("div");
       x = 0;
    }
    div.className = "Telamodal";
    div.id = "divModal";    
  /*  div.onclick = function (e) { 
                                 try {
                                       if (popUp)
                                           popUp.focus();                                    
                                     }
                                 catch(erro) {
                                    div.className = "";
                                    popUp = 0;
                                    return;
                                 }    
                                };*/
								
								
    if (x == 0) win.document.body.appendChild(div);
	ajustaWid('divModal',10,10);
}

function RemoveModal(win){
   if (win.document.getElementById('divModal'))
       win.document.getElementById('divModal').parentNode.removeChild(win.document.getElementById('divModal')) ;
}


function chama_funcao(){
	document.getElementById('botaoexcluir').click();
}


