//.................POP UP IMAGE..................

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=ffffff scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=ffffff scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}


//.................CONTACT FORM CHECK EN..................

function formCheckEn() {
if (contact_form.SenderName.value == "") {
alert("Please insert your Name");
contact_form.SenderName.focus();
return(false);
}

if (contact_form.SenderLastName.value == "") {
alert("Please insert your Surname");
contact_form.SenderLastName.focus();
return(false);
}

if (contact_form.SenderEmail.value == "") {
alert("Please insert your Email ");
contact_form.SenderEmail.focus();
return(false);
}


// **************************************
// Email Check
// **************************************

emailStr = contact_form.SenderEmail.value;
if (emailStr != "" )  {
// Begin code for validation of email

var emailPat=/^(.+)@(.+)$/
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s" + specialChars + "\]"
var firstChars=validChars
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var atom="(" + firstChars + validChars + "*" + ")"
var word="(" + atom + "|" + quotedUser + ")"
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
var matchArray=emailStr.match(emailPat)
if (matchArray==null) {
alert("The Email address seems to be wrong. Please check the @ and . characters.")
contact_form.SenderEmail.focus();
return false
}
var user=matchArray[1]
var domain=matchArray[2]
if (user.match(userPat)==null) {
alert("The username part before the @ seems to be wrong.")
contact_form.SenderEmail.focus();
return false
}
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("The IP address seems to be wrong.")
contact_form.SenderEmail.focus();
return false
}
}
return true
}
var domainArray=domain.match(domainPat)
if (domainArray==null) {
alert("The domain seems to be wrong.")
contact_form.SenderEmail.focus();
return false
}
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 ||
domArr[domArr.length-1].length>3) {
alert("The email address needs to end with 3 characters that state the domain, or 2 characters that state the country.")
contact_form.SenderEmail.focus();
return false
}
if (domArr[domArr.length-1].length==3 && len<2) {
var errStr="The hostname is missing."
alert(errStr)
contact_form.SenderEmail.focus();
return false
}

}

// End code for validation of email
}


//.................RESERVATION FORM CHECK EN..................

function ReservationformCheckEn() {
if (reservation_form.SenderName.value == "") {
alert("Please insert your Name");
reservation_form.SenderName.focus();
return(false);
}

if (reservation_form.SenderLastName.value == "") {
alert("Please insert your Surname");
reservation_form.SenderLastName.focus();
return(false);
}

if (reservation_form.SenderEmail.value == "") {
alert("Please insert your Email ");
reservation_form.SenderEmail.focus();
return(false);
}

if (reservation_form.SenderCity.value == "") {
alert("Please insert your city");
reservation_form.SenderCity.focus();
return(false);
}

if (reservation_form.SenderPostalCode.value == "") {
alert("Please insert your postal code");
reservation_form.SenderPostalCode.focus();
return(false);
}

if (reservation_form.SenderFullAddress.value == "") {
alert("Please insert your address");
reservation_form.SenderFullAddress.focus();
return(false);
}

if (reservation_form.SenderPhone.value == "") {
alert("Please insert your telephone number");
reservation_form.SenderPhone.focus();
return(false);
}


// **************************************
// Email Check
// **************************************

emailStr = reservation_form.SenderEmail.value;
if (emailStr != "" )  {
// Begin code for validation of email
var emailPat=/^(.+)@(.+)$/
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s" + specialChars + "\]"
var firstChars=validChars
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var atom="(" + firstChars + validChars + "*" + ")"
var word="(" + atom + "|" + quotedUser + ")"
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
var matchArray=emailStr.match(emailPat)
if (matchArray==null) {
alert("The Email address seems to be wrong. Please check the @ and . characters.")
reservation_form.SenderEmail.focus();
return false
}
var user=matchArray[1]
var domain=matchArray[2]
if (user.match(userPat)==null) {
alert("The username part before the @ seems to be wrong.")
reservation_form.SenderEmail.focus();
return false
}
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("The IP address seems to be wrong.")
reservation_form.SenderEmail.focus();
return false
}
}
return true
}
var domainArray=domain.match(domainPat)
if (domainArray==null) {
alert("The domain seems to be wrong.")
reservation_form.SenderEmail.focus();
return false
}
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 ||
domArr[domArr.length-1].length>3) {
alert("The email address needs to end with 3 characters that state the domain, or 2 characters that state the country.")
reservation_form.SenderEmail.focus();
return false
}
if (domArr[domArr.length-1].length==3 && len<2) {
var errStr="The hostname is missing."
alert(errStr)
reservation_form.SenderEmail.focus();
return false
}
}

// End code for validation of email
}

//.................BOOKMARK US - HOME PAGE US...............................

var bookmarkurl="http://www.zakynthos-island.gr"
var bookmarktitle="Zakynthos Island - Zante Greece"
function addbookmark()
{
bookmarkurl = location.href
bookmarktitle= document.title
if (document.all)
window.external.AddFavorite(bookmarkurl, bookmarktitle)
}
function makeHomepage(me)
{if (document.layers)
{openWindow("/explain_hpage.htm", "Zakynthos Island", "dependent=yes, width=20, height=20, scrollbars=no, top=15, left=15, pageX=15, pageY=15");
}
else
{me.style.behavior='url(#default#homepage)';
me.setHomePage('http://www.zakynthos-island.gr');
}
}
function openWindow(theURL,winName,features) { //v2.0
preview=window.open(theURL,winName,features);
preview.window.focus();
}

//.................FULL SCREEN...............................

function fullscreen(){
var hdiff;
window.resizeTo(screen.width/2,screen.height/2)
window.moveTo(0,10)
hdiff=window.screenTop;
window.moveTo(-6,-hdiff+6);
window.resizeTo(screen.width+13,screen.height+hdiff+26)
}
function restore(){
window.moveTo(-4,-4);
window.resizeTo(screen.width+8,screen.availHeight+8);
}

//.................POP UP...............................
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
