// Javascript om een artikel-pagina in een frame te plaatsen (mainframe)
// met twee linker-frames: left.html en leftbot2.html
// Locatie: http://www.extra-media.nl/indexchomsky.js
// Aanroepen vanuit indexpagina's als http://www.extra-media.nl/chomsky/index.html 
// dit script krijgt via inchomskyframe.js de locatie door van een te "framen" artikelpagina
// Frans van der Pol 11-5-2003


var wind,doc;
wind = parent.location;
doc = document.location;
if (wind != doc) {
parent.location.href= doc;
}



// break out of frames tegen droste effect
// if (window.name != 'mainframe')			// indien de window in extra-media frame zit
// { 
// top.location.href = document.location.href;		// break out of frame
// }


var where = document.location.href;  		// voorbeeld: http://www.extra-media.nl/chomsky/index.html?artikelyy.html
var pos = where.lastIndexOf("?");    		// scheidingsteken
if (pos == -1){ var mainfile = "main.html"; } 	// standaard-pagina laden indien geen "?"
else {var mainfile = where.substr(pos+1); } 	// voorbeeld nieuwe pagina: artikelyy.html
if (mainfile == "index.html")
    {var mainfile = "main.html";} 		// tegen droste-effect


document.write(
'<frameset  rows="33,*,33" framespacing="0" frameborder="no" border="0" marginwidth="0" marginheight="0">',
'<frame name="top" src="../top.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">',
'    <frameset cols="200,*" frameborder="NO" border="0" framespacing="0">', 
'        <frameset rows="275,*" frameborder="NO" border="0" framespacing="0">', 
'        <frame name="topFrame" scrolling="NO" noresize src="left.html" >',
'        <frame name="leftFrame" scrolling="auto" noresize src="../leftbotchomsky.html">',
'        </frameset>',
'    <frame name="chframe" src="',mainfile,'" marginwidth="0" marginheight="0" scrolling="AUTO" frameborder="0">',
'    </frameset>',
'<frame name="bottom" src="../bottom.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">',
'</frameset>',
'<noframes>', 
'</noframes>'
);









// just for testing::::
// document.write('<body>hallo,<br>')
// document.write(where); document.write('<br>')
// document.write(pos); document.write('<br>')
// document.write(mainfile); document.write('<br>')
// document.write('</body></html>')

