function openFullImage(folderid, fileid)
{
   winAtts="width=802,height=535,toolbar=no,directories=no,top=0,left=0";
   targetPage = "/showfull.asp?folder=" + folderid + "&file=" + fileid
   myChild = window.open(targetPage,"child",winAtts);
}

function doSection (secID, display){
	//display the section if it's not displayed; hide it if it is displayed
	//var sDivID = secID
	var sDivID = "section" + secID
	document.poppedLayer = eval(GetSpecificBrowserObject(sDivID));

	if (document.poppedLayer.style.display == "none") {
		if (display == 1) {
			document.poppedLayer.style.display = "block";
		}
	}
	else {
		if (display == 0) {
			document.poppedLayer.style.display = "none";
		}
	}
}

function GetSpecificBrowserObject(sValue){
	var browserType;
	
	if (document.layers) {browserType = "nn4"}
	if (document.all) {browserType = "ie"}
	if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko"}
	
	if (browserType == "gecko" ){
		return "document.getElementById(\'"+sValue+"\')";
		}
	else if (browserType == "ie"){
		return "document.all[\'"+sValue+"\']";
		}
	else
		{
		return "document.layers[\'`"+sValue+"\']";
		}
}

function showSpecify() {
	aMenu = document.contact.menuHear
	switch (aMenu.selectedIndex) {
			case 4: doSection(1, 1);doSection(2, 1);break;
			case 7: doSection(1, 1);doSection(2, 1);break;
			default:doSection(1, 0);doSection(2, 0);break;
	}
}

function showLocation() {
	aMenu = document.contact;
	j = aMenu.lot.length;
	for (i=0; i<j; i++) {
		if (aMenu.lot[i].checked) var lotValue =  aMenu.lot[i].value
	}
	
	switch (lotValue) {
		case "Yes": doSection(3, 0);break;
		case "No": doSection(3, 1);break;
		default: doSection(3, 0);break;
	}
}

function LimitNumeric(input){
	input.value=input.value.replace(/[^\d]*/gi,"");
}
function LimitAlpha(input) {
	input.value=input.value.replace(/[^\a-z]*/gi,"");
}


function populateDate(objMonth,objDay,objYear,selectIndex) {
	if (objYear == "") {
		timeA = new Date('2000', objMonth.options[objMonth.selectedIndex].value,1);
		}
	else {
		timeA = new Date(objYear.options[objYear.selectedIndex].text, objMonth.options[objMonth.selectedIndex].value,1);
		}
	timeDifference = timeA - 86400000;
	timeB = new Date(timeDifference);
	var daysInMonth = timeB.getDate();
	for (var i = 0; i < objDay.length; i++) {
		objDay.options[0] = null;
		}
	for (var i = 0; i < daysInMonth; i++) {
		objDay.options[i] = new Option(i+1);
		}
	objDay.options[0].selected = true;
}

function getYears(objYear) {
	for (var i = 0; i < objYear.length; i++) {
		objYear.options[0] = null;
		}
	timeC = new Date();
	yt = timeC.getFullYear();
	yb = yt - 75
	for (var i = yb; i <= yt; i++) {
		oi = i - yb
		objYear.options[oi] = new Option(i);
		}
	objYear.options[55].selected = true;
}