$(document).ready(function() {	
	/**** Eliminar outlines das checkboxes, radio buttons e botoes em geral ****/
	$("A,INPUT[@type='radio'],INPUT[@type='checkbox'],INPUT[@type='button'],INPUT[@type='image'],INPUT[@type='submit']").bind("focus",function(){this.blur();});
	
	/**** altera os PNG qdo o browser e' IE ****/
	if ($.browser.msie) _fixPNG();
	
});

function _fixPNG() {
	var images = $('img[@src*="png"]'), png;
	images.each(
		function() {
			png = this.src;
			this.src = '../images/icons/spacer.gif';
			this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + png + "')";
		}
	);
}

function submitForm(formName, actionPage, target, method, encoding){
	//validacoes
	if (formName.length==0)//
		formName = "form";
		
	if (actionPage.length==0)
		actionPage = document.URL;
	
	if (method.length==0) //
		method = "POST";
		
	if (target.length==0)//
		target = "";
	
	if (encoding.length==0)//
		encoding = "application/x-www-form-urlencoded";		
		
	//envio
	var myForm = document.getElementById(formName);
	myForm.method  = method;
	myForm.target  = target;
	myForm.encoding= encoding;
	myForm.action  = actionPage;
	myForm.submit();
}

function popwindow(url, windowName, width, height, resize){
	if (width.length==0)//
		width=200;
	if (height.length==0)//
		height=300;
	if (resize.length==0)//
		resize='yes';
		
	var screenWidth = self.screen.width/2 - width/2;
	var screenHeight = self.screen.height/2 - height/2;	

	janela = window.open (url,windowName,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable='+resize+',top='+screenHeight+',left='+screenWidth+',width='+width+',height='+height+'');
	janela.focus();
}

