(function($) {

	/**
	 * helper variables and function
	 */
	$.ifixpng = function(customPixel) {
		$.ifixpng.pixel = customPixel;
	};

	$.ifixpng.getPixel = function() {
		return $.ifixpng.pixel || 'images/pixel.gif';
	};

	var hack = {
		ltie7  : $.browser.msie && $.browser.version < 7,
		filter : function(src) {
			return "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+src+"')";
		}
	};

	/**
	 * Applies ie png hack to selected dom elements
	 *
	 * $('img[@src$=.png]').ifixpng();
	 * @desc apply hack to all images with png extensions
	 *
	 * $('#panel, img[@src$=.png]').ifixpng();
	 * @desc apply hack to element #panel and all images with png extensions
	 *
	 * @name ifixpng
	 */

	$.fn.ifixpng = hack.ltie7 ? function() {
    	return this.each(function() {
			var $$ = $(this);
			// in case rewriting urls
			var base = $('base').attr('href');
			if (base) {
				// remove anything after the last '/'
				base = base.replace(/\/[^\/]+$/,'/');
			}
			if ($$.is('img') || $$.is('input')) { // hack image tags present in dom
				if ($$.attr('src')) {
					if ($$.attr('src').match(/.*\.png([?].*)?$/i)) { // make sure it is png image
						// use source tag value if set
						var source = (base && $$.attr('src').search(/^(\/|http:)/i)) ? base + $$.attr('src') : $$.attr('src');
						// apply filter
						$$.css({filter:hack.filter(source), width:$$.width(), height:$$.height()})
						  .attr({src:$.ifixpng.getPixel()})
						  .positionFix();
					}
				}
			} else { // hack png css properties present inside css
				var image = $$.css('backgroundImage');
				if (image.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)) {
					image = RegExp.$1;
					image = (base && image.substring(0,1)!='/') ? base + image : image;
					$$.css({backgroundImage:'none', filter:hack.filter(image)})
					  .children().children().positionFix();
				}
			}
		});
	} : function() { return this; };

	/**
	 * Removes any png hack that may have been applied previously
	 *
	 * $('img[@src$=.png]').iunfixpng();
	 * @desc revert hack on all images with png extensions
	 *
	 * $('#panel, img[@src$=.png]').iunfixpng();
	 * @desc revert hack on element #panel and all images with png extensions
	 *
	 * @name iunfixpng
	 */

	$.fn.iunfixpng = hack.ltie7 ? function() {
    	return this.each(function() {
			var $$ = $(this);
			var src = $$.css('filter');
			if (src.match(/src=["']?(.*\.png([?].*)?)["']?/i)) { // get img source from filter
				src = RegExp.$1;
				if ($$.is('img') || $$.is('input')) {
					$$.attr({src:src}).css({filter:''});
				} else {
					$$.css({filter:'', background:'url('+src+')'});
				}
			}
		});
	} : function() { return this; };

	/**
	 * positions selected item relatively
	 */

	$.fn.positionFix = function() {
		return this.each(function() {
			var $$ = $(this);
			var position = $$.css('position');
			if (position != 'absolute' && position != 'relative') {
				$$.css({position:'relative'});
			}
		});
	};

})(jQuery);

var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var t=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AB=[0,0,0],w=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){w=T.plugins[n].description;if(w&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){w=w.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AB[0]=parseInt(w.replace(/^(.*)\..*$/,"$1"),10);AB[1]=parseInt(w.replace(/^.*\.(.*)\s.*$/,"$1"),10);AB[2]=/r/.test(w)?parseInt(w.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var x=null,AA=false;try{x=new ActiveXObject(p+".7")}catch(s){try{x=new ActiveXObject(p+".6");AB=[6,0,21];x.AllowScriptAccess="always"}catch(s){if(AB[0]==6){AA=true}}if(!AA){try{x=new ActiveXObject(p)}catch(s){}}}if(!AA&&x){try{w=x.GetVariable("$version");if(w){w=w.split(" ")[1].split(",");AB=[parseInt(w[0],10),parseInt(w[1],10),parseInt(w[2],10)]}}catch(s){}}}}var AC=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),z=/webkit/.test(AC)?parseFloat(AC.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,y=r?/win/.test(r):/win/.test(AC),v=r?/mac/.test(r):/mac/.test(AC);if(navigator.appName&&navigator.appName.indexOf("Internet Explorer")!=-1){q=true;y=true}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Mac")!=-1){v=true}}return{w3cdom:t,pv:AB,webkit:z,ie:q,win:y,mac:v}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var s=N.length;for(var q=0;q<s;q++){var t=N[q].id;if(h.pv[0]>0){var r=C(t);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(t,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(t,true)}}}function Y(s){var q=s.getElementsByTagName(Q)[0];if(q){var v=a("embed"),x=q.attributes;if(x){var u=x.length;for(var t=0;t<u;t++){if(x[t].nodeName=="DATA"){v.setAttribute("src",x[t].nodeValue)}else{v.setAttribute(x[t].nodeName,x[t].nodeValue)}}}var w=q.childNodes;if(w){var y=w.length;for(var r=0;r<y;r++){if(w[r].nodeType==1&&w[r].nodeName=="PARAM"){v.setAttribute(w[r].getAttribute("name"),w[r].getAttribute("value"))}}}s.parentNode.replaceChild(v,s)}}function k(v){A=true;var t=C(v.id);if(t){if(v.altContentId){var x=C(v.altContentId);if(x){M=x;l=v.altContentId}}else{M=G(t)}if(!(/%$/.test(v.width))&&parseInt(v.width,10)<310){v.width="310"}if(!(/%$/.test(v.height))&&parseInt(v.height,10)<137){v.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var y=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+y+"&MMdoctitle="+q,w=v.id;if(h.ie&&h.win&&t.readyState!=4){var s=a("div");w+="SWFObjectNew";s.setAttribute("id",w);t.parentNode.insertBefore(s,t);t.style.display="none";var u=function(){t.parentNode.removeChild(t)};I(j,"onload",u)}U({data:v.expressInstall,id:m,width:v.width,height:v.height},{flashvars:r},w)}}function O(s){if(h.ie&&h.win&&s.readyState!=4){var r=a("div");s.parentNode.insertBefore(r,s);r.parentNode.replaceChild(G(s),r);s.style.display="none";var q=function(){s.parentNode.removeChild(s)};I(j,"onload",q)}else{s.parentNode.replaceChild(G(s),s)}}function G(u){var t=a("div");if(h.win&&h.ie){t.innerHTML=u.innerHTML}else{var r=u.getElementsByTagName(Q)[0];if(r){var v=r.childNodes;if(v){var q=v.length;for(var s=0;s<q;s++){if(!(v[s].nodeType==1&&v[s].nodeName=="PARAM")&&!(v[s].nodeType==8)){t.appendChild(v[s].cloneNode(true))}}}}}return t}function U(AF,AD,s){var q,u=C(s);if(u){if(typeof AF.id==b){AF.id=s}if(h.ie&&h.win){var AE="";for(var AA in AF){if(AF[AA]!=Object.prototype[AA]){if(AA.toLowerCase()=="data"){AD.movie=AF[AA]}else{if(AA.toLowerCase()=="styleclass"){AE+=' class="'+AF[AA]+'"'}else{if(AA.toLowerCase()!="classid"){AE+=" "+AA+'="'+AF[AA]+'"'}}}}}var AC="";for(var z in AD){if(AD[z]!=Object.prototype[z]){AC+='<param name="'+z+'" value="'+AD[z]+'" />'}}u.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AE+">"+AC+"</object>";i[i.length]=AF.id;q=C(AF.id)}else{if(h.webkit&&h.webkit<312){var AB=a("embed");AB.setAttribute("type",P);for(var y in AF){if(AF[y]!=Object.prototype[y]){if(y.toLowerCase()=="data"){AB.setAttribute("src",AF[y])}else{if(y.toLowerCase()=="styleclass"){AB.setAttribute("class",AF[y])}else{if(y.toLowerCase()!="classid"){AB.setAttribute(y,AF[y])}}}}}for(var x in AD){if(AD[x]!=Object.prototype[x]){if(x.toLowerCase()!="movie"){AB.setAttribute(x,AD[x])}}}u.parentNode.replaceChild(AB,u);q=AB}else{var t=a(Q);t.setAttribute("type",P);for(var w in AF){if(AF[w]!=Object.prototype[w]){if(w.toLowerCase()=="styleclass"){t.setAttribute("class",AF[w])}else{if(w.toLowerCase()!="classid"){t.setAttribute(w,AF[w])}}}}for(var v in AD){if(AD[v]!=Object.prototype[v]&&v.toLowerCase()!="movie"){F(t,v,AD[v])}}u.parentNode.replaceChild(t,u);q=t}}}return q}function F(s,q,r){var t=a("param");t.setAttribute("name",q);t.setAttribute("value",r);s.appendChild(t)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(s){var r=C(s);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(s){var q=null;try{q=K.getElementById(s)}catch(r){}return q}function a(q){return K.createElement(q)}function I(s,q,r){s.attachEvent(q,r);d[d.length]=[s,q,r]}function c(s){var r=h.pv,q=s.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(s,q){var r=q?"visible":"hidden";if(e&&C(s)){C(s).style.visibility=r}else{V("#"+s,"visibility:"+r)}}function g(r){var t=/[\\\"<>\.;]/;var q=t.exec(r)!=null;return q?encodeURIComponent(r):r}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var v=d.length;for(var u=0;u<v;u++){d[u][0].detachEvent(d[u][1],d[u][2])}var s=i.length;for(var t=0;t<s;t++){X(i[t])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(t,q,s){if(!h.w3cdom||!t||!q){return }var r={};r.id=t;r.swfVersion=q;r.expressInstall=s?s:false;N[N.length]=r;W(t,false)},getObjectById:function(u){var q=null;if(h.w3cdom){var s=C(u);if(s){var t=s.getElementsByTagName(Q)[0];if(!t||(t&&typeof s.SetVariable!=b)){q=s}else{if(typeof t.SetVariable!=b){q=t}}}}return q},embedSWF:function(w,AD,AA,AC,q,v,r,y,AB){if(!h.w3cdom||!w||!AD||!AA||!AC||!q){return }AA+="";AC+="";if(c(q)){W(AD,false);var z={};if(AB&&typeof AB===Q){for(var u in AB){if(AB[u]!=Object.prototype[u]){z[u]=AB[u]}}}z.data=w;z.width=AA;z.height=AC;var x={};if(y&&typeof y===Q){for(var t in y){if(y[t]!=Object.prototype[t]){x[t]=y[t]}}}if(r&&typeof r===Q){for(var s in r){if(r[s]!=Object.prototype[s]){if(typeof x.flashvars!=b){x.flashvars+="&"+s+"="+r[s]}else{x.flashvars=s+"="+r[s]}}}}f(function(){U(z,x,AD);if(z.id==AD){W(AD,true)}})}else{if(v&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AD,false);f(function(){var AE={};AE.id=AE.altContentId=AD;AE.width=AA;AE.height=AC;AE.expressInstall=v;k(AE)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(s,r,q){if(h.w3cdom){return U(s,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(u){var t=K.location.search||K.location.hash;if(u==null){return g(t)}if(t){var s=t.substring(1).split("&");for(var r=0;r<s.length;r++){if(s[r].substring(0,s[r].indexOf("="))==u){return g(s[r].substring((s[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();$(document).ready(function(){$("#inputbutton").click(function(){$("#inputbutton").hide();$("#loader25").show()})});function checkInputDate(Y){try{var V=document.getElementById(Y);if(V==null){return }var A=V.value;if(A==""){DateElements={Year:null,Month:null,Day:null};if(GetDateElements(Y,DateElements)){DateElements.Year.value="";DateElements.Month.value="";DateElements.Day.value=""}return }var B="";var H="";var X="";var U=/^\d\d\d\d\d\d\d\d$/;var T=/^\d\d\D\d\d\D\d\d\d\d$/;var S=/^\d\d\D\d\D\d\d\d\d$/;var R=/^\d\d\d\d\d\d$/;var Q=/^\d\d\D\d\d\D\d\d$/;var P=/^\d\D\d\d\D\d\d$/;var O=/^\d\d\d\d\D\d\d\D\d\d(\D)?$/;var N=/^\d\D\d\d\D\d\d\d\d$/;var M=/^\d\d\d\d$/;var L=/^\d\D\d\D\d\d$/;var J=/^\d\d\D\d\D\d\d$/;var I=/^\d\d\d\d\d\d$/;var G=/^\d\D\d\D\d\d\d\d$/;var F=/^\d\D\d(\D)?$/;var E=/^\d\d\D\d(\D)?$/;var D=/^\d\D\d\d(\D)?$/;var C=/^\d\d\D\d\d(\D)?$/;var W=false;if(U.test(A)){var B=A.substr(0,2);var H=A.substr(2,2);var X=A.substr(4,4)}else{if(T.test(A)){var B=A.substr(0,2);var H=A.substr(3,2);var X=A.substr(6,4)}else{if(S.test(A)){var B=A.substr(0,2);var H=A.substr(3,2);var X=A.substr(5,4)}else{if(R.test(A)){var B=A.substr(0,2);var H=A.substr(2,2);var X="20"+A.substr(4,2)}else{if(Q.test(A)){var B=A.substr(0,2);var H=A.substr(3,2);var X="20"+A.substr(6,2)}else{if(P.test(A)){var B=A.substr(0,2);var H=A.substr(2,2);var X="20"+A.substr(5,2)}else{if(O.test(A)){var B=A.substr(8,2);var H=A.substr(5,2);var X=A.substr(0,4)}else{if(N.test(A)){var B=A.substr(0,1);var H=A.substr(2,2);var X=A.substr(5,4)}else{if(M.test(A)){var B=A.substr(0,1);var H=A.substr(1,1);var X="20"+A.substr(2,2)}else{if(L.test(A)){var B=A.substr(0,1);var H=A.substr(2,1);var X="20"+A.substr(4,2)}else{if(J.test(A)){var B=A.substr(0,2);var H=A.substr(3,1);var X="20"+A.substr(5,2)}else{if(I.test(A)){var B=A.substr(0,1);var H=A.substr(1,1);var X=A.substr(2,4)}else{if(G.test(A)){var B=A.substr(0,1);var H=A.substr(2,1);var X=A.substr(4,4)}else{if(F.test(A)){var B=A.substr(0,1);var H=A.substr(2,1);var X=new Date().getFullYear();W=true}else{if(E.test(A)){var B=A.substr(0,2);var H=A.substr(3,1);var X=new Date().getFullYear();W=true}else{if(D.test(A)){var B=A.substr(0,1);var H=A.substr(2,2);var X=new Date().getFullYear();W=true}else{if(C.test(A)){var B=A.substr(0,2);var H=A.substr(3,2);var X=new Date().getFullYear();W=true}else{var B=new Date().getDate();var H=new Date().getMonth()+1;var X=new Date().getFullYear();W=true}}}}}}}}}}}}}}}}}if((H>12)&&(B<=12)){var a=H;H=B;B=a}var K=new Date(X*1,H*1-1,B*1,23,59,59);if((W==true)&&(K<new Date())){K=new Date(X*1+1,H*1-1,B*1)}setDate(Y,K)}catch(Z){alert(Z)}}function setDate(E,C){var D=C.getYear()*1;if(D<999){D+=1900}var B=C.getDate()*1;var A=(C.getMonth())*1+1;document.getElementById(E).value=CalFormatDateFromString(B,A,D);DateElements={Year:null,Month:null,Day:null};if(GetDateElements(E,DateElements)){DateElements.Year.value=D;DateElements.Month.value=A;DateElements.Day.value=B}return true}function CalFormatDateFromString(B,A,C){if(B<10){B="0"+B}if(A<10){A="0"+A}return B+"."+A+"."+C}function GetDateElements(B,A){A.Year=document.getElementById(B+"_year");A.Month=document.getElementById(B+"_month");A.Day=document.getElementById(B+"_day");return((A.Year!=null)&&(A.Month!=null)&&(A.Day!=null))}jQuery.cookie=function(B,I,L){if(typeof I!="undefined"){L=L||{};if(I===null){I="";L.expires=-1}var E="";if(L.expires&&(typeof L.expires=="number"||L.expires.toUTCString)){var F;if(typeof L.expires=="number"){F=new Date();F.setTime(F.getTime()+(L.expires*24*60*60*1000))}else{F=L.expires}E="; expires="+F.toUTCString()}var K=L.path?"; path="+(L.path):"";var G=L.domain?"; domain="+(L.domain):"";var A=L.secure?"; secure":"";document.cookie=[B,"=",encodeURIComponent(I),E,K,G,A].join("")}else{var D=null;if(document.cookie&&document.cookie!=""){var J=document.cookie.split(";");for(var H=0;H<J.length;H++){var C=jQuery.trim(J[H]);if(C.substring(0,B.length+1)==(B+"=")){D=decodeURIComponent(C.substring(B.length+1));break}}}return D}};function OpenCalendar_sb(H,A,D,G,K,B,J,E){var F=D+"_day";var L=D+"_month";var I=D+"_year";if(J&&B!="nl"){popupHeight=415}else{J=0;popupHeight=380}var C="/"+B+"/search.ltml?u=sdh&formname="+H+"&calendar=3&suffix="+E+"&frmidx="+K+"&ref="+A+"&refC="+D+"&refday="+document.getElementsByName(F)[G].value+"&refmon="+document.getElementsByName(L)[G].value+"&refyear="+document.getElementsByName(I)[G].value+"&PageMove="+J;calWin=window.open(C,"Kalender","width=610,height="+popupHeight+",scrollbars=no,resizable=no");calWin.focus()}function InputCheck_sb(C,B){arrError=new Array();if(((B&1)==1)&&(!$("#von"+C).val().match(/^[A-Za-z]/i))){arrError.push("Bitte geben Sie einen Abreiseort an.")}if(((B&2)==2)&&(!$("#zo"+C).val().match(/^[A-Za-z]/i))){arrError.push("Bitte geben Sie ein Reiseziel an.")}if(((B&4)==4)&&(!$("#start_datum"+C).val().match(/^\d{1,2}\.\d{1,2}\.\d{4}$/))){arrError.push("Bitte geben Sie ein Anreisedatum an.")}if(((B&8)==8)&&(!$("#end_datum"+C).val().match(/^\d{1,2}\.\d{1,2}\.\d{4}$/))){arrError.push("Bitte geben Sie ein R&uuml;ckreisedatum an.")}if((B&16)==16){if(($("#start_datum"+C).val()!=0)&&($("#end_datum"+C).val()!=0)){try{if(new Date($("#start_datum_year"+C).val(),$("#start_datum_month"+C).val()-1,$("#start_datum_day"+C).val())>=new Date($("#end_datum_year"+C).val(),$("#end_datum_month"+C).val()-1,$("#end_datum_day"+C).val())){arrError.push('Bitte geben Sie ein R&uuml;ckreisedatum ein, das <span style="text-decoration:underline">nach</span> der Anreise liegt.')}}catch(A){}}}if((B&32)==32){if(($("#start_datum"+C).val()!=0)&&($("#end_datum"+C).val()!=0)){try{if(new Date($("#start_datum_year"+C).val(),$("#start_datum_month"+C).val()-1,$("#start_datum_day"+C).val())>new Date($("#end_datum_year"+C).val(),$("#end_datum_month"+C).val()-1,$("#end_datum_day"+C).val())){arrError.push('Bitte geben Sie ein R&uuml;ckreisedatum ein, das <span style="text-decoration:underline">nach oder gleich</span> der Anreise liegt.')}}catch(A){}}}if(arrError.length>0){ErrorWindow=returnObjById("sb_Error");if(ErrorWindow!=null){ErrorMessage="F&uuml;r die Suche Ihrer Reise werden noch folgende Angaben ben&ouml;tigt:<br/>- "+arrError.join("<br/>- ");ErrorWindow.innerHTML=ErrorMessage;ErrorWindow.style.display="inline";$("body").click(function(){returnObjById("sb_Error").style.display="none"});$("img").click(function(){returnObjById("sb_Error").style.display="none"})}else{alert(arrError.join("\n"))}return false}return true}function onAfterCalendarClose(B,A){onInputChange(B,A)}var tabs;var tabName=new Array();var tabAbbrevation=new Array();var tabExtendTextImg=new Array();var sizes={NORMAL:0,EXTENDED:1};var currentContainerSize;var CurrentTabSizes;var activeTab;var ImageExtension="png";var MandantExtension="";var HideSmoBox=false;function RegisterTab(B,A,C,D){tabName[B]=A;tabAbbrevation[B]=C;D=(typeof D=="undefined")?"/images/buttons/de/erweitert_txt":D;tabExtendTextImg[B]=D}function returnObjById(B){if(document.getElementById){var A=document.getElementById(B)}else{if(document.all){var A=document.all[B]}else{if(document.layers){var A=document.layers[B]}}}return A}function SwitchTabStyle(B,D){if(B==""){B=tabName[D]}for(var A in tabName){var C=returnObjById("img_"+tabName[A]);if(B==tabName[A]){strNeedle="_out"+MandantExtension+"."+ImageExtension;strReplace="_on"+MandantExtension+"."+ImageExtension}else{strNeedle="_on"+MandantExtension+"."+ImageExtension;strReplace="_out"+MandantExtension+"."+ImageExtension}C.src=C.src.replace(strNeedle,strReplace)}}function hideSmobox(){if(!HideSmoBox){return true}var A=returnObjById("smobox1_1");if(A==null){return false}else{$("#smobox1_1").fadeOut();return true}}function FadeOut(A,B){$("#suche_erweitert"+B).fadeIn("slow");$("#buttonclick"+B+" img").attr("src","/images/buttons/de/schliessen_txt."+ImageExtension);setTabSize(A,sizes.EXTENDED,activeTab==A);DesignChangesForFadeOut(B)}function FadeIn(A,B){setTabSize(A,sizes.NORMAL,true);$("#suche_erweitert"+B).fadeOut("slow",function(){$("#buttonclick"+B+" img").attr("src",tabExtendTextImg[A]+"."+ImageExtension);$("#smobox1_1").slideDown("fast")});DesignChangesForFadeIn(B)}function Resize(C){if(C!=currentContainerSize){var E=returnObjById("container_background");var B="sm_t4";if(C==sizes.EXTENDED){B=B+"_lang"}E.src="/images/layout/gfxborder/"+B+"."+ImageExtension;var D=returnObjById("suche_standard_rahmen");var A;switch(C){case sizes.NORMAL:A=21.4;break;case sizes.EXTENDED:A=42.5;if(!hideSmobox()){setTimeout("hideSmobox()",1000)}break;default:A=21.4}D.style.height=A+"em";currentContainerSize=C}}function setTabSize(C,A,B){CurrentTabSizes[C]=A;if(B){Resize(A)}}function DesignChangesForFadeOut(C){var B=returnObjById("divLine3"+C);if(B!=null){B.className=B.className.replace("searchbox_dotline","")}var A=returnObjById("MainContainer"+C);if(A!=null){A.style.height="14em"}}function DesignChangesForFadeIn(C){var B=returnObjById("divLine3"+C);if(B!=null){B.className=B.className+" searchbox_dotline"}var A=returnObjById("MainContainer"+C);if(A!=null){A.style.height="15.5em"}}function PNGFixInSearchbox(A){$(".pngfix"+A).hide();$(".pngfix"+A).show().ifixpng()}var lock=false;function onInputChange(E,D,C,B){FieldTag=returnObjById(E+D);if(FieldTag===null){return -1}FieldValue=FieldTag.value;for(var A in tabAbbrevation){if(tabAbbrevation[A]!=D){tag=returnObjById(E+tabAbbrevation[A]);if(tag!=null){tag.value=FieldValue;if(FieldValue!=tag.value){tag.value="0"}}else{continue}if(C){DependingTag=returnObjById(C+tabAbbrevation[A]);if((DependingTag!=null)&&(FieldValue!="")){if(!DependingTag.checked){lock=true;$("#"+DependingTag.id).trigger("click");lock=false}}}if((FieldValue!="")&&(B)&&(B==true)){ExtTag=returnObjById("suche_erweitert"+tabAbbrevation[A]);if((ExtTag!=null)){FadeOut(A,tabAbbrevation[A])}}}}}function onCheckboxChange(C,B){if(lock){return 0}FieldTag=returnObjById(C+B);if(FieldTag===null){return -1}for(var A in tabAbbrevation){if(tabAbbrevation[A]!=B){tag=returnObjById(C+tabAbbrevation[A]);if(tag!=null){lock=true;$("#"+tag.id).trigger("click");lock=false}}}}function onDestinationChangeByText(A,B,C){DestinationTag=returnObjById(A+C);if(DestinationTag===null){return -1}DestinationValue=DestinationTag.value;DestinationDescTag=returnObjById(B+C);if(DestinationDescTag!=null){DestinationDesc=DestinationDescTag.value}onDestinationChange(A,B,C,DestinationValue,DestinationDesc)}function onDestinationChangeBySelect(A,B,C){DestinationTag=returnObjById(A+C);if(DestinationTag===null){return -1}DestinationValue=DestinationTag.value;if(DestinationValue.substr(0,2)=="zl"){return 0}DestinationDesc=DestinationTag.options[DestinationTag.selectedIndex].text.replace("--","");onDestinationChange(A,B,C,DestinationValue,DestinationDesc)}function onDestinationChange(B,C,F,E,D){for(var A in tabAbbrevation){if(tabAbbrevation[A]!=F){tag=returnObjById(B+tabAbbrevation[A]);if(tag!=null){tag.value=E;if(C!=""){tagFullDesc=returnObjById(C+tabAbbrevation[A]);if(tagFullDesc!=null){tagFullDesc.value=D}}}}}};

;(function($){
	$.fn.superfish = function(op){

		var sf = $.fn.superfish,
			c = sf.c,
			$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
			over = function(){
				var $$ = $(this), menu = getMenu($$);
				clearTimeout(menu.sfTimer);
				$$.showSuperfishUl().siblings().hideSuperfishUl();
			},
			out = function(){
				var $$ = $(this), menu = getMenu($$), o = sf.op;
				clearTimeout(menu.sfTimer);
				menu.sfTimer=setTimeout(function(){
					o.retainPath=($.inArray($$[0],o.$path)>-1);
					$$.hideSuperfishUl();
					if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
				},o.delay);
			},
			getMenu = function($menu){
				var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
				sf.op = sf.o[menu.serial];
				return menu;
			},
			addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };

		return this.each(function() {
			var s = this.serial = sf.o.length;
			var o = $.extend({},sf.defaults,op);
			o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
				$(this).addClass([o.hoverClass,c.bcClass].join(' '))
					.filter('li:has(ul)').removeClass(o.pathClass);
			});
			sf.o[s] = sf.op = o;

			$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
				if (o.autoArrows) addArrow( $('>a:first-child',this) );
			})
			.not('.'+c.bcClass)
				.hideSuperfishUl();

			var $a = $('a',this);
			$a.each(function(i){
				var $li = $a.eq(i).parents('li');
				$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
			});
			o.onInit.call(this);

		}).each(function() {
			menuClasses = [c.menuClass];
			if (sf.op.dropShadows  && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
			$(this).addClass(menuClasses.join(' '));
		});
	};

	var sf = $.fn.superfish;
	sf.o = [];
	sf.op = {};
	sf.IE7fix = function(){
		var o = sf.op;
		if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
			this.toggleClass(sf.c.shadowClass+'-off');
		};
	sf.c = {
		bcClass     : 'sf-breadcrumb',
		menuClass   : 'sf-js-enabled',
		anchorClass : 'sf-with-ul',
		arrowClass  : 'sf-sub-indicator',
		shadowClass : 'sf-shadow'
	};
	sf.defaults = {
		hoverClass	: 'sfHover',
		pathClass	: 'overideThisToUse',
		pathLevels	: 1,
		delay		: 800,
		animation	: {opacity:'show'},
		speed		: 'normal',
		autoArrows	: true,
		dropShadows : true,
		disableHI	: false,		// true disables hoverIntent detection
		onInit		: function(){}, // callback functions
		onBeforeShow: function(){},
		onShow		: function(){},
		onHide		: function(){}
	};
	$.fn.extend({
		hideSuperfishUl : function(){
			var o = sf.op,
				not = (o.retainPath===true) ? o.$path : '';
			o.retainPath = false;
			var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
					.find('>ul').hide().css('visibility','hidden');
			o.onHide.call($ul);
			return this;
		},
		showSuperfishUl : function(){
			var o = sf.op,
				sh = sf.c.shadowClass+'-off',
				$ul = this.addClass(o.hoverClass)
					.find('>ul:hidden').css('visibility','visible');
			sf.IE7fix.call($ul);
			o.onBeforeShow.call($ul);
			$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
			return this;
		}
	});

})(jQuery);




//////////////////////////////////////////////////////////////////////////////////////////////////////


///*
// * Thickbox 3.1 - One Box To Rule Them All.
// * By Cody Lindley (http://www.codylindley.com)
// * Copyright (c) 2007 cody lindley
// * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
//*/var tb_pathToImage="/images/layout/loader_25.gif";
//
//
//
//
////on page load call tb_init
//$(document).ready(function(){
//	tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
//	imgLoader = new Image();// preload image
//	imgLoader.src = tb_pathToImage;
//});
//
////add thickbox to href & area elements that have a class of .thickbox
//function tb_init(domChunk){
//	$(domChunk).click(function(){
//	var t = this.title || this.name || null;
//	var a = this.href || this.alt;
//	var g = this.rel || false;
//	tb_show(t,a,g);
//	this.blur();
//	return false;
//	});
//}
//
//function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
//
//	try {
//		if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
//			$("body","html").css({height: "100%", width: "100%"});
//			$("html").css("overflow","hidden");
//			if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
//				$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
//				$("#TB_overlay").click(tb_remove);
//			}
//		}else{//all others
//			if(document.getElementById("TB_overlay") === null){
//				$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
//				$("#TB_overlay").click(tb_remove);
//			}
//		}
//
//		if(tb_detectMacXFF()){
//			$("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
//		}else{
//			$("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
//		}
//
//		if(caption===null){caption="";}
//		$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");//add loader to the page
//		$('#TB_load').show();//show loader
//
//		var baseURL;
//	   if(url.indexOf("?")!==-1){ //ff there is a query string involved
//			baseURL = url.substr(0, url.indexOf("?"));
//	   }else{
//	   		baseURL = url;
//	   }
//
//	   var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;
//	   var urlType = baseURL.toLowerCase().match(urlString);
//
//		if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
//
//			TB_PrevCaption = "";
//			TB_PrevURL = "";
//			TB_PrevHTML = "";
//			TB_NextCaption = "";
//			TB_NextURL = "";
//			TB_NextHTML = "";
//			TB_imageCount = "";
//			TB_FoundURL = false;
//			if(imageGroup){
//				TB_TempArray = $("a[@rel="+imageGroup+"]").get();
//				for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
//					var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
//						if (!(TB_TempArray[TB_Counter].href == url)) {
//							if (TB_FoundURL) {
//								TB_NextCaption = TB_TempArray[TB_Counter].title;
//								TB_NextURL = TB_TempArray[TB_Counter].href;
//								TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";
//							} else {
//								TB_PrevCaption = TB_TempArray[TB_Counter].title;
//								TB_PrevURL = TB_TempArray[TB_Counter].href;
//								TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";
//							}
//						} else {
//							TB_FoundURL = true;
//							TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length);
//						}
//				}
//			}
//
//			imgPreloader = new Image();
//			imgPreloader.onload = function(){
//			imgPreloader.onload = null;
//
//			// Resizing large images - orginal by Christian Montoya edited by me.
//			var pagesize = tb_getPageSize();
//			var x = pagesize[0] - 150;
//			var y = pagesize[1] - 150;
//			var imageWidth = imgPreloader.width;
//			var imageHeight = imgPreloader.height;
//			if (imageWidth > x) {
//				imageHeight = imageHeight * (x / imageWidth);
//				imageWidth = x;
//				if (imageHeight > y) {
//					imageWidth = imageWidth * (y / imageHeight);
//					imageHeight = y;
//				}
//			} else if (imageHeight > y) {
//				imageWidth = imageWidth * (y / imageHeight);
//				imageHeight = y;
//				if (imageWidth > x) {
//					imageHeight = imageHeight * (x / imageWidth);
//					imageWidth = x;
//				}
//			}
//			// End Resizing
//
//			TB_WIDTH = imageWidth + 30;
//			TB_HEIGHT = imageHeight + 60;
//			$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");
//
//			$("#TB_closeWindowButton").click(tb_remove);
//
//			if (!(TB_PrevHTML === "")) {
//				function goPrev(){
//					if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
//					$("#TB_window").remove();
//					$("body").append("<div id='TB_window'></div>");
//					tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
//					return false;
//				}
//				$("#TB_prev").click(goPrev);
//			}
//
//			if (!(TB_NextHTML === "")) {
//				function goNext(){
//					$("#TB_window").remove();
//					$("body").append("<div id='TB_window'></div>");
//					tb_show(TB_NextCaption, TB_NextURL, imageGroup);
//					return false;
//				}
//				$("#TB_next").click(goNext);
//
//			}
//
//			document.onkeydown = function(e){
//				if (e == null) { // ie
//					keycode = event.keyCode;
//				} else { // mozilla
//					keycode = e.which;
//				}
//				if(keycode == 27){ // close
//					tb_remove();
//				} else if(keycode == 190){ // display previous image
//					if(!(TB_NextHTML == "")){
//						document.onkeydown = "";
//						goNext();
//					}
//				} else if(keycode == 188){ // display next image
//					if(!(TB_PrevHTML == "")){
//						document.onkeydown = "";
//						goPrev();
//					}
//				}
//			};
//
//			tb_position();
//			$("#TB_load").remove();
//			$("#TB_ImageOff").click(tb_remove);
//			$("#TB_window").css({display:"block"}); //for safari using css instead of show
//			};
//
//			imgPreloader.src = url;
//		}else{//code to show html
//
//			var queryString = url.replace(/^[^\?]+\??/,'');
//			var params = tb_parseQuery( queryString );
//
//			TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL
//			TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL
//			ajaxContentW = TB_WIDTH - 30;
//			ajaxContentH = TB_HEIGHT - 45;
//
//			if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window
//					urlNoQuery = url.split('TB_');
//					$("#TB_iframeContent").remove();
//					if(params['modal'] != "true"){//iframe no modal
//						$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>");
//					}else{//iframe modal
//					$("#TB_overlay").unbind();
//						$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>");
//					}
//			}else{// not an iframe, ajax
//					if($("#TB_window").css("display") != "block"){
//						if(params['modal'] != "true"){//ajax no modal
//						$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
//						}else{//ajax modal
//						$("#TB_overlay").unbind();
//						$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
//						}
//					}else{//this means the window is already up, we are just loading new content via ajax
//						$("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
//						$("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
//						$("#TB_ajaxContent")[0].scrollTop = 0;
//						$("#TB_ajaxWindowTitle").html(caption);
//					}
//			}
//
//			$("#TB_closeWindowButton").click(tb_remove);
//
//				if(url.indexOf('TB_inline') != -1){
//					$("#TB_ajaxContent").append($('#' + params['inlineId']).children());
//					$("#TB_window").unload(function () {
//						$('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished
//					});
//					tb_position();
//					$("#TB_load").remove();
//					$("#TB_window").css({display:"block"});
//				}else if(url.indexOf('TB_iframe') != -1){
//					tb_position();
//					if($.browser.safari){//safari needs help because it will not fire iframe onload
//						$("#TB_load").remove();
//						$("#TB_window").css({display:"block"});
//					}
//				}else{
//					$("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
//						tb_position();
//						$("#TB_load").remove();
//						tb_init("#TB_ajaxContent a.thickbox");
//						$("#TB_window").css({display:"block"});
//					});
//				}
//
//		}
//
//		if(!params['modal']){
//			document.onkeyup = function(e){
//				if (e == null) { // ie
//					keycode = event.keyCode;
//				} else { // mozilla
//					keycode = e.which;
//				}
//				if(keycode == 27){ // close
//					tb_remove();
//				}
//			};
//		}
//
//	} catch(e) {
//		//nothing here
//	}
//}
//
////helper functions below
//function tb_showIframe(){
//	$("#TB_load").remove();
//	$("#TB_window").css({display:"block"});
//}
//
//function tb_remove() {
// 	$("#TB_imageOff").unbind("click");
//	$("#TB_closeWindowButton").unbind("click");
//	$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
//	$("#TB_load").remove();
//	if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
//		$("body","html").css({height: "auto", width: "auto"});
//		$("html").css("overflow","");
//	}
//	document.onkeydown = "";
//	document.onkeyup = "";
//	return false;
//}
//
//function tb_position() {
//$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
//	if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
//		$("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
//	}
//}
//
//function tb_parseQuery ( query ) {
//   var Params = {};
//   if ( ! query ) {return Params;}// return empty object
//   var Pairs = query.split(/[;&]/);
//   for ( var i = 0; i < Pairs.length; i++ ) {
//      var KeyVal = Pairs[i].split('=');
//      if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
//      var key = unescape( KeyVal[0] );
//      var val = unescape( KeyVal[1] );
//      val = val.replace(/\+/g, ' ');
//      Params[key] = val;
//   }
//   return Params;
//}
//
//function tb_getPageSize(){
//	var de = document.documentElement;
//	var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
//	var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
//	arrayPageSize = [w,h];
//	return arrayPageSize;
//}
//
//function tb_detectMacXFF() {
//  var userAgent = navigator.userAgent.toLowerCase();
//  if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
//    return true;
//  }
//}
//
//
//(function($){
//
//$.dimensions = {
//	version: '1.2'
//};
//
//// Create innerHeight, innerWidth, outerHeight and outerWidth methods
//$.each( [ 'Height', 'Width' ], function(i, name){
//
//	// innerHeight and innerWidth
//	$.fn[ 'inner' + name ] = function() {
//		if (!this[0]) return;
//
//		var torl = name == 'Height' ? 'Top'    : 'Left',  // top or left
//		    borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
//
//		return this.is(':visible') ? this[0]['client' + name] : num( this, name.toLowerCase() ) + num(this, 'padding' + torl) + num(this, 'padding' + borr);
//	};
//
//	// outerHeight and outerWidth
//	$.fn[ 'outer' + name ] = function(options) {
//		if (!this[0]) return;
//
//		var torl = name == 'Height' ? 'Top'    : 'Left',  // top or left
//		    borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
//
//		options = $.extend({ margin: false }, options || {});
//
//		var val = this.is(':visible') ?
//				this[0]['offset' + name] :
//				num( this, name.toLowerCase() )
//					+ num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width')
//					+ num(this, 'padding' + torl) + num(this, 'padding' + borr);
//
//		return val + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);
//	};
//});
//
//// Create scrollLeft and scrollTop methods
//$.each( ['Left', 'Top'], function(i, name) {
//	$.fn[ 'scroll' + name ] = function(val) {
//		if (!this[0]) return;
//
//		return val != undefined ?
//
//			// Set the scroll offset
//			this.each(function() {
//				this == window || this == document ?
//					window.scrollTo(
//						name == 'Left' ? val : $(window)[ 'scrollLeft' ](),
//						name == 'Top'  ? val : $(window)[ 'scrollTop'  ]()
//					) :
//					this[ 'scroll' + name ] = val;
//			}) :
//
//			// Return the scroll offset
//			this[0] == window || this[0] == document ?
//				self[ (name == 'Left' ? 'pageXOffset' : 'pageYOffset') ] ||
//					$.boxModel && document.documentElement[ 'scroll' + name ] ||
//					document.body[ 'scroll' + name ] :
//				this[0][ 'scroll' + name ];
//	};
//});
//
//$.fn.extend({
//	position: function() {
//		var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results;
//
//		if (elem) {
//			// Get *real* offsetParent
//			offsetParent = this.offsetParent();
//
//			// Get correct offsets
//			offset       = this.offset();
//			parentOffset = offsetParent.offset();
//
//			// Subtract element margins
//			offset.top  -= num(elem, 'marginTop');
//			offset.left -= num(elem, 'marginLeft');
//
//			// Add offsetParent borders
//			parentOffset.top  += num(offsetParent, 'borderTopWidth');
//			parentOffset.left += num(offsetParent, 'borderLeftWidth');
//
//			// Subtract the two offsets
//			results = {
//				top:  offset.top  - parentOffset.top,
//				left: offset.left - parentOffset.left
//			};
//		}
//
//		return results;
//	},
//
//	offsetParent: function() {
//		var offsetParent = this[0].offsetParent;
//		while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && $.css(offsetParent, 'position') == 'static') )
//			offsetParent = offsetParent.offsetParent;
//		return $(offsetParent);
//	}
//});
//
//function num(el, prop) {
//	return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;
//};
//
//})(jQuery);



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

(function(C){
    if(window.webforms){
	C(document).ready(function(){
	    C("input").each(function(){
		if(this.getAttribute("type")=="range"){
		    var G=C(this);
		    var E=C("<div class='ui-slider'></div>").css({
			width:G.innerWidth()+"px",
			height:G.innerHeight()+"px"
			}).insertAfter(G);
		    var F=C("<div class='ui-slider-handle'></div>").appendTo(E);
		    E.css({
			position:G.css("position")=="absolute"?"absolute":"relative",
			left:G.css("left"),
			right:G.css("right"),
			zIndex:G.css("zIndex"),
			"float":G.css("float"),
			clear:G.css("clear")
			});
		    G.css({
			position:"absolute",
			opacity:0,
			top:"-1000px",
			left:"-1000px"
		    });
		    E.slider({
			maxValue:G.attr("max"),
			minValue:G.attr("min"),
			startValue:this.getAttribute("value"),
			stepping:G.attr("step"),
			change:function(I,H){
			    G[0].value=H.value;
			    G[0].setAttribute("value",H.value)
			    }
			});
		E=E.sliderInstance();
		G.bind("keydown",function(H){
		    var I=E.interaction.options;
		    switch(H.keyCode){
			case 37:
			    E.moveTo(E.interaction.curValue+I.minValue-(I.stepping||1));
			    break;
			case 39:
			    E.moveTo(E.interaction.curValue+I.minValue+(I.stepping||1));
			    break
			    }
			    if(H.keyCode!=9){
			return false
			}
		    })
	    }
	    })
    })
}
C.extend(C.expr[":"],{
    slider:"(' '+a.className+' ').indexOf(' ui-slider ')"
});
C.fn.slider=function(E){
    return this.each(function(){
	new C.ui.slider(this,E)
	})
    };

var A="destroy,enable,disable,moveTo".split(",");
for(var B=0;B<A.length;B++){
    var D=A[B];
    C.fn["slider"+D.substr(0,1).toUpperCase()+D.substr(1)]=(function(E){
	return function(){
	    var F=arguments;
	    return this.each(function(){
		if(C(this).is(".ui-slider")){
		    var G=C.data(this,"ui-slider");
		    G[E].apply(G,F)
		    }
		})
	}
    })(D)
}
C.fn.sliderInstance=function(){
    if(C(this[0]).is(".ui-slider")){
	return C.data(this[0],"ui-slider")
	}
	return false
    };

C.ui.slider=function(G,H){
    var F={};

    H=H||{};

    C.extend(F,H);
    C.extend(F,{
	maxValue:parseInt(H.maxValue)||100,
	minValue:parseInt(H.minValue)||0,
	startValue:parseInt(H.startValue)||0,
	_start:function(J,L,M,I,K){
	    E.calcDimensions(I);
	    E.start.apply(I,[E,K])
	    },
	_beforeStop:function(J,L,M,I,K){
	    E.stop.apply(I,[E,K])
	    },
	_drag:function(J,L,M,I,K){
	    E.drag.apply(I,[E,K,L])
	    },
	startCondition:function(){
	    return !E.disabled
	    }
	});
var E=this;
var H=F;
C.data(G,"ui-slider",this);
H.stepping=parseInt(H.stepping)||(H.steps?H.maxValue/H.steps:0);
H.realValue=(H.maxValue-H.minValue);
this.handle=F.handle?C(F.handle,G):C(".ui-slider-handle",G);
if(this.handle.length==1){
    this.interaction=new C.ui.mouseInteraction(this.handle[0],F);
    this.multipleHandles=false
    }else{
    this.interactions=[];
    this.handle.each(function(){
	E.interactions.push(new C.ui.mouseInteraction(this,F))
	});
    this.multipleHandles=true
    }
    this.element=G;
C(this.element).addClass("ui-slider");
if(!this.multipleHandles){
    C(G).bind("click",function(I){
	E.click.apply(E,[I])
	});
    if(!isNaN(H.startValue)){
	this.moveTo(H.startValue,F.realValue,null,false)
	}
    }
};

C.extend(C.ui.slider.prototype,{
    currentTarget:null,
    lastTarget:null,
    destroy:function(){
	C(this.element).removeClass("ui-slider").removeClass("ui-slider-disabled");
	this.interaction.destroy()
	},
    enable:function(){
	C(this.element).removeClass("ui-slider-disabled");
	this.disabled=false
	},
    disable:function(){
	C(this.element).addClass("ui-slider-disabled");
	this.disabled=true
	},
    nonvalidRange:function(E){
	for(var F=0;F<this.interactions.length;F++){
	    if(E==this.interactions[F]){
		if(this.interactions[F-1]){
		    if(this.interactions[F-1].curValue>this.interactions[F].curValue){
			return this.interactions[F-1].curValue
			}
		    }
		if(this.interactions[F+1]){
		if(this.interactions[F+1].curValue<this.interactions[F].curValue){
		    return this.interactions[F+1].curValue
		    }
		}
	}
    }
return false
},
calcDimensions:function(E){
    var F=E.options,G=this.element;
    F.axis=F.axis||(G.offsetWidth<G.offsetHeight?"vertical":"horizontal");
    if(F.axis=="horizontal"){
	this.parentSize=C(G).outerWidth()-this.handle.outerWidth();
	this.prop="left"
	}
	if(F.axis=="vertical"){
	this.parentSize=C(G).outerHeight()-this.handle.outerHeight();
	this.prop="top"
	}
    },
prepareCallbackObj:function(F,E){
    var H=this;
    var G=function(){
	var J=[];
	for(var I=0;I<H.interactions.length;I++){
	    J.push((H.interactions[I].curValue||0)+F.options.minValue)
	    }
	    return J
	};

    return{
	handle:F.helper,
	pixel:E,
	value:F.curValue+F.options.minValue,
	values:this.multipleHandles?G():F.curValue+F.options.minValue,
	slider:F
    }
},
click:function(E){
    var H=this.interaction.options;
    var G=[E.pageX,E.pageY];
    var F=C(this.interaction.element).offsetParent().offset({
	border:false
    });
    if(this.interaction.element==E.target||this.disabled){
	return
    }
    this.interaction.pickValue=this.interaction.curValue;
    this.drag.apply(this.interaction,[this,E,[G[0]-F.left-this.handle[0].offsetWidth/2,G[1]-F.top-this.handle[0].offsetHeight/2]]);
    if(this.interaction.pickValue!=this.interaction.curValue){
	C(this.element).triggerHandler("slidechange",[E,this.prepareCallbackObj(this.interaction)],H.change)
	}
    },
start:function(E,F){
    var G=this.options;
    C(E.element).triggerHandler("slidestart",[F,E.prepareCallbackObj(this)],G.start);
    this.pickValue=this.curValue;
    return false
    },
stop:function(E,F){
    var G=this.options;
    C(E.element).triggerHandler("slidestop",[F,E.prepareCallbackObj(this)],G.stop);
    if(this.pickValue!=this.curValue){
	C(E.element).triggerHandler("slidechange",[F,E.prepareCallbackObj(this)],G.change)
	}
	return false
    },
drag:function(F,H,K){
    var I=this.options;
    this.pos=K||[this.pos[0]-this.element.offsetWidth/2,this.pos[1]-this.element.offsetHeight/2];
    if(I.axis=="horizontal"){
	var E=this.pos[0]
	}
	if(I.axis=="vertical"){
	var E=this.pos[1]
	}
	var G=F.parentSize;
    var J=F.prop;
    if(E<0){
	E=0
	}
	if(E>G){
	E=G
	}
	this.curValue=(Math.round((E/G)*I.realValue));
    if(I.stepping){
	this.curValue=Math.round(this.curValue/I.stepping)*I.stepping;
	E=((this.curValue)/I.realValue)*G
	}
	if(F.interactions){
	nonvalidRange=F.nonvalidRange(this);
	if(nonvalidRange){
	    this.curValue=nonvalidRange;
	    E=((this.curValue)/I.realValue)*G
	    }
	}
    C(this.element).css(J,E+"px");
C(F.element).triggerHandler("slide",[H,F.prepareCallbackObj(this,E)],I.slide);
return false
},
moveTo:function(I,L,G,J,K){
    var F=this,E=this.multipleHandles?this.interactions[K||0]:this.interaction;
    this.calcDimensions(E);
    H(E,J);
    function H(O,P){
	var Q=O.options;
	O.pickValue=O.curValue;
	I=I-Q.minValue;
	var N=L||Q.realValue;
	if(!P){
	    var P=F.parentSize
	    }
	    var R=F.prop;
	var M=Math.round(((I)/N)*P);
	if(M<0){
	    M=0
	    }
	    if(M>P){
	    M=P
	    }
	    O.curValue=(Math.round((M/P)*Q.realValue));
	if(Q.stepping){
	    O.curValue=Math.round(O.curValue/Q.stepping)*Q.stepping;
	    M=((O.curValue)/Q.realValue)*P;
	    if(isNaN(M)){
		M=0
		}
	    }
	C(O.element).css(R,M+"px");
    if(!G&&O.pickValue!=O.curValue&&!P){
	C(F.element).triggerHandler("slidechange",[null,F.prepareCallbackObj(O)],Q.change)
	}
	if(G){
	C(F.element).triggerHandler("slide",[null,F.prepareCallbackObj(O)],Q.slide)
	}
    }
}
})
})(jQuery);






