function mostraFlash(){
	var id = arguments[0];
	var swf = arguments[1];
	var width = arguments[2];
	var height = arguments[3];	
	var params = arguments[4] || null;
	var valor = arguments[5] || null;
	
	var so = new SWFObject(swf, id+"movie", width, height, "8", "transparent", true);
	so.addParam("scale", "noscale");
	so.addParam("wmode", "transparent");
	
	if(params){
		if(params.length != valor.length){
			alert("os arrays de paramentros so diferentes"); 
			return false;
		}
		for(var i = 0;i<params.length;i++){
			so.addParam(params[i], valor[i]);	
		}		
	}
	so.write(id);
}

function apareceMenu(nomedomenu,linkdomenu){
	$(linkdomenu).style.backgroundPosition = "0 0px"
	$(nomedomenu).style.display = 'block'
}

function someMenu(nomedomenu,linkdomenu){
	$(linkdomenu).style.backgroundPosition = "0 -40px"
	$(nomedomenu).style.display = 'none'
}

getScroll = function () {
	if (self.pageXOffset) {
		sX = self.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollLeft) {
		sX = document.documentElement.scrollLeft;
	} else if (document.body) {
		sX = document.body.scrollLeft;
	}
	if (self.pageYOffset) {
		sY = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop) {
		sY = document.documentElement.scrollTop;
	} else if (document.body) {
		sY = document.body.scrollTop;
	}
	return {x:sX, y:sY};
}

// Retorna o tamanho total do documento
getDocSize = function () {
	return {x:document.body.offsetWidth, y:document.body.offsetHeight};
};

// Retorna o tamanho da rea visivel
getDocVisibleSize = function () {
	var _x, _y;
	if (window.innerWidth) {
		_x = window.innerWidth;
	} else if (document.documentElement && document.documentElement.clientWidth) {
		_x = document.documentElement.clientWidth;
	} else if (document.body) {
		_x = document.body.clientWidth;
	}
	if (window.innerHeight) {
		_y = window.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		_y = document.documentElement.clientHeight;
	} else if (document.body) {
		_y = document.body.clientHeight;
	}
	return {x:_x, y:_y};
};
getSize = function (e) {
	if (typeof e == 'string') e = $(e);
	return {x:e.offsetWidth, y:e.offsetHeight};
};

