// ----------------------------------------------------------------------------
// forms
// ----------------------------------------------------------------------------

/*
 * In-Field Label jQuery Plugin
 * http://fuelyourcoding.com/scripts/infield.html
 *
 * Copyright (c) 2009 Doug Neiner
 * Dual licensed under the MIT and GPL licenses.
 * Uses the same license as jQuery, see:
 * http://docs.jquery.com/License
 *
 * @version 0.1
 */
(function($){$.InFieldLabels=function(b,c,d){var f=this;f.$label=$(b);f.label=b;f.$field=$(c);f.field=c;f.$label.data("InFieldLabels",f);f.showing=true;f.init=function(){f.options=$.extend({},$.InFieldLabels.defaultOptions,d);if(f.$field.val()!=""){f.$label.hide();f.showing=false};f.$field.focus(function(){f.fadeOnFocus()}).blur(function(){f.checkForEmpty(true)}).bind('keydown.infieldlabel',function(e){f.hideOnChange(e)}).change(function(e){f.checkForEmpty()}).bind('onPropertyChange',function(){f.checkForEmpty()})};f.fadeOnFocus=function(){if(f.showing){f.setOpacity(f.options.fadeOpacity)}};f.setOpacity=function(a){f.$label.stop().animate({opacity:a},f.options.fadeDuration);f.showing=(a>0.0)};f.checkForEmpty=function(a){if(f.$field.val()==""){f.prepForShow();f.setOpacity(a?1.0:f.options.fadeOpacity)}else{f.setOpacity(0.0)}};f.prepForShow=function(e){if(!f.showing){f.$label.css({opacity:0.0}).show();f.$field.bind('keydown.infieldlabel',function(e){f.hideOnChange(e)})}};f.hideOnChange=function(e){if((e.keyCode==16)||(e.keyCode==9))return;if(f.showing){f.$label.hide();f.showing=false};f.$field.unbind('keydown.infieldlabel')};f.init()};$.InFieldLabels.defaultOptions={fadeOpacity:0.5,fadeDuration:300};$.fn.inFieldLabels=function(c){return this.each(function(){var a=$(this).attr('for');if(!a)return;var b=$("input#"+a+"[type='text'],"+"input#"+a+"[type='password'],"+"textarea#"+a);if(b.length==0)return;(new $.InFieldLabels(this,b[0],c))})}})(jQuery);

/* jQuery Elastic http://www.unwrongest.com/projects/elastic/ */
(function(jQuery){jQuery.fn.extend({elastic:function(){var mimics=['paddingTop','paddingRight','paddingBottom','paddingLeft','fontSize','lineHeight','fontFamily','width','fontWeight'];return this.each(function(){if(this.type!='textarea'){return false;}
var $textarea=jQuery(this),$twin=jQuery('<div />').css({'position':'absolute','display':'none','word-wrap':'break-word'}),lineHeight=parseInt($textarea.css('line-height'),10)||parseInt($textarea.css('font-size'),'10'),minheight=parseInt($textarea.css('height'),10)||lineHeight*3,maxheight=parseInt($textarea.css('max-height'),10)||Number.MAX_VALUE,goalheight=0,i=0;if(maxheight<0){maxheight=Number.MAX_VALUE;}
$twin.appendTo($textarea.parent());var i=mimics.length;while(i--){$twin.css(mimics[i].toString(),$textarea.css(mimics[i].toString()));}
function setHeightAndOverflow(height,overflow){curratedHeight=Math.floor(parseInt(height,10));if($textarea.height()!=curratedHeight){$textarea.css({'height':curratedHeight+'px','overflow':overflow});}}
function update(){var textareaContent=$textarea.val().replace(/&/g,'&amp;').replace(/  /g,'&nbsp;').replace(/<|>/g,'&gt;').replace(/\n/g,'<br />');var twinContent=$twin.html();if(textareaContent+'&nbsp;'!=twinContent){$twin.html(textareaContent+'&nbsp;');if(Math.abs($twin.height()+lineHeight-$textarea.height())>3){var goalheight=$twin.height()+lineHeight;if(goalheight>=maxheight){setHeightAndOverflow(maxheight,'auto');}else if(goalheight<=minheight){setHeightAndOverflow(minheight,'hidden');}else{setHeightAndOverflow(goalheight,'hidden');}}}}
$textarea.css({'overflow':'hidden'});$textarea.keyup(function(){update();});$textarea.live('input paste',function(e){setTimeout(update,250);});update();});}});})(jQuery);

/* TextLimit - jQuery plugin for counting and limiting characters for input and textarea fields
 * pass '-1' as speed if you don't want slow char deletion effect. (don't just put 0)
 * Example: jQuery("Textarea").textlimit('span.counter',256)
 * $Version: 2007.10.24 +r1
 * Copyright (c) 2007 Yair Even-Or
 */
jQuery.fn.textlimit=function(counter_el, thelimit, speed) {
	var charDelSpeed = speed || 15;
	var toggleCharDel = speed != -1;
	var toggleTrim = true;	
	var that = this[0];
	updateCounter();	
	function updateCounter(){jQuery(counter_el).text(thelimit - that.value.length);};	
	this.keypress (function(e){if( this.value.length >= thelimit && e.charCode != '0' ) e.preventDefault()})
	.keyup (function(e){
		updateCounter();
		if( this.value.length >= thelimit && toggleTrim ){
			if(toggleCharDel){
				// first, trim the text a bit so the char trimming won't take forever
				that.value = that.value.substr(0,thelimit+100);
				var init = setInterval
					(function(){if(that.value.length <= thelimit){init = clearInterval(init);updateCounter()}
					else{that.value=that.value.substring(0,that.value.length-1);jQuery(counter_el).text('trimming...  '+(thelimit - that.value.length));};
						} ,charDelSpeed 
					);}
			else this.value = that.value.substr(0,thelimit);}
	});	
};

// ----------------------------------------------------------------------------
// links and popups
// ----------------------------------------------------------------------------

// open external links in a new window ("target" is not valid XHTML strict) - will be called on all pages
function externallinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		anchor.tabindex = i;
		if (anchor.getAttribute("href")) {
			if (anchor.getAttribute("rel") == "external")
				anchor.target = "_blank";
			else if (anchor.getAttribute("rel") == "parent")
				anchor.target = "_parent";
			else if (anchor.getAttribute("rel") == "top")
				anchor.target = "_top";
			else if (anchor.getAttribute("rel") == "popup")
                $('a[rel="popup"]').click(function(){return $.dbPopWin( $(this).attr('href'));}
				);	
		}
	}
}
jQuery.fn.popupwindow = function(p)
{
	var profiles = p || {};
	return this.each(function(index){
		var settings, parameters, mysettings, b, a;
		// for overrideing the default settings
		mysettings = (jQuery(this).attr("rel") || "").split(",");
		settings = {
			height:600, // sets the height in pixels of the window.
			width:600, // sets the width in pixels of the window.
			toolbar:0, // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}.
			scrollbars:0, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}.
			status:0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}.
			resizable:1, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable.
			left:0, // left position when the window appears.
			top:0, // top position when the window appears.
			center:0, // should we center the window? {1 (YES) or 0 (NO)}. overrides top and left
			createnew:1, // should we create a new window for each occurance {1 (YES) or 0 (NO)}.
			location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}.
			menubar:0 // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}.
		};
		// if mysettings length is 1 and not a value pair then assume it is a profile declaration
		// and see if the profile settings exists
		if(mysettings.length == 1 && mysettings[0].split(":").length == 1)
		{
			a = mysettings[0];
			// see if a profile has been defined
			if(typeof profiles[a] != "undefined")
			{
				settings = jQuery.extend(settings, profiles[a]);
			}
		}
		else
		{
			// overrides the settings with parameter passed in using the rel tag.
			for(var i=0; i < mysettings.length; i++)
			{
				b = mysettings[i].split(":");
				if(typeof settings[b[0]] != "undefined" && b.length == 2)
				{
					settings[b[0]] = b[1];
				}
			}
		}
		// center the window
		if (settings.center == 1)
		{
			settings.top = (screen.height-(settings.height + 110))/2;
			settings.left = (screen.width-settings.width)/2;
		}
		parameters = "location=" + settings.location + ",menubar=" + settings.menubar + ",height=" + settings.height + ",width=" + settings.width + ",toolbar=" + settings.toolbar + ",scrollbars=" + settings.scrollbars  + ",status=" + settings.status + ",resizable=" + settings.resizable + ",left=" + settings.left  + ",screenX=" + settings.left + ",top=" + settings.top  + ",screenY=" + settings.top;
		jQuery(this).bind("click", function(){
			var name = settings.createnew ? "PopUpWindow" + index : "PopUpWindow";
			window.open(this.href, name, parameters).focus();
			return false;
		});
	});
};
// ----------------------------------------------------------------------------
// get url parameters
// ----------------------------------------------------------------------------

/* Copyright (c) 2006-2007 Mathias Bank (http://www.mathias-bank.de)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * 
 * Version 2.1
 * 
 * Thanks to 
 * Hinnerk Ruemenapf - http://hinnerk.ruemenapf.de/ for bug reporting and fixing.
 * Tom Leonard for some improvements
 * 
 */
jQuery.fn.extend({
/**
* Returns get parameters.
*
* If the desired param does not exist, null will be returned
*
* To get the document params:
* @example value = $(document).getUrlParam("paramName");
* 
* To get the params of a html-attribute (uses src attribute)
* @example value = $('#imgLink').getUrlParam("paramName");
*/ 

getUrlParam: function(strParamName){
	  strParamName = escape(unescape(strParamName));	  
	  var returnVal = new Array();
	  var qString = null;	  
	  if ($(this).attr("nodeName")=="#document") {
	  	//document-handler		
		if (window.location.search.search(strParamName) > -1 ){			
			qString = window.location.search.substr(1,window.location.search.length).split("&");
		}			
	  } else if ($(this).attr("src")!="undefined") {	  	
	  	var strHref = $(this).attr("src")
	  	if ( strHref.indexOf("?") > -1 ){
	    	var strQueryString = strHref.substr(strHref.indexOf("?")+1);
	  		qString = strQueryString.split("&");
	  	}
	  } else if ($(this).attr("href")!="undefined") {
	  	var strHref = $(this).attr("href")
	  	if ( strHref.indexOf("?") > -1 ){
	    	var strQueryString = strHref.substr(strHref.indexOf("?")+1);
	  		qString = strQueryString.split("&");
	  	}
	  } else {
	  	return null;
	  }	  
	  if (qString==null) return null;	  
	  for (var i=0;i<qString.length; i++){
			if (escape(unescape(qString[i].split("=")[0])) == strParamName){
				returnVal.push(qString[i].split("=")[1]);
			}
			
	  }	  
	  if (returnVal.length==0) return null;
	  else if (returnVal.length==1) return returnVal[0];
	  else return returnVal;
	}
});

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

/*
 * Special event for image load events
 * Needed because some browsers do not trigger events on cached images.

 * MIT License
 * Paul Irish     | @paul_irish | www.paulirish.com
 * Andree Hansson | @peolanha   | www.andreehansson.se
 * 2010.
 *
 * Usage:
 * $(images).bind('load', function (e) {
 *   // Do stuff on load
 * });
 * 
 * Note that you can bind the 'error' event on data uri images, this will trigger when
 * data uri images isn't supported.
 * 
 * Tested in:
 * FF 3+
 * IE 6-8
 * Chromium 5-6
 * Opera 9-10
 */
(function ($) {
	$.event.special.load = {
		add: function (hollaback) {
			if ( this.nodeType === 1 && this.tagName.toLowerCase() === 'img' && this.src !== '' ) {
				// Image is already complete, fire the hollaback
				// (fixes browser issues where cached images aren't triggering the load event)
				if ( this.complete || this.readyState === 4 ) {
					hollaback.handler.apply(this);
				}

				// Check if data URI images is supported, fire 'error' event if not
				else if ( this.readyState === 'uninitialized' && this.src.indexOf('data:') === 0 ) {
					$(this).trigger('error');
				}
				
				else {
					$(this).bind('load', hollaback.handler);
				}
			}
		}
	};
}(jQuery));


/*****
 * Copyright FASTBOOKING  1999-2007
 * 20/02/2008
 *
 * Please do NOT modify this file
 * Please do NOT use the final IP adress for Fastbooking links:
 *   IP address may be changed at any time
 *
*/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('6 A="3j://3i.3g.3k/3l/";6 2U=7;6 2V=w 3p();2V.20=A+"3e.21";9 3m(){6 1j=[31,28,31,30,31,30,31,31,30,31,30,31];2z();1f=w 24();1c=1f.3n();3r=1f.3b();U=1f.36();1r=1s(1f);r=1r;1c+=2U;4(1c>1j[U]){1c-=1j[U];U++;4(U>11){1r++;U=0}}14=1c-1;1a=U;1z=1r-r;4(14<0||14>30)14=0;4(1a<0||1a>11)1a=0;4(1z<0||1z>1)14=0;e.f.1o.R=14;e.f.1n.R=1a;e.f.X.R=1z;2x()}9 3L(h,8,o,b,d){10(h,8,o,"","",b,d,"","")}9 3I(h,8,t){10(h,8,"3M","","","","",t,"")}9 3P(h,8,o,b,d){10(h,8,o,"","",b,d,"","2O=3F")}9 3x(h,8,o,b,d){10(h,8,o,"","",b,d,"","3u=1")}9 3y(h,8,o,19,b,z){10(h,8,o,19,z,b,"","","2O=1Q")}9 3z(d,8,q,p,n){V(d,8,q,p,n,"","")}9 3E(d,8,q,b,n){4(b!="")g="&1R="+b;W g="";V(d,8,q,"",n,"",g)}9 3D(d,q,p,n,z){6 g="";4(z!="")g="1S="+z;V(d,"",q,p,n,"",g)}9 3C(d,8,q,b,p,n,z){6 g="";4(b!="")g="1R="+b;4(z!="")g+="&1S="+z;V(d,8,q,p,n,"",g)}9 3K(d,8,t){V(d,8,"","","",t,"")}9 3B(d,8,q,b,2G,2N,2r){6 g="3A="+1u(2G)+";"+2N+";"+2r;4(b!="")g+="&1R="+b;V(d,8,q,"","","",g)}9 2h(h,8){6 5=A+"3t.I?3v=3w&T="+h;4(8!="")5+="&j="+8;s.E(5,"1Z","L=k,F=2L,D=2E,H=k,M=c,N=c,J=c")}9 2o(h,8){6 5=A+"2e.I?T="+h+"&j="+8;s.E(5,\'2e\',\'L=k,F=3G,D=3O,H=k,M=c,N=c,J=c\');v P}9 3Q(h,8){6 5=A+"1m.I?18="+h;4(8!="")5+="&j="+8;5+="&3R=1";s.E(5,"1y","L=k,F=1b,D=1g,H=k,M=c,N=c,J=c")}6 Q="";6 u="";9 3N(2g,S){Q=2g;u=S}9 10(h,8,o,19,z,b,d,t,g){6 5=A+"3J.I?T="+h;4(8!="")5+="&j="+8;4(19!=""){5+="&3s="+19;4(o=="")o="1Q"}4(z!=""){5+="&1S="+z;4(o=="")o="1Q"}4(o!="")5+="&2D="+o;4(b!="")5+="&1w="+b;4(d!="")5+="&37="+d;4(t!="")5+="&t="+t;4(g!=""&&(g.2w("=")!=-1))5+="&"+g;4(u!=""){5+="&13="+Q;5+="&S="+u}5+="&3c="+1u(e.3d.35);s.E(5,"1Z","L=k,F=2L,D=2E,H=k,M=c,N=c,J=c")}9 V(d,8,q,p,n,t,g){6 5=A+"1m.I?18="+d;4(8!="")5+="&j="+8;4(q!="")5+="&2D="+q;4(p!="")5+="&p="+p;4(n!="")5+="&n="+1u(n);4(t!="")5+="&t="+t;4(g!=""&&(g.2w("=")!=-1))5+="&"+g;4(u!=""){5+="&13="+Q;5+="&S="+u}s.E(5,"1y","L=k,F=1b,D=1g,H=k,M=c,N=c,J=c")}9 3q(d,8,1M,n,b){6 5=A+"1m.I?18="+d;4(8!="")5+="&j="+8;4(1M!="")5+="&2H="+1M;4(n!="")5+="&n="+1u(n);4(b!="")5+="&1w="+b;5+="&1e=3f";4(u!=""){5+="&13="+Q;5+="&S="+u}s.E(5,"1y","L=k,F=1b,D=1g,H=k,M=c,N=c,J=c")}9 3h(d,8,b,1e){6 5=A+"1m.I?18="+d;4(8!="")5+="&j="+8;4(b!="")5+="&1w="+b;4(1e!="")5+="&1e="+1e;4(u!=""){5+="&13="+Q;5+="&S="+u}s.E(5,"1y","L=k,F=1b,D=1g,H=k,M=c,N=c,J=c")}9 4O(h,8,b,1N,1O,1T,p,1U){6 5=A+"2i.I?18="+h+"&T="+h;4(8!="")5+="&j="+8;4(b!="")5+="&1w="+b;4(1N!="")5+="&X="+1N;4(1O!="")5+="&1n="+1O;4(1T!="")5+="&1o="+1T;4(p!="")5+="&4E="+p;4(1U!="")5+="&4A="+1U;5+="&3T=3";4(u!=""){5+="&13="+Q;5+="&S="+u}s.E(5,"1Z","L=k,F=4C,D=4B,H=k,M=c,N=c,J=c")}9 4w(l){2F(l,0)}9 2F(l,2u){4(2u==1&&l.2H.m==""){1V("4v 4x 4y 4J 4z 13 4P");v(P)}6 17=1X l.2k;l.2k=A+"2i.I";l.4U();v(1d)}9 4T(l){1Y=l.2j.R;4(1Y==O)v;l.T.m=l.2j.1i[1Y].m}9 4Q(l){6 C=l.T.m;6 17=1X l.j;6 j;4(17=="2f")j="";W j=l.j.m;4(C==O||C==\'2t\'||C==\'\'){1V(\'2l 2q a 2m 2n\');v(P)}v 2h(C,j)}9 4L(l){6 C=l.T.m;6 17=1X l.j;6 j;4(17=="2f")j="";W j=l.j.m;4(C==O||C==\'2t\'||C==\'\'){1V(\'2l 2q a 2m 2n\');v(P)}v 2o(C,j)}9 2y(B){1W(4u.e,B)}9 46(B){1W(s.45.e,B);s.44()}9 1W(Z,B){Z.f.j.m=B;6 1v=2T(B);4(1v!=""){6 1l=Z.2Z;4(1l!=O)Z.2Z.20="1I/1H/"+1v+".21";6 1l=Z.33;4(1l!=O)Z.33.20="1I/1H/"+1v+"8.21"}}6 1G=w 1J("23","1F","1D","1L","1C","1K","1B","2S","2Q","2P","2W","34","2R","2Y","25","2d","1P","1E","1A","2b","2a","26");6 32=w 1J("43","1F","1D","1L","1C","1K","1B","42","3W","3V","3U","3X","3Y","41","25","2d","1P","1E","1A","2b","2a","26");9 2T(B){2K(i=0;i<1G.29;i++){4(1G[i]==B)2v}v 32[i]}9 40(){s.E(\'1I/1H/4b.4c\',\'\',\'F=4o,D=4n\')}6 1h=w 1J("4p","23","4q","1F","4s","1D","4l","1L ","4k","1C","4e","1K","4d","1B","4h","1A ","4j","1E","4D","1P","4i","2d","4g","2S","4f","2R","4r","25","4m","2Y","3Z","2Q","49","2P","4a","2W","k","34","48","2b","47","2a","4t","26","4N","4M");9 4K(){4(1k.2J=="4V 4R 4S")22=1k.4I.4H(0,2);W 4(1k.2J=="4G")22=1k.4F;W v;2K(i=0;i<1h.29;i+=2)4(22==1h[i])2v;B=(i<1h.29)?1h[i+1]:"23";2y(B)}9 2z(){6 1p=w 24();6 r=1s(1p);2C=w 1x(r,r,1d,1d);e.f.X.1i[0]=2C;4(e.f.15!=O){2B=w 1x(r,r,1d,1d);e.f.15.1i[0]=2B}2A=w 1x(r+1,r+1,P,P);e.f.X.1i[1]=2A;2p=w 1x(r+1,r+1,P,P);4(e.f.15!=O){e.f.15.1i[1]=2p}}9 1t(){4(e.f.1q!=O){6 1j=[31,28,31,30,31,30,31,31,30,31,30,31];6 Y=G(e.f.1o.m)+1;6 K=G(e.f.1n.m);6 16=G(e.f.X.m);4(Y>1j[K-1]){Y=1;K+=1;4(K>12){K=1;16+=1}}6 1p=w 24();6 r=1s(1p);e.f.1q.R=Y-1;e.f.2I.R=K-1;e.f.15.R=16-r}}9 2x(){4(e.f.1q!=O){6 Y=G(e.f.1o.m)+1;6 K=G(e.f.1n.m);6 16=G(e.f.X.m);6 2M=G(e.f.1q.m)+1;6 2c=G(e.f.2I.m);6 27=G(e.f.15.m);4(27<16){1t()}W{4(27==16){4(2c<K){1t()}W{4(2c==K){4(2M<=Y){1t()}}}}}}}9 1s(2s){x=2s.3H();6 y=x%3S;y+=(y<38)?3o:39;v y}9 3a(2X){s.E(2X,"","L=k,F=1b,D=1g,H=k,M=c,N=c,J=c")}',62,306,'||||if|waction|var||lg|function||codetrack|yes|cluster|document|idForm|args|cname||langue|no|myForm|value|title|codeprice|nights|price|cur_year|window|theme|FB_profil|return|new|||firstdate|FBRESA|lang|CName|height|open|width|parseInt|menubar|phtml|alwaysRaised|ar_month|toolbar|scrollbars|resizable|null|false|FB_code_interface|selectedIndex|profil|Hotelnames|amois|hhotelSearch|else|fromyear|ar_day|mydoc|hhotelResa|||code|indexDay|toyear|ar_year|languetype|clusterName|firstroom|indexMois|800|nday|true|crossSelling|MD|550|langcodes|options|nbm|navigator|formFlag|crs|frommonth|fromday|cur_date|today|ayear|takeYear|check_departure|escape|imgLang|FSTBKNGTrackLink|Option|search|indexYear|japan|nether|portuguese|germany|coreen|france|FBLangCode|flags|fastbooking|Array|italy|spain|clecode|year|month|china|DIRECT|from|FirstDate|day|currency|alert|hhotelShowLang__|typeof|menuNum|reservation|src|gif|UL|uk|Date|greek|poland|de_year||length|czech|croate|de_month|arab|getresa|undefined|code_interface|hhotelcancel|dispoprice|HotelList|action|Please|hotel|first|hhotelExtract|next_yb|select|extrashow|theDate|All|mandatoryCode|break|indexOf|update_departure|hhotelShowLang|build_year_select|next_y|cur_yb|cur_y|FSTBKNGCode|350|hhotelFormValidation|extratitle|AccessCode|tomonth|appName|for|400|de_day|extraval|style|svensk|dansk|turk|russian|hhotelLang2Img|FB_nb_day_delay|FB_book_image|islensk|url|hungria|selLgFlag|||FBLangImg|selLgTxt|norsk|href|getMonth|clustername||1900|popup|getDay|HTTP_REFERER|location|trans|NO|fastbookings|hhotelSearchCrossSell|www|http|biz|DIRECTORY|start|getDate|2000|Image|hhotelSearchMultCode|aday|FirstRoomName|cancel|negociated|state|77|hhotelNegociated|hhotelResaDirect|hhotelSearchGroup|Extrafield|hhotelSearchExtra|hhotelSearchPriceDateTrack|hhotelSearchPriceDate|hhotelSearchPartner|DIRECTPROMO|700|getYear|hhotelPromo|preresa|hhotelSearchPromo|hhotelPTC|DYNPROMO|hhotelProfil|300|hhotelOnePromo|hhotelcheckrates|checkPromo|100|showPromotions|iceland|sweeden|denmark|norway|turkey|da|hhotelLangSelector|hungary|russia|grandbret|close|opener|hhotelShowLangOpener|cs|hr|sv|is|langSelector|html|nl|it|tr|ru|ja|ar|ko|pt|es|hu|180|330|en|fr|el|de|pl|this|You|hhotelDispoprice|must|type|your|CurrencyLabel|600|750|zh|nbdays|language|Netscape|substring|userLanguage|in|selectLang|hhotelFormExtract|hebrew|iw|hhotelDispopriceFHP|ID|hhotelFormCancel|Internet|Explorer|hhotelFormUpdateHotelnames|submit|Microsoft'.split('|'),0,{}))

// move Shadowbox "close" button top right
function moveCloseLink(){ 
    var cb=document.getElementById('sb-nav-close'); 
    var tb=document.getElementById('sb-title'); 
    if(tb) tb.appendChild(cb); 
}

// slideshow (jQuery Cycle)
function slideshowCycle() {
	$('#slideshow').slideDown(500);
	$('#slideshow li:first').fadeIn(1000,function() {
	        $('#slides').after('<div id="slidesnav">') 
.cycle({fx:'fade',pause:1,timeout:4000,speed:500,prev:'#prevslide',next:'#nextslide',pager:'#slidesnav'});
	});
	$('#slideshow').hover(
	        function() {$('#slideshowcontrols,#slidesnav').fadeIn();},
	        function() {$('#slideshowcontrols,#slidesnav').fadeOut();}
	);
}
// Siem Reap: Map help
function maphelptoggle() {
	if ($('#maphelp').attr('openstate')=='open'){
		$('#maphelp').hide('slide',{direction:'down'},500).attr({openstate:'closed'});
	};
}

// If JavaScript is on, replace html class="nojs" by class="js" (allows styling that prevents FOUC)
(function(B,C){B[C]=B[C].replace(/\bnojs\b/,'js')})(document.documentElement,'className');

// ----------------------------------------------------------------------------
// PAGE OPEN & CLOSE (functions called on all pages)
// ----------------------------------------------------------------------------
function pageOpen() {
	$('#navigation').show();
	ddsmoothmenu.init({mainmenuid:'navigation',orientation:'v',classname:'ddsmoothmenu-v',contentsource:'markup'});
	ddsmoothmenu.init({mainmenuid:'topnav',orientation:'h',classname:'ddsmoothmenu',contentsource:'markup'});
	// Cufon headings, navigation and buttons
	Cufon.replace('h2',{textShadow:'1px 1px 1px #ccc'});
	Cufon.replace('h3',{textShadow:'1px 1px 1px #fff'});
	Cufon.replace('h4');
	Cufon.replace('h5');
	Cufon.replace('h6');
	Cufon.replace('#topnav a',{hover:true});
	Cufon.replace('#navigation a',{hover:true});
};
function pageClose() {
	$('.button-ui').button();
	$('#panel').attr({openstate:'closed'});
	// Booking Enquiry
	$('#launch_booking_enquiry').click(function(evt) {
		evt.preventDefault();
		try {
			if ($('#panel').attr('openstate')=='closed'){
				$('#panel').slideDown('slow').attr({openstate:'open'});
				$('#panel #loading').fadeIn(500);
				var url = this.href;
				url += (url.indexOf('?') == -1 ? '?' : '&') + 'formonly=1';
				$('#panel').load(url);
				$('#launch_booking_enquiry_text').hide();
				$('#launch_booking_enquiry_close').show();
				$(this).addClass('close_panel');
				$('#panel #loading').fadeOut(500);
				Cufon.refresh();
				//return false;
			}
			else {
				$('#panel').slideUp('slow').attr({openstate:'closed'});;
				$(this).removeClass('close_panel');
				$('#launch_instant_booking').removeClass('close_panel');
				$('#launch_booking_enquiry_text').show();
				$('#launch_booking_enquiry_close').hide();
				$('#launch_instant_booking_text').show();
				$('#launch_instant_booking_close').hide();
				Cufon.refresh();
				//return false;
			};
		}
		catch(err) {return true;}	
	});
	// Instant Booking
	$('#launch_instant_booking').click(function(evt) {
	evt.preventDefault();
	try
		{
		if ($('#panel').attr('openstate')=='closed'){
			$('#panel').slideDown('slow').attr({openstate:'open'});
			$('#panel #loading').fadeIn(500);
			var url = this.href;
				url += (url.indexOf('?') == -1 ? '?' : '&') + 'formonly=1';
			$('#panel').load(url);
			$('#launch_instant_booking_text').hide();
			$('#launch_instant_booking_close').show();
			$(this).addClass('close_panel');
			$('#panel #loading').fadeOut(500);
			Cufon.refresh();
			// return false;
		}
		else {
			$('#panel').slideUp('slow').attr({openstate:'closed'});
			$(this).removeClass('close_panel');
			$('#launch_booking_enquiry').removeClass('close_panel');
			$('#launch_booking_enquiry_text').show();
			$('#launch_booking_enquiry_close').hide();
			$('#launch_instant_booking_text').show();
			$('#launch_instant_booking_close').hide();
			Cufon.refresh();
			return false;
		};
		}
		catch(err) {return true;}
	});
	Cufon.now(); /* avoid flash of unstyled content with IE */
};

// POPUPS
function popupOpen() {
	// Cufon headings, navigation and buttons
	Cufon.replace('h2',{textShadow:'1px 1px 1px #000'});
	Cufon.replace('h3',{textShadow:'1px 1px 1px #fff'});
	Cufon.replace('h4');
	Cufon.replace('h5');
	Cufon.replace('h6');
};
function popupClose() {
	Cufon.now(); /* avoid flash of unstyled content with IE */
};

// OVERLAYS
function overlayOpen() {
	// Cufon headings, navigation and buttons
	Cufon.replace('h2',{textShadow:'1px 1px 1px #ccc'});
	Cufon.replace('h3',{textShadow:'1px 1px 1px #fff'});
	Cufon.replace('h4');
	Cufon.replace('h5');
	Cufon.replace('h6');
	};
function overlayClose() {
	Cufon.now(); /* avoid flash of unstyled content with IE */
};
