function jump(place, trip, day){
	if (place == "journal.asp") {
		document.location = "" + place + "?trip=" + trip + "&day=" + day;
	}
	if (place == "signUp.asp") {
		document.location = "" + place;
	}
}

function borderIt(what, color) {
	var b=document.getElementById(what);
	b.style.border = "1px solid " + color;
}
function unBorderIt(what) {
	var c=document.getElementById(what);
	c.style.border = "1px solid #fff";
}

function popitup(url, width, height) {
	var newWindow = url+'_'+width+'x'+height;
 	newWindow = window.open('','','width='+width+',height='+height+',left=50,top=50,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no');
	newWindow.document.write('<html><head><title>GarciaTrips | Enlarged Image</title></head><body style="margin:0px;"><img src="'+url+'"></body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function popvideoup(url, width, height) {
	var newWindow = url+'_'+width+'x'+height;
	var innerHtml = '<object id="MediaPlayer" width="'+ width +'" height="'+ height +'" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject"><param name="FileName" value="'+ url +'"><param name="ShowControls" value="true"><param name="ShowStatusBar" value="false"><param name="ShowDisplay" value="false"><param name="autostart" value="false"><embed type="application/x-mplayer2" src="'+ url +'" name="MediaPlayer" width="'+ width +'" height="'+ height +'" showcontrols="1" showstatusbar="0" showdisplay="0" autostart="0"></embed></object>';
 	newWindow = window.open('','','width='+width+',height='+height+',left=50,top=50,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no');
	newWindow.document.write('<html><head><title>GarciaTrips | Video</title></head><body style="margin:0px;">'+innerHtml+'</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function popvimeoup(vimeoID, width, height) {
	var newWindow = vimeoID+'_'+width+'x'+height;
	var innerHtml = '<iframe src="http://player.vimeo.com/video/'+vimeoID+'?portrait=0&amp;autoplay=1" width="'+width+'" height="'+height+'" frameborder="0"></iframe>';
 	newWindow = window.open('','','width='+width+',height='+height+',left=50,top=50,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no');
	newWindow.document.write('<html><head><title>GarciaTrips | Video</title></head><body style="margin:0px;">'+innerHtml+'</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function popmapup(journalID, width, height) {
	var newWindow = journalID+'_'+width+'x'+height;
 	newWindow = window.open('http://garciatrips.com/journals/mapZoom/'+journalID+'','','width='+width+',height='+height+',left=50,top=50,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no');
	// newWindow.document.close();
	newWindow.focus();
}

function go(form) {
	form.action = form.action + form.selectTrip.value; 
}

function get_cookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') {
			c = c.substring(1,c.length);
		}
		if (c.indexOf(nameEQ) == 0) {
			return c.substring(nameEQ.length,c.length);
		}
	}
	return null;
}

function showGoogleMaps() {
	if (document.getElementById('googleMap').className == 'hide') {
		document.getElementById('googleMap').className = 'googleMap';
		document.getElementById('dropImage').src = '/img/dropUp.gif';
		document.getElementById('dropText').innerHTML = 'Hide Trip Map';
	} else {
		document.getElementById('googleMap').className = 'hide';
		document.getElementById('dropText').innerHTML = 'Show Trip Map';
		document.getElementById('dropImage').src = '/img/dropDown.gif';
	}
}

