
var color1="#FFFFFF" // background 
var color2="#000099" // text color 

var color3="#008080" // border color
var color4="#003399" // Title color 
var color5="#5B8484" // color for text titles
var color6="#CC3300" // color for red (highlighted menu links)
var color7="#FFCC66" // gold/orange background color for menus
var helpURL=""
var saveHTML="true"
var prepareToPrint="true"
var palette="true"
var save="false"
var load="false"

// please keep these lines on when you copy the source

// made by: Nicolas - http://www.javascript-page.com

function mg() {txt="Open Help Menu"; window.status = txt;}

function wopen1() 

{
window.open(helpURL,"Help_Menu","width=580,height=150,location=no,toolbar=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
}

   
function simPageHead(banner,help,helpfolder,helpmenu,cpucips) 

{
helpURL = "help/"+helpfolder+"/helpmenus/"+helpmenu

document.write("<BODY BGCOLOR='"+color1+"'>");
document.write("<STRONG>");
document.write("<table border='0' width='626'>");
document.write("<tr>");
document.write("<td width='24'>");
document.write("<img border='0' src='spacer.gif' width='24' height='1'>");
document.write("</td>");
document.write("<td width='100%'>");
document.write("<STRONG>");

document.write("<TABLE BORDER=0 CELLPADDING=5 WIDTH=600 bordercolorlight='"+color3+"'>");
document.write("<TR>");
document.write("<TD WIDTH=157>");
document.write("<P><font face='Arial'>");
// document.write("<img border='0' src='"+banner+"' width='147' height='69'>");
document.write("<img border='0' src='"+banner+"' >");
document.write("</font></P>");
document.write("</TD>");
document.write("<TD WIDTH=544 align='left' valign='middle'>");
document.write("<p align='left'>");
document.write("<font size='4' face='Arial' color='"+color4+"'>")
}


// The name of the simulator or setup goes here in the individual simulator HTML pages



function simPageMiddle(banner,help,helpfolder,helpmenu,cpucips) 

{
helpURL = "help/"+helpfolder+"/helpmenus/"+helpmenu;

document.write("</font></P>"); 
document.write("</TD>");

// help button  (top of page for on-line simulators)

// if (help=="true") 
// {
// document.write("<TD WIDTH=36>");

// {document.write ("<IMG SRC='help/help.gif' ALT='Open Help Menu' BORDER=0 ALIGN=top onclick='wopen1()' onmouseover='mg(); return true;'>");}

// document.write("</TD>");
// }

// end help button

document.write("</TR>");
document.write("</TABLE>");
document.write("</STRONG>");
document.write("<HR width='600' align='left' size='3' color='"+color3+"'>");

// document.write("<p align='left'>");
}


// The HTML code for the simulator applet goes here in the individual simulator HTML pages.



function simPageFoot(banner,help,helpfolder,helpmenu,cpucips) 
{
helpURL = "help/"+helpfolder+"/helpmenus/"+helpmenu;


document.write("<br>&nbsp;");

if (cpucips=="cpu") {panel_cpu(saveHTML,prepareToPrint,palette,help,save,load);}
else if (cpucips="cips") {panel_cips(saveHTML,prepareToPrint,palette,help,save,load);} 

document.write("</p>");
document.write("<HR width='600' align='left' size='3' color='"+color3+"'>");

document.write("<font face='Arial' size='2'>");

document.write("Copyright © 2011 San Diego State University Foundation");
document.write("</font>");
document.write("</td>");
document.write("</tr>");
document.write("</table>");
document.write("</STRONG>");
document.write("</BODY>");

}

function mg1() {txt="Open Image Palette"; window.status = txt;}

function wopen_cpu() {
window.open("Images/images_cpu.htm","Images","width=240,height=310,location=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no");}

function panel_cpu(saveHTML,prepareToPrint,palette,help,save,load) {
document.write('<p align="left">');
if(save == "true")
{document.write('<APPLET width="71" height="30" code="physicon.intcpu.SaveApplet.class" archive="intcpu.jar"></applet>');}

if(load == "true")
{document.write(' <applet width="71" height="30" code="physicon.intcpu.LoadApplet.class" archive="intcpu.jar"></applet>');}

if(prepareToPrint == "true")
{document.write(' <APPLET width="140" height="30" code="physicon.intcpu.AppletParser.class" archive="intcpu.jar"></applet>');}

if(saveHTML == "true")
{document.write(' <applet width="140" height="30" code="physicon.intcpu.HTMLSaveApplet.class" archive="intcpu.jar"></applet>');}

if(palette == "true")
{document.write(' <img src="Images/Image_Palette.gif" border=0 alt="Open Image Palette" onclick="wopen_cpu();" onmouseover="mg1(); return true;">');}

if(help == "true")
{document.write(' <IMG SRC="help/help.gif" ALT="Open Help Menu" WIDTH=30 HEIGHT=30 X-CLARIS-USEIMAGEWIDTH BORDER=0 ALIGN=bottom onclick="wopen1()" onmouseover="mg(); return true;">');}

document.write("</p>");
}

function wopen_cips() {
window.open("Images/image_palette.htm","Images","width=240,height=310,location=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no");}


function panel_cips(saveHTML,prepareToPrint,palette,help,save,load) {
document.write('<p align="left">');
if(save == "true")
{document.write('<APPLET width="71" height="30" code="com.ot.intcips.SaveApplet.class" archive="intcips.jar"></applet>');}

if(load == "true")
{document.write(' <applet width="71" height="30" code="com.ot.intcips.LoadApplet.class" archive="intcips.jar"></applet>');}

if(prepareToPrint == "true")
{document.write(' <APPLET width="140" height="30" code="com.ot.intcips.AppletParser.class" archive="intcips.jar"></applet>');}

if(saveHTML == "true")
{document.write(' <applet width="140" height="30" code="com.ot.intcips.HTMLSaveApplet.class" archive="intcips.jar"></applet>');}

if(palette == "true")
{document.write(' <img src="Images/Image_Palette.gif" border=0 alt="Open Image Palette" onclick="wopen_cips();" onmouseover="mg1(); return true;">');}

if(help == "true")
{document.write(' <IMG SRC="help/help.gif" ALT="Open Help Menu" WIDTH=30 HEIGHT=30 X-CLARIS-USEIMAGEWIDTH BORDER=0 ALIGN=bottom onclick="wopen1()" onmouseover="mg(); return true;">');}

document.write("</p>");
}


