function showMap()
{
window.open('images/location1.jpg','mywindow','width=550,height=532')
return false;
}

function formCheck(formobj){
	// Enter name of mandatory fields
	var fieldRequired = Array("req_name", "req_email", "req_phone", "dreq_ate", "req_ftime", "req_ttime", "req_desc");
	// Enter field description to appear in the dialog box
	var fieldDescription = Array("Name", "E-Mail Address", "Phone", "Date", "Start Time", "End Time", "Description");
	// dialog message
	var alertMsg = "Please complete the following fields:\n";
	
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
			}
			if (obj.type == undefined){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}

	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}

function toggleLayer(obj, opt){
 var b1 = document.getElementById(obj);
 if(opt == 1){
  b1.style.display = "block";
 } else {
  b1.style.display = "none";
 }
 return false;
}

function popImage(iname, iheight, iwidth){
	window.open('images/'+iname, 'popPic', 'height='+iheight+',width='+iwidth+', scrollbars=no, resizable=no'); 
	return false
}

function verify()
{
 var conf= confirm("Are you sure you want to submit the form? Make sure you have filled in all the required fields.");
 if (conf == false)
 { return false; }
}