//The following 2 functions require kdate.js from kaluach.org
function displayHebrewDate()
{
	var now = new Date;
	var tday = now.getDate();
	var tmonth = now.getMonth() + 1;
	var tyear = now.getYear();
	if(tyear < 1900) tyear += 1900; // if date from Netscape, then add 1900

	var hebDate = civ2heb(tday, tmonth, tyear);
	var hmS = hebDate.substring(hebDate.indexOf(' ')+1, hebDate.length);
	var hDay = eval(hebDate.substring(0, hebDate.indexOf(' ')));
	var hMonth = eval(hmS.substring(0, hmS.indexOf(' ')));
	var hYear = hmS.substring(hmS.indexOf(' ')+1, hmS.length);
	document.write(hDay + ' ' + hebMonth[hMonth+1] + ' ' + hYear);
}

function displayCivilDate()
{
	var day, month, year;
	var today = new Date;

	day   = today.getDate();
	month = today.getMonth() + 1;
	year  = today.getYear();
	if(year < 1900)	year += 1900; // if date from Netscape, then add 1900
	document.write(civMonth[month] + ' ' + day + ', ' + year);
}

function submitAppSearch()
{
	var paramString ="?";
	var cat = "cat=" + document.searchBox.category.options[document.searchBox.category.selectedIndex].value;

	paramString = paramString + cat
	document.location.href='collection.php' + paramString;
}

function countView(pagename, isColl)
{
  var pyPage = pagename == "" ? 'index.php' : pagename;
  var curTime = new Date().valueOf();	
	var bug = new Image();
	bug.src = 'countView.php?pyPage=' + pyPage + "&isCol=" + isColl + "&time=" + curTime;
}