// JavaScript Document
window.onload = function() {
	setAnchors();
}
var arr_Preloads = new Array();
function setAnchors() {
	var arr_Anchors = document.getElementsByTagName("a");
	for (var i=0;i<arr_Anchors.length;i++) {
		switch(arr_Anchors[i].rel) {
			case "_blank":
				arr_Anchors[i].target = "_blank";
				break;
			case "rollover":
				arr_Anchors[i].img_Obj = arr_Anchors[i].getElementsByTagName("img")[0];
				arr_Anchors[i].str_Off = arr_Anchors[i].img_Obj.src;
				arr_Anchors[i].str_Over = arr_Anchors[i].img_Obj.src.replace("_0.","_1.");
				arr_Preloads[arr_Preloads.length] = new Image();
				arr_Preloads[arr_Preloads.length-1].src = arr_Anchors[i].str_Over;
				arr_Anchors[i].onmouseover = function() {
					this.img_Obj.src = this.str_Over;
				}
				arr_Anchors[i].onmouseout = function() {
					this.img_Obj.src = this.str_Off;
				}
				break;
		}
	}
}
function openwindow(theURL,theName,width,height) {
    window.open(theURL,theName,'width=' + width + ',height=' + height + ',resizable=yes,scrollbars=no,menubar=no,toolbar=no,location=no,directories=no,status=no');
}
var arr_Fresh = new Array();
function addFresh(str_Title,str_Description,str_Link,str_Thumbnail) {
	arr_Fresh[arr_Fresh.length] = [str_Title,str_Description,str_Link,str_Thumbnail];
}
var int_CurFresh = 0;
var itv_WriteFresh = "";
function writeFresh() {
	clearInterval(itv_WriteFresh);
	str_NewFresh = "<table cellspacing=\"0\">\n";
	str_NewFresh += "<tr>\n<td width=\"100\"><h1>FRESH:</h1></td>\n";
	if (arr_Fresh[int_CurFresh][3]!="images/spacer.gif") {
		str_NewFresh += "<td width=\"130\"><img src=\"" + arr_Fresh[int_CurFresh][3] + "\" width=\"101\" height=\"76\" alt=\"Thumbnail\" class=\"border\" /></td>\n";
	} else {
		str_NewFresh += "<td width=\"130\"><img src=\"images/spacer.gif\" width=\"101\" height=\"76\" alt=\"Thumbnail\" /></td>\n";
	}
	str_NewFresh += "<td width=\"410\"><h1><a href=\"" + arr_Fresh[int_CurFresh][2] + "\">" + arr_Fresh[int_CurFresh][0] + "</a></h1><p>" + arr_Fresh[int_CurFresh][1] + "</p></td>\n";
	str_NewFresh += "</tr>\n</table>";
	document.getElementById("homeFresh").innerHTML = str_NewFresh;
	int_CurFresh = ((int_CurFresh+1)<arr_Fresh.length) ? int_CurFresh+1 : 0;
	if (arr_Fresh.length>1) {
		itv_WriteFresh = setInterval("writeFresh()",10000);
	}
}
function writeLogoSwf() {
	document.writeln("      <object width=\"467\" height=\"111\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\">");
	document.writeln("        <param name=\"movie\" value=\"images/logo.swf\">");
	document.writeln("        <param name=\"quality\" value=\"high\">");
	document.writeln("        <param name=\"bgcolor\" value=\"#ffffff\">");
	document.writeln("        <embed src=\"images/logo.swf\" quality=\"high\" bgcolor=\"#ffffff\" width=\"467\" height=\"111\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\">");
	document.writeln("      </object>");
}
function writeVideo(str_SRC) {
	document.writeln("      <object width=\"480\" height=\"376\">");
	document.writeln("        <param name=\"movie\" value=\"" + str_SRC + "\" />");
	document.writeln("        <param name=\"autoplay\" value=\"true\" />");
	document.writeln("        <param name=\"controller\" value=\"true\" />");	
	document.writeln("        <param name=\"bgcolor\" value=\"#3C3628\" />");
	document.writeln("        <embed src=\"" + str_SRC + "\" bgcolor=\"#3C3628\" width=\"480\" height=\"376\" autoplay=\"true\" controller=\"true\" kioskmode=\"false\" cache=\"true\" type=\"video/quicktime\" pluginspage=\"http://www.apple.com/quicktime/download/\"></embed>");
	document.writeln("      </object>");
}
function writeAudio(str_SRC) {
	document.writeln("		<object width=\"400\" height=\"16\">");
	document.writeln("  		<param name=\"movie\" value=\"" + str_SRC + "\" />");
	document.writeln("  		<param name=\"autoplay\" value=\"true\" />");
	document.writeln("  		<param name=\"controller\" value=\"true\" />");
	document.writeln("  		<embed src=\"" + str_SRC + "\" width=\"400\" height=\"16\" autoplay=\"true\" controller=\"true\" kioskmode=\"false\" type=\"video/quicktime\" pluginspage=\"http://www.apple.com/quicktime/download/\"></embed>");
	document.writeln("		</object>");
}
function writeHomeBanner() {
	document.writeln("  <div id=\"bannerHolder\">");
	document.writeln("    <object width=\"1280\" height=\"309\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\">");
	document.writeln("      <param name=\"movie\" value=\"flash/home_banner.swf\">");
	document.writeln("      <param name=\"quality\" value=\"high\">");
	document.writeln("      <param name=\"bgcolor\" value=\"#443C29\">");
	document.writeln("      <embed src=\"flash/home_banner.swf\" quality=\"high\" bgcolor=\"#443C29\" width=\"1280\" height=\"309\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\">");
	document.writeln("    </object>");
	document.writeln("  </div>");
}