var Util={};Util.getQueryParameters=function(){if(!isset(this._queryParameters)){var _1=location.href.replace(/^[^\?]+/,"");this._queryParameters=_1.toQueryParams();}return this._queryParameters;};Util.createCookie=function(_2,_3,_4){if(_4){var _5=new Date();_5.setTime(_5.getTime()+(_4*24*60*60*1000));var _6="; expires="+_5.toGMTString();}else{var _6="";}document.cookie=_2+"="+_3+_6+"; path=/";};Util.readCookie=function(_7){var _8=_7+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(_8)==0){return c.substring(_8.length,c.length);}}return null;};Util.eraseCookie=function(_c){Util.createCookie(_c,"",-1);};var cookieName="sivuelas_visitor_time";var denyChatCookieName="sivuelas_visitor_deny_chat";var chatDialog=null;var intervalTime=3*60*1000;var chatEnabled=true;var chatUrl="";function startChatCounter(){var _1=new Date().getTime();if(chatEnabled){if(Util.readCookie(denyChatCookieName)==null){if(Util.readCookie(cookieName)!=null){checkVisitorTime();}else{Util.createCookie(cookieName,_1);setNextCheck();}}}}function checkVisitorTime(){var _2=parseInt(Util.readCookie(cookieName));var _3=new Date().getTime();if((_3-_2)>intervalTime){askForChat();}else{setNextCheck();}}function askForChat(){Dialog.info({url:"wantchat.html",options:{method:"get"}},{top:15,width:400,height:250,className:"alphacube",showEffectOptions:{duration:0.5}});}function denyChat(){Util.eraseCookie(cookieName);Util.createCookie(denyChatCookieName,1);Dialog.closeInfo();}function denyChatSoloCookie(){Util.eraseCookie(cookieName);Util.createCookie(denyChatCookieName,1);}function openChat(){var _4="http://www.ViajesGoya.com/chat/chatsivuelas.aspx";Dialog.closeInfo();var _5=window.open(_4,"chatWin","width=470,height=400,resizable=no,scrollbars=yes,status=no");Util.eraseCookie(cookieName);Util.createCookie(denyChatCookieName,1);}function setNextCheck(){window.setTimeout("checkVisitorTime()",1000);}startChatCounter();function openAjaxConfirm(){Dialog.info({url:"wantchat.html",options:{method:"get"}},{top:15,width:400,height:250,className:"alphacube",showEffectOptions:{duration:0.5}});}