//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblclick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
/*
* Rich HTML Ticker- by JavaScript Kit (http://www.javascriptkit.com)
* Freeware. Created Sept 13th, 08'
* This credit must stay intact for use
*/

var richhtmlticker={
loadingtext: '<em>Fetching Ticker Contents. Please wait...</em>', //Loading text if content is being fetched via Ajax

getajaxcontent:function($, config){
	config.$ticker.html(this.loadingtext)
	$.ajax({
		url: config.msgsource,
		error:function(ajaxrequest){
			config.$ticker.html('Error fetching content.<br />Server Response: '+ajaxrequest.responseText)
		},
		success:function(content){
			config.$ticker.html(content)
			richhtmlticker.setupticker(config)
		}
	})
},

rotate:function(config){
	if (config.$ticker.get(0)._hoverstate=="over"){
		setTimeout(function(){richhtmlticker.rotate(config)}, config.rotatespeed)
	}
	else{
		config.$messages.eq(config.currentmsg).fadeOut(config.animateduration, function(){
			config.currentmsg=(config.currentmsg<config.$messages.length-1)? config.currentmsg+1 : 0
			config.$messages.eq(config.currentmsg).fadeIn(config.animateduration, function(){
				setTimeout(function(){richhtmlticker.rotate(config)}, config.rotatespeed)
			})
		})
	}
},

getCookie:function(Name){ 
	var re=new RegExp(Name+"=[^;]+", "i") //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return null
},

setCookie:function(name, value){
	document.cookie = name+"="+value
},

setupticker:function(config){
	config.$messages=config.$ticker.find('div.'+config.msgclass).hide()
	config.currentmsg=Math.min(parseInt(richhtmlticker.getCookie(config.id) || 0), config.$messages.length-1)
	config.$messages.hide().eq(config.currentmsg).fadeIn(config.animateduration)
	setTimeout(function(){richhtmlticker.rotate(config)}, config.rotatespeed)
	$(window).bind('unload', function(){richhtmlticker.cleanup(config)})
},

define:function(config){
  jQuery(document).ready(function($){
		config.$ticker=$('#'+config.id)
		if (config.$ticker.length==0)
			return
		config.$ticker.css({overflow:'hidden'}).hover(
			function(){this._hoverstate="over"},
			function(){this._hoverstate="out"}
		)
		if (config.msgsource=="inline"){
			richhtmlticker.setupticker(config)
		}		
		else{
			richhtmlticker.getajaxcontent($,config)
		}
	})
},

cleanup:function(config){
	this.setCookie(config.id, config.currentmsg)
}

} //end richhtmlticker object




//////////// Declare instance of Rich HTML Ticker (invoked when page has loaded): ///////////////////////////

richhtmlticker.define({
	id: "myhtmlticker", //main ticker DIV id
	msgclass: "messagediv", //CSS class of DIVs containing each ticker message
	msgsource: "messages.html", //Where to look for the messages: "inline", or "path_to_file_on_your_server"
	rotatespeed: 3000, //pause in milliseconds between rotation
	animateduration: 1000 //duration of fade animation in milliseconds 
})

///// This is the code for the new cruise engine 2-13-09
		var PPObackgroundcolor;
		var PPOtitlebarcolor;
		var PPOborderwidth;
		var PPObordercolor;
		var PPOtitlefontcolor;
		var PPObodyfontcolor;

	function PPOFormatSearchBox(formatstyle) {
		if (formatstyle == 'standard'){
			PPObackgroundcolor = '#D5E8BB';
			PPOtitlebarcolor = '#88BE3F';
			PPOborderwidth = '0';
			PPObordercolor = '#FFFFFF';
			PPOtitlefontcolor = '#000000';
			PPObodyfontcolor = '#000000';
		}
		else if (formatstyle == 'steel') {
			PPObackgroundcolor = '#d3d3d3';
			PPOtitlebarcolor = '#3f6194';
			PPOborderwidth = '0';
			PPObordercolor = '#FFFFFF';
			PPOtitlefontcolor = '#FFFFFF';
			PPObodyfontcolor = '#000000';
		}
		else if (formatstyle == 'simple') {
			PPObackgroundcolor = '#FFFFFF';
			PPOtitlebarcolor = '#FFFFFF';
			PPOborderwidth = '1';
			PPObordercolor = '';
			PPOtitlefontcolor = '#000000';
			PPObodyfontcolor = '#000000';
		}
		else if (formatstyle == 'santafe') {
			PPObackgroundcolor = '#ffcc99';
			PPOtitlebarcolor = '#660033';
			PPOborderwidth = '0';
			PPObordercolor = '#FFFFFF';
			PPOtitlefontcolor = '#ffffcc';
			PPObodyfontcolor = '#660033';
		}
		else {
			PPObackgroundcolor = '#D5E8BB';
			PPOtitlebarcolor = '#88BE3F';
			PPOborderwidth = '0';
			PPObordercolor = '#FFFFFF';
			PPOtitlefontcolor = '#000000';
			PPObodyfontcolor = '#000000';
		}
	}

	function PPOSearchBoxHeader(searchboxcaption, distributorcode, distributoraccount, targetframe){
		document.write("<form name=\"PPOSearchForm\" method=\"get\" action=\"http://www.latesttraveloffers.com/lton/ltonclct.asp\" target=\"" + targetframe + "\">");
		document.write("<input type=\"hidden\" name=\"distributorcode\" value=\"" + distributorcode + "\">");
		document.write("<input type=\"hidden\" name=\"distributoraccount\" value=\"" + distributoraccount + "\">");
		document.write("<input type=\"hidden\" name=\"UseSearchAPI\" value=\"true\">");	
		document.write("<table border=\"" + PPOborderwidth + "\" bordercolor=\"" + PPObordercolor + "\" bgcolor=\"" + PPObackgroundcolor + "\">");
		document.write("	<tr>");
		document.write("		<td bgcolor=\"" + PPOtitlebarcolor + "\"><font face=\"arial\" size=\"2\" color=\"" + PPOtitlefontcolor + "\"><strong>" + searchboxcaption + "</strong></font></td>");
		document.write("	</tr>");
		document.write("	<tr>");
		document.write("		<td>");
		document.write("			<table width=\"270\" height=\"350\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	}
	function PPOSearchBoxFooter(){
		document.write("			</table>");
		document.write("		</td>");
		document.write("	</tr>");
		document.write("</table>");
		document.write("</form>");		
	}
	function PPOSearchBoxSubmit(){
		document.write("<tr>");
		document.write("	<td><font size=\"1\" face=\"Arial\" color=\"" + PPObodyfontcolor + "\">Powered by <em>VacationPORT</em></font></td><td align=\"right\"><a href=\"#\" onclick=\"document.PPOSearchForm.submit()\"><img src=\"http://www.latesttraveloffers.com/Public/Search/Images/go.gif\" border=\"0\"></a></td>");
		document.write("</tr>");
	}
	function PPOSearchBoxSubmitPlain(){
		document.write("<tr>");
		document.write("	<td><font size=\"1\" face=\"Arial\" color=\"" + PPObodyfontcolor + "\">Powered by <em>VacationPORT</em></font></td>");
		document.write("	<td align=\"right\"><input type=\"Submit\" value=\"Go\"></td>");
		document.write("</tr>");
	}
	function PPOsrchDestText(){
		document.write("<tr>");
		document.write("	<td colspan=\"2\"><font face=\"Arial\" size=\"1\" color=\"" + PPObodyfontcolor + "\">Destination: <br></font><input type=\"text\" name=\"srchDestText\"></td>");
		document.write("</tr>");
	}

	function PPOsrchTravType(){
		document.write("<tr>");
		document.write("	<td colspan=\"2\"><font face=\"Arial\" size=\"1\" color=\"" + PPObodyfontcolor + "\">Travel Type: <br></font><select name=\"srchTravType\">");
		document.write("	<option value=\"CRVA\">Cruises/Vacation Pkgs</option>");
		document.write("	<option value=\"CRUZ\" selected=\"selected\">Cruises Only</option>");
		document.write("	<option value=\"PKG\">Vacation Pkgs Only</option>");
		document.write("	<option value=\"TOUR\">Tours Only</option>");
		document.write("	<option value=\"AUTO\">International Auto</option>");
		document.write("	<option value=\"LODG\">Lodging</option>");
		document.write("	<option value=\"AIR\">Air Only</option>");
		document.write("</select></td></tr>");
	}
	
	function PPOsrchDestId() {
		document.write("<tr>");
		document.write("	<td colspan=\"2\"><font face=\"Arial\" size=\"1\" color=\"" + PPObodyfontcolor + "\">Destination: <br></font>");
		document.write("		<select name=\"srchDestId\">");
		document.write("			<option value=\"\">Any Destination</option>");
		document.write("			<option value=\"62221*\">Africa</option>");
		document.write("			<option value=\"62468*\">Alaska</option>");
		document.write("			<option value=\"62222*\">Antarctica</option>");
		document.write("			<option value=\"107508,62226,62228*\">Asia & Middle East</option>");
		document.write("			<option value=\"62321*\">Bahamas</option>");
		document.write("			<option value=\"62493*\">Bermuda</option>");
		document.write("			<option value=\"106355,106357,106365,106374,62482,62483,62484,65788,62486*\">Canada/New England</option>");
		document.write("			<option value=\"62319,62442,62320,106434*\">Western Caribbean</option>");
		document.write("			<option value=\"62327,62325,62329,62326,62321,62322,62328*\">Eastern Caribbean</option>");
		document.write("			<option value=\"62331,62338,62336,62340,62330,62341,62342,62339,62333,62334*\">Southern Caribbean</option>");
		document.write("			<option value=\"62234,62232,62235,62236,62233,62400,62408,62399,62392,62410,62396*\">Mediterranean</option>");
		document.write("			<option value=\"62386,62373,62413,62414,62371,62372,60175,62379,62403*\">Northern Europe</option>");
		document.write("			<option value=\"62380,62375,62385,62378,62379,62391*\">Western Europe</option>");
		document.write("			<option value=\"62469*\">Hawaii</option>");
		document.write("			<option value=\"62231,106338*\">Latin America</option>");
		document.write("			<option value=\"106337*\">Mexico</option>");
		document.write("			<option value=\"62520*\">Panama Canal</option>");
		document.write("			<option value=\"62231*\">South America</option>");
		document.write("			<option value=\"106339,62223*\">South Pacific</option>");
		document.write("			<option value=\"62471,106372,106386*\">Western US</option>");
		document.write("			<option value=\"106356,62491,106368,106375*\">Eastern US</option>");
		document.write("		</select>");
		document.write("	</td></tr>");
	}
	
	function PPOsrchStartTravDate(){

		var arrMonthName = new Array();
			arrMonthName = ["January","February","March","April","May","June","July","August","September","October","November","December"];
		var ThisDate = new Date();
		var ThisMonth = ThisDate.getMonth();
		var ThisYear = ThisDate.getFullYear();
		var tmpMonthYear;
		var tmpMonthYearName;
		document.write("<tr>");
		document.write("	<td colspan=\"2\"><font face=\"Arial\" size=\"1\" color=\"" + PPObodyfontcolor + "\">Travel When: <br></font><select name=\"srchStartTravDate\">");
		document.write("		<option value=\"\">Any Date</option>");
		for ( i = 0; i < 24; i++) {
			if ( ThisMonth == 12 ) {
				ThisMonth = ThisMonth - 12;
				ThisYear = ThisYear + 1;
			}
			if ( (ThisMonth + 1) < 10 ) {
				tmpMonthYear = '0' + (ThisMonth + 1) + '*' + ThisYear + '*';
			}
			else {
				tmpMonthYear = (ThisMonth + 1) + '*' + ThisYear + '*';
			}
			tmpMonthYearName = arrMonthName[ThisMonth] + ' ' + ThisYear;
			document.write("		<option value=\"" + tmpMonthYear + "\">" + tmpMonthYearName + "</option>");
			ThisMonth = ThisMonth + 1;
		}

		document.write("	</select></td>");
		document.write("</tr>");
	}

	function PPOsrchTravBudgetHigh() {
		document.write("<tr><td colspan=\"2\">");
		document.write("<font face=\"Arial\" size=\"1\" color=\"" + PPObodyfontcolor + "\">Travel Budget</font><br>");
		document.write("<select name=\"srchTravBudget\">");
		document.write("<option value=\"\">Any Price</option>");
		document.write("<option value=\"0*250*\">$250 or less</option>");
		document.write("<option value=\"251*500*\">$251 - $500</option>");
		document.write("<option value=\"501*1000*\">$501 - $1,000</option>");
		document.write("<option value=\"1001*1500*\">$1,001 - $1,500</option>");
		document.write("<option value=\"1501*2000*\">$1,501 - $2,000</option>");
		document.write("<option value=\"2001*3000*\">$2,001 - $3,000</option>");
		document.write("<option value=\"3000**\">$3,000 or more</option>");
		document.write("</select>");
		document.write("</td></tr>");
	}

	function PPOsrchTravBudgetLow() {
		document.write("<tr><td colspan=\"2\">");
		document.write("<font face=\"Arial\" size=\"1\" color=\"" + PPObodyfontcolor + "\">Travel Budget</font><br>");
		document.write("<select name=\"srchTravBudget\">");
		document.write("<option value=\"\">Any Price</option>");
		document.write("<option value=\"0*100*\">$100 or less</option>");
		document.write("<option value=\"101*200*\">$101 - $200</option>");
		document.write("<option value=\"201*400*\">$201 - $400</option>");
		document.write("<option value=\"400**\">$400 or more</option>");
		document.write("</select>");
		document.write("</td></tr>");
	}

	function PPOsrchTravLength() {
		document.write("<tr><td colspan=\"2\">");
		document.write("<font face=\"Arial\" size=\"1\" color=\"" + PPObodyfontcolor + "\">Travel Length</font><br>");
		document.write("<select name=\"srchTravLength\">");
		document.write("<option value=\"\">Any Length</option>");
		document.write("<option value=\"0*2*\">0-2 nights</option>");
		document.write("<option value=\"3*6*\">3-6 nights</option>");
		document.write("<option value=\"7*9*\">7-9 nights</option>");
		document.write("<option value=\"10*14*\">10-14 nights</option>");
		document.write("<option value=\"14**\">over 14 nights</option>");
		document.write("</select>");
		document.write("</td></tr>");
	}

	function PPOsrchTravSupp(){
		document.write("<tr><td colspan=\"2\">");
		document.write("<font face=\"Arial\" size=\"1\" color=\"" + PPObodyfontcolor + "\">Cruise Line</font><br>");
		document.write("<select name=\"srchTravSupp\">");
		document.write("<option value=\"Crystal\">Crystal</option>");
		document.write("<option value=\"Celebrity\">Celebrity</option>");
		document.write("<option value=\"Disney\">Disney</option>");
		document.write("<option value=\"Holland America\">Holland America</option>");
		document.write("<option value=\"Norwegian\">Norwegian</option>");
		document.write("<option value=\"Regent Seven Seas\">Regent Seven Seas</option>");
		document.write("<option value=\"Royal Caribbean\">Royal Caribbean</option>");
		document.write("<option value=\"Princess\">Princess</option>");
		document.write("<option value=\"Seabourn\">Seabourn</option>");
		document.write("<option value=\"Silversea\">Silversea</option>");
		document.write("<option value=\"Uniworld\">Uniworld</option>");
		document.write("<option value=\"Oceania\">Oceania</option>");
		document.write("</select>");
		document.write("</td></tr>");
			
	}

	function PPOSearchBox(searchboxsize, searchboxstyle, searchboxcaption, distributorcode, distributoraccount, targetframe, cruiseline) {
		//set the colors and styling
		PPOFormatSearchBox(searchboxstyle);
		//print the header
		searchboxcaption = unescape(searchboxcaption);
		PPOSearchBoxHeader(searchboxcaption, distributorcode, distributoraccount, targetframe);
		// PPOsrchTravSupp(cruiseline);
		
		//print the appropriately sized body
		if (searchboxsize == 'simple'){
			PPOsrchTravType();
			PPOsrchDestText();
		}
		else if (searchboxsize == 'moderate'){
			PPOsrchTravType();
			PPOsrchDestId();
			PPOsrchStartTravDate();
		}
		else if (searchboxsize == 'detailed'){
			PPOsrchTravType();
			PPOsrchDestId();
			PPOsrchStartTravDate();
			PPOsrchTravBudgetHigh();
			PPOsrchTravLength();
			PPOsrchTravSupp();
		}
		else {
			PPOsrchTravType();
			PPOsrchDestText();
		}
		//print the submit button and footer
		PPOSearchBoxSubmit();
		PPOSearchBoxFooter();
	}
	
	function PPOSubmitSearch() {
		document.PPOSearchForm.submit();
	}

