﻿function onLoad_go() {
	 // Create our "tiny" marker icon
	var icon = new GIcon();
	icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
	icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon.iconSize = new GSize(12, 20);
	icon.shadowSize = new GSize(22, 20);
	icon.iconAnchor = new GPoint(6, 20);
	icon.infoWindowAnchor = new GPoint(5, 1);


	  if (GBrowserIsCompatible()) {
		var map = new GMap(document.getElementById("map"));
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());

		var point = new GPoint(-89.3991870, 43.0736360);
		map.centerAndZoom(point, 2);

		var marker = new GMarker(point, icon);
		map.addOverlay(marker);

		}
	}

// Create one of our tiny markers at the given point.
function createMarker(point) {
  var marker = new GMarker(point, icon);
  GEvent.addListener(marker, 'click', function() {
	marker.openInfoWindowHtml("You clicked me!");
  });
  return marker;
}




function openJobDetail(JobID) {
	var popup = window.open('jobdetail.asp?JobID='+JobID,'JobDetail','width=740, resizable=yes, scrollbars=yes, status=no');
}

function openWin() {
	if (screen.height <= 820)
		window.open('JobNotifyOption.asp','win','resizable=0,scrollbars=1,width=700,height=screen.height');
	else
		window.open('JobNotifyOption.asp','win','resizable=0,scrollbars=0,width=700,height=820');

}

function checkSubmit() {
	var str="";
	if (document.myform.name.value=="") {str = "Name ";}
	if (document.myform.email.value=="") {(str == "")?(str="Email"):(str+=", Email ");}
	if (!(document.myform.rbt[0].checked || document.myform.rbt[1].checked)) {(str == "")?(str="Student/Employer status "):(str+=", Student/Employer status ");}
	if (document.myform.message.value=="") {(str == "")?(str="Message"):(str+=", Messsage ");}

	if (str == "") {
		x = document.myform.email.value;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(x)) {
			document.myform.myVal.value ="send";
			return true;
		}
		else {
			document.getElementById("err").innerHTML="Invalid email entered. You must provide a valid email to send the message.<BR><BR>";
		}

	} else {
		document.getElementById("err").innerHTML=str + " field(s) missing.<BR><BR>";
	}
	return false;
}