function setContentFrame()
{
if (window.screen.availWidth >= 800)
    {
    defaultsubpage="introduction.htm";
    }
else
    {
    defaultsubpage="introduction.htm";
    }

if (location.search) {subpage=location.search.substring(1)}
else {subpage=defaultsubpage}

}

//////////////////////////////////////////////////

function alwaysTopFrame()
{
if
(self!=top){parent.location.href="http://www.ancientarchaeology.org/index.html"};
}

//////////////////////////////////////////////////

function setFrameLayout()
{
if (window.screen.availWidth > 850)
    {
    document.write('<frameset rows="36,*" border="0" framespacing="0" frameborder="0" bordercolor="Red">');
    document.write('<frame src="header.htm" name="header" id="header" frameborder="No" scrolling="No" noresize marginwidth="0" marginheight="0">');
    document.write('<frameset cols="200,*" border="0" frameborder="0" framespacing="0">');
    document.write('<frame src="menu.htm" name="menu" id="menu" scrolling="Auto" noresize marginwidth="0" marginheight="0" target="_self">');
    document.write('<frame src="'+subpage+'" name="content" marginwidth="0" marginheight="0">');
    document.write('</frameset>');
    document.write('</frameset>');
    }
else if (window.screen.availWidth >= 800)
    {
    document.write('<frameset rows="36,*" border="0" framespacing="0" frameborder="0" bordercolor="Red">');
    document.write('<frame src="header.htm" name="header" id="header" frameborder="No" scrolling="No" noresize marginwidth="0" marginheight="0">');
    document.write('<frameset cols="200,*" border="0" frameborder="0" framespacing="0">');
    document.write('<frame src="menu.htm" name="menu" id="menu" scrolling="auto" noresize marginwidth="0" marginheight="0" target="_self">');
    document.write('<frame src="'+subpage+'" name="content" marginwidth="0" marginheight="0">');
    document.write('</frameset>');
    document.write('</frameset>');
    }
else
    {
    document.write('<frameset rows="1,*" border="0" framespacing="0" frameborder="0" bordercolor="white">');
    document.write('<frame src="blank.htm" name="header" id="header" frameborder="no" scrolling="no" noresize marginwidth="0" marginheight="0">');
    document.write('<frameset cols="1,*" border="0" frameborder="0" framespacing="0">');
    document.write('<frame src="blank.htm" name="menu" id="menu" frameborder="no" scrolling="no" noresize marginwidth="0" marginheight="0" target="_self">');
    document.write('<frame src="'+subpage+'" name="content" marginwidth="0" marginheight="0">');
    document.write('</frameset>');
    document.write('</frameset>');
    }
}

//////////////////////////////////////////////////

function checkFrames()
{
if (window.screen.availWidth >= 800)
    {
    framesetpage="index.html";
    thispage=window.location.href;
    if (thispage.indexOf('://')<0) {thispage="://"+thispage;};
 
suffix=thispage.substring(thispage.lastIndexOf('/')+1,thispage.length);
    if ((self==top)||(frametest==0))
    {parent.location.href=framesetpage+"?"+suffix}
    }
}

//////////////////////////////////////////////////

function checkFrames2(dir1,dir2)
{
if (window.screen.availWidth >= 800)
    {
    framesetpage=dir1+"index.html";
    thispage=window.location.href;
    if (thispage.indexOf('://')<0) {thispage="://"+thispage;};
 
suffix=thispage.substring(thispage.lastIndexOf('/')+1,thispage.length);
    if ((self==top)||(frametest==0))
    {parent.location.href=framesetpage+"?"+dir2+suffix}
    }
}

//////////////////////////////////////////////////

function checkFramesURL()
{
if (window.screen.availWidth >= 800)
    {
    frametest=0;
    try
        {
        topframe=top.location.href;
 
if((topframe.indexOf('www.ancientarchaeology.org/')>=0)||(topframe.indexOf('www.physics.leidenuniv.nl/userwebs/ruud/xternal/')>=0)||(topframe.indexOf('www.altarcheologie.nl/')>=0)||(topframe.indexOf('file://')>=0)||(topframe.indexOf('/monos/')>=0))
        {frametest=1};
        }
    catch(oException){frametest=0}
    }
}

//////////////////////////////////////////////////