var $j = jQuery.noConflict();
var http = createRequestObject();
var areal = Math.random() + "";
var real = areal.substring(2,6);
function createRequestObject() {
var xmlhttp;
try {
var xmlhttp = null;if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest();}else{ if (window.ActiveXObject) { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } }
// xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e) {
try {
var xmlhttp = null;if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest();}else{ if (window.ActiveXObject) { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } }
//xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(f) { xmlhttp=null; }
}
if(!xmlhttp&&typeof XMLHttpRequest!="undefined") {
xmlhttp=new XMLHttpRequest();
}
return xmlhttp;
}
function sendRequest() {
var rnd = Math.random();
var name = escape(document.getElementById("name").value);
var email = escape(document.getElementById("email").value);
var subject = escape(document.getElementById("subject").value);
var body = document.getElementById("body").value;
try{
http.open('POST', 'php/contactform.php');
http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
http.onreadystatechange = handleResponse;
http.send('name='+name+'&email='+email+'&subject='+subject+'&body='+body+'&rnd='+rnd);
}
catch(e){}
finally{
jQuery('#contactform').slideUp("slow").hide();
jQuery('#contactWrapper').append('
Email Successfully Sent!
Thank you for using our contact form '+decodeURIComponent(name)+'! Your email was successfully sent and we'll be in touch with you soon.
');
}
}
function sendRequest_booking() {
var rnd = Math.random();
var name = escape(document.getElementById("name").value);
var email = escape(document.getElementById("email").value);
var surname = escape(document.getElementById("surname").value);
var arrival = escape(document.getElementById("arrival").value);
var room = escape(document.getElementById("room").value);
var departure = escape(document.getElementById("departure").value);
var children = escape(document.getElementById("children").value);
var adults = escape(document.getElementById("adults").value);
var rooms = escape(document.getElementById("rooms").value);
var body = document.getElementById("body").value;
try{
http.open('POST', 'php/bookingform.php');
http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
http.onreadystatechange = handleResponse;
http.send('name='+name+'&surname='+surname+'&email='+email+'&arrival='+arrival+'&room='+room+'&departure='+departure+'&children='+children+'&adults='+adults+'&rooms='+rooms+'&body='+body+'&rnd='+rnd);
}
catch(e){}
finally{
jQuery('#contactform_booking').slideUp("slow").hide();
jQuery('#contactWrapper').append('
Email Successfully Sent!
Thank you for using our contact form '+decodeURIComponent(name)+'! Your email was successfully sent and we'll be in touch with you soon.
');
}
}
function sendRequest_loans() {
var rnd = Math.random();
var name = escape(document.getElementById("name").value);
var name_s = escape(document.getElementById("name_s").value);
var subject = escape(document.getElementById("subject").value);
try{
http.open('POST', 'php/contactform_loans.php');
http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
http.onreadystatechange = handleResponse_popup;
http.send('name='+name+'&name_s='+name_s+'&subject='+subject+'&rnd='+rnd);
}
catch(e){}
finally{
jQuery('#contactform_popup').slideUp("slow").hide();
jQuery('#contactWrapper_popup').append('
Email Successfully Sent!
Thank you for using our contact form '+name+'! Your email was successfully sent and we'll be in touch with you soon.
');
}
}
function sendRequest_popup() {
var rnd = Math.random();
var name = escape(document.getElementById("name_popup").value);
var email = escape(document.getElementById("email_popup").value);
var subject = escape(document.getElementById("subject_popup").value);
var body = escape(document.getElementById("body_popup").value);
try{
http.open('POST', 'php/contactform.php');
http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
http.onreadystatechange = handleResponse_popup;
http.send('name='+name+'&email='+email+'&subject='+subject+'&body='+body+'&rnd='+rnd);
}
catch(e){}
finally{
jQuery('#contactform_popup').slideUp("slow").hide();
jQuery('#contactWrapper_popup').append('
Email Successfully Sent!
Thank you for using our contact form '+name+'! Your email was successfully sent and we'll be in touch with you soon.
');
}
}
function sendRequest_news() {
var rnd = Math.random();
if(document.getElementById("name_news") instanceof Object){
var name = escape(document.getElementById("name_news").value);}
else{
var name ='noname';
}
var email = escape(document.getElementById("email_news").value);
try{
http.open('POST', 'php/newsletter.php');
http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
http.onreadystatechange = handleResponse_news;
http.send('name_news='+name+'&email_news='+email+'&rnd_news='+rnd);
}
catch(e){
}
finally{
jQuery('#newsletterform').slideUp("slow").hide();
jQuery('#newsletterform').parent().append('