// JavaScript Document

// include a helpful function
function makeCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

// When this file (checkframe.js) is included via the <script> tag
// the following code will execute directly

if (window.top == window.self) {
	makeCookie('current_page',window.location,false);
	
	// This redirects to the new frameset page
	// note the use of .replace which will substitute the current page
	// allowing the web browser's back button to function as normal.
	window.location.replace('javascript-frames.html');
}

