function controlGaleries(pObj, pArea) {
	var area = document.getElementById(pArea);
	var text = pObj.innerHTML;
	if(area.style.display == '' || area.style.display == 'block') {
		text = text.replace("Ocultar", "Exibir");
		area.style.display = 'none';
		pObj.innerHTML = text;
	}
	else {
		text = text.replace("Exibir", "Ocultar");
		area.style.display = 'block';
		pObj.innerHTML = text;
	}
}

function openVideoGallery () {
	var gallery = document.getElementById('VideoGallery');
	if(gallery.style.display != 'none')
		return;
		
	var s1 = new SWFObject("../galeriavideos/VideoGallery.swf","videogallery","750","470","9");
	s1.addParam("allowFullScreen","false");
	s1.addParam("allowScriptAccess","sameDomain");
	s1.addParam("wmode","transparent");
	s1.addParam("width","750");
	s1.addParam("height","470");
	s1.addParam("align","middle");
	s1.addParam("play","true");
	s1.addParam("scale","showall");	
	s1.addParam("devicefont","false");
	s1.addParam("menu","true");
	s1.addVariable("xml","../galeriavideos/VideoGallery.xml");
	s1.write('VideoGalleryContent');
	gallery.style.display = '';
	document.documentElement.scrollTop = 0;
	document.body.scrollTop = 0;
	document.documentElement.style.overflow = 'hidden';
	document.body.style.overflow = 'hidden';
}
function hideVideoGallery () {
	var gallery = document.getElementById('VideoGallery');
	var content = document.getElementById('VideoGalleryContent');
	document.documentElement.style.overflow = '';
	document.body.style.overflow = '';
	gallery.style.display = 'none';
	content.innerHTML = '';
}
