/*Bloqueo de Click Derecho*/
var message="Colegio de Ingenieros del Perú - Consejo Departamental de Junín"; 
function click(e) { 
if (document.all) { 
if (event.button == 2) { 
alert(message); 
return false; 
} 
} 
if (document.layers) 
{ 
	if (e.which == 3) 
	{ 
		alert(message); 
		return false; 
	} 
} 
} 
if (document.layers) 
{ 
document.captureEvents(Event.MOUSEDOWN); 
} 
document.onmousedown=click; 

/*Cambia el Tamaño de IFrames*/

function iframeResize(iframeWindow)
{
	var iframeElement = self.document.getElementById(iframeWindow.name);
	if(iframeWindow.document.height)
	{	

		iframeElement.style.height = iframeWindow.document.height + 0 + 'px';
		iframeElement.style.width = iframeWindow.document.width + 0 + 'px';
	}
	else if(iframeWindow.document.body.scrollHeight)
	{
		iframeElement.style.height = iframeWindow.document.body.scrollHeight + 0 + 'px';
		iframeElement.style.width = iframeWindow.document.body.scrollWidth + 0 + 'px';
	}
}

/*Maximiza la ventana del navegador*/

function maximizar()
{
	var offset = (navigator.userAgent.indexOf("Mac") != -1 ||
	navigator.userAgent.indexOf("Gecko") != -1 ||
	navigator.appName.indexOf("Netscape") != -1) ? 0 : 4;
	window.moveTo(-offset, -offset);
	window.resizeTo(screen.availWidth + (2 * offset),
	screen.availHeight + (2 * offset));
}

/*Inserta contenido flash*/

function insertarPelicula(pstrPelicula,pintAlto,pintAncho,pstrVariables)
{
	document.write('<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"' + pintAncho + '\" height=\"' + pintAlto + '\" id=\"' + 'swf' + '\" align=\"top\">');
	document.write('<param name=\"allowScriptAccess\" value=\"always\">');
	document.write('<param name=\"movie\" value=\"' + pstrPelicula + '\">');
	document.write('<param name=\"quality\" value=\"high\">');
	document.write('<param name=\"wmode\" value=\"opaque\">');
	document.write('<param name=\"flashvars\" value=\"' + pstrVariables + '\">');
	document.write('<param name=\"scale\" value=\"noscale\">');
	document.write('<param name=\"menu\" value=\"true\">');
	document.write('<param name=\"salign\" value=\"t\">'); 
	document.write('<embed src=\"' + pstrPelicula + '\" flashvars=\"' + pstrVariables + '\" width=\"' + pintAncho + '\" height=\"' + pintAlto + '\" name=\"' + 'swf' + '\" scale=\"noscale\"  salign=\"t\" align=\"top\" quality=\"high\" menu=\"true\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\">');
	document.write('</object>');
}

function abrirVentana(pagina) 
{      
	parent.frames['contenido'].location= pagina;
}