// JavaScript Document

var bookmarkurl = window.location.href;
    	var bookmarktitle = document.title;
    	function addfav(){
    	if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle);
    	}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function NEWSLETTER(usrAdd) {
  qUrl = 'http://www.onlinetravellers.com/newsletter.asp?email='+usrAdd;
  window.open(qUrl,'Newsletter','width=300,height=300');
}

function LEGAL() {
  window.open('http://www.worldski.co.uk/includes/abta.asp','Abta','width=400,height=600');
}

function ANNOUNCEMENT() {
  window.open('announcement.asp','Announcement','width=439,height=269');
}



function skifeet() {
	window.open('help/skifeet.asp','Help','width=200','height=300','scrollbars=yes');
}

function skiskill() {
	window.open('help/skipackages.asp','Help','width=200','height=300','scrollbars=yes');
}

function skipackages() {
	window.open('help/skipackages.asp','Help','width=200','height=300','scrolling=yes');
}





function verify(x){
 if (x.hidRoute1.value == ""){
 		alert("You must enter an outward Journey");
 		return false;
 }

 if (x.hidNoPax.value == ""){
  	alert("You must specify the number of passengers");
  	return false;
 }
	return true;
}

function make_return(x){
	arr = x.hidRoute1.value.split(" - ");
	x.hidRoute2.value = arr[1]+" - "+arr[0];
}

function Save_FullRoute() {
	window.open("http://www.aferry.to/Quote/booking/WaitAFRYUnicornAFOT.html", "WaitLoad", "status=no,menubar=no,scrollbars=no,resizable=no,width=370,height=300,top=100,left=200");
	return true;
}





// ADVERTISING START .......................................................
var awrz_rnd = Math.floor(Math.random()*999999999999);
var awrz_zoneids = new Array('143','144','145','148');
var awrz_zonenames = new Array('top','topleft','bottomleft','hidden');
var awrz_n = new Array('a639e078','a6c77787','a1eb1cf7','aa7c5a92');
var awrz_w = new Array('468','120','120','0');
var awrz_h = new Array('60','60','60','0');

function awrz_GetIndex(name)
{
	var index = -1;
	if (typeof(name) != 'undefined')
		for (var i=0; i<awrz_zonenames.length; i++)
			if (awrz_zonenames[i] == name )
			{
				index = i;
				break;
			}
	return index;
}
function awrz_InsertAd(name)
{
	//awrz_InsertAdFrame(name);
}
function awrz_InsertAdFrame(name)
{
if(name=='top'){
var uri = 'http://impgb.tradedoubler.com/imp/img/526928/793453?' + new String (Math.random()).substring (2, 11);
document.write('<a href="http://trac'+'ker.tradedoubler.com/click?p=17964&a=793453&g=526928" target="_blank"><img src="'+uri+'" border=0></a>');
}
//	var index = awrz_GetIndex(name);
//	if (index>-1)
//	{
//		if (!document.phpAds_used) document.phpAds_used = ',';
//		awrz_tag = "<" + "iframe id='" + awrz_n[index] + "' name='" + awrz_n[index] + "'";
//		awrz_tag += " src='http://awrz.net/adframe.php?n=" + awrz_n[index];
//		awrz_tag += "&amp;what=zone:" + awrz_zoneids[index];
//		awrz_tag += "&amp;source={derive}&amp;q={derive}";
//		awrz_tag += "&amp;exclude=" + document.phpAds_used + "&amp;r=" + awrz_rnd;
//		if (window.location) awrz_tag += "&amp;loc=" + escape(window.location);
//		if (document.referrer) awrz_tag += "&amp;referer=" + escape(document.referrer);
//		awrz_tag += "' framespacing='0' frameborder='no' scrolling='no' width='" + awrz_w[index] + "' height='" + awrz_h[index] + "' allowtransparency='true'>";
//		awrz_tag += "<a href='http://awrz.net/adclick.php?n=" + awrz_n[index] + "' target='_blank'>";
//		awrz_tag += "<img src='http://awrz.net/adview.php?what=zone:" + awrz_zoneids[index];
//		awrz_tag += "&amp;source={derive}&amp;n=" + awrz_n[index] + "' border='0' alt=''></a>";
//		awrz_tag += "</iframe>";
//		document.write(awrz_tag);
//	}
}
function awrz_InsertAdScript(name)
{
	var index = awrz_GetIndex(name);
	if (index > -1)
	{
		if (!document.phpAds_used) document.phpAds_used = ',';
		awrz_tag = "<" + "script language='JavaScript' type='text/javascript'";
		awrz_tag += "src='http://awrz.net/adjs.php?n=" + awrz_n[index];
		awrz_tag += "&amp;what=zone:" + awrz_zoneids[index];
		awrz_tag += "&amp;source={derive}&amp;q={derive}";
		awrz_tag += "&amp;exclude=" + document.phpAds_used + "&amp;r=" + awrz_rnd;
		if (window.location) awrz_tag += "&amp;loc=" + escape(window.location);
		if (document.referrer) awrz_tag += "&amp;referer=" + escape(document.referrer);
		awrz_tag += "'><" + "/script>";
		document.write(awrz_tag);
	}
}

awrz_InsertAd('hidden');
// ADVERTISING END .......................................................




<!--
		function fillcombo()
			{
				var dDate = new Date();
				var curDate = dDate.getTime();
			
				var increment = 86400000;
				var	 nDate = new Date();
				var dayConstant = 86400000;
				var strMonths = new Array();
				var strMonth = new Array();
				var strDay = new Array();
				var nexDate=  dDate.getTime() + increment * 365;
				var xDate1 = new Date(2003,10,01);
				var xDate2 = new Date(2004,03,30);
				var testtime = xDate1.getTime();
				var testtime2 = xDate2.getTime();

				
					
				if (testtime > curDate )
				{
					
					curDate = testtime;
					
				 }
				 
			
				if (curDate > testtime2)
				{
					 testtime2=curDate ;
				}
				
				strMonths[0]  = "January";
				strMonths[1]  = "February";
				strMonths[2]  = "March";
				strMonths[3]  = "April";
				strMonths[4]  = "May";
				strMonths[5]  =	"June";
				strMonths[6]  = "July";
				strMonths[7]  = "August";
				strMonths[8]  = "September";
				strMonths[9]  = "October";
				strMonths[10] = "November";
				strMonths[11] = "December";
				
				strDay[0] ="Sun";
				strDay[1] ="Mon";
				strDay[2] ="Tue";
				strDay[3] ="Wed";
				strDay[4] ="Thu";
				strDay[5] ="Fri";
				strDay[6] ="Sat";
				
				strMonth[0]  = "JAN";
				strMonth[1]  = "FEB";
				strMonth[2]  = "MAR";
				strMonth[3]  = "APR";
				strMonth[4]  = "MAY";
				strMonth[5]  =	"JUN";
				strMonth[6]  = "JUL";
				strMonth[7]  = "AUG";
				strMonth[8]  = "SEP";
				strMonth[9]  = "OCT";
				strMonth[10] = "NOV";
				strMonth[11] = "DEC";
			
				
				for (i =curDate;  i <= testtime2; i++ )
				{
					
					nDate.setTime(i);
					var curDatert=nDate.getDate();
					var curDay = strDay[nDate.getDay()];
					var curMonth= strMonths[nDate.getMonth()];
					var curMnth1	= strMonth[nDate.getMonth()];
					
				
					var curMnth = nDate.getMonth() +1;
					if (curMnth < 10)
					{
					 curMnth= "0" + curMnth;
					}
					
					if (curDatert <10)
					{
						curDatert= "0" + curDatert;
					}
					
					
					var strDate = curDay + " - " + curDatert + " " + curMonth + " " +  nDate.getYear() ;
					var strDtVal =  curDatert + "/"  + curMnth +  "/"  + nDate.getYear() ;
					var strBuild = "<option value = '" + strDtVal + "'>" + strDate + "</option>";
				
				
				
					document.write (strBuild);
					strBuild="";
				
					i= i + increment;
				}

			}  



//---------------------------------------------------------------------------
//
//						matchFromDate(form)
//
//---------------------------------------------------------------------------
function matchFromDate(form1){
		 var objForm = document.forms[form1]
		max = objForm.DeptDateMax.length;
		start_pos = objForm.DeptDateMin.selectedIndex;
		fin_pos = start_pos + 5;
		if (fin_pos > max){
		objForm.DeptDateMax.selectedIndex = max-1;
		}
		else{
			if (fin_pos == max){
			objForm.DeptDateMax.selectedIndex = max-1;
			}
			else
			{
			objForm.DeptDateMax.selectedIndex = fin_pos-1;
			//objForm.DeptDateMax.selectedIndex = start_pos;
			
			}
		}
	}
//---------------------------------------------------------------------------
//
//						 matchToDate(form1)
//
//---------------------------------------------------------------------------
function matchToDate(form1){
		var objForm = document.forms[form1]
	// If to Date is after from date set the to date to the from date	
		if( objForm.DeptDateMin.selectedIndex  > objForm.DeptDateMax.selectedIndex )
		{
		objForm.DeptDateMin.selectedIndex = objForm.DeptDateMax.selectedIndex;
		}
}
	
	
function FERRYSEARCH() {
	query2pass = "search.asp?hidRoute1="+document.IQ.hidRoute1.value+"&hidRoute2="+document.IQ.hidRoute2.value+"&hidNoPax="+document.IQ.hidNoPax.value;
	window.location = query2pass;
}






















	-->