// JavaScript Document



function pdf(id,lang,method,source)
{
var w = 600; 
   var h = 800;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);

	  var style = "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=1,scrollbar=1";
	  
	  var page = "pdf.php?id="+id+"&lang="+lang+"&method="+method+"&source="+source;
	
window.open(page,'',style);
}


function email(id,lang,source)
{
var w = 600; 
   var h = 500;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
 
	  var style = "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=0,scrollbar=1";
	  
	  var page = "email.php?id="+id+"&lang="+lang+"&source="+source;
window.open(page,'',style);
}





function openMap(name,url)
{
var w = 600; 
   var h = 700;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
 
	  var style = "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=0,scrollbar=1";
	  
	  var page = "map.php?name="+name+"&url="+escape(url);
window.open(page,'',style);
}





function mailform(title,email)
{
var url = "form_mail.php?title="+title+"&hemail="+email;
view(url,640,480);
}



function sendme(title)
{
var url = "giveme.php?title="+title;
view(url,640,480);
}



function view(URL,w,h)

{

   var l = Math.floor((screen.width-w)/2);

   var t = Math.floor((screen.height-h)/2);

  

              var style = "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",resizable=no,status=no, menubar=no, toolbar=no, scrollbars=yes";

              window.open(URL, "" , style);

}


function hhotelPTC(val, lg, codeprice, codetrack, cluster)
{
var waction = "http://www.fastbooking.co.uk/DIRECTORY/";
waction += "preresa.phtml?Hotelnames="+val;
if (lg != "") waction += "&langue="+lg;
if (codeprice!= "") waction += "&FSTBKNGCode="+codeprice;
if (codetrack != "") waction += "&FSTBKNGTrackLink="+codetrack;
if (cluster != "") waction += "&clustername="+cluster;
window.open(waction,"reservation","toolbar=no,width=400,height=350,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes");
}




function bookingLayer(vertical_url)
{
var w = 796;
var h = 508;
GB_show('Vertical Booking', vertical_url , h, w);
return;

}


function bookingForm(hotel_id , lang , email)
{
var w = 520;
var h = 440;
var url = (lang=='it') ? '../email.form.it.php' : '../email.form.en.php';
url+= "?id="+hotel_id+"&bcc="+email;
GB_show('Booking Form', url , h, w);
return;

}


function postcard(hotel_id , lang , src)
{
var w = 760;
var h = 660;
var url = (lang=='it') ? '../postcard.it.php' : '../postcard.en.php';
var title = (lang=='it') ? 'Invio Cartoline' : 'Sending Postcards';
url+= "?id="+hotel_id+"&src="+src;
GB_show(title, url , h, w);
return;
}







