﻿function isShow(object) {
		//var img_id = "img_" + object.id.substr(8, 8);
	
		if(object.style.display=="none") {
		   object.style.display = "inline";
		   
	
		   //document.getElementById(img_id).src = "del.gif";
		}
		else {
		   object.style.display = "none";
		   //document.getElementById(img_id).src = "../../imgs/ico_lupa.jpg";
		}
	  }

 function verificaKeyPress(obj, max)

{

 if (obj.value.length == max)

     {

        event.returnValue = false;

     }

}

 function NovaJanela(pagina,nome,w,h,scroll){
    var win = null;
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(pagina,nome,settings);
}
 

function verificaKeyUp(obj, max)

{

    if (obj.value.length > max)

  {

      obj.value = obj.value.substr(0,max);

   }

}

 

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>');

}