<html>
<title>Web Techniques: JavaScript Demo</title>
<head>
<script language="JavaScript">
<!---set background colors for all text pages--->
function backgcol(tc)
{
   if (tc == 1) { return "#FFCCCC";}
   if (tc == 2) { return "#C8E3FF";}
   if (tc == 3) { return "#FFFFC1";}
   if (tc == 4) { return "#FFBDFF";}
   if (tc == 5) { return "#2BFF95";}
   if (tc == 6) { return "#FFFFFF";}
   return "#FFFFFF";
}
<!---set text content for all text pages--->
function pagecontent(tc)
{
   if (tc == 1) { return "Welcome to the <b>SERVICES</b> page !";}
   if (tc == 2) { return "Read <b>ABOUT</b> this demo !";}
   if (tc == 3) { return "You can <b>SEARCH</b> here !";}
   if (tc == 4) { return "Have a great <b>LINKS</b> today !";}
   if (tc == 5) { return "You can always <b>eMAIL</b> us !";}
   if (tc == 6) { return "This is your <b>unique</b>
<br>opportunity to leave the <i><b>programming</b></i>to the
browser.<br><br>Sit back and enjoy <b>:-)</b>!";}
}
<!---draw appropriate left tabs--->
function writenl(left1,left2,left3,left4,left5,left6) 
{	
   parent.nl.document.open("text/html");
   parent.nl.document.write("<html><body bgcolor='#FFFFFF'>");
   if (left1 == 1) { parent.nl.document.write("<a href='drive.htm' 
	         target='drive' onClick='parent.drive.writetr(1);
                     return true;'><img src='gifs/services.gif' 
	         border=0 width='60' height='58'></a>"); }
   else            { parent.nl.document.write("<img src='gifs/blul.gif' 
	         border=0 width='60' height='58'>"); }
   if (left2 == 1) { parent.nl.document.write("<a href='drive.htm' 
	         target='drive' onClick='parent.drive.writetr(2);
                     return true;'><img src='gifs/about.gif'    
	         border=0 width='60' height='58'></a>"); }
   else            { parent.nl.document.write("<img src='gifs/blml.gif' 
	         border=0 width='60' height='58'>"); }
   if (left3 == 1) { parent.nl.document.write("<a href='drive.htm' 
	         target='drive' onClick='parent.drive.writetr(3);
                     return true;'><img src='gifs/search.gif'   
	         border=0 width='60' height='58'></a>"); }
   else            { parent.nl.document.write("<img src='gifs/blml.gif' 
	         border=0 width='60' height='58'>"); }
   if (left4 == 1) { parent.nl.document.write("<a href='drive.htm' 
	         target='drive' onClick='parent.drive.writetr(4);
                     return true;'><img src='gifs/links.gif'    
	         border=0 width='60' height='58'></a>"); }
   else            { parent.nl.document.write("<img src='gifs/blml.gif' 
	         border=0 width='60' height='58'>"); }
   if (left5 == 1) { parent.nl.document.write("<a href='drive.htm' 
	         target='drive' onClick='parent.drive.writetr(5);
                     return true;'><img src='gifs/email.gif'    
	         border=0 width='60' height='58'></a>"); }
   else            { parent.nl.document.write("<img src='gifs/blml.gif' 
	         border=0 width='60' height='58'>"); }
   if (left6 == 1) { parent.nl.document.write("<a href='drive.htm' 
	         target='drive' onClick='parent.drive.writetr(6);
                     return true;'><img src='gifs/home.gif'     
	         border=0 width='60' height='58'></a>"); }
   else            { parent.nl.document.write("<img src='gifs/bldl.gif' 
	         border=0 width='60' height='58'>"); }
   parent.nl.document.write("</body></html>");
   parent.nl.document.close(); 
}
<!---draw appropriate right tabs--->
function writenr(right1,right2,right3,right4,right5,right6) 
{	
   parent.nr.document.open("text/html");
   parent.nr.document.write("<html><body bgcolor='#FFFFFF'>");
   if (right1 == 1) { parent.nr.document.write("<a href='drive.htm' 
target='drive' onClick='parent.drive.writetr(1);
                             return true;'><img src='gifs/servicer.gif' 
border=0 width='60' height='58'></a>"); }
   else             { parent.nr.document.write(" <img src='gifs/blur.gif' 
border=0 width='60' height='58'>"); }

   if (right2 == 1) { parent.nr.document.write("<a href='drive.htm' 
target='drive' onClick='parent.drive.writetr(2);
                             return true;'><img sc='gifs/aboutr.gif'   
border=0 width='60' height='58'></a>"); }
   else             { parent.nr.document.write("<img src='gifs/blmr.gif' 
border=0 width='60' height='58'>"); }
   if (right3 == 1) { parent.nr.document.write("<a href='drive.htm' 
target='drive' onClick='parent.drive.writetr(3);
                             return true;'><img src='gifs/searchr.gif'  
border=0 width='60' height='58'></a>"); }
   else             { parent.nr.document.write("<img src='gifs/blmr.gif' 
border=0 width='60' height='58'>"); }
   if (right4 == 1) { parent.nr.document.write("<a href='drive.htm' 
target='drive' onClick='parent.drive.writetr(4);
                             return true;'><img src='gifs/linksr.gif'   
border=0 width='60' height='58'></a>"); }
   else             { parent.nr.document.write("<img src='gifs/blmr.gif' 
border=0 width='60' height='58'>"); }
   if (right5 == 1) { parent.nr.document.write("<a href='drive.htm' 
target='drive' onClick='parent.drive.writetr(5);
                             return true;'><img src='gifs/emailr.gif'   
border=0 width='60' height='58'></a>"); }
   else             { parent.nr.document.write("<img src='gifs/blmr.gif' 
border=0 width='60' height='58'>"); }
   if (right6 == 1) { parent.nr.document.write("<a href='drive.htm' 
target='drive' onClick='parent.drive.writetr(6);
                             return true;'><img src='gifs/homer.gif'    
border=0 width='60' height='58'></a>"); }
   else             { parent.nr.document.write("<img src='gifs/bldr.gif' 
border=0 width='60' height='58'>"); }
   parent.nr.document.write("</body></html>");
   parent.nr.document.close(); 
}
function writetr(textpage) 
{
<!---create right text frame--->
   parent.tr.document.open("text/html");
   parent.tr.document.write("<html>
<title>Web Techniques: JavaScript Demo</title>");
   parent.tr.document.write("<head><\script>");
<!---enable right text frame to create left text frame--->
   parent.tr.document.write("parent.tl.document.write(\"<html>\");");
   parent.tr.document.write("parent.tl.document.write
(\"<body leftmargin='0' topmargin='0' link='#000080' vlink='#0000FF'
alink='#FF00FF' text='#000000' bgcolor='" + 
parent.drive.backgcol(textpage) + "'>\");");
   
parent.tr.document.write("parent.tl.document.write(\"</body></html>
\");");
   parent.tr.document.write("parent.tl.document.close();");
   parent.tr.document.write("</\script></head>");
   parent.tr.document.write("<body leftmargin=0 topmargin=0 
link=#000080 vlink=#0000FF alink=#FF00FF text=#000000
bgcolor=" + parent.drive.backgcol(textpage) + ">");
<!---your predefined page content is being used here--->
   parent.tr.document.write("<br><br><br><br><center><font size='-1'>");
   parent.tr.document.write(pagecontent(textpage));
   parent.tr.document.write("</font></center>");
<!---draw appropriate left and right buttons--->
   parent.tr.document.write("<\script>");
   if (textpage == 1) 
   { 
    parent.tr.document.write("parent.drive.writenr(1,1,1,1,1,1);");
    parent.tr.document.write("parent.drive.writenl(0,0,0,0,0,0);");
   }
    if (textpage == 2) 
   { 
    parent.tr.document.write("parent.drive.writenr(0,1,1,1,1,1);");
    parent.tr.document.write("parent.drive.writenl(1,0,0,0,0,0);");
   }
   if (textpage == 3) 
   { 
    parent.tr.document.write("parent.drive.writenr(0,0,1,1,1,1);");
    parent.tr.document.write("parent.drive.writenl(1,1,0,0,0,0);");
   }
   if (textpage == 4) 
   { 
    parent.tr.document.write("parent.drive.writenr(0,0,0,1,1,1);");
    parent.tr.document.write("parent.drive.writenl(1,1,1,0,0,0);");
   }
   if (textpage == 5) 
   { 
    parent.tr.document.write("parent.drive.writenr(0,0,0,0,1,1);");
    parent.tr.document.write("parent.drive.writenl(1,1,1,1,0,0);");
   }
   if (textpage == 6) 
   { 
    parent.tr.document.write("parent.drive.writenr(1,1,1,1,1,1);");
    parent.tr.document.write("parent.drive.writenl(0,0,0,0,0,0);");
   }
   parent.tr.document.write("</\script>");
   parent.tr.document.write("</body></html>");
   parent.tr.document.close(); 
}
<!---...and start with the Home Page--->
writetr(6);
</script>
</head>
</html>