RE:Detectar si la página tiene un marco
Acá tenés un script, que debés poner entre las etiquetas <head> del docuemento. Si el mismo es abierto fuera del contexto FRAMESET, entonces se lee el archiv index.html o como se llame el FRAMESET
<script>
//Break-out-of-frames script
//By JavaScript Kit (http://javascriptkit.com)
//Over 400+ free scripts here!
//if not in frames
if (parent.frames.length==0)
//CHANGE "index.htm" to the URL of your main frame page
window.location.replace("index.htm")
</script>
Saludos!
Daniel Ulczyk
http://ulczyk.blogspot.com
utilidades para webmasters