// JavaScript Document Hotel Marques de Prado Ameno
function right(e) {
	if(navigator.appName=='Netscape'&&(e.which==3||e.which==2))
return false;
	else if(navigator.appName=='Microsoft Internet Explorer'&&(event.button==2||event.button==3)) {
		warning =
		" Copyright © Netssa" 
		
var agree = confirm(warning);
if (agree !="0") {
	top.location="mailto:trip@netssa.com?subject=Hotel Information Netssa"; }
	return false; }
return true;}

function keypressed() {
	alert("This function is disabled");
}
document.onkeydown=keypressed;
document.onmousedown=right;
document.onmousemove=right;
   function event_false() {
         window.event.returnValue = false
   }

document.onselectstart = event_false;

function detect() {
	// simplify things
	var agent 	= navigator.userAgent.toLowerCase();
	
	// detect platform
	this.isMac		= (agent.indexOf('mac') != -1);
	this.isWin		= (agent.indexOf('win') != -1);
	this.isWin2k	= (this.isWin && (
			agent.indexOf('nt 5') != -1));
	this.isWinSP2	= (this.isWin && (
			agent.indexOf('xp') != -1 || 
			agent.indexOf('sv1') != -1));
	this.isOther	= (
			agent.indexOf('unix') != -1 || 
			agent.indexOf('sunos') != -1 || 
			agent.indexOf('bsd') != -1 ||
			agent.indexOf('x11') != -1 || 
			agent.indexOf('linux') != -1);
	
	// detect browser
	this.isSafari	= (agent.indexOf('safari') != -1);
	this.isSafari2 = (this.isSafari && (parseFloat(agent.substring(agent.indexOf("applewebkit/")+"applewebkit/".length,agent.length).substring(0,agent.substring(agent.indexOf("applewebkit/")+"applewebkit/".length,agent.length).indexOf(' '))) >=  300));
	this.isOpera	= (agent.indexOf('opera') != -1);
	this.isNN		= (agent.indexOf('netscape') != -1);
	this.isIE		= (agent.indexOf('msie') != -1);
	
	
}
var browser = new detect();
function addEventToObject(obj, evt, func) {
	var oldhandler = obj[evt];
	obj[evt] = (typeof obj[evt] != 'function') ? func : function(){oldhandler();func();};
}


function hhotelPTC(val, lg, codeprice, codetrack, cluster)
{
var waction = "http://www.fastbookings.biz/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");
}

addEventToObject(window,'onload', scrollinator);
