
var isNet = false;

if (navigator.appName == "Netscape") {
	isNet = true;

	// Check for browser less than 6.0 (5.0) and redirect to Director Home if it is.
	ver = parseInt(navigator.appVersion);
	if (ver < 5) {
		alert("In order to use this page, you must use Internet Explorer 5.5, Netscape 6.0 or higher.  You will now be redirected to the Portal Home Page.");
		window.document.location = "../cn";
	}
}

/* LAYOUT JAVASCRIPT */

	// Border Images.  You can use the setter methods to change their values or you can change them directly
	var TOP_LEFT_IMG = "../../resource/images/top_left_curve.gif";
	var TOP_RIGHT_IMG = "../../resource/images/top_right_curve.gif";
	var TOP_IMG = "../../resource/images/top_bar.gif";
	var LEFT_SIDE_IMG = "../../resource/images/left_bar.gif";
	var RIGHT_SIDE_IMG = "../../resource/images/right_bar.gif";
	var BOTTOM_LEFT_IMG = "../../resource/images/bottom_left_curve.gif";
	var BOTTOM_RIGHT_IMG = "../../resource/images/bottom_right_curve.gif";
	var BOTTOM_IMG = "../../resource/images/bottom_bar.gif";


   //var isNet = (navigator.appName == "Netscape")?true:false;


function setTopLeft(img_url) {
	TOP_LEFT_IMG = img_url;
}

function setTopRight(img_url) {
	TOP_RIGHT_IMG = img_url;
}

function setTop(img_url) {
	TOP_IMG = img_url;
}

function setLeftSide(img_url) {
	LEFT_SIDE_IMG = img_url;
}

function setRightSide(img_url) {
	RIGHT_SIDE_IMG = img_url;
}

function setBottomLeft(img_url) {
	BOTTOM_LEFT_IMG = img_url;
}

function setBottomRight(img_url) {
	BOTTOM_RIGHT_IMG = img_url;
}

function setBottom(img_url) {
	BOTTOM_IMG = img_url;
}


/*
 *	writeHeader()
 *	This method is used to create the header padding for all the Portal interfaces around the main content
 *	of each page.  As long as this method is called on all pages, all the padding will look the same.
 *
 *	Variables:
 *		header_url -- URL of Image to use for header image
 *		desc -- Description that will be used under header image
 *		classList -- CSS Style list to assign to the Description text
 *		showBorder -- Whether or not to show the border around the main content
 *		topFiller -- String of HTML that will be placed in the top space above the main content
 *      tableWidth (optional) - the width of the table.
*/
function writeHeader(header_url,desc,classList,showBorder,topFiller, tableWidth) {

    var tWidth = "720";
    if (tableWidth) {
        tWidth = tableWidth ;
    }

	var html_out = "<table border=\"0\" width=\""+tWidth+"\" cellpadding=\"0\" cellspacing=\"0\">";
	html_out += "<tr>";
	if (header_url.length > 0) {
		html_out += "<td colspan=\"5\"><img src=\"" + header_url + "\"></td>";
	}
	else {
		html_out += "<td colspan=\"5\"></td>";
	}
	html_out += "</tr>";
	html_out += "<tr>";
	if (classList == "") {
		classList = "description";
	}

	if (desc != "") {
		html_out += "  <td height=\"10\" colspan=\"5\" class=\"" + classList + "\">";
	} else {
		html_out += "  <td height=\"5\" colspan=\"5\" class=\"" + classList + "\">";
	}

	html_out += desc;
	html_out += "  </td>";
	html_out += "</tr>";
	html_out += "<tr>";
	if (showBorder) {
		html_out += "  <td valign=\"top\" rowspan=\"2\" colspan=\"2\"><img src=\"" + TOP_LEFT_IMG + "\"/></td>";
		html_out += "  <td valign=\"top\" height=\"5\" ><img src=\"" + TOP_IMG + "\"/></td>";
		html_out += "  <td valign=\"top\" rowspan=\"2\" colspan=\"2\"><img src=\"" + TOP_RIGHT_IMG + "\"/></td>";

	}
	else {
		html_out += "  <td rowspan=\"2\"></td>";
		html_out += "  <td valign=\"top\"></td>";
		html_out += "  <td rowspan=\"2\"></td>";
	}
	html_out += "</tr>";

	if (!topFiller) {
		topFiller = "";
	}

	html_out += "<tr><td valign=\"top\"><!-- TOP PLACE HOLDER -->" + topFiller + "</td></tr>";
	html_out += "<tr>";
	if (showBorder) {
		html_out += "  <td style=\"background-repeat:repeat-y;\" background=\"" + LEFT_SIDE_IMG + "\"></td>";
	}
	else {
		html_out += "  <td></td>";
	}
	html_out += " <td colspan=\"3\">";
	html_out += "    <table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
	html_out += "      <tr>";
 	html_out += "        <td height=\"100%\" valign=\"top\">";

	document.write(html_out);

}

/*
 *	writeFooter()
 *	This method is used to create the footer padding for all the Portal interfaces around the main content
 *	of each page.  As long as this method is called on all pages, all the padding will look the same.
 *
 *	Variables:
 *		showBorder -- Whether or not to show the border around the main content
 *		bottomFiller -- String of HTML that will be placed in the bottom space below the main content
*/
function writeFooter(showBorder,bottomFiller) {

	var html_out = "    </td>";
 	html_out += "  </tr>";
	html_out += "</table>";
	html_out += "  </td>";
	if (showBorder) {
		html_out += "  <td style=\"background-position:top right;background-repeat:repeat-y;\" background=\"" + RIGHT_SIDE_IMG + "\"></td>";
	}
	else {
		html_out += "  <td></td>";
	}
	html_out += "</tr>";
	html_out += "<tr>";

	if (!bottomFiller) {
		bottomFiller = "";
	}

	if (showBorder) {
		html_out += "  <td rowspan=\"2\" colspan=\"2\" valign=\"top\"><img src=\"" + BOTTOM_LEFT_IMG + "\"/></td>";
		html_out += "  <td valign=\"top\">" + bottomFiller + "</td>";
		html_out += "  <td rowspan=\"2\" colspan=\"2\" valign=\"top\"><img src=\"" + BOTTOM_RIGHT_IMG + "\"/></td>";
	}
	else {
		html_out += "  <td rowspan=\"2\" colspan=\"2\" valign=\"top\"></td>";
		html_out += "  <td></td>";
		html_out += "  <td rowspan=\"2\" colspan=\"2\" valign=\"top\"></td>";
	}

	html_out += "</tr>";

	if (showBorder) {
    	html_out += "<tr>";
	    html_out += "  <td valign=\"bottom\" height=\"5\" ><img src=\"" + BOTTOM_IMG + "\"/></td>";
	    html_out += "</tr>";
	}


	html_out += "</table>";

	document.write(html_out);
}


