function mascaraData(x){
              var data = document.getElementById('data_'+x).value;
			 // alert(data);
              if (data.length == 2){
                  data = data + '/';
                  data = data;
				  document.getElementById('data_'+x).value = data ;
      return true;              
              }
              if (data.length == 5){
                  data = data + '/';
                  document.getElementById('data_'+x).value = data ;
                  return true;
              }
         }
 

 
function deletar(url)
{
if(confirm('Tem certeza que deseja Excluir?')) {
window.open(url,'_parent')
}
}


function excluir(url,msg)
{
	if(confirm(msg)) 
	{
	window.open(url,'_parent')
	}
}


function marcareg(frm) {



		document.deletar.submit();

		



	}

function valcheck(x){



		for (var i = 0; i < document.forms(0).elements.length; i++) {



			var e = document.forms(0).elements[i];



			if (e.type=="checkbox") {



				e.checked = x;



				CCA(e);



			}



		}



	}

	var checkflag = "false";



function check(field) {

       if (checkflag == "false") {

           for (i = 0; i < field.length; i++) {

               field[i].checked = true;

           }

           checkflag = "true";

           return true;

        }

       else {

            for (i = 0; i < field.length; i++) {

               field[i].checked = false;

            }

           checkflag = "false";

           return true;

        }

}

function addSWF (URL, WIDTH, HEIGHT, TRANSPARENT)
{
document.write (' <object classid="clsid:27CDB6E-AE6D-11cf-96B8-444553540000" ');
document.write (' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ');
document.write (' width="'+ WIDTH +'" height="'+ HEIGHT +'">');
document.write (' <param name="movie" value="'+ URL +'" />');
document.write (' <param name="quality" value="high" />');

if ( TRANSPARENT ) {
  document.write (' <param name="Wmode" value="Transparent" />'); 
}

document.write (' <embed src="'+ URL +'" quality="high" ');

if ( TRANSPARENT ) {
document.write (' Wmode = "transparent" ');
}

document.write (' pluginspage="http://www.macromedia.com/go/getflashplayer" ');
document.write (' type="application/x-shockwave-flash" width="'+ WIDTH +'" height="'+ HEIGHT +'"></embed> ');
document.write (' </object>');

} 	
