// ———————————	DATE AND TIME

function TheDate() {
	today = new Date();
	TimeHrs = today.getHours(); TimeMin = today.getMinutes();
	DateMth = today.getMonth()+1; DateDate = today.getDate();
	DateYear = today.getYear(); DateDy = today.getDay();

	if (TimeHrs > 12) { TimeHrs = TimeHrs - 12; if (TimeHrs == 12) { AmPm = "am"; } else { AmPm = "pm"; }
	} else { if (TimeHrs == 12) { AmPm = "pm"; } else { AmPm = "am"; } }

	if (TimeMin < 10) { TimeMin = "0" + TimeMin }

	DateMonth = ["","January ","February ","March ","April ","May ","June ",
		"July ","August ","September ","October ","November ","December "];

	DateDay = ["Sunday, ","Monday, ","Tuesday, ","Wednesday, ","Thursday, ","Friday, ","Saturday, "];

	brsr=navigator.appName;
	if (brsr=="Netscape") {
		if (DateYear < 99) { DateYear = DateYear + 2000; } else { DateYear = DateYear + 1900; }
	}

	// ----------DAY OF WEEK VAR:	DateDay[DateDy]

	document.write("<span class=\"smtext\">" + DateMonth[DateMth] + DateDate + ", " + DateYear + "</span>");
}


// ———————————	JUMP MENU

function GoLocation() {
	field = document.jumper.JumpMenu;

	len = field.length;
	for (a=0; a<len; a++) { if (field.options[a].selected) { break; } }

	GoURL = field.options[a].value;

	loc = location.href;
	if (loc.search(/http:\/\/computer/) != -1) { GoURL = "/cp" + GoURL; }
	if (a != 0) { location = GoURL; }
}


// ———————————	ADSENSE

function GoogleAd() {
	google_ad_client = "pub-3373249915520899"; google_ad_width = 120; google_ad_height = 600; google_ad_format = "120x600_as";

	document.write("<script language=\"JavaScript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>");
}


// ———————————	DHTML MENU

// default background color before mousing over main menu items:

MainMenuBgCol = "#00005F";

// when you first highlight the menu:
// highlight color of main menu items for mouse-over

MainMenuBgColHilite = "#6F80C0";

// when mousing over secondary menus:
// highlight color of dropdown menu items for mouse-over

Menu2ndHilite = "#CFD7EF";

// highlight color of dropdown menus for mouse-out and default color for dropdowns

Menu2ndNoHilite = "#AFB8EF";


// DO NOT EDIT ANYTHING BELOW THIS LINE
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

inmenu=false; lastmenu=0;

function Menu(current,pxl,GoRight,GoDown) {
	GoRight = parseInt(GoRight); GoDown = parseInt(GoDown);
	if (navigator.appName.search(/explorer/i) != -1) { LtPos = 10 + GoRight; TpPos = 15 + GoDown;
	} else { LtPos = 8 + GoRight; TpPos = 8 + GoDown; }

	if (!document.getElementById) { return; }
	inmenu = true; oldmenu = lastmenu; lastmenu = current;
	if (oldmenu) { Erase(oldmenu); }
	m = document.getElementById("menu-" + current); box = document.getElementById(current);
	box.style.left = m.offsetLeft + LtPos; box.style.top = m.offsetTop + m.offsetHeight + TpPos;
	box.style.visibility = "visible"; m.style.backgroundColor = MainMenuBgColHilite;
	box.style.backgroundColor = Menu2ndNoHilite; box.style.width = pxl + "px";
}

function Erase(current) {
	if (!document.getElementById) { return; }
	if (inmenu && lastmenu==current) { return; }
	m = document.getElementById("menu-" + current);
	box = document.getElementById(current); box.style.visibility = "hidden"; m.style.backgroundColor = MainMenuBgCol
}

function Timeout(current) { inmenu=false; window.setTimeout("Erase('" + current + "')",100); }

function Highlight(menu,item) {
	if (!document.getElementById) { return; }
	inmenu = true; lastmenu = menu; obj = document.getElementById(item); obj.style.backgroundColor = Menu2ndHilite;
}

function UnHighlight(menu,item) {
	if (!document.getElementById) { return; }
	Timeout(menu); obj = document.getElementById(item); obj.style.backgroundColor = Menu2ndNoHilite;
}


// ———————————	DETAIL NOTES POPUP

NumDet = 1; Wide = 300; ContentType = "text"; t = 0;
DetailPopUp = "DetailNote1"; flag = 0;	//	t = setTimeout("EraseNotice()",100000);
function Notice() {
	if (flag == 0) { EraseNotice(); }

	if (navigator.appName.search(/explorer/i) != -1 || navigator.appVersion.search(/5.0/) != -1) {
		xCoord = document.body.scrollLeft; yCoord = document.body.scrollTop;
	} else {
		xCoord = self.pageXOffset; yCoord = self.pageYOffset;
	}

	DetailPopUp = "DetailNote" + NumDet; ClosePopUp = "CloseIt" + NumDet;
	xCoord = xCoord + (400 - Math.round(Wide/2));
	if (xCoord < 0) { xCoord = 0; }

	box = document.getElementById(DetailPopUp);
	box.style.left = xCoord; box.style.top = yCoord + 100; box.style.width = Wide; box.style.visibility = "visible";
	box2 = document.getElementById(ClosePopUp);

	if (navigator.appName.search(/explorer/i) != -1 && ContentType == "image") { box2.style.width = Wide;
	} else { box2.style.width = Wide - 6; }

	t = setTimeout("Notice()",10); flag = 1;
}

function EraseNotice() {
	if (t != 0) { clearTimeout(t); }
	box = document.getElementById(DetailPopUp); box.style.visibility = "hidden";
}


// ———————————	FACEBOOK "LIKE" ICON

function SiteWideFunction() {
	a = location.href; a = a.replace(/\//g, "%2F"); a = a.replace(/:/g, "%3A");

	document.write("<div style=\"padding: 15px 0 10px 0\">",
	"<iframe src=\"http://www.facebook.com/plugins/like.php?href=", a, "&amp;layout=standard&amp;",
	"show_faces=false&amp;width=160&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=42\" ",
	"scrolling=\"no\" frameborder=\"0\" style=\"overflow: hidden; width: 160px; ",
	"height: 42px\" allowTransparency=\"true\"></iframe></div>");
}



