// JavaScript Document

function imprimirFlash(arquivo,w,h,transparente) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">');
	document.write('<param name="movie" value="'+arquivo+'">');
	document.write('<param name=quality value=high>');
	document.write('<param name="menu" value="false">');
	if (transparente) {
		document.write('<param name="wmode" value="transparent">');
	}
	document.write('<embed src="'+arquivo+'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" ');
	if (transparente) {
		document.write('wmode="transparent" ');
	}
	document.write('menu="false"></embed>');
	document.write('</object>');
}

function abrirJanela2 (url, target, w, h, features) {
	var t = (screen.height - h) / 2;
	var l = (screen.width - w) / 2;

	if (typeof features == 'undefined') {
		features = {};
	}
	
	if (navigator.appName.indexOf('MSIE') < 0) {
		h += 0;
		w += 5;
	}
	
	features['width'] = w;
	features['height'] = h;
	features['top'] = t;
	features['left'] = l;
	
	if (typeof features['scrollbars'] == 'undefined') {
		features['scrollbars'] = 'yes';
	}
	
	var strfeatures = '';
	for (var i in features) {
		strfeatures += (strfeatures == ''?'':',') + i + '=' + features[i];
	}
	return window.open(url, target, strfeatures);
}



function abrirJanela(url,target,w,h) {
	return abrirJanelaScroll(url,target,w,h,'no');
}

function abrirJanelaScroll(url,target,w,h,scrollbar) {
	l = parseInt((screen.width - w) / 2);
	t = parseInt((screen.height - h) / 2);
	return window.open(url,target,'width='+w+',height='+h+',left='+l+',top='+t+',scrollbars='+scrollbar);
}
