frameURL = "http://www.cea.com.br/menu";

if (top == self) {
	
	function addLoadEvent(func) {
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				if (oldonload) {
					oldonload();
				}
				func();
			}
		}
	}

	// addLoadEvent(nameOfSomeFunctionToRunOnPageLoad);
	addLoadEvent(function() {
		urlLocal = window.location.href;

		body = window.document.body;
		
		while (body.firstChild) 
		 {
		    //The list is LIVE so it will re-index each call
			body.removeChild(body.firstChild);
		 };
	
		var frameset = document.createElement("frameset");
		var frame1 = document.createElement("frame");
		var frame2 = document.createElement("frame");
		
		
		frameset.setAttribute('rows', '45,100%');
		frameset.setAttribute('name', 'framepai');
		frameset.setAttribute('cols', '1');
		frameset.setAttribute('framespacing', '0');
		frameset.setAttribute('frameborder', 'no');
		frameset.setAttribute('border', '0');
		
		
		frame1.setAttribute('src', frameURL);
		
		frame1.setAttribute('name', 'barra');
		frame1.setAttribute('frameborder', '0');
		frame1.setAttribute('scrolling', 'no');
		frame1.setAttribute('marginwidth', '0');
		frame1.setAttribute('marginheight', '0');
		
		
		
		
		frame2.setAttribute('name', 'conteudo');
			
		//<frame src="blank.html" name="none" frameborder="0" scrolling="no" noresize marginwidth="0" marginheight="0" />

		
		
		
		//window.appendChild(bd);
		body.appendChild(frameset);
		frameset.appendChild(frame1);
		frameset.appendChild(frame2);
		
		//conteudo.document.location.href = urlLocal;
		frames[1].location.href = urlLocal;
		//frame2.document.location.href = urlLocal;
		

	});

} else {
	//alert('tem frame');
}


