//document.onselectstart=new Function ("return false")
//document.onmousedown=new Function ("return false")
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 1;
if(isNS) 
document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
if(EnableRightClick==1){ return true; }
else {return false; }
}
function mousehandler(e){
if(EnableRightClick==1){ return true; }
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
function keyhandler(e) {
var myevent = (isNS) ? e : window.event;
if (myevent.keyCode==96)
EnableRightClick = 1;
return;
}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;

var SlideShowSpeed = 3500;
var CrossFadeDuration = 3;

var Picture = new Array(); 
Picture[1]  = 'images/acropolis-athens.jpg';
Picture[2]  = 'images/temple-of-poseidon.jpg';
Picture[3]  = 'images/evzonoi-syntagma-square.jpg';
Picture[4]  = 'images/temple-of-hephaestus.jpg';
Picture[5]  = 'images/academy-of-athens.jpg';
Picture[6]  = 'images/erextheion-caryatids.jpg';
Picture[7]  = 'images/athens-view.jpg';
Picture[8]  = 'images/opening-ceremony-athens.jpg';
Picture[9]  = 'images/Greek-Parliament-Syntagma.jpg';

var Caption = new Array();
Caption[1]  = 'The Acropolis of Athens';
Caption[2]  = 'The temple of Poseidon in Sounio';
Caption[3]  = "Tsoliades in front of the Athens Parliament";
Caption[4]  = "The temple of Hephaestus";
Caption[5]  = "The Academy of Athens";
Caption[6]  = "The Acropolis- the Erechtheion and the Caryatids ";
Caption[7]  = "A View of the Acropolis";
Caption[8]  = "Athens 2004- Opening ceremony in Athens";
Caption[9]  = 'The Greek Parliament in Syntagma';


var tss,iss;
var jss = 1;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++)
{
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];
}

function runSlideShow(){
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}



function changeimg(picpath,pic)
{
	document.getElementById(pic).src=picpath;
	pic.src=picpath;
	if(pic.width>350)
	{
		pic.width=350;
	}
}



function dayname(m)
{
	switch(m)
	{
	      case 0:  i= "Sunday";
	      	break;
	      case 1:   i= "Monday";
			break;
	      case 2:	  i= "Tuesday";
			break;
	      case 3:    i= "Wednesday";
			 break;
	      case 4:    i= "Thursday";
	      break;
	      case 5:    i= "Friday";
	      break;
	      case 6:    i= "Saturday";
	      break;
	     
	      default:	  i= " ";
	 }
	return(i)
}

function showdayname(day1,month1,year1,elmnt)
{
	var date1=new Date();
	date1.setFullYear(year1,parseInt(month1),parseInt(day1));
	document.getElementById(elmnt).innerHTML="<font color=red><small>"+dayname(date1.getDay())+"</small></font>";
	
}
function checkdays(mth,day,year)
{

switch(mth.value)
{

	case '4':
	case '6':
	case '9':
	case '11':		day.length=30;
				day.options[29]=new Option(30,30);
				break;
	case '2':		if ((year.value%4)==0)
				{

					day.length=29;
				}
				else
				{
				day.length=28;
				}
				break;
	
	default:	day.length=31;
			day.options[29]=new Option(30,30);
			day.options[30]=new Option(31,31);
			break;

}//switch


}//function

function checkdates()
{
	var datenow1=new Date();
	
	var fromday=document.getElementById("fromday").value;
	var frommonth=document.getElementById("frommonth").value;
	var fromyear=document.getElementById("fromyear").value;
	var fromdate=new Date()
	fromdate.setFullYear(fromyear,frommonth-1,fromday)

	var today=document.getElementById("today").value;
	var tomonth=document.getElementById("tomonth").value;
	var toyear=document.getElementById("toyear").value;
	var todate=new Date();
	todate.setFullYear(toyear,tomonth-1,today);
	if (fromdate>=todate)
	{
		alert("Please specify a departure date later than the arrival date");
		return false;
	}
	if ((fromdate<datenow1)||(todate<datenow1))
	{
		alert("Please specify future dates");
		return false;
	}
	else return true;

}
	
function changedep(inp,i)
{
inp.selectedIndex=i-1
}


		

	


		
