// kwyshell. java script
// check frameset and redirect to correct frame page

// skip all errors
function SymError()
{
	return true;
}

function SearchMyRoot(varHref)
{
	return 'http://kwyshell.myweb.hinet.net/';
}

window.onerror = SymError;

if (location.search == '?PrintFriendly')
{
	var myroot = SearchMyRoot(parent.location.href);

	// print the banner header
	document.write('<table width="100%" height="80" border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr bgcolor="94AEC7" valign="top"> <td colspan="3" height="73">');
	document.write('<table border="0" cellspacing="0" cellpadding="0" height="80" width="100%">');
	document.write('<tr> <td width="36%"><img src="' + myroot + 'images/logotype.jpg" width="400" height="79"></td>');
	document.write('<td width="63%">¡@</td><td width="63%" valign="bottom">');
	document.write('<div align="right"><img src="' + myroot + 'images/slogan.gif" width="261" height="26"></div>');
	document.write('</td></tr></table></td></tr></table>');
}
else if (parent.location.href == self.location.href)
{
	var myroot = SearchMyRoot(parent.location.href);
	var page = self.location.href;
	var pos = page.indexOf(myroot);

	// find something then redirect to correct page
	if (pos != -1)
	{
		var subpage = page.substring(pos + myroot.length, page.length);
		window.location.href = myroot + 'pager.html?' + subpage;
	}
}
