// en
// Page Routines

	//pagettl = new Array("Home","Introduction","Places of Interest","Apartments","Villas & Farmhouses","Hotels","Car Rentals","Diving","Transfers & Tours","Menu Item","Menu Item","Menu Item","English Courses");
	
	

	var menuitems = 14;
	

function dopage(pagenumber){
		createmenu('');
		
		createthings();

		
			// BackLayer = createLayer("Back",xClientWidth()-(backwidth*mult)-20,xClientHeight()-(backheight*mult)-20,backwidth*mult,backheight*mult,true,'<img border="0" src="backlogo.gif" width="'+(backwidth*mult)+'" height="'+(backheight*mult)+'">','');	
			// setzIndex(BackLayer, -20)
			

			
		if (pagenumber==1)
		{
			createimages();
			
		}
		else
		{
			menuin(menuitems-1);
		}
			
}

function moveimages() {
	xRemoveEventListener(window, "resize", moveimages, false);
	createimages();
}

// Things Routines

		var logowidth = 180 ;
		var logoheight = 85 ;
		var mult = 2;

		var NormX = 160;
		
function createthings(){
}

// Menu Routines

		
		var menudata = new Array("Home","Introduction","Places of Interest","Apartments","Villas & Farmhouses","Hotels","Transfers & Tours","Car Rentals","Diving","English Courses","Holiday Packages","Quotation Request","Weather Forecast ");
		var menusize = new Array(2,2,1,2,1,2,1,2,2,2,1,1,2);
		var menuurl = new Array("index.html","introduction.html","places.html","apartments.html","villas.html","hotels.html","transferstours.html","carrentals.html","diving.html","english.html","pricelist.html","form.cgi?quote","weather.html");
		var menutop = 10;
		var menuleft = 10;
		var menuspace = -1;
		var menuwidth = 130;
		var menuheight = 26;

		var menustartleft = -80;
		var menudo = "";
						
function createmenu(code){

		for (a = 0; a < menuitems; a++) {
			layer = xGetElementById("divMenuBar"+a);
			xMoveTo(layer,10,-50) 
			xShow(layer);
			layer = xGetElementById("divMenuSel"+a);
			xMoveTo(layer,10,menutop+((menuheight+menuspace)*(a))); 
		}
		
		xMoveTo("divMenuEmail",-100,menutop+((menuheight+menuspace)*(menuitems))+5);
		
}

function mOver(no){
	xShow("divMenuSel"+no);
}

function mOut(no){
	xHide("divMenuSel"+no);
}

function menuin(no){
	xSlideTo("divMenuBar"+no,10,menutop+((menuheight+menuspace)*(no)), 400, 'menudone('+no+')');
	//slideLayer(menulayer[no],10,menutop+((menuheight+menuspace)*(no)), 400, 'menudone('+no+')');
	no--;
	if (no>=0){setTimeout('menuin('+no+')',200)}
}

function menudone(no){
	if (no==2) {
		xShow("divMenuEmail");
		xSlideTo("divMenuEmail",10+((menuwidth-42)/2),menutop+((menuheight+menuspace)*(menuitems))+5, 400, '');
	}
}

function clickMenuLayer(e){
	window.top.location.href = "index.html";
}

// Img Routines




	
		
function createimages(){

		imgitems = 4
		imglayer = new Array(imgitems);
		
		imgwidth = 150;	
		imgspace = 4;
		
		imgfile = new Array ('images/in1.jpg','images/in2.jpg','images/in3.jpg','images/in4.jpg');
		imgfileh = new Array (204,100,100,204);		
		
		imgdx = new Array( 0 , imgwidth+imgspace, imgwidth+imgspace, (imgwidth+imgspace)*2 );
		imgdy = new Array( 0 , 0 , imgfileh[1]+4 , 0 );
		
		WelWidth = (imgwidth*3)+(imgspace*2) + 50;


		// Logo
		layer = xGetElementById("divLogo");
		xMoveTo(layer,160,-100);
		xShow(layer);
		//			LogoLayer = createLayer("B101",160,-100,logowidth,logoheight,true,'<img border="0" src="images/logo.gif" width="'+(logowidth)+'" height="'+(logoheight)+'">','');	
		//	setzIndex (LogoLayer,900);

		imageswidth=(imgwidth*3)+(imgspace*2);
		imgx = ((xClientWidth()-140-imageswidth)/2)+140;
		if (imgx<160) imgx = 160;
		imgy = 120;

		imgstartx = new Array( -imgwidth *2, imgx+imgdx[1] , imgx+imgdx[2], xClientWidth()+(imgwidth*2)   );
		imgstarty = new Array( imgy+imgdy[0] ,-imgfileh[1]*2 ,  xClientHeight()+(imgfileh[2]*2), imgy+imgdy[3] );
		imgspeed = new Array(500,500,500,500);
				
		layer = xGetElementById("divWelcome");
		xWidth(layer,WelWidth);//imageswidth);
		xMoveTo(layer,imgx+((imageswidth-WelWidth)/2),imgfileh[0]+imgy+8);
		xShow(layer);
		
		
		
		logox = imgx+((imageswidth-logowidth)/2);
		logoy = ((imgfileh[0]-logoheight)/2)+imgy;

		imgready = 0;

		for (a = 0; a < imgitems; a++) {
			layer = xGetElementById("img"+a);
			xMoveTo(layer,imgstartx[a],imgstarty[a]);
			xShow(layer);
			xSlideTo(layer,imgx+imgdx[a],imgy+imgdy[a], imgspeed[a], "imgdone();");
			}	
}

function imgdone(){
	imgready++;
	if (imgready==4) {
		xSlideTo("divLogo",logox,logoy, 500 , 'xAddEventListener(window, "resize", moveimages, false);');
		menuin(menuitems-1);
	}
}



