// JavaScript Document

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}

function Brochure() {
		var TypeTable = document.getElementById('contacttable');
		var InputRow = (TypeTable.rows.length)-4;
		if ((InputRow) < 6) {
			
			/*document.getElementById('addresstable').className='pubform';
			document.getElementById('statetable').className='pubform';
			document.getElementById('ziptable').className='pubform';
			document.getElementById('countrytable').className='pubform';*/
			
			var LineBreak = document.createElement('br');
			var LineBreak2 = document.createElement('br');
			var LineBreak3 = document.createElement('br');
			var LineBreak4 = document.createElement('br');
			var LineBreak5 = document.createElement('br');
			var LineBreak6 = document.createElement('br');
			
			var FormType = document.getElementById('form_name');
			FormType.setAttribute('value', 'brochure');
			
			var Row1 = TypeTable.insertRow(InputRow);
			Row1.className='pubform';
			var LeftCell = Row1.insertCell(0);
			var RightCell = Row1.insertCell(1);
			var Address1Field = document.createElement('input');
			Address1Field.setAttribute('type', 'text');
			Address1Field.setAttribute('name', 'Address1');
			Address1Field.setAttribute('id', 'Address1');
			Address1Field.setAttribute('size', '20');
			var Address2Field = document.createElement('input');
			Address2Field.setAttribute('type', 'text');
			Address2Field.setAttribute('name', 'Address2');
			Address2Field.setAttribute('id', 'Address2');
			Address2Field.setAttribute('size', '20');
			
			var addresstext = document.createTextNode('Address1');
			LeftCell.setAttribute('id', 'left');
			document.getElementById('left').className='style8';
			LeftCell.appendChild(addresstext);
			LeftCell.appendChild(LineBreak);
			LeftCell.appendChild(Address1Field);
			
			var addresstext2 = document.createTextNode('Address2');
			RightCell.setAttribute('id', 'right');
			document.getElementById('right').className='style8';
			RightCell.appendChild(addresstext2);
			RightCell.appendChild(LineBreak2);
			RightCell.appendChild(Address2Field);
			
			
			var Row2 = TypeTable.insertRow(InputRow + 1);
			Row2.className='pubform';
			var LeftCell2 = Row2.insertCell(0);
			var RightCell2 = Row2.insertCell(1);
			var CityField = document.createElement('input');
			CityField.setAttribute('type', 'text');
			CityField.setAttribute('name', 'City');
			CityField.setAttribute('id', 'City');
			CityField.setAttribute('size', '20');
			var StateField = document.createElement('input');
			StateField.setAttribute('type', 'text');
			StateField.setAttribute('name', 'State');
			StateField.setAttribute('id', 'State');
			StateField.setAttribute('size', '20');
			
			var citytext = document.createTextNode('City');
			LeftCell2.setAttribute('id', 'left2');
			document.getElementById('left2').className='style8';
			LeftCell2.appendChild(citytext);
			LeftCell2.appendChild(LineBreak3);
			LeftCell2.appendChild(CityField);
			
			var statetext = document.createTextNode('State');
			RightCell2.setAttribute('id', 'right2');
			document.getElementById('right2').className='style8';
			RightCell2.appendChild(statetext);
			RightCell2.appendChild(LineBreak4);
			RightCell2.appendChild(StateField);
			
			var Row3 = TypeTable.insertRow(InputRow + 2);
			Row3.className='pubform';
			var LeftCell3 = Row3.insertCell(0);
			var ZipField = document.createElement('input');
			ZipField.setAttribute('type', 'text');
			ZipField.setAttribute('name', 'Zip');
			ZipField.setAttribute('id', 'Zip');
			ZipField.setAttribute('size', '20');
			
			var ziptext = document.createTextNode('Zip');
			LeftCell3.setAttribute('id', 'left3');
			document.getElementById('left3').className='style8';
			LeftCell3.appendChild(ziptext);
			LeftCell3.appendChild(LineBreak5);
			LeftCell3.appendChild(ZipField);
			
			var Row4 = TypeTable.insertRow(InputRow + 3);
			Row4.className='pubform';
			var LeftCell4 = Row4.insertCell(0);
			var CountryField = document.createElement('input');
			CountryField.setAttribute('type', 'text');
			CountryField.setAttribute('name', 'Country');
			CountryField.setAttribute('id', 'Country');
			CountryField.setAttribute('size', '20');
			
			var Countrytext = document.createTextNode('Country');
			LeftCell4.setAttribute('id', 'left4');
			document.getElementById('left4').className='style8';
			LeftCell4.appendChild(Countrytext);
			LeftCell4.appendChild(LineBreak6);
			LeftCell4.appendChild(CountryField);
			}
			else {
			location.reload(true);
			}
		}

function Message() {
		var helpcell = document.getElementById('giftmessage');
		helpcell.style.display='';
		var namerow = document.getElementById('guest1');
		namerow.style.display='';
		var phonerow = document.getElementById('guest2');
		phonerow.style.display='';
		var title2 = document.getElementById('guest4');
		title2.style.display='';
		var formname = document.getElementById('form_name');
		formname.value='guesttrip';
		window.parent.resizeCaller();
	}
	
	function MessageRemove() {
		var helpcell = document.getElementById('giftmessage');
		helpcell.style.display='none';
		var namerow = document.getElementById('guest1');
		namerow.style.display='none';
		var phonerow = document.getElementById('guest2');
		phonerow.style.display='none';
		var title2 = document.getElementById('guest4');
		title2.style.display='none';
		var formname = document.getElementById('form_name');
		formname.value='trip';
		window.parent.resizeCaller();
	}
	
	function unchecked(acts) {
		
		for (var x = 1; x <= acts; x++) {
			var box = document.getElementById('activity' + x);
			box.checked=false;
		}
	}
	
	function checkboxes(acts) {
	
		for (var x = 1; x <= acts; x++) {
			var box = document.getElementById('activity' + x);
			box.checked=true;
		}
	}
function showevents(day)
	{
		events = document.getElementById(day);
		see = document.getElementById('see' + day);
		var curleft = curtop = 0;
		
		if(see)
		{
			if (see.offsetParent) {
				curleft = see.offsetLeft;
				curtop = see.offsetTop;
				while (see = see.offsetParent) {
					curleft += see.offsetLeft;
					curtop += see.offsetTop;
				}
			}
		}
		
		if(events)
		{
			events.style.display = '';
			events.style.top = curtop;
			events.style.left = curleft;
		}
	}
	
function hideevents(day)
	{
		events = document.getElementById(day);
		if(events)
		{
			events.style.display = 'none';
		}
	}
	
function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=0,width=749,height=520,left = 100,top = 100');");
}

// JavaScript Document
