
/*****FOR PLANNING RESOURCES PAGE*****/

// TIPS
function displayTip() 
{
    // Make sure the page contains a "tips" id
    if (document.getElementById('tips') == null) return;

    // Packing tips
    var PackingTips = new Array()
    PackingTips[0] = "An inflatable neck cushion is an invaluable item for long flights."
    PackingTips[1] = "Wear and carry washable silk clothing whenever possible. It is as cool as cotton for warmer days and surprisingly warm for cooler evenings."
    PackingTips[2] = "An extra folded flight bag takes very little room and comes in handy on your way home for the gifts and souvenirs you&rsquo;ve picked up along the way."
    PackingTips[3] = "Check with your doctor to get the appropriate vaccinations. Pack enough medication for your entire trip as some prescriptions are difficult to find in exotic locales."
    PackingTips[4] = "Stow away some antibacterial wipes—they&rsquo;re a convenient way to clean up on the go."
    PackingTips[5] = "Bring a voltage converter with you, along with an adapter (to fit electrical plugs into foreign outlets). Note that some adapter kits don&rsquo;t include converters."
    PackingTips[6] = "Pack an extra pair of prescription glasses or contacts in case they are lost or broken."
    PackingTips[7] = "Comfortable, broken-in walking shoes are a must. Never pack new shoes."
    PackingTips[8] = "Wrap a long strip of duct tape around a pencil and bring it along for the ride. Duct tape is the magic fix for everything from torn suitcases to broken sandal straps."

    // Get Packing Tips
	var pt = PackingTips.length;
	var whichpackingtip=Math.round(Math.random()*(pt-1));
	var thePackingTip = PackingTips[whichpackingtip]

    // Fit tips
    var FitTips = new Array()
    FitTips[0] = "Be realistic. You probably won&rsquo;t have the time to fully follow your weekly workout routine. Aim for 50 percent of your normal regimen."
    FitTips[1] = "Be creative. You will be visiting some of the most intriguing cities and awe-inspiring landscapes in the world. Instead of calisthenics in your hotel room, try an early morning walk along the banks of the River Thames or a leisurely bike ride through Margaret Island, Budapest&rsquo;s version of Central Park."
    FitTips[2] = "Take advantage of every situation. Try your hand at a wide variety of seated stretches and exercises to increase flexibility and keep you agile during flights and on the motorcoach."
    FitTips[3] = "Bring along a resistance band. Lightweight and easy to pack, a resistance band can provide a full upper and lower body workout on the go."
    FitTips[4] = "Replenish yourself. To maintain the energy you gain from staying fit and active while traveling, drink plenty of water and never skip meals."

    // Get Fit Tips
	var ft = FitTips.length;
	var whichfittip=Math.round(Math.random()*(ft-1));
	var theFitTip = FitTips[whichfittip]

    // Travel tips
    var TravelTips = new Array()
    TravelTips[0] = "Before you leave, read a book that takes place in the country you are about to visit. Your fictional journey through the region will get you excited for the sights and experiences to come."
    TravelTips[1] = "Make sure your passport does not expire within six months of your date of travel. Some countries insist that your passport be valid for at least a six-month time period."
    TravelTips[2] = "Place an envelope in one of your checked bags containing copies of your passport, birth certificate and a back-up form of photo I.D. in case your passport is lost or stolen."
    TravelTips[3] = "Place a copy of the detailed itinerary of your trip inside each piece of luggage."
    TravelTips[4] = "If your luggage is lost, this will help the airline find you while you&rsquo;re traveling."
    TravelTips[5] = "If you are on Medicare and traveling outside the United States, be aware that Medicare does not cover any of your medical bills abroad. It&rsquo;s a good idea to get a travel protection policy that will cover these costs."
    TravelTips[6] = "Medicare does not cover any of your medical bills abroad. It&rsquo;s a good idea to get a travel protection policy that will cover these costs."
    TravelTips[7] = "Learn a few essential terms in the native language of the country you&rsquo;ll be visiting. You&rsquo;ll find that the locals will appreciate your effort."
    TravelTips[8] = "Plan at least a day or two after your return home before scheduling any commitments; you may be tired after your journey."
    TravelTips[9] = "Before your flight, get plenty of rest and drink a lot of water. Also, try eating light meal before you board so that hunger does not keep you from sleeping."
    TravelTips[10] = "As soon as you board your flight, set your watch to the time of your destination. Then act accordingly. If it is nighttime in your arrival city when you take off, try to get a few hours of sleep. If it&rsquo;s daytime at your final stop, try walking through the cabin to stay alert."
    TravelTips[11] = "On arrival, stay awake until an early local bedtime. A brisk walk will not only revive your body, but also serves as an invaluable introduction to your new surroundings. Wake the next day from a full night&rsquo;s rest, alert and able to get the most from your overseas experience."

    // Get Travel Tips
	var tt = TravelTips.length;
	var whichtraveltip=Math.round(Math.random()*(tt-1));
	var theTravelTip = TravelTips[whichtraveltip]

    // Put tips in list
    var RandomPackingTip = "<li>" + thePackingTip + "</li>"
    var RandomFitTip = "<li>" + theFitTip + "</li>"
    var RandomTravelTip = "<li>" + theTravelTip + "</li>"

    document.getElementById('tips').innerHTML = RandomPackingTip + RandomFitTip + RandomTravelTip;
}

//REDIRECT DROP DOWN
function redirectDropDown(ddl) 
{
    var index = ddl.selectedIndex;
    if (index == -1)
        return;
    var redirect =  ddl.options[index].value;
    if (redirect == "")
        return;
    location.href = redirect; 
}
function redirectURL(url) 
{
    if (url == "")
        return;
    location.href = url; 
}

/*****FOR DEFINED SECTION*****/

// Defined images deal
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_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_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];}
}

/*****FOR VACATION PACKAGES SECTION*****/
var map_array = new Array();

function displayMap(the_map, toppx, leftpx)
{
    if (document.getElementById(the_map) == null) return;
    
    if (document.getElementById(the_map).classname=="")
    {
        document.getElementById(the_map).className = "hide";
        return;
    }
    for (i=0;i<map_array.length;i++)
    {
        var my_map = document.getElementById(map_array[i]);
        my_map.className = "hide";
    }
    document.getElementById(the_map).className = "MapPopUpShow";
    document.getElementById(the_map).style.top = toppx;
    document.getElementById(the_map).style.left = leftpx;
}
function clearMapClass(itemid) 
{
	var object = document.getElementById(itemid);
	object.className = 'hide';
}

/* Homepage search pop-ups */
function setClassSearch(itemid, newclass) 
{
    if (document.getElementById(itemid) == null) return;
	var object = document.getElementById(itemid);
	object.className = newclass;
}
function clearClassSearch(itemid) 
{
    if (document.getElementById(itemid) == null) return;
	var object = document.getElementById(itemid);
	object.className = 'hide';
}

/*****FOR ABOUT SECTION - added by Tyson on 9/14/09*****/

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];}
}


/* Include an external javascript file at Conrad */
document.write("<script language=JavaScript src='http://www2.monograms-mail.com/jscripts/subform_redir.js' type=text/javascript></script>");
