try{
	document.execCommand("BackgroundImageCache",false,true);
}
catch(e){};

getOffset = function(o){
	for(var r = {x: o.offsetLeft, y: o.offsetTop, h: o.offsetHeight, w: o.offsetWidth};
	o = o.offsetParent; r.x += o.offsetLeft, r.y += o.offsetTop);
	return r;
};

ge = function(n){
	return document.getElementById(n);
};

function popUp(url,x,y,hasScroll) {
  window.open(url,'popUp','status=yes,resizable=no,width='+x+',height='+y+',scrollbars='+hasScroll);
}

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


function  showLang(objname,arrayobj){
	ge(objname).style.display = 'block';
	ge("bt_"+objname).style.display = 'none';
	for(var y=0; y < arrayobj.length; y++){
		ge(arrayobj[y]).style.display = 'none';
		ge("bt_"+arrayobj[y]).style.display = 'block';
	}
}




function simpleShowHide(objeto) {
	var obj = document.getElementById(objeto);
	if(obj.style.display == 'none' || !obj.style.display) {
		obj.style.display = 'block';
	} else {
		obj.style.display = 'none';
	}
}

/*
function showBox(objeto) {
	var obj = document.getElementById(objeto);
	var alt = obj.offsetHeight + obj.offsetTop + 10;
	var file=document.getElementById('box-enviar');
	file.style.top = alt + 'px';
	file.style.display='block';
}

function showHideFileBox(container,objeto) {
	var obj = document.getElementById(objeto);
	var up = document.getElementById("arrowup");
	var down = document.getElementById("arrowdown");

	if(obj.style.display=='none' || !obj.style.display) {
		obj.style.display='block';
		up.style.display='block';
		down.style.display='none';
		changeClass(container,'opened');
	} else {
		obj.style.display='none';
		up.style.display='none';
		down.style.display='block';
		changeClass(container,'closed');
	}
}
*/

function changeClass(objeto,classe) {
	document.getElementById(objeto).className=classe;
}

function getPosFile(a,b) {
	var obj = document.getElementById(a);
	var alt = obj.offsetHeight + 10;
	var file=document.getElementById(b);
	file.style.top = alt + 'px';
}

function showHideMenu(a,b){
	var obj = document.getElementById(a);
	obj= obj.getElementsByTagName('div');
	i=0;
	while(i < obj.length){
		obj[i].style.display = "none";
		i++ ;
	}
	if(b) {
		document.getElementById(b).style.display='block';
	}
}

function slideScroll(obj,pos) {
	var id = document.getElementById(obj);
	id.scrollTop = pos;
}

function buildFlash(swfLocation,x,y,swfMode, variaveis){
	var swfLocation, x, y, swfMode, variaveis;
	if(variaveis == undefined || variaveis.length < 1) variaveis = '';
	document.write(' <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+x+'" height="'+y+'">');
	document.write('  <param name="movie" value="'+swfLocation+'.swf'+variaveis+'" />');
	document.write('  <param name="quality" value="best" />');
	document.write('  <param name="wmode" value="'+swfMode+'" />');
	document.write('  <embed src="'+swfLocation+'.swf'+variaveis+'" wmode="'+swfMode+'" quality="best" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+x+'" height="'+y+'"></embed>');
	document.write(' </object>');
}

function changeBGPosition(objeto,opt) {
	var obj = document.getElementById(objeto);
	if(opt) {
		obj.style.backgroundPosition="0 -13px";
	} else {
		obj.style.backgroundPosition="0 0";
	}
}

