Jump_In_Frames Java Script.
Copyright 1999, Virtual_Max. (http://come.to/vmax)
This script and it's documentation pages can be used, copied, modified and distributed absolutly free until  copyright statement in documentation file and in JavaScript remains unchanged and present in all copies and derivatives.

If you have a frameset on your pages, the most common problem is that some of your pages can be indexed on different search engines and other links pages as a single page. When visitors come to your pages through this direct page link, they fall onto a single page but not in your frameset, as you expected. If you have site navigation links in the other frame, then your visitors, who come this way, have no links to browse your site. Below is an easy solution for this problem.

Let's say you have the following frameset in your index.html file:
 
<html>
<frameset cols="200,*">
 <frame name="left"  src="left.html">
 <frame name="right" src="home.html">
</frameset> 
</html>

Then you need to create the same structure frameset.html file.
One can use another file name, but this name will be used later in call of ForceFrames('frameset.html') function, so if you would like to have a different filename, then you need to change it there too.
 
<html>
<frameset cols="200,*">
 <frame name="left"  src="left.html">
 <frame name="right" src="default.html">
</frameset> 
</html>

The only difference is that instead of your home.html file this frameset loads default.html file which contains a loader script for loading of the requested page.  Below is a content of this default.html file.
 
<html>
<head>
<script SRC="http://www.geocities.com/SiliconValley/Lakes/8620/jumpinframes/jumpinframes.js">
</script>
<script language="JavaScript1.1">
 CheckPageToLoad();
</script>
</head>
<body>
<h2>Loading requested page, please be patient.</h2>
If you have cookie disabled, this script wouldn't work 
for you, please follow navigation links.
</body>
</html>

The last thing to add is the following code into each document which requres to 'jump in frames'. You can add it at any place of the HTML source, but to make loading faster it's better to add it just after <HEAD> tag of HTML file.
 
<script SRC="http://www.geocities.com/SiliconValley/Lakes/8620/jumpinframes/jumpinframes.js">
</script>
<script language="JavaScript1.1">
 ForceFrames('frameset.html');
</script>

Example

Let's see this script in action, This link will try to open somepage1.html page in new blank window. This is a single page without any  frames. But instead of this page, frameset will be loaded in new window, and loader script in default.html file will take care to replace default.html with somepage1.html file which was originaly requested by clicking on this link.

Limitations

This script requres JavaScript 1.1,  it will work on Netscape 3 and Microsoft Internet Explorer 4 or better browsers. In browsers such as these ( MIE3 for example) this script won't even try to load frameset.

This script uses cookies to store  a temporary URL of  the requested page, if the visitor has cookies disabled, then the default.html won't be replaced with requested page. One can take care of users with paranoic security options settings by placing some message in the body of default.html (page with loader script)
 

That's all folks...

Additional notes ( advanced users only )
In some cases one probably would like to have different framesets to be loaded depending on what page was requested. In this case you would need to create several frameset files with loader script and specify which frameset you would like to be loaded in ForceFrames('frameset.html') function call.

If you follow the instructions above exactly in the above example, file jumpinframes.js will be loaded from my geocities page.  In this case additional Pop-Up window with links back to my site will be loaded. If you want to get rid of this additional feature, please, download 'no pop-up' version of jumpinframes.js file and upload it to your site, in this case you would need to change the SRC attribute of <SCRIPT> tags. In case you choose to do this then the only requrement for free use of this script is link back to Virtual Max's Cafe from your pages.