function avail(hotel,lang,form){ var x = 750; var y = 550; var win = null; var centerwidth=(screen.width/2)-(x/2); var centerheight=(screen.height/2)-(y/2); var features = "scrollbars = yes,resizable = no,status = no,location = no,toolbar = no,width = "+x+",height = "+y+",top = "+centerheight+",left = "+centerwidth if(form){ form.action = "http://www.bookingevolution.com/availability/step2.html"; form. target = hotel; form.method = "POST"; if (window.pageTracker !== undefined){ pageTracker._linkByPost(form); } win=window.open("",hotel,features); } else{ var url = "http://www.bookingevolution.com/availability/step1.html?id="+hotel+"&lan="+lang; if (window.pageTracker !== undefined){ win = window.open(pageTracker._getLinkerUrl(url), hotel, features); } else{ win = window.open(url, hotel, features); } } win.focus() } if (typeof jQuery != 'undefined') { jQuery(document).ready(function(){ var hotel = jQuery('#bookingevolution').attr('hotel'); var lingua = jQuery('#bookingevolution').attr('lan'); function send_ajax(){ jQuery.ajax({ type: "POST", url: "http://www.bookingevolution.com/availability/_ajax/check_code.php", data: "log="+jQuery("#custcod").val()+"&id="+hotel+"&lingua="+lingua, success: function(data){ if(data==0){ jQuery("#pinspan").css("display","none"); } if(data==1){ jQuery("#pinspan").css("display","inline"); } if(data==2){ jQuery("#pinspan").css("display","none"); send_ajax_2(); } } }); } function send_ajax_2(){ jQuery.ajax({ type: "POST", url: "http://www.bookingevolution.com/availability/_ajax/check_account.php", data: "log="+jQuery("#custcod").val()+"&pin="+jQuery("#pin").val()+"&id="+hotel+"&lingua="+lingua, success: function(data){ if(data){ jQuery("#discount").html(data) } } }); } jQuery.ajaxSetup({cache:false}); jQuery('#bookingevolution').load('http://www.bookingevolution.com/availability/inline.html?id='+hotel+"&lan="+lingua,function(){ jQuery("#custcod").click(function(){ send_ajax(); }); jQuery("#custcod").keyup(function(){ send_ajax(); }); jQuery("#custcod").bind('paste', function(e){ var myTimer = {}; myTimer = jQuery.timer(100,function(){ send_ajax(); }) }) jQuery("#pin").click(function(){ send_ajax_2(); }); jQuery("#pin").keyup(function(){ send_ajax_2(); }); jQuery("#pin").bind('paste', function(e){ var myTimer = {}; myTimer = jQuery.timer(100,function(){ send_ajax_2(); }) }) }); }); }