function embedFlash(){
  var line01="<OBJECT classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' ";
  var line02=" codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\' ";
  var line03=" WIDTH=" + movieWidth;
  var line04=" HEIGHT=" + movieHeight;
  var line05=" id=\'flashMovie\' align=\'\'> ";
  var line06=" <PARAM NAME=movie VALUE=\'" + movieName + "\'>" ;
  var line07=" <PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=high> ";
  var line08=" <PARAM NAME=scale VALUE=" + movieScale + "> ";
  var line09=" <PARAM NAME= bgcolor VALUE=" + movieBG + "> ";
  var line10=" <EMBED src=\'" + movieName + "\' ";
  var line11=" menu=false quality=high scale=" + movieScale + " bgcolor=" + movieBG + line03 + line04;
  var line12=" NAME=\'flashMovie\' ALIGN=\'\' ";
  var line13=" TYPE=\'application/x-shockwave-flash\' PLUGINSPAGE=\'http://www.macromedia.com/go/getflashplayer\'> ";
  var line14=" </EMBED></OBJECT> ";
  document.write(line01 + line02 + line03 + line04 + line05 + line06 + line07 + line08 + line09 + line10 + line11 + line12 + line13 + line14);
}

function popWindow(url, w, h){
var str="height="+h+",width="+w;
var windowX = Math.ceil( (window.screen.width-w)/2 );
var windowY = Math.ceil( (window.screen.height-h)/2 )-20;
if(parseInt(navigator.appVersion)>3) {
	str+=",toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=auto";
}
win=window.open("about:blank","newWindow",str);
win.moveTo(windowX, windowY);
win.location=url;
win.focus()
}

function popUpPic(picURL, picNum, guideId){
var w=700;
var h=550;
var str="height="+h+",width="+w;
					
var windowX = Math.ceil( (window.screen.width-w)/2 );
var windowY = Math.ceil( (window.screen.height-h)/2 )-20;
if(parseInt(navigator.appVersion)>3)
  {
	str+=",toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no";
}
winTopen="gallery.php?id="+guideId+"&currentPic="+picURL+"&picNum="+picNum;
win=window.open(winTopen,"newWindow",str);
win.moveTo(windowX, windowY);
win.focus()
}

function getMdays(newMonth) {
	switch (newMonth) {
		case 3:
			dayAmount=30;
			break;
		case 5:
			dayAmount=30;
			break;
		case 8:
			dayAmount=30;
			break;
		case 10:
			dayAmount=30;
			break;
		case 1:
			thisYear=document.forms['requestForm'].dep_year.options[document.forms['requestForm'].dep_year.selectedIndex].value;
			leapYear=thisYear - Math.floor(thisYear/4)*4;
			if (leapYear<=0) {
				dayAmount=29;
			} else {
				dayAmount=28;
			}
			break;
		default: dayAmount=31;
	}
	return dayAmount;
}

function updateAll() {
	newMonth=document.forms['requestForm'].dep_month.selectedIndex;
	var os="<option value='";
	var om="'>";
	var oe="</option>";
	var newOptions="";
	dayAmount=getMdays(newMonth);
	document.forms['requestForm'].dep_day.options.length=28;
	for (i=29;i<=dayAmount; i++) {
		document.forms['requestForm'].dep_day.options[i-1]=new Option(i,i);
		document.forms['requestForm'].ret_day.options[i-1]=new Option(i,i);
	}
	document.forms['requestForm'].dep_day.selectedIndex=0;
	document.forms['requestForm'].ret_day.selectedIndex=0;
	document.forms['requestForm'].ret_month.selectedIndex=newMonth;
}

function updateDay() {
	document.forms['requestForm'].ret_day.selectedIndex=document.forms['requestForm'].dep_day.selectedIndex;
}

function updateYear() {
	document.forms['requestForm'].ret_year.selectedIndex=document.forms['requestForm'].dep_year.selectedIndex;
}

function updateMonth() {
	newMonth=document.forms['requestForm'].ret_month.selectedIndex;
	dayAmount=getMdays(newMonth);
	document.forms['requestForm'].ret_day.options.length=28;
	for (i=29;i<=dayAmount; i++) {
		document.forms['requestForm'].ret_day.options[i-1]=new Option(i,i);
	}
	document.forms['requestForm'].ret_day.selectedIndex=0;
}