		var da = (document.all) ? 1 : 0;
		var pr = (window.print) ? 1 : 0;
		var mac = (navigator.userAgent.indexOf("Mac") != -1);
		function printPage() {
 			if (pr) // NS4, IE5
    				window.print()
  			else if (da && !mac) // IE4 (Windows)
    				vbPrintPage()
  			else // other browsers
    				alert('');
			}

			if (da && !pr && !mac) with (document) {
  			writeln('<OBJECT ID="WB" WIDTH="0" HEIGHT="0" CLASSID="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>');
  			writeln('<' + 'SCRIPT LANGUAGE="VBScript">');
  			writeln('Sub window_onunload');
  			writeln('  On Error Resume Next');
  			writeln('  Set WB = nothing');
  			writeln('End Sub');
  			writeln('Sub vbPrintPage');
  			writeln('  OLECMDID_PRINT = 6');
  			writeln('  OLECMDEXECOPT_DONTPROMPTUSER = 2');
  			writeln('  OLECMDEXECOPT_PROMPTUSER = 1');
  			writeln('  On Error Resume Next');
  			writeln('  WB.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER');
  			writeln('End Sub');
  			writeln('<' + '/SCRIPT>');
			}

					function openDynamic(tag) {


							callAHAH('phpfunctions/dynamic.php?id='+tag, 'dynamic_content','Loading Content', 'Error');


					}
					function openClass(tag) {


							callAHAH('phpfunctions/class.php?id='+tag, 'dynamic_content','Loading Content', 'Error');


					}
					function editaccount() {


							callAHAH('phpfunctions/editprofile.php', 'account_content','Loading Profile Editor', 'Error');


					}
					function viewjobs() {


							callAHAH('phpfunctions/viewjobs.php', 'account_content','Loading Job Editor', 'Error');


					}
					function viewhome() {


							callAHAH('phpfunctions/viewhome.php', 'account_content','Loading....', 'Error');


					}
					function viewdid() {


							callAHAH('phpfunctions/didyouknow.php', 'account_content','Loading....', 'Error');


					}
					function signout() {


							callAHAH('phpfunctions/login.php?logout=true', 'account_content','Loading....', 'Error');


					}
					function forgot() {


							callAHAH('phpfunctions/forgotemail.php', 'account_content','Loading...', 'Error');


					}
					function forgot2(email) {


							callAHAH('phpfunctions/forgotemail.php?email='+email, 'account_content','Loading...', 'Error');


					}
					function viewresume() {


							callAHAH('phpfunctions/resumelist.php', 'account_content','Loading Posted Resumes', 'Error');


					}
					function jobdelete(id) {


							callAHAH('phpfunctions/viewjobs.php?delete=true&id='+id, 'account_content','Loading Job Editor', 'Error');


					}
					function jobedit(id) {


							callAHAH('phpfunctions/jobedit.php?id='+id, 'account_content','Loading Job Editor', 'Error');


					}
					function jobedit3(id) {


							callAHAH('phpfunctions/jobedit.php?edit=true&id='+id, 'account_content','Loading Job Editor', 'Error');


					}
					function missionload(id) {


							callAHAH('phpfunctions/'+id, 'miss_content','Loading Content', 'Error');


					}
					function jobedit2(id){
							string = "?edit=true";
							string = string + "&title=" + document.jobeditform.title.value;
							string = string + "&date=" + document.jobeditform.date.value;

							string = string + "&desc=" + document.jobeditform.desc.value;
							string = string + "&qual=" + document.jobeditform.qual.value;
							
							string = string + "&fullname=" + document.jobeditform.fullname.value;
							string = string + "&address=" + document.jobeditform.address.value;
							string = string + "&city=" + document.jobeditform.city.value;
							string = string + "&state=" + document.jobeditform.state.value;
							string = string + "&zip=" + document.jobeditform.zip.value;
							string = string + "&phone=" + document.jobeditform.phone.value;
							string = string + "&email=" + document.jobeditform.email.value;
							string = string + "&website=" + document.jobeditform.website.value;
							
							names = document.jobeditform.names.value;
							string = string + "&name=" + names;
							if(id){
							string = string + "&id=" + id;

							}
							callAHAH('phpfunctions/viewjobs.php'+string, 'account_content','Loading Job Editor', 'Error');


					}
					function editaccount2() {
						if (document.fileForm.email.value == ""){
							alert('You need to enter a email address to continue');
							return false;
						}

						if(document.fileForm.password.value == ""){
							alert('You need to enter a Password to coninue');
							return false;
						}
						if(document.fileForm.first.value == ""){
							alert('You need to enter your first name.');
							return false;
						}
						if(document.fileForm.last.value == ""){
							alert('You need to enter your last name.');
							return false;
						}

							var newIndex = document.fileForm.spec.selectedIndex;
						
							string = "?edit=true";
							string = string + "&email=" + document.fileForm.email.value;
							string = string + "&email_type=" + document.fileForm.email_type.value;
							string = string + "&login=" + document.fileForm.login.value;
							string = string + "&password=" + document.fileForm.password.value;
							string = string + "&birth=" + document.fileForm.birth.value;
							string = string + "&first=" + document.fileForm.first.value;
							string = string + "&last=" + document.fileForm.last.value;
							string = string + "&label=" + document.fileForm.label.value;
							string = string + "&title=" + document.fileForm.title.value;
							string = string + "&address=" + document.fileForm.address.value;
							string = string + "&city=" + document.fileForm.city.value;
							string = string + "&state=" + document.fileForm.state.value;
							string = string + "&zip=" + document.fileForm.zip.value;
							string = string + "&phone=" + document.fileForm.phone.value;
							string = string + "&add_type=" + document.fileForm.add_type.value;
							string = string + "&prac_type=" + document.fileForm.prac_type.value;
							string = string + "&website=" + document.fileForm.website.value;

							string = string + "&fax=" + document.fileForm.fax.value;
							string = string + "&spouse=" + document.fileForm.spouse.value;
							string = string + "&home_address=" + document.fileForm.home_address.value;
							string = string + "&home_city=" + document.fileForm.home_city.value;
							string = string + "&home_state=" + document.fileForm.home_state.value;
							string = string + "&home_zip=" + document.fileForm.home_zip.value;
							string = string + "&home_phone=" + document.fileForm.home_phone.value;
							string = string + "&home_email=" + document.fileForm.home_email.value;
							string = string + "&office=" + document.fileForm.office.value;

							string = string + "&spec=" + document.fileForm.spec.options[ newIndex ].value;
	
							for (var i = document.fileForm.private.length; i--;)
							{
								if (document.fileForm.private[i].checked)
								{
									string = string + "&private=" + document.fileForm.private[i].value;
								}
							}
						
							callAHAH('phpfunctions/editprofile.php'+string, 'account_content','Loading Profile Editor', 'Error');


					}
					function editaccountevent(id) {
						if (document.fileForm.email.value == ""){
							alert('You need to enter a email address to continue');
							return false;
						}

						if(document.fileForm.password.value == ""){
							alert('You need to enter a Password to coninue');
							return false;
						}
						if(document.fileForm.first.value == ""){
							alert('You need to enter your first name.');
							return false;
						}
						if(document.fileForm.last.value == ""){
							alert('You need to enter your last name.');
							return false;
						}
							var newIndex = document.fileForm.spec.selectedIndex;
							string = "&edit=true";
							string = string + "&email=" + document.fileForm.email.value;
							string = string + "&email_type=" + document.fileForm.email_type.value;
							string = string + "&login=" + document.fileForm.login.value;
							string = string + "&password=" + document.fileForm.password.value;
							string = string + "&birth=" + document.fileForm.birth.value;
							string = string + "&first=" + document.fileForm.first.value;
							string = string + "&last=" + document.fileForm.last.value;
							string = string + "&label=" + document.fileForm.label.value;
							string = string + "&title=" + document.fileForm.title.value;
							string = string + "&address=" + document.fileForm.address.value;
							string = string + "&city=" + document.fileForm.city.value;
							string = string + "&state=" + document.fileForm.state.value;
							string = string + "&zip=" + document.fileForm.zip.value;
							string = string + "&phone=" + document.fileForm.phone.value;
							string = string + "&add_type=" + document.fileForm.add_type.value;
							string = string + "&prac_type=" + document.fileForm.prac_type.value;
							string = string + "&website=" + document.fileForm.website.value;
							string = string + "&spec=" + document.fileForm.spec.options[ newIndex ].value;
							tb_show('','phpfunctions/eventeditprofile.php?height=500&width=500&id='+id+string,'');

					}
					function PicList(tag) {


						callAHAH('phpfunctions/piclist.php?id='+tag, 'picture_list','Loading Content', 'Error');


					}
					function DocList(tag) {


						callAHAH('phpfunctions/doclist.php?id='+tag, 'doc_list','Loading Content', 'Error');


					}
					function YoungList(tag) {


						callAHAH('phpfunctions/younglist.php?id='+tag, 'young_list','Loading Content', 'Error');


					}
					function NewsList(tag) {


						callAHAH('phpfunctions/newlist.php?id='+tag, 'news_list','Loading Content', 'Error');


					}
					function addnews() {


						callAHAH('phpfunctions/addnews.php', 'news_list','Loading Content', 'Error');


					}
function sendnews(){
pass = "true";
	if (document.addnewsform.title.value == ""){
		alert('You need to enter a title to continue');
		pass = "false";
	}

	if(document.addnewsform.desc.value == ""){
		alert('You need to enter a description to continue');
		pass = "false";
	}
	if (pass == "true"){
							string = "?edit=true";
							string = string + "&title=" + document.addnewsform.title.value;
							string = string + "&text=" + document.addnewsform.desc.value;
						
							callAHAH('phpfunctions/didyouknow.php'+string, 'account_content','Loading...', 'We have encountered an error.');
	}


}
					function ClassList(tag) {


						callAHAH('phpfunctions/classlist.php?id='+tag, 'class_list','Loading Content', 'Error');


					}
					function resumeList(tag,sort) {


						callAHAH('phpfunctions/resumelist.php?id='+tag+'&filter='+sort, 'account_content','Loading Content', 'Error');


					}
					function filterres() {
						var newIndex = document.filter.sort.selectedIndex;
						tag = document.filter.sort.options[ newIndex ].value;
					
						if (tag){
							callAHAH('phpfunctions/resumelist.php?filter='+tag, 'account_content','Loading Content', 'Error');
						} else {
							callAHAH('phpfunctions/resumelist.php?filter=', 'account_content','Loading Content', 'Error');
						}
						


					}
					function Search(tag,string) {


						callAHAH('phpfunctions/search.php?id='+tag+'&string='+string, 'search_content','Searching...', 'Error');


					}
					function login(tag,string) {


						callAHAH('phpfunctions/login.php?username='+tag+'&password='+string, 'account_content','Processing', 'Error');


					}
					function EventList(tag,year,month) {


						callAHAH('phpfunctions/eventlist.php?id='+tag+'&year='+year+'&month='+month, 'event_content','Loading Events', 'Error');


					}
					function EventList1() {
						var newIndex = document.jumpevent.month.selectedIndex;
							month = document.jumpevent.month.options[ newIndex ].value;
						var newIndex = document.jumpevent.year.selectedIndex;
							year = document.jumpevent.year.options[ newIndex ].value;

						callAHAH('phpfunctions/eventlist.php?id=1&year='+year+'&month='+month, 'event_content','Loading Events', 'Error');


					}
					function contentslide(){
						$("#jobs-inner").css({ left: 2000 });
						  if($(this).attr("rel") == "sub") {
						    $("#jobs-inner").css({ left: 2000 });
						  }
						  $("#jobs").toggleClass("open");
						  $("#jobs").slideToggle({ duration: 1000, easing: "expoinout" });
	 						 return false;

					}
					$(document).ready(function(){
					   
					   $("#jobs-inner").css({ left: 2000 });
					 });

					function countySearch( form ) {
						var newIndex = document.dropdown.county.selectedIndex;
							cururl = document.dropdown.county.options[ newIndex ].value;
						callAHAH('phpfunctions/finddentist.php?county='+cururl, 'dynamic_content','Locating Dentists', 'Error');
							contentslide();
					}
					function townSearch( form ) {
							var newIndex = document.towndropdown.town.selectedIndex;
							cururl = document.towndropdown.town.options[ newIndex ].value;
							callAHAH('phpfunctions/finddentist.php?town='+cururl, 'dynamic_content','Locating Dentists', 'Error');
							contentslide();
					}
					function specSearch( form ) {
							var newIndex = document.specdropdown.spec.selectedIndex;
							cururl = document.specdropdown.spec.options[ newIndex ].value;
							callAHAH('phpfunctions/finddentist.php?spec='+cururl, 'dynamic_content','Locating Dentists', 'Error');
							contentslide();
					}
					function zipSearch( form ) {
							cururl = document.zipenter.zipcode.value;
							callAHAH('phpfunctions/finddentist.php?zip='+cururl, 'dynamic_content','Locating Dentists', 'Error');
							contentslide();
					}
					function nameSearch( form ) {
							cururl = document.nameenter.namecode.value;
							callAHAH('phpfunctions/finddentist.php?name='+cururl, 'dynamic_content','Locating Dentists', 'Error');
							contentslide();
					}
					function countySearch2(tag,string,zip,town,name,spec,search) {


					callAHAH('phpfunctions/finddentist.php?id='+tag+'&county='+string+'&zip='+zip+'&town='+town+'&name='+name+'&spec='+spec+'&search='+search, 'dynamic_content','Loading...', 'Error');


					}
					function countySelect(tag,string,zip) {


					callAHAH('phpfunctions/finddentist.php?id='+tag+'&county='+string+'&zip='+zip, 'dynamic_content','Loading...', 'Error');
					contentslide();

					}
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors){
  	alert('The following error(s) occurred:\n'+errors);
  } else {
subject = document.contactform.subject.value;
message = document.contactform.message.value;
from = document.contactform.from.value;
verif_box = document.contactform.verif_box.value;

  	callAHAH('phpfunctions/contactemail.php?subject='+subject+'&message='+message+'&from='+from+'&verif_box='+verif_box+'&email=true', 'contact_content','Loading...', 'Error');

  }
  document.MM_returnValue = (errors == '');
}

function confirmation() {
	var answer = confirm("You are about to leave this site, do you wish to continue?");
	if (answer){
		return true;
	}
	else{
		window.location = "http://www.grsds.org/index.php";
		return false;
	}
}
		function popUp(URL) {
		daygett = new Date();
		idggg = daygett.getTime();
		eval("page" + idggg + " = window.open(URL, '" + idggg + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left = 240,top = 212');");
		}
//-->