
 
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);

function toTop(id){
document.getElementById(id).scrollTop=0
}

defaultStep=1
step=defaultStep

function scrollDivDown(id)
{	document.getElementById(id).scrollLeft+=step;
	timerDown=setTimeout("scrollDivDown('"+id+"')",10)}
function scrollDivUp(id)
{	document.getElementById(id).scrollLeft-=step;
	timerUp=setTimeout("scrollDivUp('"+id+"')",10)}

function toBottom(id){
document.getElementById(id).scrollLeft=document.getElementById(id).scrollHeight}

function toPoint(id){document.getElementById(id).scrollLeft=100}
			
function sendit2()
 {var thispage=location.href;
        var pagename=prompt("Enter your Friend e-mail address?","");
        window.open("mailto:"+pagename+"?Subject=Seychelles&body="+thispage,"_self");
 }


     function Sendit()
	 {
		 if (navigator.appName == 'Netscape') 
		 {
			 sendit2()
		 } 
		 else
		 {
			if (navigator.appName == 'Opera') 
			{
				sendit2()
			}
            else 
			{
				alert("Unfortunately your browser, "+navigator.appName+ ", does not support this feature. Please use the \n File » Send » Link by Email...\n menu 	option to send the page");
			}
		 }
	 }
function btn_mouseOver(imageName)
   {  
        imageName.style.opacity=0.5;
		//imageName.filters.alpha.opacity=50
     }  
function btn_mouseOut(imageName)       
     {  
        imageName.style.opacity=1;
		//imageName.filters.alpha.opacity=100
           
     }  
/******************************************/
/* code for Advertisment */
/**************************/
function FindAdd(keyword,path)
{
	var possArray = new Array();
	
	var Aaa1 = new Array(1,"Dubai.swf","wedding, Arabia, flight", 1, 468,60);
	var Aaa2 = new Array(2,"Mauritius.swf","HongKong, wedding, flight", 1, 468,60);
	var Aaa3 = new Array(3,"Thailand.swf","Thailand, wedding, flight", 1, 468,60);
	var Aaa4 = new Array(4,"Malaysia.swf","Malaysia, wedding, flight", 1, 468,60);
	var Aaa4 = new Array(5,"Seychelles.swf","Seychelles, wedding, flight", 1, 468,60);
	var Aaa4 = new Array(5,"Maldives.swf","Seychelles, wedding, flight", 1, 468,60);
	var Aaa4 = new Array(6,"Malaysia.swf","Seychelles, wedding, flight", 1, 468,60);
	var Aaa4 = new Array(7,"Sri_Lanka.swf","Seychelles, wedding, flight", 1, 468,60);
	var Aaa4 = new Array(8,"Tahiti.swf","Seychelles, wedding, flight", 1, 468,60);
	var Aaa4 = new Array(9,"United_States_of_America.swf","Seychelles, wedding, flight", 1, 468,60);
	var Aaa4 = new Array(10,"Tahiti.swf","Seychelles, wedding, flight", 1, 468,60);
	var Aaa4 = new Array(11,"South_Africa.swf","Seychelles, wedding, flight", 1, 468,60);
	var Aaa1 = new Array(12,"Abu_Dhabi.swf","wedding, Arabia, flight", 1, 468,60);
	var Aaa1 = new Array(13,"Oman.swf","wedding, Arabia, flight", 1, 468,60);
	
						/*id, filename,keywords,visible,displayonly,width,height*/
	var ArrayofAdd = new Array(Aaa1,Aaa2,Aaa3,Aaa4);
	var i = 0;
	for (x = 0; x < ArrayofAdd.length; x++)
	{
		if( ArrayofAdd[x][2].indexOf(keyword) != -1)
		{
			possArray[i] = ArrayofAdd[x][1];
			i++;
		}	
	}
	var randomnumber=Math.floor(Math.random()*(0,possArray.length));
	Advert_Flash(path+'Banners/'+possArray[randomnumber], '468', '60');     
}	

function Advert_Flash(fileName, sWidth, sHeight)
{
	/*******************************************************************************/
	//Width, Heitht and FileName 
	var width = sWidth;
	var height = sHeight;
	var src = fileName;
	
	/*******************************************************************************/
	
	
	//var queries = '?hotelName='+QueryString('ContiDestProdDtlsId')


	var l1 = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'">'
	var l2 = '<param name="movie" value="'+src+'" />'
	var l3 = '<param name="quality" value="high" />  <param name="wmode" value="transparent" />'
	var l4 = '<embed src="'+src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="'+width+'" height="'+height+'"></embed>'
	var l5 = '</object>'

	
	document.write(l1+l2+l3+l4+l5)
}

 
function openwin_other(divName,zoomImage,container, width, height) 
{
	var thiswidth = parseInt(width) +20;
	var thisHeight = parseInt(height) +20;
 
	var thisDiv = document.getElementById (divName);
	thisDiv.style.visibility='visible';
     thisDiv.style.display='none';
	 document.getElementById(container).src = zoomImage;
	 document.getElementById(container).width = width;
	 document.getElementById(container).height = height;
	 thisDiv.style.width=thiswidth + 'px';
	  thisDiv.style.height=thisHeight + 'px';
	  thisDiv.style.textAlign='center';
     thisDiv.style.top= Math.round ((document.documentElement.clientHeight/2)+ 			document.documentElement.scrollTop)-200 + 'px'; 
	 thisDiv.style.left='300px';
	 appear(divName);	
	
}
/******************************************
*Photography************
**************************/

function changeImg(ImgPath, cnt)
{			
	document.getElementById("LargImage").src = ImgPath;
	document.getElementById("LargImage").onclick ="return openwin();"
	document.getElementById("LargImage").title = cnt;
	document.getElementById('zoomdiv').title = cnt;
	document.getElementById("caption").innerHTML =  cnt ;				
}
			
function openwin() 
{
	var hril = document.getElementById("LargImage").src;
	var title = document.getElementById("LargImage").title;
	var hdnHotelId = document.getElementById("hdnHotelId").value;
	//document.getElementById("zoom-iframe").src = "hotel-zoom-images.html?imageName="+hril+"& Tittle="+title;
	//document.getElementById("zoom-iframe").src = "HotelHiResImages.aspx?imageName="+hril+"&Tittle="+title+"&HotelId="+hdnHotelId;
	document.getElementById("zoom-iframe").src = "http://www.luxuryholidaysdirect.com/HotelHiResImages.aspx?imageName="+hril+"&Tittle="+title+"&HotelId="+hdnHotelId;
			 
	document.getElementById('photograph-iframe').style.visibility='visible';
    document.getElementById('photograph-iframe').style.display='none';
    //document.getElementById('photograph-iframe').style.top= '100px'; //Math.round ((document.documentElement.clientHeight/2)+ document.documentElement.scrollTop)-200 + 'px'; 
	//document.getElementById('photograph-iframe').style.left='300px';
	appear('photograph-iframe');
}
	
	
	
function CloseZoomDiv()
{
    //document.getElementById ('MaskedDiv').style.display='none';
	//document.getElementById ('ModalPopupDiv').style.width = '1px';
	fade('photograph-iframe');
	//document.getElementById ('ModalPopupDiv').style.display='none';
}			
			






 function OpenModelPopup()
    { 
	
        document.getElementById ('MaskedDiv').style.width= screen.width;
        document.getElementById ('MaskedDiv').style.display='';
        document.getElementById ('MaskedDiv').style.visibility='visible';
		
        document.getElementById ('MaskedDiv').style.top='0px';
        document.getElementById ('MaskedDiv').style.left='0px';
		
		
		document.getElementById ('ModalPopupDiv').style.visibility='visible';
        document.getElementById ('ModalPopupDiv').style.display='none';
        
        //document.getElementById ('ModalPopupDiv').style.top= Math.round ((document.documentElement.clientHeight/3)+ document.documentElement.scrollTop)-100 + 'px';
     //   document.getElementById ('ModalPopupDiv').style.top= eval(Math.round ((document.documentElement.clientHeight/3)+ document.documentElement.scrollTop)+100) + 'px';
		
		//document.getElementById ('ModalPopupDiv').style.left=Math.round ((document.documentElement.clientWidth/3)+ document.documentElement.scrollTop)-100 + 'px';
	//	document.getElementById ('ModalPopupDiv').style.left=eval(Math.round ((document.documentElement.clientWidth/3)+ document.documentElement.scrollTop)) + 'px';
		
			
		
		//if (navigator.appName.indexOf('Microsoft') == -1){
		appear('ModalPopupDiv');
		//}
       
     
    }
    function CloseModelPopup()
    {
		
        document.getElementById ('MaskedDiv').style.display='none';
		//document.getElementById ('ModalPopupDiv').style.width = '1px';
	 fade('ModalPopupDiv');
		//document.getElementById ('ModalPopupDiv').style.display='none';
		
    }
     function Submit()
    {
        if(document.getElementById ('txtName').value!='')
        {
            document.getElementById ('MaskedDiv').style.display='none';
            document.getElementById ('ModalPopupDiv').style.display='none';
            document.getElementById ('tdDisplayName').innerHTML='<H1> Hi ' + document.getElementById ('txtName').value +' !</H1>';
        }
        else 
        {
            alert ('Please enter your name');
        }
    }

function setOpacity(domId, val) {
	obj = document.getElementById(domId);
	var browsername = navigator.appName;

	//alert(browsername);
	obj.style.MozOpacity = val;
	obj.style.opacity = (val/10);
	obj.style.KhtmlOpacity=val/10
	obj.style.filter = 'alpha(opacity=' + val*10 + ')';
 
};



function fade(domId){
		 
	obj = document.getElementById(domId); //Get the Element
	if(obj.style.display == "none") return false; //Return false if the element is already hidden
	var alpha = 10; //Set the initial value of alpha to 10 (Opaque)
	function f(){ //Internal function
		alpha--; //Decrememnt the alpha value
		setOpacity(domId, alpha); //Set the opacity of our element to the specified alpha
		if(alpha > -1){ //If alpha is still bigger than -1 then..
			setTimeout(f, 50); //..then call the function again after 100 milliseconds
		}else{ //otherwise..
			obj.style.display = 'none'; //..otherwise now that we cant see the element anyways, hide it
		}
	}
	setTimeout(f, 50); //This is where we call the f() function for the first time
	 
};

function appear(domId){
	var obj = document.getElementById(domId); //Get the element
		
	if (navigator.appName != 'Microsoft Internet Explorer')
	{
		//obj.style.opacity = 0;
		//obj.style.filter = 'alpha(opacity=' + 0 + ')';
		if(obj.style.display != "none") return false; //Return if it is already being displayed
		obj.style.display = ''; //Un-hide the object before its animation
		var alpha = 0; //Set the initial value of alpha to 0 (invisible)
		function a()
		{ //Internal function
		alpha++; //Increment alpha
		setOpacity(domId, alpha); //Set the opacity of our element to the specified alpha
		if(alpha < 11)setTimeout(a, 10);
		/*Till alpha is 10, keep calling the
		a() function after 100 milliseconds */
		}
		setTimeout(a, 10); //This is where we call the a() function for the first time
	 }
	
	 else
	 {
		if(obj.style.display != "none") return false; //Return if it is already being displayed
		obj.style.display = '';
setOpacity(domId, 100); 
		//var alpha = 0; //Set the initial value of alpha to 0 (invisible)
		


	 }
};


/*Destination Image*/


var fadebgcolor="black"

////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder)
{
	this.pausecheck=pause
	this.mouseovercheck=0
	this.delay=delay
	this.degree=10 //initial opacity degree (10%)
	this.curimageindex=0
	this.nextimageindex=1
	fadearray[fadearray.length]=this
	this.slideshowid=fadearray.length-1
	this.canvasbase="canvas"+this.slideshowid
	this.curcanvas=this.canvasbase+"_0"
	if (typeof displayorder!="undefined")
	theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
	this.theimages=theimages
	this.imageborder=parseInt(borderwidth)
	this.postimages=new Array() //preload images
	for (p=0;p<theimages.length;p++){
	this.postimages[p]=new Image()
	this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj)
{
	if (obj.degree<100)
	{
		obj.degree+=10
		if (obj.tempobj.filters&&obj.tempobj.filters[0])
		{
			if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
			obj.tempobj.filters[0].opacity=obj.degree
			else //else if IE5.5-
			obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
		}
		else if (obj.tempobj.style.MozOpacity)
		obj.tempobj.style.MozOpacity=obj.degree/101
		else if (obj.tempobj.style.KhtmlOpacity)
		obj.tempobj.style.KhtmlOpacity=obj.degree/100
		else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
		obj.tempobj.style.opacity=obj.degree/101
	}
else
{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}
