<!--
var xoffset1, xoffset2;
var yoffset = new Array(18);
var descr = new Array(18);
var imags = new Array(18);
var mimags = new Array(6);
var menuDivVisible = new Array(6);
var tblheight;
var myoffset;
var mxoffset = new Array(6);
var mcontent = new Array(6);
var curmenu;
var nimags;
var offstack = 0;
var imgpath;

var OnFlag = false;



function InitializePicDiv()
{
  var windWidth, windHeight, yoff;

   //initialize variables related to PicDiv
   imags[0] = new Image().src = "ttazzija.jpg";
   imags[1] = new Image().src = "tparselta.jpg";
   imags[2] = new Image().src = "tbarumbara.jpg";
   imags[3] = new Image().src = "tghorfatadoti.jpg";
   imags[4] = new Image().src = "ttacikku.jpg";
   imags[5] = new Image().src = "tfakond.jpg";
   imags[6] = new Image().src = "tharriega.jpg";
   imags[7] = new Image().src = "tmithnatalpatrun.jpg";
   imags[8] = new Image().src = "trazzetttapawlu.jpg";
   imags[9] = new Image().src = "tsardinell.jpg";
   imags[10] = new Image().src = "ttamargerit.jpg";
   imags[11] = new Image().src = "tvillapalma.jpg";
   imags[12] = new Image().src = "thideaway.jpg";
   imags[13] = new Image().src = "tstmary.jpg";
   imags[14] = new Image().src = "tgozo.jpg";
   imags[15] = new Image().src = "tphotoalbum.jpg";
   imags[16] = new Image().src = "tboattrip.jpg";
   imags[17] = new Image().src = "tcarhire.jpg";

   
	windWidth = (window.document.body.offsetWidth);	
	
	if (windWidth < 771)
		xoffset1 = 31;
	else
		xoffset1 = (windWidth / 2) - (750 / 2);
	
	xoffset1 += 150;
	xoffset2 = xoffset1 - 40;


	windHeight = (window.document.body.offsetHeight);	
	
	if (windHeight < 584)
		yoff = 21;
	else
		yoff = (windHeight / 2) - (563 / 2);
	
	yoffset[0] = yoff + 90;
	yoffset[1] = yoffset[0] + 18;
	yoffset[2] = yoffset[1] + 18;
	yoffset[3] = yoffset[2] + 18;
	yoffset[4] = yoffset[3] + 18;
	yoffset[5] = yoffset[4] + 18;
	yoffset[6] = yoffset[5] + 18;
	yoffset[7] = yoffset[6] + 18;
	yoffset[8] = yoffset[7] + 18;
	yoffset[9] = yoffset[8] + 18;
	yoffset[10] = yoffset[9] + 18;
	yoffset[11] = yoffset[10] + 45;

	yoffset[12] = yoffset[0];
	yoffset[13] = yoffset[1];

	yoffset[14] = yoffset[13] + 54;
	yoffset[15] = yoffset[14] + 18;

    yoffset[16] = yoffset[15] + 54;
	yoffset[17] = yoffset[16] + 18;
}
	

function InitializeMenuDiv()
{  //initialize variables related to the menuDiv

  var windWidth, windHeight, yoff;
  var i;
  
	windWidth = (window.document.body.offsetWidth);	
	
	if (windWidth < 771)
		xoffset1 = 21;
	else
		xoffset1 = (windWidth / 2) - (750 / 2);
	
	xoffset1 += 150;
	xoffset2 = xoffset1 - 10;


	windHeight = (window.document.body.offsetHeight);	
	
	if (windHeight < 584)
		yoff = 21;
	else
		yoff = (windHeight / 2) - (563 / 2);
		
		
	for (i=0; i<6; i++)
	{
	  menuDivVisible[i] = false;
	}
	
	myoffset = yoff + 96;

   mimags[0] = new Image().src = "bhome.jpg";
   mimags[1] = new Image().src = "bfarmhouse.jpg";
   mimags[2] = new Image().src = "bapartments.jpg";
   mimags[3] = new Image().src = "bgozo.jpg";
   mimags[4] = new Image().src = "bexcursions.jpg";
   mimags[5] = new Image().src = "blinks.jpg";
   
   mxoffset[0] = xoffset1 - 150;
   mxoffset[1] = mxoffset[0] + 120;
   mxoffset[2] = mxoffset[1] + 143;
   mxoffset[3] = mxoffset[2] + 135;
   mxoffset[4] = mxoffset[3] + 115;
   mxoffset[5] = mxoffset[4] + 117;
   
   
   mcontent[0] =
     '<table align="center" border="0" rules="none" height="133" cellspacing="0" cellpadding="0">' + 
     '  <tr>' +
	 '    <td height="50%" valign="middle" class="indexitem" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/index.html" class="indexitem" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '       Home' +
	 '	   </a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="50%" valign="middle" class="indexitem" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/book.html" class="indexitem" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Book' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
	 '</table>';
   
   
   mcontent[1] =
     '<table align="center" border="0" rules="none" height="266" cellspacing="0" cellpadding="0">' + 
     '  <tr>' +
	 '    <td height="8%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/tazzija/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Taz-Zija' +
	 '	   </a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="8%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/harriega/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Harriega' +
	 '	   </a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="8%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/mithnatalpatrun/index.html" class="indexitem4" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Mithna tal-Patrun' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="8%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/razzetttafakond/index.html" class="indexitem4" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Razzett ta Fakond' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="8%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/razzetttapawlu/index.html" class="indexitem3" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Razzett ta Pawlu' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="8%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/sardinell/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Sardinell' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="8%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/tamargerit/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Ta Margerit' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="8%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/parselta/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Il Parselta' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="8%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/barumbara/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Barumbara' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="8%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/ghorfatadoti/index.html" class="indexitem3" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Ghorfa ta Doti' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="8%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/tacikku/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Ta Cikku' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="8%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/villapalma/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       VillaPalma' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
	 '</table>';
   
   
   mcontent[2] =
     '<table align="center" border="0" rules="none" height="133" cellspacing="0" cellpadding="0">' + 
     '  <tr>' +
	 '    <td height="50%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/hideaway/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Hideaway Flat' +
	 '	   </a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="50%" valign="middle" class="indexitem" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/accommodation/stmary/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       St Mary flat' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
	 '</table>';
   
   
   mcontent[3] =
     '<table align="center" border="0" rules="none" height="133" cellspacing="0" cellpadding="0">' + 
     '  <tr>' +
	 '    <td height="50%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/gozo/gozoisland/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Gozo Island' +
	 '	   </a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="50%" valign="middle" class="indexitem" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/gozo/photoalbum/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       PhotoAlbum' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
	 '</table>';
   
   
   mcontent[4] =
     '<table align="center" border="0" rules="none" height="133" cellspacing="0" cellpadding="0">' + 
     '  <tr>' +
	 '    <td height="50%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/excursions/boattrip/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Boat Trip' +
	 '	   </a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="50%" valign="middle" class="indexitem" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/excursions/carhire/index.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Car Hire' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
	 '</table>';
   
   
   mcontent[5] =
     '<table align="center" border="0" rules="none" height="133" cellspacing="0" cellpadding="0">' + 
     '  <tr>' +
	 '    <td height="50%" valign="middle" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/links/sponsoredlinks.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '       Sponsored Links' +
	 '	   </a>' +
	 '    </td>' +
	 '  </tr>' +
     '  <tr>' +
	 '    <td height="50%" valign="middle" class="indexitem" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
	 '      <a href="http://www.e-gozo.com/links/externallinks.html" class="indexitem2" onmouseover="MouseIn()" onmouseout="MouseOut()" target="content" onclick="hideMenuDivNow()">' +
	 '        Travel-Related Links' +
	 '  	</a>' +
	 '    </td>' +
	 '  </tr>' +
	 '</table>';
}


function showPicDiv(n)
{
    if (n < 12)
  		PicDiv.style.left = xoffset1;
	else
  		PicDiv.style.left = xoffset2;
	
	PicDiv.style.top = yoffset[n];
	PicDiv.innerHTML = 
	  '<table border="2" cellpadding="0" cellspacing="0" bordercolor="#d70000" width="133" height="100" bgcolor="#ffffff">' +
	    '<tr>' +
		  '<td>' +
		    '<img src="' + imags[n] + '" border="0">'  +
		  '</td>' +
		'</tr>' +
	  '</table>';
	  
	
	PicDiv.style.visibility="visible";

}


function hidePicDiv()
{
	PicDiv.style.visibility="hidden";
}


function moverMenuDiv(n)
{
  if (!menuDivVisible[n])
  {
    menuDivVisible[n] = true;
    showMenuDiv(n);
  }
}



function showMenuDiv(n)
{
//  showPicDiv(n);

  tblheight = 0;
	
  menuDiv.style.left = mxoffset[n];
  menuDiv.style.top = myoffset;
  
  curmenu = n;
  openMenuDiv(n);

  menuDiv.style.visibility="visible";
}


function openMenuDiv()
{
  if (curmenu == 1)
  	tblheight += 10;
   else  
  	tblheight += 8;

  menuDiv.innerHTML = 
	  '<table border="2" cellpadding="0" cellspacing="0" bordercolor="#ffffff" width="100" height="' + tblheight + '" bgcolor="#ffffff" onmouseout="hideMenuDiv()" background="' + mimags[curmenu] + '">' +
	    '<tr>' +
		  '<td>' +
		  '</td>' +
		'</tr>' +
	  '</table>';
	  
	if ((curmenu == 1) && (tblheight < 267))
	{
    	setTimeout ("openMenuDiv()", 5);
	}
	else if ((curmenu != 1) && (tblheight < 134))
	{
    	setTimeout ("openMenuDiv()", 1);
	}
	else
	{
	  menuDiv.innerHTML = 
	  '<table border="2" cellpadding="0" cellspacing="0" bordercolor="#ffffff" width="100" height="' + tblheight + '" bgcolor="#ffffff" background="' + mimags[curmenu] + '">' +
      '  <tr>' +
	  '    <td valign="middle" align="center" width="100%" height="100%" onmouseover="MouseIn()" onmouseout="MouseOut()">' +
		     mcontent[curmenu] + 
	  '    </td>' +
	  '  </tr>' +
	  '</table>';
	}
}


function hideMenuDiv()
{
    var i;

//	alert ("IndexItem: " & IndexItem);
	offstack--;
	if ((!OnFlag) && (offstack == 0))	// && (!Table1) && (!Table2) && (!MenuDiv))
	{
		menuDiv.style.visibility="hidden";
		menuDiv.innerHTML = '';
		tblheight = 0;

//		alert("mouse out"); 
		for (i=0; i<6; i++)
		{
		  menuDivVisible[i] = false;
		}
	}
}


function hideMenuDivNow()
{
   var i;

	menuDiv.style.visibility="hidden";
	menuDiv.innerHTML = '';
	tblheight = 0;
		
	for (i=0; i<6; i++)
	{
	  menuDivVisible[i] = false;
	}
	
	OnFlag = false;
	offstack = 0;
}


function delayHideMenuDiv()
{
	offstack++;

	setTimeout ("hideMenuDiv()", 100);
}


function MouseIn()
{
	setTimeout ("setOnFlag()", 10);
}


function setOnFlag()
{
	OnFlag = true;
}


function MouseOut()
{
	OnFlag = false;
}


function showPhoto(phname, n)
{
	parent.mainpic.src=imgpath + '/' + phname;
}


function setNumImags(n)
{
	nimags = n;
	clearImagBorders();
	document.all.tags("img").item(0).setAttribute ("border", "3", false);
}


function setImagePath (p)
{
	imgpath = p;
}


function clearImagBorders()
{
	var i;
	
	for (i = 0; i < nimags; i++)
	{
		document.all.tags("img").item(i).setAttribute ("border", "0", false);
	}
}


function checkform()
{
  var submit;
	var at, dot;
	
	at = document.contact.email.value.lastIndexOf ("@");
	dot = document.contact.email.value.lastIndexOf (".");
	
	if (document.contact.uname.value == "")
	{
	  alert ("Please enter your name!");
		submit = false;
	}
	else if ((at == -1) || (dot == -1) || (dot < at))
	{
	  alert ("Please enter a valid email address!");
		submit = false;
	}
	else if (document.contact.accomodation.value=="")
	{
	  alert ("Please choose an accomodation!");
		submit = false;		
	}
	else submit = true;
	
 return submit;
}


-->