// This code may be copied and modified without permission or
// charge, provided this notice remains intact.
// Original source is located at ...
// http://www.searchmechanics.com/learn/srf/writefs.js
// See http://www.searchmechanics.com/learn/srf/ for more details.

// We work out whether we are in the frameset or frame context by
// looking for a 'nowritefs' parameter
var str = location.search;
var writeFrames = (str.indexOf("nowritefs")) && (top.window.length == 0);

if (writeFrames)
{
// We are in the frameset context - write the frameset out
if (str == "")
{
var bodyFrame = window.location + "?nowritefs";
}
else
{
var bodyFrame = window.location + "&nowritefs";
}

// Time to write the frameset.
// The format of the frameset will of course vary from site to
// site, so you will need to modify this piece of the code for
// your site.
document.write(
'<FRAMESET border=false rows="*,67" frameBorder=0 frameSpacing=0>',
// Here's the self-referencing part:
'<FRAME name=main src="' + bodyFrame + '">',
'<FRAME marginHeight=0 marginWidth=0 name=nav noResize scrolling=no src="http://www.iwon.net/main/navframe.php">',
// That's it - the body frame was written with a nowritefs
// parameter to prevent the frameset from being written again on
// the next invocation.
'</FRAMESET>'
);
}

