/*      
var message="";

function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
function clearData(){
//window.clipboardData.setData('text','') 
}
function ccb(){
if(clipboardData){
//clipboardData.clearData();
}
}
setInterval("ccb();", 1000);

browserName         = navigator.appName
browserVersion      = parseInt(navigator.appVersion)

document.onmousedown = checkforRightMouseButtonClick;
if (browserVersion<5 && browserName=="Netscape") 
  {
    window.onmousedown = checkforRightMouseButtonClick;
  }

function rightClickPressed(){
   return false;
}

function checkforRightMouseButtonClick(mouseEvent)
{
  if ( ((browserName != "Microsoft Internet Explorer") && (mouseEvent.which >1)) ||
       ((browserName=="Netscape") && (mouseEvent.which > 1)) )
    {
      rightClickPressed()
      return false;
    }
  else
   return true;
}

*/
function soN(esp,numbers,others,e){
	if(window.event)key=window.event.keyCode
	else if(e)key=e.which
	else return true
	S=(others)?others:''
	if(numbers)S+='0123456789'
	if (esp) { if(key==32)return true 	}
	if(key==null||key==0||key==8||key==9||key==13||key==27)return true
	else if(S.indexOf(String.fromCharCode(key))!=-1)return true
	else return false

}


function foto(ende){ window.open (ende,'','width=300,height=150');}
function cert(ende){ window.open (ende,'','scrollbars=yes,width=680,height=480');}
function cidades(ende){ window.open (ende,'EscolherCidade','width=340,height=160');}


function redim(){
	if (top.screen) {
		obj=document.foto;
		foto_width =obj.width;
		foto_height =obj.height;
		top.resizeTo(foto_width + 10, foto_height + 30); 
		}

if (parseInt(navigator.appVersion) >= 4) window.moveTo((screen.width/2)-(foto_width/2+10),(screen.height/2)-(foto_height/2+20));	

}

function mudacor(LayerID)
  {
	  if (document.all)
	  {		  if (document.getElementById(LayerID).style.color == '')
		  {
			  document.getElementById(LayerID).style.color = '#FF9900';
			}
		  else
		  {
			  document.getElementById(LayerID).style.color = '';
			}
			

		}
	}
	
function mostrar(LayerID)
  {
	  if (document.all)
	  {
		  if (document.getElementById(LayerID).style.display == '')
		  {
			  document.getElementById(LayerID).style.display = 'none';
			}
		  else
		  {
			  document.getElementById(LayerID).style.display = '';
			}
		}
	}
	
	// JavaScript Document
        function popup(url, name, width, height)
        {
           var str = "height=" + height + ",innerHeight=" + height;
                str += ",width=" + width + ",innerWidth=" + width;
                str += ",status=yes,scrollbars=yes,resizable=no";
                  if (window.screen)
                {
                        var ah = screen.availHeight - 30;
                        var aw = screen.availWidth - 10;
                        var xc = (aw - width) / 2;
                        var yc = (ah - height) / 2;

                        str += ",left=" + xc + ",screenX=" + xc;
                        str += ",top=" + yc + ",screenY=" + yc;
                }
                var win = window.open(url, name, str);
        }
        
