<!--

function preload()
{
	var the_images = new Array('/pictures/location.gif' , '/pictures/facilities.gif' , '/pictures/accommodation.gif' , '/pictures/events.gif' , 	'/pictures/offers.gif' , '/pictures/rates.gif' , '/pictures/slide.gif' , '/pictures/location1.gif' , '/pictures/facilities1.gif' , 	'/pictures/accommodation1.gif' , '/pictures/events1.gif' , '/pictures/offers1.gif' , '/pictures/rates1.gif' , '/pictures/slide1.gif');

	for (i=0; i < the_images.length; i++)
	{
		var an_image = new Image();
		an_image.src = the_images[i];
	}
}

function swap(imgnum,which)
{
	switch (which){
		case(1): imgsrc = 'http://www.marnivillage.com/pictures/location1.gif'; break;
		case(2): imgsrc = 'http://www.marnivillage.com/pictures/facilities1.gif'; break;
		case(3): imgsrc = 'http://www.marnivillage.com/pictures/accommodation1.gif'; break;
		case(4): imgsrc = 'http://www.marnivillage.com/pictures/events1.gif'; break;
		case(5): imgsrc = 'http://www.marnivillage.com/pictures/rates1.gif'; break;
		case(6): imgsrc = 'http://www.marnivillage.com/pictures/slide1.gif' ; break;
		case(7): imgsrc = 'http://www.marnivillage.com/pictures/offers1.gif' ; break;
	}
	document.images[imgnum].src = imgsrc;
}

function deswap(imgnum,which)
{
	switch (which){
		case(1): imgsrc = '/pictures/location.gif'; break;
		case(2): imgsrc = '/pictures/facilities.gif'; break;
		case(3): imgsrc = '/pictures/accommodation.gif'; break;
		case(4): imgsrc = '/pictures/events.gif'; break;
		case(5): imgsrc = '/pictures/rates.gif'; break;
		case(6): imgsrc = '/pictures/slide.gif' ; break;
		case(7): imgsrc = '/pictures/offers.gif' ; break;
	}
	document.images[imgnum].src = imgsrc;
}


function changebgcolor(id,color)
{
	if (document.all)
		document.all[id].style.backgroundColor = color;
	if (document.layers)
		document.layers[id].bgColor = color;
}

function checkform()
{
	if (window.document.request_form.country.value == "nocountry")
	{
		alert("Please specify the Country field");
		return false;
	} 

	if ((window.document.request_form.hear.value == 'Travel related website reference') || (window.document.request_form.hear.value == 'Other'))
	{
		if (window.document.request_form.specify.value =="")
		{
			alert('Please specify \''+window.document.request_form.hear.value+'\''); window.document.request_form.specify.focus(); return false;
		}
	}
	return true;
}
	
function fix_specify_field() //ftiaxnei to pedio specify na einai energo otan xreiazetai (bl. check_specify)
{

	if ((window.document.request_form.hear.value == 'Travel related website reference') || (window.document.request_form.hear.value == 'Other') || (window.document.request_form.hear.value == 'Search Engine'))
	{	//alert('NAI');
		window.document.request_form.specify.disabled = false;
		window.document.request_form.specify.focus();
		window.document.request_form.specify.blur();
		window.document.request_form.specify.select();

    } else if ((window.document.request_form.hear.value == 'Tour operator Brochure') || (window.document.request_form.hear.value == 'Travel agency'))
    {	
		window.document.request_form.specify.disabled = false;
		window.document.request_form.specify.focus();
		window.document.request_form.specify.blur();
		window.document.request_form.specify.select();
    } else if (window.document.request_form.hear.value == 'none')
		window.document.request_form.specify.disabled = true; //22-JAN-2008: allagi, na mhn apenergopoieitai to pedio "specify" gia kamia erwthsh (mono ean den exei epile3ei ka8olou na apanthsei. Na mporei na grafei o pelaths oti 8elei.

	return true;
}   

function check_specify() //tsekarei to pedio specify mono otan o user epilegei apo to pedio "How did you reach us?" tis epiloges: 1.Travel related website, 2.Tour operator brochure, 3.Travel agency, 4.other. Einai ypoxrewtiko mono gia tis epiloges 1,4.
{
	if ((window.document.request_form.hear.value == 'Travel related website reference') || (window.document.request_form.hear.value == 'other'))
	{
		if (window.document.request_form.specify =='')
		{
			alert('Please specify '+window.document.request_form.hear.value);
		}
	}
}


function printme() {
browser = (((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion) < 4 )) || 
((navigator.appName == "Microsoft Internet Explorer") && 
(parseInt(navigator.appVersion) < 4 )))
if (browser) {
alert('You are obviously using Netscape 3 or MSIE 3. Printing is only suported by version 4+ browsers..')}
else {
//	 window.print();
MM_openBrWindow('../page/default.asp?id=1814&amp;la=1','PrintMe','location=0, toolbar=0, directories=0, status=0, menubar=0, scrollbars=1, resizable=1, width=500, height=500');
}}

function SendEmail() { 
theUrl = window.document.location;
window.document.location="mailto:?subject=Marni%20Village%20Website&body=Visit%20this%20interesting%20hotel%20vacations%20link:%20"+escape(theUrl)+"%20from%20Marni%20Village%20Hotel%20Web%20Site."
return void(0); 
}

function show(imagename,width,height) {
	var my_win = window.open('','image','width='+width+'px,height='+height+'px,resizable=yes,scrollbars=no,status=yes');
	my_win.resizeTo(width+10,height+58);
	my_win.document.open();
	my_win.document.write("<html><head><title>Marni Village</title></head><body topmargin=0 marginwidth=0 marginheight=0 leftmargin=0><table cellspacing=0 cellpadding=0 width=100% height=100%><tr><td align=center valign=middle>");
	my_win.document.write("<img src='pics/gallery/"+imagename+"'></td></tr></table></body></html>");
	my_win.document.close();
	my_win.focus();
}

function showmap(img,w,h) {
	var my_win = window.open('','image','width='+w+'px,height='+h+'px,resizable=yes,scrollbars=no,status=yes');
	my_win.resizeTo(w+10,h+50);
	my_win.document.open();
	my_win.document.write("<html><head><title>Marni Village</title></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><table cellspacing=0 cellpadding=0 width=100% height=100%><tr><td align=center valign=middle>");
	my_win.document.write("<img src='pics/maps/"+img+"'></td></tr></table></body></html>");
	my_win.document.close();
	my_win.focus();
}
//-->