
	function openMessageWindow(company){
		fromobj=document.getElementById('from1Select');
		toobj=document.getElementById('to1Select');
		document.getElementById('fromToDiv').innerHTML = fromobj.options[fromobj.selectedIndex].text + '-' + toobj.options[toobj.selectedIndex].text
		//showcardDisplay(true);
		type=fromobj.value + '-' + toobj.value;
		$jq('#trespasingSpanContent_SKYEXPRESS').show();
		$jq.colorbox({speed:300, inline:true, href:"#trespasingSpanContent_SKYEXPRESS"});
		$jq("#cboxOverlay").click( function() { 
			$jq('#trespasingSpanContent_SKYEXPRESS').hide();
			$jq.colorbox.close();
		});
		$jq('#compactButtonCancell').click(function () {
			$jq('#trespasingSpanContent_SKYEXPRESS').hide();
			$jq.fn.colorbox.close();
			return false;
		});
		if (company == "GERMANWINGS"){
			document.getElementById('cardDisplay').innerHTML = document.getElementById('trespasingSpanContent_GERMANWINGS').innerHTML;			
			executevuelingTrakingFunctions('X-Selling Germanwings','Layer',type);
		} else if(company == "SKYEXPRESS"){
			document.getElementById('cardDisplay').innerHTML = document.getElementById('trespasingSpanContent_SKYEXPRESS').innerHTML;
			executevuelingTrakingFunctions('X-Selling Sky Express','Layer',type);		
		} else {
			executevuelingTrakingFunctions('X-Selling Sky Express','Layer',type);		
		}
	}
	
	function urlForGermanWings(baseURL, language){
		var url = "http://" + baseURL + "/skysales/DeepLink.aspx?";
		var fromobj=document.getElementById('from1Select');
		var toobj=document.getElementById('to1Select');
		var typetraobj=document.getElementById('roundTripRadio');
		var typetra;
		var departDay1obj = document.getElementById('departDay1Select');
		var departMonth1obj = document.getElementById('departMonth1Select');
		var departDay2obj;
		var departMonth2obj;
		var numberAdultobj = document.getElementById('ADULTSelect');
		var numberChildobj = document.getElementById('CHILDSelect');
		var numberInfantobj = document.getElementById('INFANTSelect');
		var webLanguage;
		
		if(typetraobj.value == 2){
		  typetra = "r";
		  departDay2obj = document.getElementById('departDay2Select');
		  departMonth2obj = document.getElementById('departMonth2Select');
		} else {
		  typetra = "o";
		}
		
		url = url + "o=" + fromobj.options[fromobj.selectedIndex].value;
		url = url + "&d=" + toobj.options[toobj.selectedIndex].value;
		url = url + "&t=" + typetra; 
		url = url + "&od=" + departMonth1obj.value.substr(0,4) + "-" + departMonth1obj.value.substr(4,2) + "-" +departDay1obj.value ;
		if(typetraobj.value == 2){
			url = url + "&rd=" + departMonth2obj.value.substr(0,4) + "-" + departMonth2obj.value.substr(4,2) + "-" +departDay2obj.value ;
		}
		url = url + "&adt=" + numberAdultobj.options[numberAdultobj.selectedIndex].value;
		if (numberChildobj.options[numberChildobj.selectedIndex].value > 0){
			url = url + "&chd=" + numberChildobj.options[numberChildobj.selectedIndex].value;
		}
		if (numberInfantobj.options[numberInfantobj.selectedIndex].value > 0){
			url = url + "&inf=" + numberInfantobj.options[numberInfantobj.selectedIndex].value;
		}
		switch(language){
			case "ES":
				webLanguage = "es-ES";
				break;
			case "CA":
				webLanguage = "es-ES";
				break;
			case "EU":
				webLanguage = "es-ES";
				break;
			case "GA":
				webLanguage = "es-ES";
				break;
			case "FR":
				webLanguage = "fr-FR";
				break;
			case "IT":
				webLanguage = "it-IT";
				break;
			case "PT":
				webLanguage = "en-GB";
				break;
			case "EN":
				webLanguage = "en-GB";
				break;
			case "NL":
				webLanguage = "nl-NL";
				break;	
			default:
				webLanguage = "en-GB";
 		}
		url = url + "&lng=" + webLanguage;
		window.location=url;
	}
	function executevuelingTrakingFunctions(event,action,type){
		try {
			eval(vuelingTracker._trackEvent(event, action,type));
		} catch(e) {
		}
		finally {
		}
	}
	function showLoadingDiv(show){
		obj = document.getElementById('trespasingSpanContentButton');
		if(show){
			obj2 = document.getElementById('loadingDivImage');
			obj.innerHTML = obj2.innerHTML;
		}
		else{
			obj.innerHTML = "";
		}
	}
	function getPageSize(){
		var xScroll, yScroll;
		if (window.innerHeight && window.scrollMaxY) {
			xScroll = document.body.scrollWidth;
			yScroll = window.innerHeight + window.scrollMaxY;
		} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
			xScroll = document.body.scrollWidth;
			yScroll = document.body.scrollHeight;
		} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
			xScroll = document.body.offsetWidth;
			yScroll = document.body.offsetHeight;
		}
		var windowWidth, windowHeight;
		if (self.innerHeight) { // all except Explorer
			windowWidth = self.innerWidth;
			windowHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		} else if (document.body) { // other Explorers
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}
		if(yScroll < windowHeight){
			pageHeight = windowHeight;
		} else {
			pageHeight = yScroll;
		}
		if(xScroll < windowWidth){
			pageWidth = windowWidth;
		} else {
			pageWidth = xScroll;
		}
		var scrOfX = 0, scrOfY = 0;
 		if( typeof( window.pageYOffset ) == 'number' ) {
    		scrOfY = window.pageYOffset;
    		scrOfX = window.pageXOffset;
  		} 
  		else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    		scrOfY = document.body.scrollTop;
    		scrOfX = document.body.scrollLeft;
  		} 
  		else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    		scrOfY = document.documentElement.scrollTop;
    		scrOfX = document.documentElement.scrollLeft;
  		}
		arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight,scrOfX,scrOfY);
		return arrayPageSize;
	}
	function altura() {
		var myWidth;
		var myHeight;
		if( typeof( window.innerWidth ) == 'number' ) { 
			//Non-IE 
			myWidth = window.innerWidth;
			myHeight = window.innerHeight; 
		} else if( document.documentElement && 
		( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { 
			//IE 6+ in 'standards compliant mode' 
			myWidth = document.documentElement.clientWidth; 
			myHeight = document.documentElement.clientHeight; 
		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { 
			//IE 4 compatible 
			myWidth = document.body.clientWidth; 
			myHeight = document.body.clientHeight; 
		}
		//var t = new Array(myWidth,  myHeight);
		return myHeight;
	}

	
	function disable_selectsIE(option){
		for(var i = 0; i < document.forms.length; i++) {
			for(var e = 0; e < document.forms[i].length; e++){
				if(document.forms[i].elements[e].tagName == "SELECT") {
					document.forms[i].elements[e].disabled = option;
				}
			}
		}
	}

function thirdCompanyComonScripts_initExec() {
	document.onkeydown = function(e){ 	
		if (e == null) { // ie
			keycode = event.keyCode;
		} else { // mozilla
			keycode = e.which;
		}
		if(keycode == 27){ // close
			showcardDisplay(false);
		}	
	};

	try{
		if(typeof colorBoxLoaded == 'undefined' && ((typeof $jq != 'undefined' && $jq != null) || (typeof jQuery != 'undefined' && jQuery  != null))) {
		colorBoxLoaded = true;
		// ColorBox v1.3.17 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
		// Copyright (c) 2011 Jack Moore - jack@colorpowered.com
		// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
		(function(a,b,c){function bc(b){if(!T){O=b,_(a.extend(J,a.data(O,e))),x=a(O),P=0,J.rel!=="nofollow"&&(x=a("."+X).filter(function(){var b=a.data(this,e).rel||this.rel;return b===J.rel}),P=x.index(O),P===-1&&(x=x.add(O),P=x.length-1));if(!R){R=S=!0,q.show();if(J.returnFocus)try{O.blur(),a(O).one(k,function(){try{this.focus()}catch(a){}})}catch(c){}p.css({opacity:+J.opacity,cursor:J.overlayClose?"pointer":"auto"}).show(),J.w=Z(J.initialWidth,"x"),J.h=Z(J.initialHeight,"y"),W.position(0),n&&y.bind("resize."+o+" scroll."+o,function(){p.css({width:y.width(),height:y.height(),top:y.scrollTop(),left:y.scrollLeft()})}).trigger("resize."+o),ba(g,J.onOpen),I.add(C).hide(),H.html(J.close).show()}W.load(!0)}}function bb(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;J.slideshow&&x[1]?(d=function(){E.text(J.slideshowStop).unbind(c).bind(i,function(){if(P<x.length-1||J.loop)a=setTimeout(W.next,J.slideshowSpeed)}).bind(h,function(){clearTimeout(a)}).one(c+" "+j,e),q.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,J.slideshowSpeed)},e=function(){clearTimeout(a),E.text(J.slideshowStart).unbind([i,h,j,c].join(" ")).one(c,d),q.removeClass(b+"on").addClass(b+"off")},J.slideshowAuto?d():e()):q.removeClass(b+"off "+b+"on")}function ba(b,c){c&&c.call(O),a.event.trigger(b)}function _(b){for(var c in b)a.isFunction(b[c])&&c.substring(0,2)!=="on"&&(b[c]=b[c].call(O));b.rel=b.rel||O.rel||"nofollow",b.href=b.href||a(O).attr("href"),b.title=b.title||O.title,typeof b.href=="string"&&(b.href=a.trim(b.href))}function $(a){return J.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a)}function Z(a,b){b=b==="x"?y.width():y.height();return typeof a=="string"?Math.round(/%/.test(a)?b/100*parseInt(a,10):parseInt(a,10)):a}function Y(c,d){var e=b.createElement("div");c&&(e.id=f+c),e.style.cssText=d||"";return a(e)}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:!1},e="colorbox",f="cbox",g=f+"_open",h=f+"_load",i=f+"_complete",j=f+"_cleanup",k=f+"_closed",l=f+"_purge",m=a.browser.msie&&!a.support.opacity,n=m&&a.browser.version<7,o=f+"_IE6",p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J={},K,L,M,N,O,P,Q,R,S,T,U,V,W,X=f+"Element";W=a.fn[e]=a[e]=function(b,c){var f=this,g;if(!f[0]&&f.selector)return f;b=b||{},c&&(b.onComplete=c);if(!f[0]||f.selector===undefined)f=a("<a/>"),b.open=!0;f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b)),a(this).addClass(X)}),g=b.open,a.isFunction(g)&&(g=g.call(f)),g&&bc(f[0]);return f},W.init=function(){y=a(c),q=Y().attr({id:e,"class":m?f+(n?"IE6":"IE"):""}),p=Y("Overlay",n?"position:absolute":"").hide(),r=Y("Wrapper"),s=Y("Content").append(z=Y("LoadedContent","width:0; height:0; overflow:hidden"),B=Y("LoadingOverlay").add(Y("LoadingGraphic")),C=Y("Title"),D=Y("Current"),F=Y("Next"),G=Y("Previous"),E=Y("Slideshow").bind(g,bb),H=Y("Close")),r.append(Y().append(Y("TopLeft"),t=Y("TopCenter"),Y("TopRight")),Y(!1,"clear:left").append(u=Y("MiddleLeft"),s,v=Y("MiddleRight")),Y(!1,"clear:left").append(Y("BottomLeft"),w=Y("BottomCenter"),Y("BottomRight"))).children().children().css({"float":"left"}),A=Y(!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(p,q.append(r,A)),s.children().hover(function(){a(this).addClass("hover")},function(){a(this).removeClass("hover")}).addClass("hover"),K=t.height()+w.height()+s.outerHeight(!0)-s.height(),L=u.width()+v.width()+s.outerWidth(!0)-s.width(),M=z.outerHeight(!0),N=z.outerWidth(!0),q.css({"padding-bottom":K,"padding-right":L}).hide(),F.click(function(){W.next()}),G.click(function(){W.prev()}),H.click(function(){W.close()}),I=F.add(G).add(D).add(E),s.children().removeClass("hover"),p.click(function(){J.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;R&&J.escKey&&b===27&&(a.preventDefault(),W.close()),R&&J.arrowKey&&x[1]&&(b===37?(a.preventDefault(),G.click()):b===39&&(a.preventDefault(),F.click()))})},W.remove=function(){q.add(p).remove(),a("."+X).removeData(e).removeClass(X)},W.position=function(a,c){function g(a){t[0].style.width=w[0].style.width=s[0].style.width=a.style.width,B[0].style.height=B[1].style.height=s[0].style.height=u[0].style.height=v[0].style.height=a.style.height}var d,e=0,f=0;q.hide(),J.fixed&&!n?q.css({position:"fixed"}):(e=y.scrollTop(),f=y.scrollLeft(),q.css({position:"absolute"})),J.right!==!1?f+=Math.max(y.width()-J.w-N-L-Z(J.right,"x"),0):J.left!==!1?f+=Z(J.right,"x")/2:f+=Math.max(y.width()-J.w-N-L,0)/2,J.bottom!==!1?e+=Math.max(b.documentElement.clientHeight-J.h-M-K-Z(J.bottom,"y"),0):J.top!==!1?e+=Z(J.top,"y")/2:e+=Math.max(b.documentElement.clientHeight-J.h-M-K,0)/2,q.show(),d=q.width()===J.w+N&&q.height()===J.h+M?0:a,r[0].style.width=r[0].style.height="9999px",q.dequeue().animate({width:J.w+N,height:J.h+M,top:e,left:f},{duration:d,complete:function(){g(this),S=!1,r[0].style.width=J.w+N+L+"px",r[0].style.height=J.h+M+K+"px",c&&c()},step:function(){g(this)}})},W.resize=function(a){if(R){a=a||{},a.width&&(J.w=Z(a.width,"x")-N-L),a.innerWidth&&(J.w=Z(a.innerWidth,"x")),z.css({width:J.w}),a.height&&(J.h=Z(a.height,"y")-M-K),a.innerHeight&&(J.h=Z(a.innerHeight,"y"));if(!a.innerHeight&&!a.height){var b=z.wrapInner("<div style='overflow:auto'></div>").children();J.h=b.height(),b.replaceWith(b.children())}z.css({height:J.h}),W.position(J.transition==="none"?0:J.speed)}},W.prep=function(b){function h(b){W.position(b,function(){function o(){m&&q[0].style.removeAttribute("filter")}var b,d,g,h,j=x.length,k,n;!R||(n=function(){clearTimeout(V),B.hide(),ba(i,J.onComplete)},m&&Q&&z.fadeIn(100),C.html(J.title).add(z).show(),j>1?(typeof J.current=="string"&&D.html(J.current.replace(/\{current\}/,P+1).replace(/\{total\}/,j)).show(),F[J.loop||P<j-1?"show":"hide"]().html(J.next),G[J.loop||P?"show":"hide"]().html(J.previous),b=P?x[P-1]:x[j-1],g=P<j-1?x[P+1]:x[0],J.slideshow&&E.show(),J.preloading&&(h=a.data(g,e).href||g.href,d=a.data(b,e).href||b.href,h=a.isFunction(h)?h.call(g):h,d=a.isFunction(d)?d.call(b):d,$(h)&&(a("<img/>")[0].src=h),$(d)&&(a("<img/>")[0].src=d))):I.hide(),J.iframe?(k=a("<iframe/>").addClass(f+"Iframe")[0],J.fastIframe?n():a(k).one("load",n),k.name=f+ +(new Date),k.src=J.href,J.scrolling||(k.scrolling="no"),m&&(k.frameBorder=0,k.allowTransparency="true"),a(k).appendTo(z).one(l,function(){k.src="//about:blank"})):n(),J.transition==="fade"?q.fadeTo(c,1,o):o(),y.bind("resize."+f,function(){W.position(0)}))})}function g(){J.h=J.h||z.height(),J.h=J.mh&&J.mh<J.h?J.mh:J.h;return J.h}function d(){J.w=J.w||z.width(),J.w=J.mw&&J.mw<J.w?J.mw:J.w;return J.w}if(!!R){var c=J.transition==="none"?0:J.speed;y.unbind("resize."+f),z.remove(),z=Y("LoadedContent").html(b),z.hide().appendTo(A.show()).css({width:d(),overflow:J.scrolling?"hidden":"hidden"}).css({height:g()}).prependTo(s),A.hide(),a(Q).css({"float":"none"}),n&&a("select").not(q.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(j,function(){this.style.visibility="inherit"}),J.transition==="fade"?q.fadeTo(c,0,function(){h(0)}):h(c)}},W.load=function(b){var c,d,g=W.prep;S=!0,Q=!1,O=x[P],b||_(a.extend(J,a.data(O,e))),ba(l),ba(h,J.onLoad),J.h=J.height?Z(J.height,"y")-M-K:J.innerHeight&&Z(J.innerHeight,"y"),J.w=J.width?Z(J.width,"x")-N-L:J.innerWidth&&Z(J.innerWidth,"x"),J.mw=J.w,J.mh=J.h,J.maxWidth&&(J.mw=Z(J.maxWidth,"x")-N-L,J.mw=J.w&&J.w<J.mw?J.w:J.mw),J.maxHeight&&(J.mh=Z(J.maxHeight,"y")-M-K,J.mh=J.h&&J.h<J.mh?J.h:J.mh),c=J.href,V=setTimeout(function(){B.show()},100),J.inline?(Y().hide().insertBefore(a(c)[0]).one(l,function(){a(this).replaceWith(z.children())}),g(a(c))):J.iframe?g(" "):J.html?g(J.html):$(c)?(a(Q=new Image).addClass(f+"Photo").error(function(){J.title=!1,g(Y("Error").text("This image could not be loaded"))}).load(function(){var a;Q.onload=null,J.scalePhotos&&(d=function(){Q.height-=Q.height*a,Q.width-=Q.width*a},J.mw&&Q.width>J.mw&&(a=(Q.width-J.mw)/Q.width,d()),J.mh&&Q.height>J.mh&&(a=(Q.height-J.mh)/Q.height,d())),J.h&&(Q.style.marginTop=Math.max(J.h-Q.height,0)/2+"px"),x[1]&&(P<x.length-1||J.loop)&&(Q.style.cursor="pointer",Q.onclick=function(){W.next()}),m&&(Q.style.msInterpolationMode="bicubic"),setTimeout(function(){g(Q)},1)}),setTimeout(function(){Q.src=c},1)):c&&A.load(c,J.data,function(b,c,d){g(c==="error"?Y("Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!S&&x[1]&&(P<x.length-1||J.loop)&&(P=P<x.length-1?P+1:0,W.load())},W.prev=function(){!S&&x[1]&&(P||J.loop)&&(P=P?P-1:x.length-1,W.load())},W.close=function(){R&&!T&&(T=!0,R=!1,ba(j,J.onCleanup),y.unbind("."+f+" ."+o),p.fadeTo(200,0),q.stop().fadeTo(300,0,function(){q.add(p).css({opacity:1,cursor:"auto"}).hide(),ba(l),z.remove(),setTimeout(function(){T=!1,ba(k,J.onClosed)},1)}))},W.element=function(){return a(O)},W.settings=d,U=function(a){a.button!==0&&typeof a.button!="undefined"||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),bc(this))},a.fn.delegate?a(b).delegate("."+X,"click",U):a("."+X).live("click",U),a(W.init)})(jQuery,document,this);
		}
	}
	catch(e){
	}
}
	//IMPORTANTE !!! La capa que monta esta función se utiliza en varios sitios de la web (WBP, facturación, hold ...), se ha añadido un parámetro 'from' para indicar para que funcionalidad se pide la capa y poder personalizar la visualización de la misma
	//Por ejemplo, en la llamada desde WBP se utiliza el parámetro from=WBP para fijar la posición de la capa
	function showcardDisplay(show,text,from){
		var $jq = jQuery.noConflict();
		var h = altura();
		obj =document.getElementById('cardDisplay');
		obj2=document.getElementById('cardDisplayContentPopupMask');
		obj3=document.getElementById('ieiframe');
		if(show){
			if(document.getElementById('idioma')){
				document.getElementById('idioma').disabled=true;
			}	
			var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
			standardbody.style.overflow="visible";
			// posicionar la capa del mensaje para que pueda añadirse al scroll
			var width=550;
			var height=350;
			var list=getPageSize();
			var sobrante = (screen.height - h);
			var left=(screen.width - width)/2;
			var top=( (screen.height- height)/2)-sobrante+50;
			if (from=='SiteInfoExtra'){
				left="151";
				top="110";
			} else if (from=='Hold')
			{
				left=$jq("html").scrollLeft();
				top=$jq("html").scrollTop();
			} 

			obj.style.left = $jq("html").scrollLeft() + "px";
			obj.style.display = 'block';
			if (from=='WBP'){
				window.scrollTo(0,0);
				obj.style.left = "";
			}
			else if (from=='factura')
			{
				$jq('#cardDisplayContentPopupMask').css({'position':'absolute','top':0,'left':0});
				window.scrollTo(0,0);
			}
			if (navigator.appName != "Microsoft Internet Explorer"){
				obj.style.top= $jq("html").scrollTop() + "px";
				obj.style.position='absolute';
			} 
			else {
				obj.style.top=$jq("html").scrollTop() + top + "px";
				obj.style.position='absolute';
			}
			obj.style.clear='none';
			obj.style.zIndex='200';
			obj2.style.zIndex='100';
			obj2.style.display='block';
			obj2.style.width=list[2]  + "px";
			obj2.style.height=list[1] + "px";
			if (navigator.appName == "Microsoft Internet Explorer"){
				obj3.style.left=$jq("html").scrollLeft();
				obj3.style.top=0;
				obj3.style.width=obj.clientWidth;
				obj3.style.height=obj.clientHeight;
				obj3.style.display='block';
				obj3.style.zIndex=obj.style.zIndex - 1;
			}
			if(text){
				if(document.getElementById(text) && document.getElementById(text) != null )
				document.getElementById('cardDisplay').innerHTML=document.getElementById(text).innerHTML;
			}
		}
		else{
			var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
			standardbody.style.overflow="auto";
			obj.style.display='none';
			obj2.style.display='none';
			if(document.getElementById('idioma')){
				document.getElementById('idioma').disabled=false;
			}
			if (navigator.appName == "Microsoft Internet Explorer"){
				obj3.style.display='none';
			}
		}
		if ( typeof from != "undefined" && from != null && from=='Hold' && show){
			if(navigator.appName == "Microsoft Internet Explorer"){
				if(show) $jq("html").animate({ scrollTop: $jq("html").attr("scrollHeight") }, 0);
			}else{
				$jq( 'html,body' ).animate( { scrollTop: 0 }, 0 );
			}
		}
		if(!show) $jq( 'html,body' ).animate( { scrollTop: 0 }, 0 );
	}
try {
	if((typeof $jq != 'undefined' && $jq != null) || (typeof jQuery != 'undefined' && jQuery  != null)){
	// qTip2 - Pretty powerful tooltips - http://craigsworks.com/projects/qtip2/
	// Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
	// Dual licensed under MIT or GPLv2 licenses = Date: Sat Jun 18 06:06:00 PDT 2011
	(function(a,b,c){function E(b){var c=this,d=b.elements,e=d.tooltip,f=".bgiframe-"+b.id;a.extend(c,{init:function(){d.bgiframe=a('<iframe class="ui-tooltip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';"  style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>'),d.bgiframe.appendTo(e),e.bind("tooltipmove"+f,c.adjust)},adjust:function(){var a=b.get("dimensions"),c=b.plugins.tip,f=d.tip,g,h;h=parseInt(e.css("border-left-width"),10)||0,h={left:-h,top:-h},c&&f&&(g=c.corner.precedance==="x"?["width","left"]:["height","top"],h[g[1]]-=f[g[0]]()),d.bgiframe.css(h).css(a)},destroy:function(){d.bgiframe.remove(),e.unbind(f)}}),c.init()}function D(c){var f=this,g=c.options.show.modal,h=c.elements,i=h.tooltip,j="#qtip-overlay",k=".qtipmodal",l=k+c.id,m="is-modal-qtip",o=a(document.body),q;c.checks.modal={"^show.modal.(on|blur)$":function(){f.init(),h.overlay.toggle(i.is(":visible"))}},a.extend(f,{init:function(){if(!g.on)return f;q=f.create(),i.attr(m,d).unbind(k).unbind(l).bind("tooltipshow"+k+" tooltiphide"+k,function(a,b,c){var d=a.originalEvent;d&&a.type==="tooltiphide"&&/mouse(leave|enter)/.test(d.type)&&d.relatedTarget.closest(q[0]).length?a.preventDefault():f[a.type.replace("tooltip","")](a,c)}).bind("tooltipfocus"+k,function(a,b,c){q[0].style.zIndex=c}).bind("tooltipblur"+k,function(b){a("["+m+"]:visible").not(i).last().qtip("focus",b)}),g.escape&&a(b).unbind(l).bind("keydown"+l,function(a){a.keyCode===27&&i.hasClass(p)&&c.hide(a)}),g.blur&&h.overlay.unbind(l).bind("click"+l,function(a){i.hasClass(p)&&c.hide(a)});return f},create:function(){var c=a(j);if(c.length){h.overlay=c;return c}q=h.overlay=a("<div />",{id:j.substr(1),html:"<div></div>",mousedown:function(){return e}}).insertBefore(a(n).last()),a(b).unbind(k).bind("resize"+k,function(){q.css({height:a(b).height(),width:a(b).width()})}).triggerHandler("resize");return q},toggle:function(b,c,h){if(b&&b.isDefaultPrevented())return f;var j=g.effect,k=c?"show":"hide",p=q.is(":visible"),r=a("["+m+"]:visible").not(i),s;q||(q=f.create());if(q.is(":animated")&&p===c||!c&&r.length)return f;c?(q.css({left:0,top:0}),q.toggleClass("blurs",g.blur),o.delegate("*","focusin"+l,function(b){a(b.target).closest(n)[0]!==i[0]&&a("a, :input, img",i).add(i).focus()})):o.undelegate("*","focus"+l),q.stop(d,e),a.isFunction(j)?j.call(q,c):j===e?q[k]():q.fadeTo(parseInt(h,10)||90,c?1:0,function(){c||a(this).hide()}),c||q.queue(function(a){q.css({left:"",top:""}),a()});return f},show:function(a,b){return f.toggle(a,d,b)},hide:function(a,b){return f.toggle(a,e,b)},destroy:function(){var d=q;d&&(d=a("["+m+"]").not(i).length<1,d?(h.overlay.remove(),a(b).unbind(k)):h.overlay.unbind(k+c.id),o.undelegate("*","focus"+l));return i.removeAttr(m).unbind(k)}}),f.init()}function C(b,g){function w(a){var b=a.precedance==="y",c=n[b?"width":"height"],d=n[b?"height":"width"],e=a.string().indexOf("center")>-1,f=c*(e?.5:1),g=Math.pow,h=Math.round,i,j,k,l=Math.sqrt(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=Math.sqrt(g(m[0],2)-g(p,2)),m[3]=Math.sqrt(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[0]),j=i/l,k=[h(j*d),h(j*c)];return{height:k[b?0:1],width:k[b?1:0]}}function v(b){var c=k.titlebar&&b.y==="top",d=c?k.titlebar:k.content,e=a.browser.mozilla,f=e?"-moz-":a.browser.webkit?"-webkit-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"border-radius-"+g:"border-"+g+"-radius");return parseInt(d.css(h),10)||parseInt(l.css(h),10)||0}function u(a,b,c){b=b?b:a[a.precedance];var d=l.hasClass(r),e=k.titlebar&&a.y==="top",f=e?k.titlebar:k.content,g="border-"+b+"-width",h;l.addClass(r),h=parseInt(f.css(g),10),h=(c?h||parseInt(l.css(g),10):h)||0,l.toggleClass(r,d);return h}function t(f,g,h,l){if(k.tip){var n=a.extend({},i.corner),o=h.adjusted,p=b.options.position.adjust.method.split(" "),q=p[0],r=p[1]||p[0],s={left:e,top:e,x:0,y:0},t,u={},v;i.corner.fixed!==d&&(q==="shift"&&n.precedance==="x"&&o.left&&n.y!=="center"?n.precedance=n.precedance==="x"?"y":"x":q==="flip"&&o.left&&(n.x=n.x==="center"?o.left>0?"left":"right":n.x==="left"?"right":"left"),r==="shift"&&n.precedance==="y"&&o.top&&n.x!=="center"?n.precedance=n.precedance==="y"?"x":"y":r==="flip"&&o.top&&(n.y=n.y==="center"?o.top>0?"top":"bottom":n.y==="top"?"bottom":"top"),n.string()!==m.corner&&(m.top!==o.top||m.left!==o.left)&&i.update(n,e)),t=i.position(n,o),t.right!==c&&(t.left=-t.right),t.bottom!==c&&(t.top=-t.bottom),t.user=Math.max(0,j.offset);if(s.left=q==="shift"&&!!o.left)n.x==="center"?u["margin-left"]=s.x=t["margin-left"]-o.left:(v=t.right!==c?[o.left,-t.left]:[-o.left,t.left],(s.x=Math.max(v[0],v[1]))>v[0]&&(h.left-=o.left,s.left=e),u[t.right!==c?"right":"left"]=s.x);if(s.top=r==="shift"&&!!o.top)n.y==="center"?u["margin-top"]=s.y=t["margin-top"]-o.top:(v=t.bottom!==c?[o.top,-t.top]:[-o.top,t.top],(s.y=Math.max(v[0],v[1]))>v[0]&&(h.top-=o.top,s.top=e),u[t.bottom!==c?"bottom":"top"]=s.y);k.tip.css(u).toggle(!(s.x&&s.y||n.x==="center"&&s.y||n.y==="center"&&s.x)),h.left-=t.left.charAt?t.user:q!=="shift"||s.top||!s.left&&!s.top?t.left:0,h.top-=t.top.charAt?t.user:r!=="shift"||s.left||!s.left&&!s.top?t.top:0,m.left=o.left,m.top=o.top,m.corner=n.string()}}var i=this,j=b.options.style.tip,k=b.elements,l=k.tooltip,m={top:0,left:0,corner:""},n={width:j.width,height:j.height},o={},p=j.border||0,q=".qtip-tip",s=!!(a("<canvas />")[0]||{}).getContext;i.corner=f,i.mimic=f,i.border=p,i.offset=j.offset,i.size=n,b.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){i.init()||i.destroy(),b.reposition()},"^style.tip.(height|width)$":function(){n={width:j.width,height:j.height},i.create(),i.update(),b.reposition()},"^content.title.text|style.(classes|widget)$":function(){k.tip&&i.update()}},a.extend(i,{init:function(){var b=i.detectCorner()&&(s||a.browser.msie);b&&(i.create(),i.update(),l.unbind(q).bind("tooltipmove"+q,t));return b},detectCorner:function(){var a=j.corner,c=b.options.position,f=c.at,g=c.my.string?c.my.string():c.my;if(a===e||g===e&&f===e)return e;a===d?i.corner=new h.Corner(g):a.string||(i.corner=new h.Corner(a),i.corner.fixed=d);return i.corner.string()!=="centercenter"},detectColours:function(){var c,d,e,f=k.tip.css({backgroundColor:"",border:""}),g=i.corner,h=g[g.precedance],m="border-"+h+"-color",p="border"+h.charAt(0)+h.substr(1)+"Color",q=/rgba?\(0, 0, 0(, 0)?\)|transparent/i,s="background-color",t="transparent",u=a(document.body).css("color"),v=b.elements.content.css("color"),w=k.titlebar&&(g.y==="top"||g.y==="center"&&f.position().top+n.height/2+j.offset<k.titlebar.outerHeight(1)),x=w?k.titlebar:k.content;l.addClass(r),o.fill=d=f.css(s),o.border=e=f[0].style[p]||l.css(m);if(!d||q.test(d))o.fill=x.css(s)||t,q.test(o.fill)&&(o.fill=l.css(s)||d);if(!e||q.test(e)||e===u){o.border=x.css(m)||t;if(q.test(o.border)||o.border===v)o.border=e}a("*",f).add(f).css(s,t).css("border",""),l.removeClass(r)},create:function(){var b=n.width,c=n.height,d;k.tip&&k.tip.remove(),k.tip=a("<div />",{"class":"ui-tooltip-tip"}).css({width:b,height:c}).prependTo(l),s?a("<canvas />").appendTo(k.tip)[0].getContext("2d").save():(d='<vml:shape coordorigin="0,0" style="display:inline-block; position:absolute; behavior:url(#default#VML);"></vml:shape>',k.tip.html(d+d))},update:function(b,c){var g=k.tip,l=g.children(),m=n.width,q=n.height,r="px solid ",t="px dashed transparent",v=j.mimic,x=Math.round,y,z,A,C,D;b||(b=i.corner),v===e?v=b:(v=new h.Corner(v),v.precedance=b.precedance,v.x==="inherit"?v.x=b.x:v.y==="inherit"?v.y=b.y:v.x===v.y&&(v[b.precedance]=b[b.precedance])),y=v.precedance,i.detectColours(),o.border!=="transparent"&&o.border!=="#123456"?(p=u(b,f,d),j.border===0&&p>0&&(o.fill=o.border),i.border=p=j.border!==d?j.border:p):i.border=p=0,A=B(v,m,q),i.size=D=w(b),g.css(D),b.precedance==="y"?C=[x(v.x==="left"?p:v.x==="right"?D.width-m-p:(D.width-m)/2),x(v.y==="top"?D.height-q:0)]:C=[x(v.x==="left"?D.width-m:0),x(v.y==="top"?p:v.y==="bottom"?D.height-q-p:(D.height-q)/2)],s?(l.attr(D),z=l[0].getContext("2d"),z.restore(),z.save(),z.clearRect(0,0,3e3,3e3),z.translate(C[0],C[1]),z.beginPath(),z.moveTo(A[0][0],A[0][1]),z.lineTo(A[1][0],A[1][1]),z.lineTo(A[2][0],A[2][1]),z.closePath(),z.fillStyle=o.fill,z.strokeStyle=o.border,z.lineWidth=p*2,z.lineJoin="miter",z.miterLimit=100,p&&z.stroke(),z.fill()):(A="m"+A[0][0]+","+A[0][1]+" l"+A[1][0]+","+A[1][1]+" "+A[2][0]+","+A[2][1]+" xe",C[2]=p&&/^(r|b)/i.test(b.string())?parseFloat(a.browser.version,10)===8?2:1:0,l.css({antialias:""+(v.string().indexOf("center")>-1),left:C[0]-C[2]*Number(y==="x"),top:C[1]-C[2]*Number(y==="y"),width:m+p,height:q+p}).each(function(b){var c=a(this);c[c.prop?"prop":"attr"]({coordsize:m+p+" "+(q+p),path:A,fillcolor:o.fill,filled:!!b,stroked:!b}).css({display:p||b?"block":"none"}),!b&&c.html()===""&&c.html('<vml:stroke weight="'+p*2+'px" color="'+o.border+'" miterlimit="1000" joinstyle="miter"  style="behavior:url(#default#VML); display:inline-block;" />')})),c!==e&&i.position(b)},position:function(b){var c=k.tip,f={},g=Math.max(0,j.offset),h,l,m;if(j.corner===e||!c)return e;b=b||i.corner,h=b.precedance,l=w(b),m=[b.x,b.y],h==="x"&&m.reverse(),a.each(m,function(a,c){var e,i;c==="center"?(e=h==="y"?"left":"top",f[e]="50%",f["margin-"+e]=-Math.round(l[h==="y"?"width":"height"]/2)+g):(e=u(b,c,d),i=v(b),f[c]=a?p?u(b,c):0:g+(i>e?i:0))}),f[b[h]]-=l[h==="x"?"width":"height"],c.css({top:"",bottom:"",left:"",right:"",margin:""}).css(f);return f},destroy:function(){k.tip&&k.tip.remove(),l.unbind(q)}}),i.init()}function B(a,b,c){var d=Math.ceil(b/2),e=Math.ceil(c/2),f={bottomright:[[0,0],[b,c],[b,0]],bottomleft:[[0,0],[b,0],[0,c]],topright:[[0,c],[b,0],[b,c]],topleft:[[0,0],[0,c],[b,c]],topcenter:[[0,c],[d,0],[b,c]],bottomcenter:[[0,0],[b,0],[d,c]],rightcenter:[[0,0],[b,e],[0,c]],leftcenter:[[b,0],[b,c],[0,e]]};f.lefttop=f.bottomright,f.righttop=f.bottomleft,f.leftbottom=f.topright,f.rightbottom=f.topleft;return f[a.string()]}function A(b){var c=this,f=b.elements.tooltip,g=b.options.content.ajax,h=".qtip-ajax",i=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,j=d;b.checks.ajax={"^content.ajax":function(a,b,d){b==="ajax"&&(g=d),b==="once"?c.init():g&&g.url?c.load():f.unbind(h)}},a.extend(c,{init:function(){g&&g.url&&f.unbind(h)[g.once?"one":"bind"]("tooltipshow"+h,c.load);return c},load:function(d,h){function p(a,c,d){b.set("content.text",c+": "+d),n()}function o(c){l&&(c=a("<div/>").append(c.replace(i,"")).find(l)),b.set("content.text",c),n()}function n(){m&&(f.css("visibility",""),h=e)}if(d&&d.isDefaultPrevented())return c;var j=g.url.indexOf(" "),k=g.url,l,m=g.once&&!g.loading&&h;m&&f.css("visibility","hidden"),j>-1&&(l=k.substr(j),k=k.substr(0,j)),a.ajax(a.extend({success:o,error:p,context:b},g,{url:k}));return c}}),c.init()}function z(b,c){var i,j,k,l,m=a(this),n=a(document.body),o=this===document?n:m,p=m.metadata?m.metadata(c.metadata):f,q=c.metadata.type==="html5"&&p?p[c.metadata.name]:f,r=m.data(c.metadata.name||"qtipopts");try{r=typeof r==="string"?(new Function("return "+r))():r}catch(s){w("Unable to parse HTML5 attribute data: "+r)}l=a.extend(d,{},g.defaults,c,typeof r==="object"?x(r):f,x(q||p)),j=l.position,l.id=b;if("boolean"===typeof l.content.text){k=m.attr(l.content.attr);if(l.content.attr!==e&&k)l.content.text=k;else{w("Unable to locate content for tooltip! Aborting render of tooltip on element: ",m);return e}}j.container===e&&(j.container=n),j.target===e&&(j.target=o),l.show.target===e&&(l.show.target=o),l.show.solo===d&&(l.show.solo=n),l.hide.target===e&&(l.hide.target=o),l.position.viewport===d&&(l.position.viewport=j.container),j.at=new h.Corner(j.at),j.my=new h.Corner(j.my);if(a.data(this,"qtip"))if(l.overwrite)m.qtip("destroy");else if(l.overwrite===e)return e;a.attr(this,"title")&&(a.attr(this,u,a.attr(this,"title")),this.removeAttribute("title")),i=new y(m,l,b,!!k),a.data(this,"qtip",i),m.bind("remove.qtip",function(){i.destroy()});return i}function y(c,s,t,w){function Q(){var c=[s.show.target[0],s.hide.target[0],y.rendered&&F.tooltip[0],s.position.container[0],s.position.viewport[0],b,document];y.rendered?a([]).pushStack(a.grep(c,function(a){return typeof a==="object"})).unbind(E):s.show.target.unbind(E+"-create")}function P(){function r(a){D.is(":visible")&&y.reposition(a)}function p(a){if(D.hasClass(m))return e;clearTimeout(y.timers.inactive),y.timers.inactive=setTimeout(function(){y.hide(a)},s.hide.inactive)}function o(b){if(D.hasClass(m))return e;var c=a(b.relatedTarget||b.target),d=c.closest(n)[0]===D[0],g=c[0]===h.show[0];clearTimeout(y.timers.show),clearTimeout(y.timers.hide);f.target==="mouse"&&d||s.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(d||g))?b.preventDefault():s.hide.delay>0?y.timers.hide=setTimeout(function(){y.hide(b)},s.hide.delay):y.hide(b)}function l(a){if(D.hasClass(m))return e;h.show.trigger("qtip-"+t+"-inactive"),clearTimeout(y.timers.show),clearTimeout(y.timers.hide);var b=function(){y.toggle(d,a)};s.show.delay>0?y.timers.show=setTimeout(b,s.show.delay):b()}var f=s.position,h={show:s.show.target,hide:s.hide.target,viewport:a(f.viewport),document:a(document),window:a(b)},j={show:a.trim(""+s.show.event).split(" "),hide:a.trim(""+s.hide.event).split(" ")},k=a.browser.msie&&parseInt(a.browser.version,10)===6;D.bind("mouseenter"+E+" mouseleave"+E,function(a){var b=a.type==="mouseenter";b&&y.focus(a),D.toggleClass(q,b)}),s.hide.fixed&&(h.hide=h.hide.add(D),D.bind("mouseover"+E,function(){D.hasClass(m)||clearTimeout(y.timers.hide)})),/mouse(out|leave)/i.test(s.hide.event)?s.hide.leave&&h.window.bind("mouse"+(s.hide.leave.indexOf("frame")>-1?"out":"leave")+E,function(a){/select|option/.test(a.target)&&!a.relatedTarget&&y.hide(a)}):/mouse(over|enter)/i.test(s.show.event)&&h.hide.bind("mouseleave"+E,function(a){clearTimeout(y.timers.show)}),(""+s.hide.event).indexOf("unfocus")>-1&&h.document.bind("mousedown"+E,function(b){var d=a(b.target),e=!D.hasClass(m)&&D.is(":visible");d.parents(n).length===0&&d.add(c).length>1&&y.hide(b)}),"number"===typeof s.hide.inactive&&(h.show.bind("qtip-"+t+"-inactive",p),a.each(g.inactiveEvents,function(a,b){h.hide.add(F.tooltip).bind(b+E+"-inactive",p)})),a.each(j.hide,function(b,c){var d=a.inArray(c,j.show),e=a(h.hide);d>-1&&e.add(h.show).length===e.length||c==="unfocus"?(h.show.bind(c+E,function(a){D.is(":visible")?o(a):l(a)}),delete j.show[d]):h.hide.bind(c+E,o)}),a.each(j.show,function(a,b){h.show.bind(b+E,l)}),"number"===typeof s.hide.distance&&h.show.bind("mousemove"+E,function(a){var b=G.origin||{},c=s.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&y.hide(a)}),f.target==="mouse"&&(h.show.bind("mousemove"+E,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),f.adjust.mouse&&(s.hide.event&&D.bind("mouseleave"+E,function(a){(a.relatedTarget||a.target)!==h.show[0]&&y.hide(a)}),h.document.bind("mousemove"+E,function(a){!D.hasClass(m)&&D.is(":visible")&&y.reposition(a||i)}))),(f.adjust.resize||h.viewport.length)&&(a.event.special.resize?h.viewport:h.window).bind("resize"+E,r),(h.viewport.length||k&&D.css("position")==="fixed")&&h.viewport.bind("scroll"+E,r)}function O(b,d){function g(b){function g(f){clearTimeout(y.timers.img[this]),a(this).unbind(E),(c=c.not(this)).length===0&&(y.redraw(),d!==e&&y.reposition(G.event),b())}var c;if((c=f.find("img:not([height]):not([width])")).length===0)return g.call(c);c.each(function(b,c){(function d(){if(c.height&&c.width)return g.call(c);y.timers.img[c]=setTimeout(d,1e3)})(),a(c).bind("error"+E+" load"+E,g)})}var f=F.content;if(!y.rendered||!b)return e;a.isFunction(b)&&(b=b.call(c,G.event,y)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),y.rendered<0?D.queue("fx",g):(C=0,g(a.noop));return y}function N(b,d){var f=F.title;if(!y.rendered||!b)return e;a.isFunction(b)&&(b=b.call(c,G.event,y)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),y.redraw(),d!==e&&y.rendered&&D.is(":visible")&&y.reposition(G.event)}function M(a){var b=F.button,c=F.title;if(!y.rendered)return e;a?(c||L(),K()):b.remove()}function L(){var b=A+"-title";F.titlebar&&J(),F.titlebar=a("<div />",{"class":k+"-titlebar "+(s.style.widget?"ui-widget-header":"")}).append(F.title=a("<div />",{id:b,"class":k+"-title","aria-atomic":d})).insertBefore(F.content),s.content.title.button?K():y.rendered&&y.redraw()}function K(){var b=s.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";F.button&&F.button.remove(),b.jquery?F.button=b:F.button=a("<a />",{"class":"ui-state-default "+(s.style.widget?"":k+"-icon"),title:d,"aria-label":d}).prepend(a("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"})),F.button.appendTo(F.titlebar).attr("role","button").hover(function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseenter")}).click(function(a){D.hasClass(m)||y.hide(a);return e}).bind("mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}),y.redraw()}function J(){F.title&&(F.titlebar.remove(),F.titlebar=F.title=F.button=f,y.reposition())}function I(){var a=s.style.widget;D.toggleClass(l,a).toggleClass(o,!a),F.content.toggleClass(l+"-content",a),F.titlebar&&F.titlebar.toggleClass(l+"-header",a),F.button&&F.button.toggleClass(k+"-icon",!a)}function H(a){var b=0,c,d=s,e=a.split(".");while(d=d[e[b++]])b<e.length&&(c=d);return[c||s,e.pop()]}var y=this,z=document.body,A=k+"-"+t,B=0,C=0,D=a(),E=".qtip-"+t,F,G;y.id=t,y.rendered=e,y.elements=F={target:c},y.timers={img:{}},y.options=s,y.checks={},y.plugins={},y.cache=G={event:{},target:a(),disabled:e,attr:w},y.checks.builtin={"^id$":function(b,c,f){var h=f===d?g.nextid:f,i=k+"-"+h;h!==e&&h.length>0&&!a("#"+i).length&&(D[0].id=i,F.content[0].id=i+"-content",F.title[0].id=i+"-title")},"^content.text$":function(a,b,c){O(c)},"^content.title.text$":function(a,b,c){if(!c)return J();!F.title&&c&&L(),N(c)},"^content.title.button$":function(a,b,c){M(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new h.Corner(c))},"^position.container$":function(a,b,c){y.rendered&&D.appendTo(c)},"^show.ready$":function(){y.rendered?y.toggle(d):y.render(1)},"^style.classes$":function(b,c,d){a.attr(D[0],"class",k+" qtip ui-helper-reset "+d)},"^style.widget|content.title":I,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){D[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var a=s.position;D.attr("tracking",a.target==="mouse"&&a.adjust.mouse),Q(),P()}},a.extend(y,{render:function(b){if(y.rendered)return y;var f=s.content.title.text,g=s.position,i=a.Event("tooltiprender");a.attr(c[0],"aria-describedby",A),D=F.tooltip=a("<div/>",{id:A,"class":k+" qtip ui-helper-reset "+o+" "+s.style.classes,width:s.style.width||"",tracking:g.target==="mouse"&&g.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":A+"-content","aria-hidden":d}).toggleClass(m,G.disabled).data("qtip",y).appendTo(s.position.container).append(F.content=a("<div />",{"class":k+"-content",id:A+"-content","aria-atomic":d})),y.rendered=-1,C=1,f&&(L(),N(f)),O(s.content.text,e),y.rendered=d,I(),a.each(s.events,function(b,c){a.isFunction(c)&&D.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(h,function(){this.initialize==="render"&&this(y)}),P(),D.queue("fx",function(a){i.originalEvent=G.event,D.trigger(i,[y]),C=0,y.redraw(),(s.show.ready||b)&&y.toggle(d,G.event),a()});return y},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:D.outerHeight(),width:D.outerWidth()};break;case"offset":b=h.offset(D,s.position.container);break;default:c=H(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(b,c){function m(a,b){var c,d,e;for(c in k)for(d in k[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),k[c][d].apply(y,b)}var g=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,h=/^content\.(title|attr)|style/i,i=e,j=e,k=y.checks,l;"string"===typeof b?(l=b,b={},b[l]=c):b=a.extend(d,{},b),a.each(b,function(c,d){var e=H(c.toLowerCase()),f;f=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,f],i=g.test(c)||i,j=h.test(c)||j}),x(s),B=C=1,a.each(b,m),B=C=0,D.is(":visible")&&y.rendered&&(i&&y.reposition(s.position.target==="mouse"?f:G.event),j&&y.redraw());return y},toggle:function(b,c){function q(){b?(a.browser.msie&&D[0].style.removeAttribute("filter"),D.css("overflow","")):D.css({display:"",visibility:"",opacity:"",left:"",top:""})}if(!y.rendered)if(b)y.render(1);else return y;var g=b?"show":"hide",h=s[g],j=D.is(":visible"),k=!c||G.target[0]===c.target,l=s.position,m=s.content,o,p;(typeof b).search("boolean|number")&&(b=!j);if(!D.is(":animated")&&j===b&&k)return y;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(G.event.type)&&c.target===s.show.target[0]&&D.has(c.relatedTarget).length)return y;G.event=a.extend({},c)}p=a.Event("tooltip"+g),p.originalEvent=c?G.event:f,D.trigger(p,[y,90]);if(p.isDefaultPrevented())return y;a.attr(D[0],"aria-hidden",!b),b?(G.origin=a.extend({},i),y.focus(c),a.isFunction(m.text)&&O(m.text,e),a.isFunction(m.title.text)&&N(m.title.text,e),!v&&l.target==="mouse"&&l.adjust.mouse&&(a(document).bind("mousemove.qtip",function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),v=d),y.reposition(c),h.solo&&a(n,h.solo).not(D).qtip("hide",p)):(clearTimeout(y.timers.show),delete G.origin,v&&!a(n+'[tracking="true"]:visible',h.solo).not(D).length&&(a(document).unbind("mousemove.qtip"),v=e),y.blur(c)),k&&D.stop(0,1),h.effect===e?(D[g](),q.call(D)):a.isFunction(h.effect)?(h.effect.call(D,y),D.queue("fx",function(a){q(),a()})):D.fadeTo(90,b?1:0,q),b&&h.target.trigger("qtip-"+t+"-inactive");return y},show:function(a){return y.toggle(d,a)},hide:function(a){return y.toggle(e,a)},focus:function(b){if(!y.rendered)return y;var c=a(n),d=parseInt(D[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;D.hasClass(p)||(i=a.Event("tooltipfocus"),i.originalEvent=f,D.trigger(i,[y,e]),i.isDefaultPrevented()||(d!==e&&(c.each(function(){this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)}),c.filter("."+p).qtip("blur",f)),D.addClass(p)[0].style.zIndex=e));return y},blur:function(b){var c=a.extend({},b),d;D.removeClass(p),d=a.Event("tooltipblur"),d.originalEvent=c,D.trigger(d,[y]);return y},reposition:function(c,d){if(!y.rendered||B)return y;B=1;var f=s.position.target,g=s.position,j=g.my,l=g.at,m=g.adjust,n=m.method.split(" "),o=D.outerWidth(),p=D.outerHeight(),q=0,r=0,t=a.Event("tooltipmove"),u=D.css("position")==="fixed",v=g.viewport,w={left:0,top:0},x=y.plugins.tip,A={horizontal:n[0],vertical:n[1]||n[0],left:function(a){var b=A.horizontal==="shift",c=v.offset.left+v.scrollLeft,d=j.x==="left"?o:j.x==="right"?-o:-o/2,e=l.x==="left"?q:l.x==="right"?-q:-q/2,f=x&&x.size?x.size.width||0:0,g=x&&x.corner&&x.corner.precedance==="x"&&!b?f:0,h=c-a+g,i=a+o-v.width-c+g,k=d-(j.precedance==="x"||j.x===j.y?e:0),n=j.x==="center";b?(g=x&&x.corner.precedance==="y"?f:0,k=(j.x==="left"?1:-1)*d-g,w.left+=h>0?h:i>0?-i:0,w.left=Math.max(v.offset.left+(g&&x.corner.x==="center"?x.offset:0),a-k,Math.min(Math.max(v.offset.left+v.width,a+k),w.left))):(h>0&&(j.x!=="left"||i>0)?w.left-=k+(n?0:2*m.x):i>0&&(j.x!=="right"||h>0)&&(w.left-=n?-k:k+2*m.x),w.left!==a&&n&&(w.left-=m.x),w.left<c&&-w.left>i&&(w.left=a));return w.left-a},top:function(a){var b=A.vertical==="shift",c=v.offset.top+v.scrollTop,d=j.y==="top"?p:j.y==="bottom"?-p:-p/2,e=l.y==="top"?r:l.y==="bottom"?-r:-r/2,f=x&&x.size?x.size.height||0:0,g=x&&x.corner&&x.corner.precedance==="y"&&!b?f:0,h=c-a+g,i=a+p-v.height-c+g,k=d-(j.precedance==="y"||j.x===j.y?e:0),n=j.y==="center";b?(g=x&&x.corner.precedance==="x"?f:0,k=(j.y==="top"?1:-1)*d-g,w.top+=h>0?h:i>0?-i:0,w.top=Math.max(v.offset.top+(g&&x.corner.x==="center"?x.offset:0),a-k,Math.min(Math.max(v.offset.top+v.height,a+k),w.top))):(h>0&&(j.y!=="top"||i>0)?w.top-=k+(n?0:2*m.y):i>0&&(j.y!=="bottom"||h>0)&&(w.top-=n?-k:k+2*m.y),w.top!==a&&n&&(w.top-=m.y),w.top<0&&-w.top>i&&(w.top=a));return w.top-a}};if(a.isArray(f)&&f.length===2)l={x:"left",y:"top"},w={left:f[0],top:f[1]};else if(f==="mouse"&&(c&&c.pageX||G.event.pageX))l={x:"left",y:"top"},c=c&&(c.type==="resize"||c.type==="scroll")?G.event:c&&c.pageX&&c.type==="mousemove"?c:i&&(m.mouse||!c||!c.pageX)?{pageX:i.pageX,pageY:i.pageY}:!m.mouse&&G.origin?G.origin:c,w={top:c.pageY,left:c.pageX};else{f==="event"?c&&c.target&&c.type!=="scroll"&&c.type!=="resize"?f=G.target=a(c.target):f=G.target:G.target=a(f),f=a(f).eq(0);if(f.length===0)return y;f[0]===document||f[0]===b?(q=h.iOS?b.innerWidth:f.width(),r=h.iOS?b.innerHeight:f.height(),f[0]===b&&(w={top:!u||h.iOS?(v||f).scrollTop():0,left:!u||h.iOS?(v||f).scrollLeft():0})):f.is("area")&&h.imagemap?w=h.imagemap(f,l):f[0].namespaceURI==="http://www.w3.org/2000/svg"&&h.svg?w=h.svg(f,l):(q=f.outerWidth(),r=f.outerHeight(),w=h.offset(f,g.container,u)),w.offset&&(q=w.width,r=w.height,w=w.offset),w.left+=l.x==="right"?q:l.x==="center"?q/2:0,w.top+=l.y==="bottom"?r:l.y==="center"?r/2:0}w.left+=m.x+(j.x==="right"?-o:j.x==="center"?-o/2:0),w.top+=m.y+(j.y==="bottom"?-p:j.y==="center"?-p/2:0),v.jquery&&f[0]!==b&&f[0]!==z&&A.vertical+A.horizontal!=="nonenone"?(v={elem:v,height:v[(v[0]===b?"h":"outerH")+"eight"](),width:v[(v[0]===b?"w":"outerW")+"idth"](),scrollLeft:u?0:v.scrollLeft(),scrollTop:u?0:v.scrollTop(),offset:v.offset()||{left:0,top:0}},w.adjusted={left:A.horizontal!=="none"?A.left(w.left):0,top:A.vertical!=="none"?A.top(w.top):0}):w.adjusted={left:0,top:0},D.attr("class",function(b,c){return a.attr(this,"class").replace(/ui-tooltip-pos-\w+/i,"")}).addClass(k+"-pos-"+j.abbreviation()),t.originalEvent=a.extend({},c),D.trigger(t,[y,w,v.elem||v]);if(t.isDefaultPrevented())return y;delete w.adjusted,d===e||isNaN(w.left)||isNaN(w.top)||f==="mouse"||!a.isFunction(g.effect)?D.css(w):a.isFunction(g.effect)&&(g.effect.call(D,y,a.extend({},w)),D.queue(function(b){a(this).css({opacity:"",height:""}),a.browser.msie&&this.style.removeAttribute("filter"),b()})),B=0;return y},redraw:function(){if(y.rendered<1||C)return y;var a=s.position.container,b,c,d,e;C=1,s.style.width?D.css("width",s.style.width):(D.css("width","").addClass(r),c=D.width()+1,d=D.css("max-width")||"",e=D.css("min-width")||"",b=(d+e).indexOf("%")>-1?a.width()/100:0,d=(d.indexOf("%")>-1?b:1)*parseInt(d,10)||c,e=(e.indexOf("%")>-1?b:1)*parseInt(e,10)||0,c=d+e?Math.min(Math.max(c,e),d):c,D.css("width",Math.round(c)).removeClass(r)),C=0;return y},disable:function(b){var c=m;"boolean"!==typeof b&&(b=!D.hasClass(c)&&!G.disabled),y.rendered?(D.toggleClass(c,b),a.attr(D[0],"aria-disabled",b)):G.disabled=!!b;return y},enable:function(){return y.disable(e)},destroy:function(){var b=c[0],d=a.attr(b,u);y.rendered&&(D.remove(),a.each(y.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(y.timers.show),clearTimeout(y.timers.hide),Q(),a.removeData(b,"qtip"),d&&(a.attr(b,"title",d),c.removeAttr(u)),c.removeAttr("aria-describedby").unbind(".qtip"),delete j[y.id];return c}})}function x(b){var c;if(!b||"object"!==typeof b)return e;"object"!==typeof b.metadata&&(b.metadata={type:b.metadata});if("content"in b){if("object"!==typeof b.content||b.content.jquery)b.content={text:b.content};c=b.content.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.text=e),"title"in b.content&&("object"!==typeof b.content.title&&(b.content.title={text:b.content.title}),c=b.content.title.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.title.text=e))}"position"in b&&("object"!==typeof b.position&&(b.position={my:b.position,at:b.position})),"show"in b&&("object"!==typeof b.show&&(b.show.jquery?b.show={target:b.show}:b.show={event:b.show})),"hide"in b&&("object"!==typeof b.hide&&(b.hide.jquery?b.hide={target:b.hide}:b.hide={event:b.hide})),"style"in b&&("object"!==typeof b.style&&(b.style={classes:b.style})),a.each(h,function(){this.sanitize&&this.sanitize(b)});return b}function w(){if(console)return(console.info||console.info||a.noop).apply(console,arguments)}"use strict";var d=!0,e=!1,f=null,g,h,i,j={},k="ui-tooltip",l="ui-widget",m="ui-state-disabled",n="div.qtip."+k,o=k+"-default",p=k+"-focus",q=k+"-hover",r=k+"-fluid",s="-31000px",t="_replacedByqTip",u="oldtitle",v=e;g=a.fn.qtip=function(b,h,i){var j=(""+b).toLowerCase(),k=f,l=j==="disable"?[d]:a.makeArray(arguments).slice(1),m=l[l.length-1],n=this[0]?a.data(this[0],"qtip"):f;if(!arguments.length&&n||j==="api")return n;if("string"===typeof b){this.each(function(){var b=a.data(this,"qtip");if(!b)return d;m&&m.timeStamp&&(b.cache.event=m);if(j!=="option"&&j!=="options"||!h)b[j]&&b[j].apply(b[j],l);else if(a.isPlainObject(h)||i!==c)b.set(h,i);else{k=b.get(h);return e}});return k!==f?k:this}if("object"===typeof b||!arguments.length){n=x(a.extend(d,{},b));return g.bind.call(this,n,m)}},g.bind=function(b,f){return this.each(function(i){function q(b){function d(){o.render(typeof b==="object"||k.show.ready),l.show.add(l.hide).unbind(n)}if(o.cache.disabled)return e;o.cache.event=a.extend({},b),o.cache.target=b?a(b.target):[c],k.show.delay>0?(clearTimeout(o.timers.show),o.timers.show=setTimeout(d,k.show.delay),m.show!==m.hide&&l.hide.bind(m.hide,function(){clearTimeout(o.timers.show)})):d()}var k,l,m,n,o,p;p=a.isArray(b.id)?b.id[i]:b.id,p=!p||p===e||p.length<1||j[p]?g.nextid++:j[p]=p,n=".qtip-"+p+"-create",o=z.call(this,p,b);if(o===e)return d;k=o.options,a.each(h,function(){this.initialize==="initialize"&&this(o)}),l={show:k.show.target,hide:k.hide.target},m={show:a.trim(""+k.show.event).replace(/ /g,n+" ")+n,hide:a.trim(""+k.hide.event).replace(/ /g,n+" ")+n},/mouse(over|enter)/i.test(m.show)&&!/mouse(out|leave)/i.test(m.hide)&&(m.hide+=" mouseleave"+n),l.show.bind(m.show,q),(k.show.ready||k.prerender)&&q(f)})},h=g.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.precedance=a.charAt(0).search(/^(t|b)/)>-1?"y":"x",this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y},this.abbreviation=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b}},offset:function(c,d,e){function l(a,b){f.left+=b*a.scrollLeft(),f.top+=b*a.scrollTop()}var f=c.offset(),g=d,i=0,j=document.body,k;if(g){do{g.css("position")!=="static"&&(k=g[0]===j?{left:parseInt(g.css("left"),10)||0,top:parseInt(g.css("top"),10)||0}:g.position(),f.left-=k.left+(parseInt(g.css("borderLeftWidth"),10)||0),f.top-=k.top+(parseInt(g.css("borderTopWidth"),10)||0),i++);if(g[0]===j)break}while(g=g.offsetParent());(d[0]!==j||i>1)&&l(d,1),(h.iOS<4.1&&h.iOS>3.1||!h.iOS&&e)&&l(a(b),-1)}return f},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||e,fn:{attr:function(b,c){if(this.length){var d=this[0],e="title",f=a.data(d,"qtip");if(b===e){if(arguments.length<2)return a.attr(d,u);if(typeof f==="object"){f&&f.rendered&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c),a.fn["attr"+t].apply(this,arguments),a.attr(d,u,a.attr(d,e));return this.removeAttr(e)}}}},clone:function(b){var c=a([]),d="title",e;e=a.fn["clone"+t].apply(this,arguments).filter("[oldtitle]").each(function(){a.attr(this,d,a.attr(this,u)),this.removeAttribute(u)}).end();return e},remove:a.ui?f:function(b,c){a(this).each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}},a.each(h.fn,function(b,c){if(!c)return d;var e=a.fn[b+t]=a.fn[b];a.fn[b]=function(){return c.apply(this,arguments)||e.apply(this,arguments)}}),g.version="nightly",g.nextid=0,g.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),g.zindex=15e3,g.defaults={prerender:e,id:e,overwrite:d,content:{text:d,attr:"title",title:{text:e,button:e}},position:{my:"top left",at:"bottom right",target:e,container:e,viewport:e,adjust:{x:0,y:0,mouse:d,resize:d,method:"flip flip"},effect:function(b,c,d){a(this).animate(c,{duration:200,queue:e})}},show:{target:e,event:"mouseenter",effect:d,delay:90,solo:e,ready:e},hide:{target:e,event:"mouseleave",effect:d,delay:0,fixed:e,inactive:e,leave:"window",distance:e},style:{classes:"",widget:e,width:e},events:{render:f,move:f,show:f,hide:f,toggle:f,focus:f,blur:f}},h.ajax=function(a){var b=a.plugins.ajax;return"object"===typeof b?b:a.plugins.ajax=new A(a)},h.ajax.initialize="render",h.ajax.sanitize=function(a){var b=a.content,c;b&&"ajax"in b&&(c=b.ajax,typeof c!=="object"&&(c=a.content.ajax={url:c}),"boolean"!==typeof c.once&&c.once&&(c.once=!!c.once))},a.extend(d,g.defaults,{content:{ajax:{loading:d,once:d}}}),h.imagemap=function(b,c){function l(a,b){var d=0,e=1,f=1,g=0,h=0,i=a.width,j=a.height;while(i>0&&j>0&&e>0&&f>0){i=Math.floor(i/2),j=Math.floor(j/2),c.x==="left"?e=i:c.x==="right"?e=a.width-i:e+=Math.floor(i/2),c.y==="top"?f=j:c.y==="bottom"?f=a.height-j:f+=Math.floor(j/2),d=b.length;while(d--){if(b.length<2)break;g=b[d][0]-a.offset.left,h=b[d][1]-a.offset.top,(c.x==="left"&&g>=e||c.x==="right"&&g<=e||c.x==="center"&&(g<e||g>a.width-e)||c.y==="top"&&h>=f||c.y==="bottom"&&h<=f||c.y==="center"&&(h<f||h>a.height-f))&&b.splice(d,1)}}return{left:b[0][0],top:b[0][1]}}b.jquery||(b=a(b));var d=b.attr("shape").toLowerCase(),e=b.attr("coords").split(","),f=[],g=a('img[usemap="#'+b.parent("map").attr("name")+'"]'),h=g.offset(),i={width:0,height:0,offset:{top:1e10,right:0,bottom:0,left:1e10}},j=0,k=0;h.left+=Math.ceil((g.outerWidth()-g.width())/2),h.top+=Math.ceil((g.outerHeight()-g.height())/2);if(d==="poly"){j=e.length;while(j--)k=[parseInt(e[--j],10),parseInt(e[j+1],10)],k[0]>i.offset.right&&(i.offset.right=k[0]),k[0]<i.offset.left&&(i.offset.left=k[0]),k[1]>i.offset.bottom&&(i.offset.bottom=k[1]),k[1]<i.offset.top&&(i.offset.top=k[1]),f.push(k)}else f=a.map(e,function(a){return parseInt(a,10)});switch(d){case"rect":i={width:Math.abs(f[2]-f[0]),height:Math.abs(f[3]-f[1]),offset:{left:f[0],top:f[1]}};break;case"circle":i={width:f[2]+2,height:f[2]+2,offset:{left:f[0],top:f[1]}};break;case"poly":a.extend(i,{width:Math.abs(i.offset.right-i.offset.left),height:Math.abs(i.offset.bottom-i.offset.top)}),c.string()==="centercenter"?i.offset={left:i.offset.left+i.width/2,top:i.offset.top+i.height/2}:i.offset=l(i,f.slice()),i.width=i.height=0}i.offset.left+=h.left,i.offset.top+=h.top;return i},h.tip=function(a){var b=a.plugins.tip;return"object"===typeof b?b:a.plugins.tip=new C(a)},h.tip.initialize="render",h.tip.sanitize=function(a){var b=a.style,c;b&&"tip"in b&&(c=a.style.tip,typeof c!=="object"&&(a.style.tip={corner:c}),/string|boolean/i.test(typeof c.corner)||(c.corner=d),typeof c.width!=="number"&&delete c.width,typeof c.height!=="number"&&delete c.height,typeof c.border!=="number"&&c.border!==d&&delete c.border,typeof c.offset!=="number"&&delete c.offset)},a.extend(d,g.defaults,{style:{tip:{corner:d,mimic:e,width:6,height:6,border:d,offset:0}}}),h.svg=function(b,c){var d=a(document),e=b[0],f={width:0,height:0,offset:{top:1e10,left:1e10}},g,h,i,j,k;if(e.getBBox&&e.parentNode){g=e.getBBox(),h=e.getScreenCTM(),i=e.farthestViewportElement||e;if(!i.createSVGPoint)return f;j=i.createSVGPoint(),j.x=g.x,j.y=g.y,k=j.matrixTransform(h),f.offset.left=k.x,f.offset.top=k.y,j.x+=g.width,j.y+=g.height,k=j.matrixTransform(h),f.width=k.x-f.offset.left,f.height=k.y-f.offset.top,f.offset.left+=d.scrollLeft(),f.offset.top+=d.scrollTop()}return f},h.modal=function(a){var b=a.plugins.modal;return"object"===typeof b?b:a.plugins.modal=new D(a)},h.modal.initialize="render",h.modal.sanitize=function(a){a.show&&(typeof a.show.modal!=="object"?a.show.modal={on:!!a.show.modal}:typeof a.show.modal.on==="undefined"&&(a.show.modal.on=d))},a.extend(d,g.defaults,{show:{modal:{on:e,effect:d,blur:d,escape:d}}}),h.bgiframe=function(b){var c=a.browser,d=b.plugins.bgiframe;if(a("select, object").length<1||(!c.msie||c.version.charAt(0)!=="6"))return e;return"object"===typeof d?d:b.plugins.bgiframe=new E(b)},h.bgiframe.initialize="render"})(jQuery,window)
/*
*	Qtip2: Define valores x default 
*	(!! afecta todos los bocadillos)
*/
$jq = jQuery.noConflict();
$jq.fn.qtip.zindex = 8888;
$jq.fn.qtip.defaults = $jq.extend(true, {}, $jq.fn.qtip.defaults, {
	overwrite: true,
	content:  { title: false },
	position: { 
		at: 'left top', 
		my:'right top'
		},
	show: {
		event: false,
		effect: false
	},
	hide: {
		event: false,
		effect: false
	},	
	style: {
		width: '300px', //max width
		tip: {
			width: 10,
			height: 10,
			border:3,
			offset: 5,
			mimic: 'right bottom',
			corner: true  // Position my top left...
		}
	}
});}
}
catch (e) { }
/*
*	Funcion para implementar Qtips2 en VY
*	
*	target_jq_selector	= (String) Selector de JQuery como "#id_elem" o ".clase" etc
*	text				= (String) texto plano o HTML q sera el contenido del tooltip
*	title				= (String o false) titulo. si se pasa false o null creara un tooltip sin titulo, 
*							solo cuerpo del texto (ver formatos en maqueta)
*	tooltip_id_sufix	= (String) ID principal para el qtip. si no se pasa, sera un numero correlativo.
*							Quedará como: "ui-tooltip-{tooltip_id_sufix}"
*/
var vyQtip = function (target_jq_selector,text,title,tooltip_id_sufix) {
	if(typeof $jq.fn.qtip == 'undefined')
		return;
	// define propiedades x defecto
	var target = (typeof target_jq_selector == 'undefined' || target_jq_selector == "") ? false : target_jq_selector;
	this.id = (typeof tooltip_id_sufix == 'undefined') ? $jq('.qtip').length+1 : tooltip_id_sufix;
	this.content = {};
	this.content.text	= (typeof text == 'undefined') ? "" : text; // texto plano o HTML
	this.content.attr	= $jq.fn.qtip.defaults.content.attr;		//Attribute of the target element to use for content if none is provided 
	this.content.title	= {};
	if (typeof title == 'undefined' || title == "") {
		this.content.title = false;
	} else {
		this.content.title.text		= title; // si se especifica, aparece la barra de titulo
		this.content.title.button	= false;
	}
	this.show	= {};
	this.show.target	= $jq.fn.qtip.defaults.show.target; // jq selector del objeto target
	this.show.modal		= {};
	this.show.modal		= $jq.fn.qtip.defaults.show.modal; // jq selector del objeto target
	this.show.event		= $jq.fn.qtip.defaults.show.event; // ej= 'mouseenter click' o 'click' :: OPCIONES= blur, focus, focusin, focusout, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error
	this.hide	= {};
	this.hide.target	= $jq.fn.qtip.defaults.hide.target; // jq selector del objeto target
    this.hide.event		= $jq.fn.qtip.defaults.hide.event; // ej= 'mouseleave click' o 'click' :: OPCIONES= blur, focus, focusin, focusout, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error
	this.position = {};
	this.position.target	= target;  //false u JQ selector
	this.position.at		= $jq.fn.qtip.defaults.position.at; // posicion del bocadillo respecto del objeto target
	this.position.my		= $jq.fn.qtip.defaults.position.my; // posicion del "tip" (la punta) respecto del bocadillo
	this.position.adjust	= {};
	this.style = {};
	this.style.tip = {};
	this.style.tip.corner	= $jq.fn.qtip.defaults.style.tip.corner;	// igual que position.my (utilizar position.my para cambiar)
	this.style.tip.mimic	= $jq.fn.qtip.defaults.style.tip.mimic;		// forma del bocadillo
	this.style.tip.width	= $jq.fn.qtip.defaults.style.tip.width;		// ancho del tip
	this.style.tip.height	= $jq.fn.qtip.defaults.style.tip.height;	// alto del tip
	this.style.tip.border	= $jq.fn.qtip.defaults.style.tip.border;	// ancho del borde del tip
	this.style.tip.offset	= $jq.fn.qtip.defaults.style.tip.offset;	// movimiento o margen del tip respecto del style.tip.corner
	this.style.width		= $jq.fn.qtip.defaults.style.width;			// ancho del bocadillo
	this.style.classes		= $jq.fn.qtip.defaults.style.classes;		// "ui-tooltip-vy-shadow";
	this.events = {};	

	// define formatos-tipo de tooltips, con las clases utilizadas 
	var classMap = { 
			'base'	: "",
			'notitle'	:"ui-tooltip-no-title ", 
			'nocontent'	:"ui-tooltip-no-title ", 
			'error'		:"", 
			'warning'	:"", 
			'notice'	:"",
			'rojo'		:"ui-tooltip-rojo ",
			'rojo_error':"ui-tooltip-rojo-error ",
			'gris'		:"ui-tooltip-gris ",
			'gris_1px'	:"border-1px ui-tooltip-gris ",
			'verde'		:"ui-tooltip-verde ",
			'borde_verde'	 :"ui-tooltip-borde-verde ",
			'borde_amarillo' :"ui-tooltip-borde-amarillo ",
			'beige_1px'		 :"border-1px ui-tooltip-beige ",
			'beige_1px_inset':"border-1px inset-shadow ui-tooltip-beige ",
			'SA_itinerary_verd'	 :"ui-tooltip-itinerary ui-tooltip-borde-verde ",
			'SA_itinerary_groc'	 :"ui-tooltip-itinerary ui-tooltip-borde-amarillo ",
			'none'	 :"ui-tooltip-none "
			}
	
	// asignar clases al tooltip a traves de tipos definidos antes
	this.setClass = function(classId)  {
		if (classId in classMap) {
			this.style.classes = classMap.base + classMap[classId];
		}
	}

	// createTooltip = crea el objeto en DOM y ejecuta una funcion
	this.createTooltip = function(action) {

		var action = (typeof action == 'undefined' || action == "") ? false : action;

		if (this.content.title==false && this.style.classes.indexOf("none")<0)	{
			// si no tiene titulo, aplica una clase no-title
			this.style.classes = classMap.notitle+this.style.classes;
		}
		
		// busca si hay qtip en el mismo target
		var api = $jq(target).data('qtip');
		if (typeof api != 'undefined' ) {
			// si el objeto target tiene un qtip, lo destruye
			this.destroyTooltip();
		}

		// Crea el nuevo tooltip
		$jq(target).qtip(this);

		// ejecuta una accion pasada como parametro
		if (action) {
			switch (action) {
				case "show":
					this.showTooltip();
					break;
			}
		}
	}

	// funcion mostrar
	this.showTooltip = function() {	
		$jq(target).qtip("show");
	}

	// funcion ocultar
	this.hideTooltip = function() {		
		$jq(target).qtip("hide");
	}
	
	// funcion destruir similar a remove() de Jquery
	this.destroyTooltip = function() {		
		$jq(target).qtip("destroy");
	}

	// funcion vuelve a posicionar el ttip junto a su target
	this.repositionTooltip = function() {		
		$jq(target).qtip("reposition");
	}

}
/*****************************
*	TooltipContent() object
*
*	Crea el contenido de los tooltips con el formato:
*	"Contexto: Campo-sin-completar < link para modificar >"
*
*	ej:" Datos de contacto: Nombre del agente de viajes <a>modificar</a>"
*
*	parametros x default:
*	default_anchor_href = ID o contendio del attr HREF para el link, si no se pasa, no creará el link 
*	default_anchor_text	= texto del link ej: "modificar"
*	default_context		= contexto donde esta el campo: "Datos de contacto" equipaje, etc
*
*	METODOS: 
*	addTextLine(text,anchor_href,anchor_text,context) 
*		crea la linea con el texto, el param "text" es obligatorio, los demas los rellenara con los 
*		params x defecto si no se pasa ninguno
*
*	getContent()		= devuelve String con el HTML con contenidos,en una lista
*	getContentNoLinks() = devuelve String con el HTML con contenidos pero sin los links, separados x <br>
*
******************************/
var TooltipContent = function (default_anchor_href,default_anchor_text,default_context) {

	this.default_context = (typeof default_context == 'undefined' || default_context == "" ) ? '' : default_context+": "; 
	this.default_anchor_href = (typeof default_anchor_href == 'undefined' || default_anchor_href == "" ) ? false : default_anchor_href;	
	this.default_anchor_text = (typeof default_anchor_text == 'undefined' || default_anchor_text == "" ) ? '' : default_anchor_text;	
	
	var linesArr = [];
	
	this.addTextLine = function (text,anchor_href,anchor_text,context) {
		
		var textline = (typeof context == 'undefined' || context == "" ) ? this.default_context : context+": ";

		//textline	+= '<span>';
		textline	+= (typeof text == 'undefined' || text == "" ) ? "" : text;
		//textline	+= '</span>'; 

		if ( (typeof anchor_href != "undefined" && anchor_href != "") || this.default_anchor_href )
		{
		textline	+= ' <a href="';
		textline	+= (typeof anchor_href == 'undefined' || anchor_href == "") ? this.default_anchor_href : anchor_href;
		textline	+= '">';
		textline	+= (typeof anchor_text == 'undefined' || anchor_text == "" ) ? this.default_anchor_text : anchor_text;
		textline	+= '</a>';
		}
				
		linesArr.push(textline);
	}

	this.isEmpty = function () {
		return (linesArr.length>0) ? false : true;
	}
	
	this.getContent = function () {
		var qtip_text = new String(); 
		for(var i = 0; i < linesArr.length; i++)
			qtip_text = qtip_text.concat("<li>", linesArr[i],'</li>');
		qtip_text = new String().concat("<ul>", qtip_text, "</ul>");
		return qtip_text;
		//return linesArr.join('<br>');
	}

	this.getContentNoLinks = function () {
		var newLines = [];
		var temptext = new String(); 
		var temppos = 0;
		var qtip_text = new String(); 

		for (i=0;i<linesArr.length;i++)	{
			temppos = linesArr[i].indexOf(" <a href");
			if (temppos != -1 ) {
				temptext = linesArr[i].substr(0,temppos);
			} 
			else {
				temptext = linesArr[i];
			}
			//newLines.push(temptext);
			qtip_text = qtip_text.concat("<li>",temptext,'</li>');
		}
		qtip_text = new String().concat("<ul>", qtip_text, "</ul>");
		return qtip_text;
		//return newLines.join('<br>');
	}
}
/* 
*	disableButton(jq_selector)
*  
*	desactiva un boton con esta estructura HTML - como en tu-vuelo
*	<p>
*		<a>
*			<span>Continuar compra</span>
*		</a>
*	</p>
*
*
*/
function disableButton(jq_selector) {
	$jq(jq_selector).removeClass("bt_enabled").addClass("bt_disabled");
}
/* 
*	enableButton(jq_selector)
*	activa el boton
*/
function enableButton(jq_selector) {
	$jq(jq_selector).removeClass("bt_disabled").addClass("bt_enabled");
}

function isButtonDisabled(jq_selector) {
	return ($jq(jq_selector).hasClass("bt_disabled")) ? true : false;
}
function infoTooltipInit(){
		var vyTooltip = new vyQtip('#altPhoneLabelDiv a.mas_info', filterText.bocadilloInfomPassenger);
		vyTooltip.style.width	= "170px";
		vyTooltip.id = "contactInfoPassengerMas1";
		vyTooltip.show.event = "mouseenter";
		vyTooltip.hide.event = "mouseleave";
		vyTooltip.style.tip.mimic = "bottom right";
		vyTooltip.position.at = "top center";
		vyTooltip.position.my = "bottom right";
		vyTooltip.setClass("verde");
		vyTooltip.createTooltip();
		var vyTooltip = new vyQtip('#emailLabelDiv a.mas_info', filterText.bocadilloInfomPassenger);
		vyTooltip.style.width	= "170px";
		vyTooltip.id = "contactInfoPassengerMas2";
		vyTooltip.show.event = "mouseenter";
		vyTooltip.hide.event = "mouseleave";
		vyTooltip.style.tip.mimic = "bottom right";
		vyTooltip.position.at = "top center";
		vyTooltip.position.my = "bottom right";
		vyTooltip.setClass("verde");
		vyTooltip.createTooltip();
		var vyTooltip = new vyQtip('#labelContactInfoPassengerPackGoMas1 a.mas_info', filterText.bocadilloInfomPassengerPackGo);
		vyTooltip.style.width	= "170px";
		vyTooltip.id = "contactInfoPassengerPackGoMas1";
		vyTooltip.show.event = "mouseenter";
		vyTooltip.hide.event = "mouseleave";
		vyTooltip.style.tip.mimic = "bottom right";
		vyTooltip.position.at = "top center";
		vyTooltip.position.my = "bottom right";
		vyTooltip.setClass("verde");
		vyTooltip.createTooltip();
		var vyTooltip = new vyQtip('#labelContactInfoPassengerPackGoMas2 a.mas_info', filterText.bocadilloInfomPassengerPackGo);
		vyTooltip.style.width	= "170px";
		vyTooltip.id = "contactInfoPassengerPackGoMas2";
		vyTooltip.show.event = "mouseenter";
		vyTooltip.hide.event = "mouseleave";
		vyTooltip.style.tip.mimic = "bottom right";
		vyTooltip.position.at = "top center";
		vyTooltip.position.my = "bottom right";
		vyTooltip.setClass("verde");
		vyTooltip.createTooltip();
}
var isSubmitingForm = false;
var tooltipValidations = {
	init: function(id) {
		var self = this;
		switch(id)
		{
			case 'select':
				$jq("#label_continue_resrv").hover(function(){self.clearSection(["selectmy25invalid"]);self.onhover = true;eval($jq("#label_continue_resrv").attr("href"));self.onhover = false;},function(){});
				$jq("#results0 input[type='radio']").click(function(){self.clearSection(["submitFormSelectIda","flightTimesOverlap"]);})
				$jq("#results1 input[type='radio']").click(function(){self.clearSection(["submitFormSelectVuelta","flightTimesOverlap"]);})				
				$jq("#padlockHold,#holdConditions").click(function(){self.clearSection(["agreeToHoldTerms","validateAgreement"]);})				
				$jq("#agreementCheckBox").click(function(){self.clearSection("validateAgreement");});
				break;
			case 'contact':
				$jq("#firstNameText,#lastNameText,#adress1Text,#cityText,#countrySelect,#stateSelect,#zip,#altPhoneText,#contactEmail,#contactEmail_repeat").click(function(){self.clearSection(["submitFormSelectVuelta","addressIncomplete"]);$jq("#datosPasajero").removeClass("error_caja2");})
				$jq("#label_continue_resrv").hover(function(){ if(isButtonDisabled('#but_continue') || isSubmitingForm) return; self.clearAll();tooltipValidations.onhover = true;	eval($jq("#label_continue_resrv").attr("href"));self.onhover = false;},function(){});
				$jq("#equip_mano, input[name='bagsPaxRadio']").click(function(){self.clearSection("bagsError");$jq('#bagsSelectPaxGeneral').removeClass("error_caja");$jq("#infoExtraMaletas .sin_equipaje .condiciones_equipaje label").removeClass("error_txt");})				
				$jq("#selectPax input[type='text']").click(function(){self.clearSection("missingPassengerInfo");$jq("#datosPasajero").removeClass("error_caja2");$jq("#datosPasajero").removeClass("error_caja");})				
				$jq("#datosPasajero input,#datosPasajero select").click(function(){self.clearSection(["missingPassengerInfo","contactMissingAgentInfo", "contactResidentesMissingInfo"]);$jq("#datosPasajero").removeClass("error_caja");$jq("#datosPasajero input, #datosPasajero select").removeClass("error_input_1px");$jq("#datosPasajero input, #datosPasajero select").removeClass("error_input_1px");$jq("#datosPasajero label").removeClass("error_txt");});
				$jq("#bannerPackGoCenter input").click(function(){self.clearSection("contactPackGo");$jq("#datosPasajero").removeClass("error_caja2");$jq("#bannerPackGoCenter").removeClass("error_caja_packgo");$jq("#bannerPackGoCenter").addClass("caja_go");})
				$jq("#sel_yo_si,select[id*='frecuente_']").click(function(){self.clearSection("missingPassengerInfo");$jq("#selectPax input, #selectPax select").removeClass("error_input_1px");$jq("#datosPasajero").removeClass("error_caja2");})
				$jq("#selectPax select").change(function(){self.clearSection("missingPassengerInfo");$jq("#selectPax input, #selectPax select").removeClass("error_input_1px");$jq("#datosPasajero").removeClass("error_caja2");$jq("#bannerPackGoCenter #packGoInterface #selectPax input").removeClass("error_input_1px");})
				$jq("#bannerPackGoCenter #packGoInterface #selectPax input").click(function(){$jq("#bannerPackGoCenter #packGoInterface #selectPax input").removeClass("error_input_1px");})
				$jq("#pets input").click(function(){self.clearSection("contactPackGoPets");$jq("#datosPasajero").removeClass("error_caja2");});
				$jq("#sms input, #distrib_SMS").click(function(){self.clearSection("contactBadSmsNumber");$jq("#datosPasajero").removeClass("error_caja2");});
				$jq("#seguro_viaje input").click(function(){self.clearSection("contactInsuranceNotSelected");$jq('#seguro_viaje').removeClass("error_caja");$jq('#seguro_viaje h4').removeClass("error_txt");});
				var jq_sel_fam_num_fields = new String();
				if ($jq("#flia_num_res_fields").length>0) { 
					jq_sel_fam_num_fields = "#flia_num_res_fields input,#flia_num_res_fields select";
				} else if ($jq("#flia_num_fields").length>0) {
					jq_sel_fam_num_fields = "#flia_num_fields input,#flia_num_fields select";
				}
				if (jq_sel_fam_num_fields.length>0){
					$jq(jq_sel_fam_num_fields).click(function(){ self.clearSection(["contactResidentesMissingInfo","contactFamNum"]);$jq('#datosPasajero').removeClass("error_caja2");	$jq(jq_sel_fam_num_fields).removeClass("error_input_1px");	$jq(jq_sel_fam_num_fields).prev("span").removeClass("error_input_label");	enableButton('#but_continue');	})
				}
				$jq("#contactoPago input, #contactoPago select")
					.click(function(){ $jq('#contactoPago input, #contactoPago select').removeClass("error_input_1px"); $jq('#contactoPago DIV').removeClass("error_input_label"); self.clearSection("missingUMinfo"); enableButton("#but_continue"); $jq("#datosPasajero").removeClass("error_caja2"); });
				$jq("#agreementCheckBoxDiv").click(function(){ $jq("#agreementCheckBoxDiv").removeClass("error_input_label"); });
				$jq("#contactoPago_UM input, #contactoPago_UM select")
					.click(function(){ $jq('#contactoPago_UM input, #contactoPago_UM select').removeClass("error_input_1px"); $jq('#contactoPago_UM label').removeClass("error_input_label"); self.clearSection("missingUMinfo"); enableButton("#but_continue"); $jq("#datosPasajero").removeClass("error_caja2"); });
				$jq("#datosPasajero").removeClass("error_caja");
				break;
			case 'payment':
				$jq("#label_continue_resrv").hover(function(){if($jq("[name=totalPayment]") && $jq("[name=totalPayment]").val() != 0){self.clearAll();tooltipValidations.onhover = true;$jq("#label_continue_resrv").click();self.onhover = false;}},function(){});
				$jq('select[name="card"],input[name*="ccNumber"],input[name="ccHold"],input[name="ccMonth"],input[name="ccYear"],input[name="ccCVV"]')
					.click( function(){ if ($jq(".caja_tarjeta").hasClass("error_caja")){	self.clearSection("creditCardFields"); $jq('.caja_tarjeta').removeClass("error_caja");$jq('#ccMainPanel input,#ccMainPanel select').removeClass("error_input_1px");	$jq('#ccMainPanel label').removeClass("error_input_label");	enableButton('#but_continue');	}})
				$jq('select[name="card"]').click( function(){ self.clearSection("formatValidation");  });
				$jq('input[name="cur_tab_select"]')
					.change(function(){ self.clearSection("paymentNoSelection");$jq('.caja_tarjeta').removeClass("error_caja");	$jq('.caja_paypal').removeClass("error_caja");enableButton('#but_continue');});				
				$jq('#payment_hold_caja_datos input').click(function() { self.clearSection("paymentHold");$jq('#payment_hold_caja_datos').removeClass("error_caja");	$jq('#payment_hold_caja_datos input').removeClass("error_input_1px");	$jq('#payment_hold_caja_datos label').removeClass("error_input_label");	enableButton('#but_continue');});				
				break;
			default:
				break;
		}
	},	
	genericTooltip: function(msg, anchor, section, width) {
		if(typeof width == 'undefined')
			width = '215px';
		var vyTooltip = new vyQtip('#' + anchor, msg);
		vyTooltip.style.width	= width;
		vyTooltip.id = "genericTooltip";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "left bottom";
		vyTooltip.position.at = "right center";
		vyTooltip.position.my = "left bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, section);
	},
	selectMarket1NotSelected: function () {
		var tooltip_content = new String();
		tooltip_content = tooltip_content.concat(selectText.popupSelectFlight1, "<br/><br/><span style='float:right'><a href='#specialTransportConditions'>",selectText.popup_modify_info, "</a></span>");
		var vyTooltip = new vyQtip('#but_continue', tooltip_content);
		vyTooltip.style.width	= "185px";
		vyTooltip.id = "selectMarket1NotSelected";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "submitFormSelectIda");
		
		var vyTooltip2 = new vyQtip('#ida', selectText.popupSelectFlight1);
		vyTooltip2.style.width	= "240px";
		vyTooltip2.id = "selectMarket1NotSelected";
		vyTooltip2.setClass("rojo");
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "submitFormSelectIda");
		disableButton('#but_continue');
	},
	selectMarket2NotSelected: function () {
		var tooltip_content = new String();
		tooltip_content = tooltip_content.concat(selectText.popupSelectFlight2, "<br/><br/><span style='float:right'><a href='#verMas1'>", selectText.popup_modify_info, "</a></span>");
		var vyTooltip = new vyQtip('#but_continue', tooltip_content);
		vyTooltip.style.width	= "185px";
		vyTooltip.id = "selectMarket2NotSelected";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "submitFormSelectVuelta");
	
		var vyTooltip2 = new vyQtip('#vuelta', selectText.popupSelectFlight2);
		vyTooltip2.style.width	= "240px";
		vyTooltip2.id = "selectMarket2NotSelected";
		vyTooltip2.setClass("rojo");
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "submitFormSelectVuelta");
		
		disableButton('#but_continue');
	},
	selectAgreementNotSelected: function () {
		var vyTooltip = new vyQtip('#but_continue', selectText.agreeToTerms);
		vyTooltip.style.width	= "250px";
		vyTooltip.id = "selectMarket2NotSelected";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "validateAgreement");
		disableButton('#but_continue');
	},
	selectAgreeToHoldTerms: function() {
		var vyTooltip = new vyQtip('#but_continue', selectText.agreeToHoldTerms);
		vyTooltip.style.width	= "250px";
		vyTooltip.id = "selectAgreeToHoldTerms";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "agreeToHoldTerms");
		disableButton('#but_continue');
	},
	selectFlightTimesOverlap: function(){
		var vyTooltip = new vyQtip('#but_continue', selectText.flight_times_overlap);
		vyTooltip.style.width	= "250px";
		vyTooltip.id = "selectFlightTimesOverlap";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "flightTimesOverlap");
		disableButton('#but_continue');
	},	
	selectFlightTimesMinimum: function(msg) {
		var vyTooltip = new vyQtip('#but_continue', new String().concat(selectText.flight_times_minimum_1, " ", msg, " ", selectText.flight_times_minimum_2));
		vyTooltip.style.width	= "250px";
		vyTooltip.id = "selectFlightTimesMinimum";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "flightTimesOverlap");
		disableButton('#but_continue');
	},
	
	contactMissingAddressInfo: function(msg, msg2) {
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip = new vyQtip('#firstNameText', msg, contactText.popup_missing_fields_to_continue);
		vyTooltip.style.width	= "234px";
		vyTooltip.id = "contactMissingAddressInfo";
		vyTooltip.setClass("rojo_error");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "addressIncomplete");
		}
		
		var vyTooltip2 = new vyQtip('#but_continue', msg2, contactText.popup_missing_fields_to_continue);
		vyTooltip2.style.width	= "315px";
		vyTooltip2.id = "contactMissingAddressInfo";
		vyTooltip2.style.tip.mimic = "right bottom";
		vyTooltip2.position.at = "left center";
		vyTooltip2.position.my = "right bottom";
		vyTooltip2.position.adjust.x = 8;
		vyTooltip2.setClass("rojo_error");
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "addressIncomplete");
		
		disableButton("#but_continue");
		$jq("#datosPasajero").addClass("error_caja2");

	},
	contactEmailNotEqual: function(msg) {
		var vyTooltip = new vyQtip('#but_continue',msg,contactText.popup_missing_fields_to_continue);
		vyTooltip.style.width	= "315px";
		vyTooltip.setClass("rojo_error");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.position.adjust.x = 8;
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "addressIncomplete");
		disableButton('#but_continue');
	},
	contactEmailMissmatch: function() {
		var vyTooltip = new vyQtip('#contactEmail', contactText.label_email_mismatch);
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "contactEmailMissmatch";
		vyTooltip.setClass("rojo");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "addressIncomplete");
		
		disableButton('#but_continue');
		$jq("#datosPasajero").addClass("error_caja2");
	},
	contactNoBagsSelected: function() {
		var vyTooltip = new vyQtip('#bagsSelectPaxGeneral',contactText.error_seleccion_maletas);
		vyTooltip.style.width	= "198px";
		vyTooltip.id = "contactNoBagsSelected";
		vyTooltip.setClass("rojo");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "bagsError");
		disableButton('#but_continue');
	
		tooltip_content = new String().concat(contactText.error_seleccion_maletas, "<span style='float:right'><a href='#label_personaliza_vuelo'>",contactText.popup_modify_info,"</a></span>");
		var vyTooltip2 = new vyQtip('#but_continue',tooltip_content);
		vyTooltip2.style.width	= "234px";
		vyTooltip2.id = "contactNoBagsSelected";
		vyTooltip2.setClass("rojo");
		vyTooltip2.style.tip.mimic = "right bottom";
		vyTooltip2.position.at = "left center";
		vyTooltip2.position.my = "right bottom";
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "bagsError");
		
		disableButton('#but_continue');
		$jq('#bagsSelectPaxGeneral').addClass("error_caja");
	},
	contactBagConditionsNotSelected: function() {
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip = new vyQtip('#bagsSelectPaxGeneral',contactText.alert_check_maleta);
		vyTooltip.style.width	= "198px";
		vyTooltip.id = "contactBagConditionsNotSelected";
		vyTooltip.setClass("rojo");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "bagsError");
		}
		tooltip_content = new String().concat(contactText.alert_check_maleta,"<br/><span style='float:right'><a href='#label_personaliza_vuelo'>",contactText.popup_modify_info,"</a></span>");
		var vyTooltip2 = new vyQtip('#but_continue', tooltip_content);
		vyTooltip2.style.width	= "234px";
		vyTooltip2.id = "contactBagConditionsNotSelected";
		vyTooltip2.setClass("rojo");
		vyTooltip2.style.tip.mimic = "right bottom";
		vyTooltip2.position.at = "left center";
		vyTooltip2.position.my = "right bottom";
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "bagsError");
		
		disableButton('#but_continue');
		$jq('#bagsSelectPaxGeneral').addClass("error_caja");
		$jq("#infoExtraMaletas .sin_equipaje .condiciones_equipaje label").addClass("error_txt");
	},	
	contactMissingPassengerInfo: function(msg, msg2) {
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip2 = new vyQtip('#selectPax',msg, passengerText.missingPassengerInfo);
		vyTooltip2.style.width	= "234px";
		vyTooltip2.id = "contactMissingPassengerInfo0";
		vyTooltip2.setClass("rojo_error");
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "missingPassengerInfo");
		}
		
		var vyTooltip = new vyQtip('#but_continue', msg2, passengerText.missingPassengerInfo);
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "contactMissingPassengerInfo_2";
		vyTooltip.setClass("rojo_error");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.position.adjust.x = 8;
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "missingPassengerInfo");
		
		disableButton('#but_continue');
		$jq("#datosPasajero").addClass("error_caja2");
	},
	contactPackGo: function() {		
		var vyTooltip = new vyQtip('#but_continue', contactText.popup_packgo);
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "contactPackGo";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactPackGo");
		
		if (!isBrowserIE6orIE7())
		{
		var vyTooltip2 = new vyQtip('#bannerPackGoCenter', contactText.popup_packgo);
		vyTooltip2.style.width	= "234px";
		vyTooltip2.id = "contactPackGo";
		vyTooltip2.setClass("rojo");
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "contactPackGo");
		}

		$jq("#bannerPackGoCenter").removeClass("caja_go");
		$jq("#bannerPackGoCenter").addClass("error_caja_packgo");
		$jq("#bannerPackGoCenter #packGoInterface #selectPax input").addClass("error_input_1px");
		disableButton('#but_continue');
		$jq("#but_continue a#label_continue_resrv").attr("href") = "javascript:void(0)";
	},
	contactPackGoPets: function() {		
		var vyTooltip = new vyQtip('#but_continue', contactText.popup_packgo_pets);
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "contactPackGoPets";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactPackGoPets");

		if (!isBrowserIE6orIE7())
		{			
		var vyTooltip2 = new vyQtip('#pets', contactText.popup_packgo_pets);
		vyTooltip2.style.width	= "234px";
		vyTooltip2.id = "contactPackGoPets";
		vyTooltip2.setClass("rojo");
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "contactPackGoPets");
		}
		
		disableButton('#but_continue');
		$jq("#pets").addClass("error_caja2");
	},
	contactBadSmsNumber: function() {
		var vyTooltip = new vyQtip('#but_continue', contactText.popup_bad_sms_number);
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "contactBadSmsNumber";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactBadSmsNumber");
		
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip2 = new vyQtip('#sms', contactText.popup_bad_sms_number);
		vyTooltip2.style.width	= "234px";
		vyTooltip2.id = "contactBadSmsNumber";
		vyTooltip2.setClass("rojo");
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "contactBadSmsNumber");
		}
		
		disableButton('#but_continue');
		$jq("#datosPasajero").addClass("error_caja2");
	},
	contactInsuranceNotSelected: function() {

		var vyTooltip = new vyQtip('#but_continue', contactText.error_seleccion_seguro);
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "contactInsuranceNotSelected";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactInsuranceNotSelected");
		
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip2 = new vyQtip('#seguro_viaje', contactText.error_seleccion_seguro);
		vyTooltip2.style.width	= "234px";
		vyTooltip2.id = "contactInsuranceNotSelected";
		vyTooltip2.setClass("rojo");
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "contactInsuranceNotSelected");
		}
		
		disableButton('#but_continue');
		$jq('#seguro_viaje').addClass("error_caja");
		$jq('#seguro_viaje h4').addClass("error_txt");		
	},	
	contactMissingAgentInfo: function(msg, msg2) {
	
		var vyTooltip = new vyQtip('#but_continue', msg, contactText.popup_missing_fields_to_continue); //popup_missing_agent_info 
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "contactMissingAgentInfo";
		vyTooltip.setClass("rojo_error");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactMissingAgentInfo");
		
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip = new vyQtip('#contactoPago',msg2, contactText.popup_missing_fields_to_continue);
		vyTooltip.style.width	= "234px";
		vyTooltip.id = "contactMissingAgentInfo";
		vyTooltip.setClass("rojo_error");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactMissingAgentInfo");
		}

		$jq("#datosPasajero").addClass("error_caja");
		disableButton('#but_continue');
	},	
	contactResidentesMissingInfo: function(msg, idField){
		var vyTooltip = new vyQtip('#but_continue', msg, contactText.residents_error);
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "contactResidentesMissingInfo";
		vyTooltip.setClass("rojo_error");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactResidentesMissingInfo");
		
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip = new vyQtip('#' + idField, msg, contactText.residents_error);
		vyTooltip.style.width	= "234px";
		vyTooltip.id = "contactResidentesMissingInfo";
		vyTooltip.setClass("rojo_error");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactResidentesMissingInfo");
		}

		$jq("#datosPasajero").addClass("error_caja2");		
		$jq("#" + idField).addClass("error_input_1px");
		$jq("label", $jq("#" + idField).parent()).addClass("error_txt");
		disableButton('#but_continue');
	},
	contactResidentesNoDNI: function(idField){
		var vyTooltip = new vyQtip('#but_continue', new String().concat(contactText.label_res_error, " ", contactText.res_error_dni,"<br><span class='fRight'><a href='#"+idField+"'>",contactText.popup_modify_info,"</a></span>"));
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "contactResidentesNoDNI";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactResidentesMissingInfo");
		
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip = new vyQtip('#' + idField, new String().concat(contactText.label_res_error, " ", contactText.res_error_dni));
		vyTooltip.style.width	= "234px";
		vyTooltip.id = "contactResidentesNoDNI";
		vyTooltip.setClass("rojo");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactResidentesMissingInfo");
		}

		$jq("#datosPasajero").addClass("error_caja2");		
		$jq("#" + idField).addClass("error_input_1px");
		$jq("label", $jq("#" + idField).parent()).addClass("error_txt");
		disableButton('#but_continue');
	},	
	contactResidentesDNIFormat: function(idField){
		var msg = contactText.label_res_error+"<br>"+contactText.label_res_error_doc_type;
		var vyTooltip = new vyQtip('#but_continue', new String().concat(msg,"<br><span class='fRight'><a href='#",idField,"'>",contactText.popup_modify_info,"</a></span>"));
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "contactResidentesDNIFormat";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactResidentesMissingInfo");
		
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip = new vyQtip('#' + idField, msg);
		vyTooltip.style.width	= "234px";
		vyTooltip.id = "contactResidentesDNIFormat";
		vyTooltip.setClass("rojo");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactResidentesMissingInfo");
		}

		$jq("#datosPasajero").addClass("error_caja2");		
		$jq("#" + idField).addClass("error_input_1px");
		$jq("label", $jq("#" + idField).parent()).addClass("error_txt");
		disableButton('#but_continue');
	},
	contactFamNumMissingInfo: function(msg,idField){
		var msg_link = msg+"<br><span class='fRight'><a href='#"+idField+"'>"+contactText.popup_modify_info+"</a></span>";
		var vyTooltip = new vyQtip('#but_continue', msg_link);
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "contactFamNumMissingInfo";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactFamNum");
		
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip = new vyQtip('#'+idField, msg);
		vyTooltip.style.width	= "234px";
		vyTooltip.id = "contactResidentesMissingInfo";
		vyTooltip.setClass("rojo");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "contactFamNum");
		}

		$jq("#"+idField).prev('span').addClass("error_input_label");
		$jq("#"+idField).addClass("error_input_1px"); 

		$jq("#datosPasajero").addClass("error_caja2");		
		disableButton('#but_continue');

	},
	contactUMMissingInfoResponsable: function(msg_links,msg,title) {
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip = new vyQtip('#contactoPago', msg, title);
		vyTooltip.style.width	= "234px";
		vyTooltip.id = "contactUMMissingInfoResponsable";
		vyTooltip.setClass("rojo_error");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "missingUMinfo");
		}
		
		var vyTooltip2 = new vyQtip('#but_continue', msg_links, title);
		vyTooltip2.style.width	= "315px";
		vyTooltip2.id = "contactUMMissingInfoResponsable2";
		vyTooltip2.style.tip.mimic = "right bottom";
		vyTooltip2.position.at = "left center";
		vyTooltip2.position.my = "right bottom";
		vyTooltip2.position.adjust.x = 8;
		vyTooltip2.setClass("rojo_error");
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "missingUMinfo");
		
		disableButton("#but_continue");
		$jq("#datosPasajero").addClass("error_caja2");

		$jq('#contactoPago input:text[value=""]')
			.addClass("error_input_1px")
			.parent().prev("DIV").addClass("error_input_label"); 
		$jq('#contactoPago select:has(option:selected[value=""])')
			.addClass("error_input_1px")
			.parent().prev("DIV").addClass("error_input_label"); 
	},
	contactUMMissingInfoContacto: function(msg_links,msg,title) {
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip = new vyQtip('#contactoPago_UM', msg, title);
		vyTooltip.style.width	= "234px";
		vyTooltip.id = "contactUMMissingInfoContacto";
		vyTooltip.setClass("rojo_error");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "missingUMinfo");
		}
		
		var vyTooltip2 = new vyQtip('#but_continue', msg_links, title);
		vyTooltip2.style.width	= "315px";
		vyTooltip2.id = "contactUMMissingInfoContacto2";
		vyTooltip2.style.tip.mimic = "right bottom";
		vyTooltip2.position.at = "left center";
		vyTooltip2.position.my = "right bottom";
		vyTooltip2.position.adjust.x = 8;
		vyTooltip2.setClass("rojo_error");
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "missingUMinfo");
		
		disableButton("#but_continue");
		$jq("#datosPasajero").addClass("error_caja2");

		$jq('#contactoPago_UM input:text[value=""]')
			.addClass("error_input_1px")
			.prev("label").addClass("error_input_label"); 
		$jq('#contactoPago_UM select:has(option:selected[value=""])')
			.addClass("error_input_1px")
			.prev("label, DIV label").addClass("error_input_label"); 

	},	
	contactUMUnderAgeResponsable: function(msg) {
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip = new vyQtip('#contactoPago', msg);
		vyTooltip.style.width	= "234px";
		vyTooltip.id = "contactUMAgeResponsable";
		vyTooltip.setClass("rojo");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "missingUMinfo");
		}
		
		var vyTooltip2 = new vyQtip('#but_continue', new String().concat(msg,"<br><span class='fRight'><a href='#contactoPago'>",contactText.popup_modify_info,"</a></span>"));
		vyTooltip2.style.width	= "315px";
		vyTooltip2.id = "contactUMAgeResponsable2";
		vyTooltip2.style.tip.mimic = "right bottom";
		vyTooltip2.position.at = "left center";
		vyTooltip2.position.my = "right bottom";
		vyTooltip2.position.adjust.x = 8;
		vyTooltip2.setClass("rojo");
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "missingUMinfo");
		
		disableButton("#but_continue");
		$jq("#datosPasajero").addClass("error_caja2");

		$jq('#DOBDay_umSelect,#DOBMonth_umSelect,#DOBYear_umSelect')
			.addClass("error_input_1px")
			.parent().prev("DIV").addClass("error_input_label"); 
	},
	contactUMagree: function(msg) {
		if (!isBrowserIE6orIE7())
		{	
		var vyTooltip = new vyQtip('#agreementCheckBoxDiv', msg);
		vyTooltip.style.width	= "234px";
		vyTooltip.id = "contactUMagree";
		vyTooltip.setClass("rojo");
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "missingUMinfo");
		}
		
		var vyTooltip2 = new vyQtip('#but_continue', new String().concat(msg,"<br><span class='fRight'><a href='#countryLabel'>",contactText.popup_modify_info,"</a></span>"));
		vyTooltip2.style.width	= "315px";
		vyTooltip2.id = "contactUMagree2";
		vyTooltip2.style.tip.mimic = "right bottom";
		vyTooltip2.position.at = "left center";
		vyTooltip2.position.my = "right bottom";
		vyTooltip2.setClass("rojo");
		vyTooltip2.createTooltip("show");
		this.add(vyTooltip2, "missingUMinfo");
		
		disableButton("#but_continue");
		$jq("#datosPasajero").addClass("error_caja2");
		$jq("#agreementCheckBoxDiv").addClass("error_input_label");
	},
	creditCardMissingData: function(msg) {
		var content_text = "<b>"+paymentText.popup_card_missing_data+"</b><br>"+msg;
		var vyTooltip = new vyQtip('#but_continue',content_text); 
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "creditCardMissingData";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "creditCardFields");
		return vyTooltip;
	},
	creditCardValidateExpiration: function(msg) {
		var vyTooltip = new vyQtip('#but_continue',msg); 
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "creditCardValidateExpiration";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "creditCardFields");
		return vyTooltip;
	},
	paymentCreditCardValidateCVV: function(msg) {
		var vyTooltip = new vyQtip('#ccCVVText',msg); 
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "paymentCreditCardValidateCVV";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "formatValidation");

	},
	paymentCCVisaVuelingError: function(msg) {
		var vyTooltip = new vyQtip('#but_continue',msg);
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "paymentCCVisaVuelingError";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "creditCardFields");

		$jq(".caja_tarjeta").addClass("error_caja");
		disableButton('#but_continue');
	},
	paymentNotSelected: function(msg) {
		var vyTooltip = new vyQtip('#but_continue',msg);
		vyTooltip.style.width	= "234px";
		vyTooltip.id = "paymentNotSelected";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "paymentNoSelection");

		$jq(".caja_tarjeta").addClass("error_caja");
		$jq(".caja_paypal").addClass("error_caja");
		disableButton('#but_continue');
	},
	paymentHoldInvalidFormData: function(msg) {
		var vyTooltip = new vyQtip('#but_continue',msg);
		vyTooltip.style.width	= "315px";
		vyTooltip.id = "paymentHoldInvalidFormData";
		vyTooltip.setClass("rojo");
		vyTooltip.style.tip.mimic = "right bottom";
		vyTooltip.position.at = "left center";
		vyTooltip.position.my = "right bottom";
		vyTooltip.createTooltip("show");
		this.add(vyTooltip, "paymentHold");

		$jq("#payment_hold_caja_datos").addClass("error_caja");
		disableButton('#but_continue');
	},
	selectmy25Invalid: function(msg){
		var vyTooltip = new vyQtip('#bocatamy25', msg);
		vyTooltip.style.width    = "230px";
		vyTooltip.id = "my25Bocata";
		vyTooltip.style.tip.mimic = "center right";
		vyTooltip.position.at = "left  left";
		vyTooltip.position.my = "center right";
		vyTooltip.setClass("rojo");
		this.add(vyTooltip, "selectmy25invalid");
		vyTooltip.createTooltip("show");
		disableButton('#but_continue');
	},
	myTooltip: function (tooltip, section) {
		this.tooltip = tooltip;
		this.section = section;
	},
	add: function(tooltip, section) {
		if(typeof this.tooltips == "undefined")
			this.tooltips = [];
		this.tooltips.push(new this.myTooltip(tooltip, section));
	},
	clearAll: function(){
		if(typeof this.tooltips == "object")
		{
			for(var i = 0; i < this.tooltips.length; i++)
				this.tooltips[i].tooltip.destroyTooltip();
			delete this.tooltips;
			enableButton('#but_continue');
		}
	},
	repositionAll: function(){
		if(typeof this.tooltips == "object" && this.tooltips.length > 0 )
		{
			for(var i = 0; i < this.tooltips.length; i++)
				this.tooltips[i].tooltip.repositionTooltip();
		}
	},
	clearSection: function(s){
		if(typeof this.tooltips == "object" && this.tooltips.length > 0){
			var sections = [];
			if(typeof s == "string")
				sections.push(s);
			else if(typeof s == "object")
				sections = s;
			else
				return;
			
			for (var i = 0; i < sections.length; i++)
			{
				var new_tooltips = [];
				for(var j = 0; j < this.tooltips.length; j++)
				{
					if(this.tooltips[j].section == sections[i])
						this.tooltips[j].tooltip.destroyTooltip();
					else
						new_tooltips.push(this.tooltips[j]);
				}
				delete this.tooltips;	
				this.tooltips = new_tooltips;
			}
			if(this.tooltips.length == 0) 
				enableButton('#but_continue');
		}
	}
}

function isBrowserIE6orIE7() {
	var nav = navigator.appVersion;
	return (nav.indexOf("MSIE 6.")!=-1 || nav.indexOf("MSIE 7.")!=-1 ) ? true : false;
}
