//Local Javascript Functions

function emailFriend() { 
var href =  (escape(window.location.href));
//alert (href);
emailWindow = 
window.open('http://borgesonconsulting.com/email_friend.asp?geturl=' + href, 
'emailWin', 
'top=30,screeny=30,left=30,screenx=30,width=620,height=600,resizable=yes,scrollbars=no'); 
emailWindow.focus();
 }


//Security
function validategetpass(strForm) {
//validate appropriate fields for password lookup
    var	user_id = trimAll(document[strForm].user_id.value)

    //check that email is valid
    if (!validateNotEmpty(user_id)) {
    			alert ('Please Enter Your User ID. Thanks.')
    			document[strForm].user_id.focus();
    			return false;
    		}
    /*
    if (validateNotEmpty(currEmail)) {
    		if (isEmail(currEmail)== false) {
    		
    			alert ('The Email Address Has An Invalid Format. Please Try Again')
    			document[strForm].user_id.focus();
    			return false;
    		}
    	}	
    */

    document[strForm].blngetpass.value='1'; //turn on the password lookupfield
    document[strForm].submit();
    return true;
}

function validatelogin(strForm) {
var	user_id = trimAll(document[strForm].user_id.value)
var	password = trimAll(document[strForm].password.value)


//check that email is valid
if (!validateNotEmpty(user_id)) {
			alert ('Please Enter A User ID. Thanks.')
			document[strForm].user_id.focus();
			return false;
		}


//check that password is OK
if (!validateNotEmpty(password)) {
			alert ('Please Enter A Password. Thanks.')
			document[strForm].password.focus();
			return false;
		}
		
//ensure password is 6 to 15 characters
		var strLen = password.length;
		if (strLen < 6 || strLen > 15) {
		  alert ('Password Must be Between 6 and 15 Characters.');
		  document[strForm].password.focus();
			return false;
		}
		 
document[strForm].submit();
}//end Validator





function img_act(imgName) {
     if (document.images) {
             imgOn = eval(imgName + "on.src");
             document [imgName].src = imgOn;
     }
}

function img_inact(imgName) {
     if (document.images) {
             imgOff = eval(imgName + "off.src");
             document [imgName].src = imgOff;
     }
}

function dsplyItinerary(event_id){
  //called when 
  var page2call = '/content/c_event_itin.asp?id='+event_id;
 	objWin = window.open(page2call, 'Itinerary', 'width=600,height=500,scrollbars=yes,resizable=yes,toolbar=yes,menubar=no');
	objWin.focus();
	}
	
function dsplyDirections(event_id){
  //called when 
  var page2call = '/content/c_event_directions.asp?id='+event_id;
 	objWin = window.open(page2call, 'Directions', 'width=600,height=500,scrollbars=yes,resizable=yes,toolbar=yes,menubar=no');
	objWin.focus();
	}	
function dsplyEvent_Reminder(event_id){
  //called when 
  
  //var page2call = '/content/event_reminder.asp?id='+event_id;
  
  //objWin = window.open(page2call, 'Reminder', 'width=10,height=10,scrollbars=no,resizable=no,toolbar=no,menubar=no'); 
	//objWin.focus();
	
	location.href = '/content/event_reminder.asp?id='+event_id;
}

function dsplyEvent_Reminder_pop(event_id){
  //called when 
  var pop_page2call = '/content/event_reminder_pop.asp?id='+event_id;
  
  //open pop up window with instructions
 	objWin_pop = window.open(pop_page2call, 'Event_Reminder', 'width=250,height=175,scrollbars=no,resizable=yes,toolbar=no,menubar=no');
  
	objWin_pop.focus();
}		


