function replaceAll(strText, strFinder, strReplacer)
{
	strText += "";
	var strSpecials = /(\.|\*|\^|\?|\&|\$|\+|\-|\#|\!|\(|\)|\[|\]|\{|\}|\|)/gi; // :D
	strFinder = strFinder.replace(strSpecials, "\\$1")

	var objRe = new RegExp(strFinder, "gi");
	return strText.replace(objRe, strReplacer);
}

function abrirPopup(nome, pagina, largura, altura)
{
	window.open(pagina, 
			nome, 
			'STATUS=NO,'+
			'TOOLBAR=NO,'+
			'LOCATION=NO,'+
			'DIRECTORIES=NO,'+
			'RESISABLE=NO,'+
			'SCROLLBARS=YES,'+
			'TOP=10,'+
			'LEFT=10,'+
			'WIDTH='+largura+','+
			'HEIGHT='+altura).focus();
}

function fbs_click() {
	
	u=location.href;
	t=document.title;
	
	pagina = 'http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t);
	nome = 'share';
	
	window.open(pagina,
				nome,
				'STATUS=NO,'+
				'TOOLBAR=NO,'+
				'LOCATION=NO,'+
				'DIRECTORIES=NO,'+
				'RESISABLE=NO,'+
				'SCROLLBARS=YES,'+
				'WIDTH=626,'+
				'HEIGHT=436');
	return false;
} 

function MM_openBrWindow(theURL,winName,features) { 
	//v2.0
	window.open(theURL,winName,features);
}

function PrintElementID(id, pg) {
	
	$('#menurapido').hide();
	$('#vermais').hide();
	
    var oPrint, oJan;
    oPrint  = window.document.getElementById(id).innerHTML;
    oJan    = window.open(pg);
    oJan.document.write(oPrint);
    oJan.history.go();
    oJan.window.print();
    
    $('#menurapido').show();
    $('#vermais').show();
}
