var element_info = document.getElementById('information');
var element_gallery = document.getElementById('gallery');
function slide_info()
{
   element_info = document.getElementById('information');
   element_gallery = document.getElementById('gallery');
   if(element_info.down == null || element_info.up)
   {
	  animate('information', 0, 0, 255, 306, 250, null);
	  animate('gallery', 160, 0, 0, 105, 250, null);
      element_info.down = true;
      element_info.up = false;
      document.getElementById('info_button').style.backgroundColor="#ffffff";
	  document.getElementById('gallery_button').style.backgroundColor="transparent";
	  //document.getElementById('gallery').style.borderLeft="solid 1px transparent";
	  element_gallery.up = true;
      element_gallery.down = false;
      
   }
   else
   {
      animate('information', 0, 0, 160, 0, 250, null);
      element_info.up = true;
      element_info.down = false;
      document.getElementById('info_button').style.backgroundColor="transparent";
	  //document.getElementById('gallery').style.borderLeft="solid 1px transparent";
   }
  	
}
function slide_gallery()
{
   element_gallery = document.getElementById('gallery');
   element_info = document.getElementById('information');
   if(element_gallery.down == null || element_gallery.up)
   {
	  animate('gallery', 160, 0, 375, 105, 250, null);
	  animate('information', 0, 0, 160, 0, 250, null);
      element_gallery.down = true;
      element_gallery.up = false;
      document.getElementById('gallery_button').style.backgroundColor="#ffffff";
	  document.getElementById('info_button').style.backgroundColor="transparent";
	  //document.getElementById('gallery').style.borderLeft="solid 1px #C3C3C3";
	  element_info.up = true;
      element_info.down = false;
      
   }
   else
   {
      animate('gallery', 160, 0, 0, 105, 250, null);
      element_gallery.up = true;
      element_gallery.down = false;
      document.getElementById('gallery_button').style.backgroundColor="transparent";
	  //document.getElementById('gallery').style.borderLeft="solid 1px transparent";
   }
  	
}

			
	function makeScrollbar(content,scrollbar,handle,horizontal,ignoreMouse){
		var steps = (horizontal?(content.getScrollSize().x - content.getSize().x):(content.getScrollSize().y - content.getSize().y))
		var slider = new Slider(scrollbar, handle, {	
			steps: steps,
			mode: (horizontal?'horizontal':'vertical'),
			onChange: function(step){
				// Scrolls the content element in x or y direction.
				var x = (horizontal?step:0);
				var y = (horizontal?0:step);
				content.scrollTo(x,y);
			}
		}).set(0);
		if( !(ignoreMouse) ){
			// Scroll the content element when the mousewheel is used within the 
			// content or the scrollbar element.
			$$(content, scrollbar).addEvent('mousewheel', function(e){	
				e = new Event(e).stop();
				var step = slider.step - e.wheel * 30;	
				slider.set(step);					
			});
		}
		// Stops the handle dragging process when the mouse leaves the document body.
		$(document.body).addEvent('mouseleave',function(){slider.drag.stop()});
	}
						
restoreTXT = '';
						
window.addEvent('domready', function(){		
									 
	// Vertical Scrollbar --
	//makeScrollbar( $('content_desc'), $('scrollbar1'), $('handle1') );
	//$('content_area').setStyles({'display':'none'});
				
	//SCROLL THUMBS
				
	var thumbsScrollWidth = 1870;
	var thumbsScrollSET = 360;

    function writethumbsScrollWidth() {
        $('thumbnailsScroll').setStyles({ 'width': thumbsScrollWidth });
    }
    writethumbsScrollWidth();
 
    var thumbsIndex = 0;

    var thumbsScroll = new Fx.Scroll('thumbnails_area', {
        wait: false,
        duration: 500,
        offset: { 'x': 0, 'y': 0 },
        transition: Fx.Transitions.Quad.easeInOut
    });

    thumbsScroll.set(thumbsIndex);
    thumbsScrollWidth = thumbsScrollWidth - thumbsScrollSET;


    // RIBBON SCROLL BUTTONS

    $('thumb_nav_right').addEvent('click', function(event) {
        event = new Event(event).stop();
        //this.src = this.src.replace(/disabled/g, 'active')
        if (thumbsIndex < thumbsScrollWidth && thumbsScrollWidth > 0) {
            thumbsIndex = thumbsIndex + thumbsScrollSET;
            thumbsScroll.start(thumbsIndex);
        };
    });

    $('thumb_nav_left').addEvent('click', function(event) {
        event = new Event(event).stop();
        //this.src = this.src.replace(/disabled/g, 'active')
        if (thumbsIndex > 0) {
            thumbsIndex = thumbsIndex - thumbsScrollSET;
            thumbsScroll.start(thumbsIndex);
        };
    });
 	
	//THUMBS OVER
 	$$('.thumbnails_image img').each(function(item) {
		//INIT
		item.setStyles({'opacity':0.3});
		//OVER
        item.addEvent('mouseover', function() {
            window.restoreTXT = $('thumbnails_desc').get('text');
			var overTXT = item.get('alt');
            $('thumbnails_desc').set('text', overTXT);
            item.setStyles({'opacity':1});
        });
		//OUT
		item.addEvent('mouseout', function() {
            $('thumbnails_desc').set('text', window.restoreTXT);
            item.setStyles({'opacity':0.3});
        });
		item.addEvent('click', function() {
            window.restoreTXT = item.get('alt');
        });
	});		
	
	$('gmapsLink').addEvent('click', function() {
		var bgfade = new Fx.Tween($('pageBG'), {
					property:'opacity', 
					duration:500, 
					link: 'cancel',
					onComplete: function(){
						$('pageBG').set('html', '<div id="map_canvas" style="height: 650px;"></div><div style="display:block; position:absolute; left:175px; top:678px;">For those with GPS, our coordinates are: Longitude: 102° 0’ 5.7”, Latitude: 2° 48’ 4.2”</div><div id="showDirections"></div><div id="hideDirections"></div><div id="directionsDIV"><form id="changeLOC" action="" onsubmit="setDir(); return false"><input type="text" size="25" id="fromAddress" class="mapsField" name="from" value="KL Sentral, Malaysia" title="From" /><input type="text" size="25" id="toAddress" class="mapsField" name="to" value="Kampung Pantai, 70100 Seremban, Negeri Sembilan, Malaysia" title="To" /><input name="submit" type="submit" class="mapsButton" value="Get Directions!" /></form><div id="directions"></div></div>');
						$('map_canvas').setStyles({'width':$('pageBG').getWidth()});
						var thisSlider = new Fx.Slide($('directionsDIV'), { duration: 500, transition: Fx.Transitions.Sine.easeOut } );
	  					thisSlider.hide();
						$('hideDirections').setStyles({'display':'none'});
						$('showDirections').addEvent( 'click', function(e){ 
							e.stop();
							thisSlider.slideIn();
							$('showDirections').setStyles({'display':'none'});
							$('hideDirections').setStyles({'display':'block'});
							$('fromAddress').setStyles({'display':'inline-block'});
							$('toAddress').setStyles({'display':'inline-block'});
						});
						$('hideDirections').addEvent( 'click', function(e){ 
							e.stop();										
							thisSlider.slideOut();
							$('hideDirections').setStyles({'display':'none'});
							$('showDirections').setStyles({'display':'block'});
							$('fromAddress').setStyles({'display':'none'});
							$('toAddress').setStyles({'display':'none'});
						});
						$('changeLOC').addEvent('submit', function(e) {
							e.stop();
							window.setDirections(this.from.value, this.to.value); return false;
							this.send();
						});
						initialize();
						var fadein = new Fx.Tween($('pageBG'), {property:'opacity', duration:500, link: 'cancel'});
						fadein.start(1);
					}
					});
		bgfade.start(0);										  
      
   	});
	
		

	
	$('logo').addEvent('click', function() {
		var bgfade = new Fx.Tween($('pageBG'), {
					property:'opacity', 
					duration:500, 
					link: 'cancel',
					onComplete: function(){
						$('pageBG').set('html', '<img src="images/gallery/TD_01.jpg" width="1000" height="650" alt="" />');
						var fadein = new Fx.Tween($('pageBG'), {property:'opacity', duration:500, link: 'cancel'});
						fadein.start(1);
					}
					});
		bgfade.start(0);										  
      
   	});

	
	
	var myImages = new Asset.images(['/images/content/booking.jpg', '/images/content/berembun.jpg', '/images/content/tembusu.jpg', '/images/content/house_facilities.jpg', '/images/content/jungle_trekking.jpg', '/images/content/museum.jpg', '/images/content/pool.jpg', '/images/content/river.jpg', '/images/content/special.jpg', '/images/content/caboose.jpg', '/images/content/lord_patrick.jpg', '/images/content/patio.jpg', '/images/content/waterfall.jpg', '/images/content/wet_market.jpg'], {
	onComplete: function(){
	//alert('All images loaded!');
	}
	});
	
	new SmoothScroll({duration: 1000, fps: 30});
	
				
}); //END DOMREADY

		

function contrast(id_name)
{
	$(id_name).setStyles({'background-image':'url(images/transparent2.png)'});
}
function uncontrast(id_name)
{
	$(id_name).setStyles({'background-image':'url(images/transparent.png)'});
}
function contrast2(id_name)
{
	$(id_name).setStyles({'background-image':'url(images/white.png)'});
}
function green_arrow(id_name)
{
	$(id_name).setStyles({'background-image':'url(images/arrow_right_green.png)'});
}
function black_arrow(id_name)
{
	$(id_name).setStyles({'background-image':'url(images/arrow_right.png)'});
}
function display_block_switch(id_name1, id_name2, id_name_bg, id_name_bg2)
{
	$(id_name2).setStyles({'display':'none'});
	if($(id_name1).getStyle('display')=="block")
	{
		$(id_name1).setStyles({'display':'none'});
		$(id_name_bg).setStyles({'background-image':'url(images/transparent.png)'});
	}
	else
	{
		$(id_name1).setStyles({'display':'block'});
		$(id_name_bg).setStyles({'background-image':'url(images/transparent2.png)'});
	}
	document.getElementById(id_name_bg2).style.backgroundImage="url(images/transparent.png)";
}

function display_block(id_name)
{
	if($(id_name).getStyle('display')=="block")
	{
		$(id_name).setStyles({'display':'none'});
	}
	else
	{
		$(id_name).setStyles({'display':'block'});
	}
	
}
var cur_sub_list;
var cur_sub_list_li;
var cur_info_no;
var cur_sub_list_no;
function set_cur_content(id_name_info, id_name_ul, id_name_li, list_num, sub_list_num)
{
	cur_info=id_name_info;
	cur_sub_list=id_name_ul;
	cur_sub_list_li=id_name_li;
	cur_info_no=list_num;
	cur_sub_list_no=sub_list_num;
	
}	

function set_bg(url)
{
	var images = [url];
	$('loading_image').setStyles({'display':'block'});
	var loader = new Asset.images(images, {
		onProgress: function() {
			$('loading_image').setStyles({'display':'block'});
		},
		onComplete: function() {
			images.each(function(im) {
				//
				
				var bgfade = new Fx.Tween($('pageBG'), {
					property:'opacity', 
					duration:500, 
					link: 'cancel',
					onComplete: function(){
						$('pageBG').set('text', '');
						new Element('img',{ src:im }).inject($('pageBG'));
						$('loading_image').setStyles({'display':'none'});
						var fadein = new Fx.Tween($('pageBG'), {property:'opacity', duration:500, link: 'cancel'});
						fadein.start(1);
						//alert('fade in');
					}
					});
				bgfade.start(0);
				
				
			});
		}
	});	
}
	
function set_header(text)
{
	$('content_header').set('html',text);
}
function set_content(text)
{
	$('content_desc').set('html',text);
}

//HEADER IMAGES
var thedusunH = '<img alt="" src="images/headlines/dusun.png" />';
var ownerH = '<img alt="" src="images/headlines/temuan.png" />';
var berembunH = '<img alt="" src="images/headlines/berembun.png" />';
var tembusuH = '<img alt="" src="images/headlines/tembusu.png" />';
var lordpatrickH = '<img alt="" src="images/headlines/rumah_emas.png" />';
var cabooseH = '<img alt="" src="images/headlines/caboose.png" />';
var poolH = '<img alt="" src="images/headlines/pool.png" />';
var patioH = '<img alt="" src="images/headlines/patio.png" />';
var housefacilitiesH = '<img alt="" src="images/headlines/facilities.png" />';
var riverH = '<img alt="" src="images/headlines/river.png" />';
var trekkingH = '<img alt="" src="images/headlines/jungle_trekking.png" />';
var museumH = '<img alt="" src="images/headlines/museum.png" />';
var waterfallH = '<img alt="" src="images/headlines/waterfalls.png" />';
var wetmarketH = '<img alt="" src="images/headlines/wetmarket.png" />';
var accomodationsH = '<img alt="" src="images/headlines/accomodations.png" />';
var requestH = '<img alt="" src="images/headlines/special_request.png" />';
var addressH = '<img alt="" src="images/headlines/address.png" />';
var bookingH = '<img alt="" src="images/headlines/booking.png" />';

var thedusun = '<div class="content_descIMG"><img alt="" src="images/content/thedusun.jpg" /></div><div class="content_descTXT">';
thedusun = thedusun + 'Only an hour from Kuala Lumpur is a little-known valley of orchards , orang asli villages and virgin rainforest. The Berembun Forest Reserve is nearly 4,000 acres of protected forest rising to 3,900 feet – still an important source of food and forest products for the Temuan community who live on its fringes.   Tucked into the head of this valley, overlooking the jungle on one side and a wide view of the Mantin hills and Seremban on the other, is the Dusun, a 12 acre tropical orchard.<br />Lovingly developed over 25 years by Helen and David and their family, the Dusun honors the idea of sustainable farming and jungle conservation. Its houses are set to catch the wind and combine elements of both Malay and orang asli style.<br />Visitors to the Dusun will experience a natural environment, shaded by mature trees, where all living things – including the guests - are treated with equal respect.  There are few houses. Each is unique and each is out of sight of the others. Peace, privacy and space are the essence of the Dusun. ';
thedusun = thedusun + '</div>';


var owner = '<div class="content_descIMG"><img alt="" src="images/content/thevillage.jpg" /></div><div class="content_descTXT">'; 
owner = owner + 'Temuan, a proto-Malay group of Orang Asli, live in two villages on the western side of the river. This community was resettled out of the jungle during the Emergency, and still own durian and petai trees inside the reserve. Nowadays, there are around 50 households and around 350 people, with a high proportion of children and youth. Harvesting the jungle is still a vital part of the Temuan economy and lifestyle, but most families also have some rubber trees, and many adults work for cash in nearby farms or in factories near Seremban.  ';
owner = owner + '<br />The Orang Asli are happy to be “modern”, so long as they can retain their own culture and spiritual identity. Their children go to school in Pantai, although not many go on to secondary level. The Orang Asli reserve is used by every household, but it has never been gazetted, and is periodically under threat. The Temuan knowledge of the rainforest is unparalleled and they are proud to share it with visitors.';
owner = owner + ' All the staff on The Dusun come from this community.</div>';

var berembun = '<div class="content_descIMG"><img alt="" src="images/content/berembun.jpg"  /></div><div class="content_descTXT">'
berembun = berembun + 'A Malay-style chalet on stilts, with verandahs on two sides, incorporates carved panels scavenged from old houses and traditional shutter windows. It has one double bed and sleeps two. It looks out onto the rainforest and the orang asli reserve.  It has the most immediate access to the pool and entertainment patio. Guests can get up in the morning and jump directly into the pool from its deck.  It has a luxury bathroom, a kitchenette with cooking facilities and a hanging herb garden.';
berembun = berembun + '</div>';

var tembusu = '<div class="content_descIMG"><img alt="" src="images/content/tembusu.jpg" /></div><div class="content_descTXT">';
tembusu = tembusu + 'The original Dusun house, this is built in the orang asli style, with a deck and a modern bathroom and kitchen. It has one double and one single bed and sleeps three. An extra mattress can be provided. It overlooks the orchard with a view of the Mantin hills.  The deck has a barbeque pit and a herb garden. It is named for the mature tembusu tree which shades it throughout the day and fills it with scent during the flowering season. ';
tembusu = tembusu + '</div>';

var lordpatrick = '<div class="content_descIMG"><img alt="" src="images/content/rumah_emas.jpg" /></div><div class="content_descTXT">';
lordpatrick = lordpatrick + 'A traditional Malay house, which uses recycled timber with original shutter windows and carved panels. Emas has a separate bedroom, as well as a sleeping loft, a living area, kitchen and bathroom. It has two double beds and one single bed and sleeps five. There is a sofa bed for children if needed. Emas has a large open deck for entertaining, with its own barbeque. The house is shaded by trees most of the day and is designed for coolness.  It has a splendid view of hills rolling down to the Sepang coast and is the best place to watch the sunset. Emas is set at the end of a gently sloping path two minutes from the poolside. </div>';

var caboose = '<div class="content_descIMG"><img alt="" src="images/content/caboose.jpg" /></div><div class="content_descTXT">';
caboose = caboose + 'A genuine Kereta Api Tanah Melayu railway carriage, painted in its original silver, and lined inside with fine timber, this is a love nest for the adventurous. It is perched on stilts and looks out to the forest reserve, with a small but immaculate attached bathroom and a kitchen at ground level. The Caboose will be ready soon. <br /><br />Lord Patrick’s House and the Caboose are sited in the Pantai Hills Resort, next door to The Dusun, but have full access to the pool and entertainment patio.</div>';

var pool = '<div class="content_descIMG"><img alt="" src="images/content/pool.jpg" /></div><div class="content_descTXT">An infinity pool 40 feet long, surrounded by timber decking, this is a tranquil setting to swim and unravel.</div>';

var patio = '<div class="content_descIMG"><img alt="" src="images/content/patio.jpg" /></div><div class="content_descTXT">A few steps up from the pool is 800 square feet of entertainment patio, shaded by huge angsana trees and surrounded by lush gardens. The Patio ';
patio = patio + 'has a bathroom, a barbeque and a wine cooler, under a palm roof and plenty of relaxed seating for family groups or larger parties.</div>';

var housefacilities = '<div class="content_descIMG"><img alt="" src="images/content/house_facilities.jpg" /></div><div class="content_descTXT">Each house has the following essentials – a gas cooker, rice cooker and refrigerator. An Ipod station on request. ';
housefacilities = housefacilities + 'Luxury bedlinen and towels. ';
housefacilities = housefacilities + 'A herb garden and a spice rack for gourmet cooks. Cutlery, dishes and cooking utensils. Barbeque charcoal and lighters. ';
housefacilities = housefacilities + 'Mosquito nets are available if needed. Fans, vape mats and the wind are usually enough. ';
housefacilities = housefacilities + 'Organic fruit and vegetables are available in season.<br /><br />';
housefacilities = housefacilities + 'The Dusun provides breakfast; other meals are self catering. Seremban has a vibrant wet market, Jusco ';
housefacilities = housefacilities + 'and Tesco supermarkets and some excellent restaurants. We can provide a list.<br /><br />';
housefacilities = housefacilities + 'The Dusun has liberated itself from TV and air conditioning. ';
housefacilities = housefacilities + 'There are some gentle walking paths around the Dusun connecting each house to the pool.</div>';

var river = '<div class="content_descIMG"><img alt="" src="images/content/river.jpg" /></div><div class="content_descTXT">The Batang Penar river arises in the forest reserve and runs down the valley at the foot of the dusun. There are several swimming spots accessible from the road and some paths into the Orang Asli reserve.</div>';

var trekking = '<div class="content_descIMG"><img alt="" src="images/content/jungle_trekking.jpg" /></div><div class="content_descTXT">Within the Reserve, the Batang Penar is a pristine rush of pools and waterfalls. There is a 45 minute trek on a reasonably easy path to a deep swimming pool and some magical waterfalls. Longer treks to those parts of the forest where petai and durian are harvested, or a trek to the mountain peak, can be arranged with Temuan guides. The Temuan are jungle experts and a walk and talk with any elder is a unique window into their world.</div>';

var museum = '<div class="content_descIMG"><img alt="" src="images/content/museum.jpg" /></div><div class="content_descTXT">In Kuala Klawang, some 25 kilometers from the Dusun on the Jelebu Road, is a four story museum which illustrates the lifestyles and culture of the major races of Malaysia, including the orang asli. The drive is scenic and the museum is even-handed and interesting. Visitors who go on Thursday afternoon, can also take in the weekly night market right next door, which has lots of cooked-on-the-spot local food and fresh produce.</div>';

var waterfall = '<div class="content_descIMG"><img alt="" src="images/content/waterfall.jpg" /></div><div class="content_descTXT">En route to Kuala Klawang is a pretty series of waterfalls, with a park and picnic tables provided for visitors.</div>';

var wetmarket = '<div class="content_descIMG"><img alt="" src="images/content/wet_market.jpg" /></div><div class="content_descTXT">Malaysians will be blasé about this site, but foreigners are recommended to see and smell it! Hundreds of tiny stalls under one roof sell an amazing range of vegetables, spices, fruit, fish, meat and soy products. Many stalls are operated by the same family who farm the produce. It is a noisy, vibrant place and everything is super fresh. Open every day except Tuesday.</div>';

var accomodations = '<table cellpadding="0px" cellspacing="0px" style="width:100%;border:none;color:#000000;">';
accomodations = accomodations + '<tr><td class="chart_1" style="padding-left:1px;">Houses</td>';
accomodations = accomodations + '<td class="chart_1" style="padding-left:8px;">Number of Persons</td>';
accomodations = accomodations + '<td class="chart_1" style="padding-left:8px;">Weekend (Fri-Sun)</td>';
accomodations = accomodations + '<td class="chart_1" style="padding-left:8px;">Weekday (Mon-Thurs)</td>';
accomodations = accomodations + '<td class="chart_1" style="padding-left:8px;" width="150">3 Night Weekday Packages (except public holidays)</td></tr>';
accomodations = accomodations + '<tr><td colspan="4" style="height:10px;display:block;"></td></tr>';
accomodations = accomodations + '<tr><td class="chart_2a">Berembun</td>';
accomodations = accomodations + '<td class="chart_2b">Max 2 Adults</td>';
accomodations = accomodations + '<td class="chart_2b">RM 500</td>';
accomodations = accomodations + '<td class="chart_2b">RM 400</td>';
accomodations = accomodations + '<td class="chart_2b">RM 1000</td></tr>';
accomodations = accomodations + '<tr><td class="chart_2a">Tembusu</td>';
accomodations = accomodations + '<td class="chart_2b">3 Adults (Max 4)</td>';
accomodations = accomodations + '<td class="chart_2b">RM 400</td>';
accomodations = accomodations + '<td class="chart_2b">RM 300</td>';
accomodations = accomodations + '<td class="chart_2b">RM 750</td></tr>';
accomodations = accomodations + '<tr><td class="chart_2a">Emas</td>';
accomodations = accomodations + '<td class="chart_2b">Max 5 Adults</td>';
accomodations = accomodations + '<td class="chart_2b">RM 800<br />(Min 2 nights)</td>';
accomodations = accomodations + '<td class="chart_2b">RM 700</td>';
accomodations = accomodations + '<td class="chart_2b">RM 1800</td></tr>';
accomodations = accomodations + '<tr><td colspan="5" style="height:10px;display:block;"></td></tr>';
accomodations = accomodations + '<tr><td colspan="5" class="chart_1">The Dusun is flexible with regards to numbers of children, but will not accept adult numbers above the maximum. Take a look at the <a href="http://www.facebook.com/thedusun" target="_blank"><font color="#3b5998">Facebook Page</font></a> for special discounts. For photos of these houses please visit our Gallery.</td></tr>';
accomodations = accomodations + '<tr><td colspan="5" style="height:10px;display:block;"></td></tr>';
accomodations = accomodations + '<tr><td colspan="5" style="color:#707070";>Conditions: Chalets should be booked by email. Payment is in advance by bank transfer. Guests are responsible for their own safety. The Dusun does not take any responsibility for misadventure or loss. Checkout is flexible, depending on bookings.<br /><br />The Dusun is the home of Helen and David and is private property. People with bookings or who have made prior arrangement with Helen are welcome. To protect the privacy of ourselves and our guests, we do not accept casual visitors. </td></tr>';
accomodations = accomodations + '</table>';

var request = '<div class="content_descIMG"><img alt="" src="images/content/special.jpg" /></div><div class="content_descTXT">Functions and Parties – Management is pleased to discuss facilitating group functions and parties using the pool and patio.<br /><br />';
request = request + 'The Dusun can recommend an English speaking taxi driver for trips to Seremban, Kuala Klawang, Malacca or elsewhere.';
request = request + '<br /><br />We can arrange for a Temuan jungle expert to guide you into the jungle. Price will depend on the number of trekkers.</div>';

var address = '<div class="content_descIMG"><img alt="" src="images/content/address.jpg" /></div><div class="content_descTXT">The Dusun<br />Kampung Kolam Air<br />Pantai<br />71770 Seremban<br /><br />P.O. Box 149<br />Seremban 70710<br />Negeri Sembilan<br />Malaysia<br /><br />- <a href="downloads/dusun_map.pdf" target="_blank">Download Map & Directions</a><br />- <a href="#" id="gmapsLink2" onclick="gmap()">Find us on Google Maps</a><br /></div>';
var booking = '<div class="content_descIMG"><img alt="" src="images/content/booking.jpg" /></div><div class="content_descTXT">Contact: Helen Todd<br />Tel: (60) 012 616 2585<br />Email: <a href="mailto:hello@thedusun.com.my">hello@thedusun.com.my</a><br /><br />Gift vouchers are also available for sale. <br  /></div>';

function gmap() {
		var bgfade = new Fx.Tween($('pageBG'), {
					property:'opacity', 
					duration:500, 
					link: 'cancel',
					onComplete: function(){
						$('pageBG').set('html', '<div id="map_canvas" style="height: 650px;"></div><div id="showDirections"></div><div id="hideDirections"></div><div id="directionsDIV"><form id="changeLOC" action="" onsubmit="setDir(); return false"><input type="text" size="25" id="fromAddress" class="mapsField" name="from" value="Kuala Lumpur City Centre" title="From" /><input type="text" size="25" id="toAddress" class="mapsField" name="to" value="Kampung Pantai, 70100 Seremban, Negeri Sembilan, Malaysia" title="To" /><input name="submit" type="submit" class="mapsButton" value="Get Directions!" /></form><div id="directions"></div></div>');
						$('map_canvas').setStyles({'width':$('pageBG').getWidth()});
						var thisSlider = new Fx.Slide($('directionsDIV'), { 
							duration: 500, 
							transition: Fx.Transitions.Sine.easeOut
						});
	  					thisSlider.hide();
						$('hideDirections').setStyles({'display':'none'});
						$('showDirections').addEvent( 'click', function(e){ 
							e.stop();
							thisSlider.slideIn();
							
							$('showDirections').setStyles({'display':'none'});
							$('hideDirections').setStyles({'display':'block'});
							$('fromAddress').setStyles({'display':'inline-block'});
							$('toAddress').setStyles({'display':'inline-block'});
						});
						$('hideDirections').addEvent( 'click', function(e){ 
							e.stop();										
							thisSlider.slideOut();
							$('hideDirections').setStyles({'display':'none'});
							$('showDirections').setStyles({'display':'block'});
							$('fromAddress').setStyles({'display':'none'});
							$('toAddress').setStyles({'display':'none'});
						});
						$('changeLOC').addEvent('submit', function(e) {
							e.stop();
							window.setDirections(this.from.value, this.to.value); return false;
							this.send();
						});
						initialize();
						var fadein = new Fx.Tween($('pageBG'), {property:'opacity', duration:500, link: 'cancel'});
						fadein.start(1);
					}
					});
		bgfade.start(0);										  
      
   	};
