// Header

var includeroot = document.location.protocol+"//web.cocc.edu/coccweb/"

var imageroot = includeroot + "images/";
var hdrimage = "hdr_default.jpg";
var hdrimagefull = "";

var cssfile = includeroot + "COCC-2008.css";
if (document.location.protocol == "https:")
    cssfile = includeroot + "s-COCC-2008.css";

var fDark = false;
var fCECart = false;
var helpLink = "cocc";

// Get skin name to generate... if undefined we use default settings
if (typeof(coccskin)=="string")
{
    coccskin = coccskin.toLowerCase();
    switch (coccskin)
    {
        case "library":
            hdrimage = "hdr_pic_full_library.jpg";
            fDark = true;
            helpLink = "library";
            break;
        case "ce":
            hdrimage = "hdr_default.jpg";
            fCECart = true;
            break;
        case "bookstore":
            hdrimage = "hdr_pic_full_bookstore.jpg";
            fDark = true;
            helpLink = "bookstore";
            break;
        default:
            break;
    }
}

// Get custom banner image if provided
if (typeof(document.all)=="undefined")
{
    if (document.getElementById("cocchdrimage") != null)
        hdrimage = document.getElementById("cocchdrimage").name;
}
else
{
    if (typeof(document.all['cocchdrimage']) != "undefined")
        hdrimage = document.all['cocchdrimage'].name;
}

hdrimagefull = imageroot + hdrimage;
// If we need our dark header image style sheet let's prepare to load it
if (fDark)
{
    cssfile = includeroot + "COCC-2008drk.css";
    if (document.location.protocol == "https:")
        cssfile = includeroot + "s-COCC-2008drk.css";
}

// Header Area

document.write("<link rel=\"stylesheet\" media=\"print\" href=\"" + includeroot + "print.css\" type=\"text/css\" />");
document.write("<link href=\"" + cssfile + "\" type=\"text/css\" rel=\"stylesheet\"/>");

// If they are using IE 6 or earlier we need to include our special IE6 style sheet
if (fDark)
{
    document.write("<!--[if lte IE 6]>"+String.fromCharCode(13));
    document.write("<link href=\"" + includeroot + "COCC-2008drk-IE6.css\" type=\"text/css\" rel=\"stylesheet\"/>");
    document.write("<![endif]-->"+String.fromCharCode(13));
}
document.write("<SCRIPT type=\"text/javascript\" SRC=\"" + includeroot + "COCCUtility.js\"></SCRIPT>");

document.write("<div class=\"fullpage\">");
document.write("<a id=\"skiptocontent\" href=\"#maincontent\"><img alt=\"Skip to Main Content\" border=\"0\" src=\"" + imageroot + "spacer.gif\" width=\"1\" height=\"1\"></a>");
document.write("<div class=\"page\">");
document.write("<div id=\"header\" class=\"noprint\" style=\"background-image: url(" + hdrimagefull + "); background-repeat: no-repeat;\">");
document.write("<a class=\"homeanchor\" href=\"http://www.cocc.edu\" title=\"Go to COCC Home\"></a>");

document.write("<div id=\"headerlinks\"><span>");
document.write("<a accesskey=\"2\" class=\"topnav\" href=\"http://www.cocc.edu/default.aspx\">COCC Home</a>");
document.write(" <span class=\"topnavsep\">|</span> ");
document.write("<a class=\"topnav\" href=\"http://www.cocc.edu/contact+us/default.aspx\">Contact Us</a>");
document.write(" <span class=\"topnavsep\">|</span> ");
document.write("<a class=\"topnav\" href=\"http://current.cocc.edu/Degrees_Classes/calendar/default.aspx\">Academic Calendar</a>");
document.write(" <span class=\"topnavsep\">|</span> ");
document.write("<a class=\"topnav\" href=\"http://sitemap.cocc.edu/default.aspx\">Site Map</a>");
document.write(" <span class=\"topnavsep\">|</span> ");
document.write("<a class=\"topnav\" href=\"http://disability.cocc.edu/default.aspx\">Disability Services</a>");
document.write("</span></div>");
document.write("<div class=\"headerbuttons\">");
document.write("<p class=\"headerbuttons1\">");
document.write("<span>");

document.write("<input name=\"txtCOCCSearchBox\" type=\"text\" value=\"Search Site\" maxlength=\"100\" id=\"txtCOCCSearchBox\" accesskey=\"3\" class=\"searchbox\" onblur=\"searchFocusLost(this);\" onfocus=\"searchFocusGained(this);\" onkeydown=\"SetDefaultButton('btnCOCCSearchBox',event)\" /> ");
document.write("<input type=\"image\" name=\"btnCOCCSearchBox\" id=\"btnCOCCSearchBox\" Title=\"Search COCC Web\" src=\"" + imageroot + "btn_hdr_go.gif\" alt=\"\" align=\"AbsMiddle\" border=\"0\" style=\"height:20px;width:24px;\" onclick=\"javascript:btnCOCCSearchBox_Click();\" /></span>");
document.write("</p>");
document.write("<p class=\"headerbuttons2\">");
if (fCECart)
    document.write("<a href=\"https://web.cocc.edu/commed/secure/reg/cart.asp\"><img title=\"Campus Directory - Departments, Staff and Faculty\" src=\"" + imageroot + "btn_view_cart.gif\" width=\"80\" height=\"20\" border=\"0\"></a> ");
document.write("<a href=\"http://directory.cocc.edu/\"><img title=\"Campus Directory - Departments, Staff and Faculty\" src=\"" + imageroot + "btn_hdr_directory.gif\" width=\"111\" height=\"20\" border=\"0\"></a> ");
document.write("<a href=\"http://www.cocc.edu/login/default.aspx\"><img title=\"My Login\" src=\"" + imageroot + "btn_hdr_mylogin.gif\" width=\"66\" height=\"20\" border=\"0\"></a>");
document.write("</p>");
document.write("</div>");
document.write("</div>");
document.write("<div id=\"headerspacer\"></div>");

document.write("<div class=\"fpContent\">");

// Page Title
var pagetitle = "";
switch (typeof(cocctitle))
{
  case 'string':
    pagetitle = cocctitle;
    break;
  case 'object':
    pagetitle = document.getElementById("cocctitle").name;
    break;
  default:
    pagetitle = document.title;
    break;
}
if (pagetitle != "")
    document.write("<span class=\"sectionHeading\"><h1>"+pagetitle+"</h1></span>");
