

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable,toolbar'
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}

function OpenTheWindow(f,x,h,ap,agent,ddd,ddm,ddy,dth,dtm,rdd,rdm,rdy,rth,rtm,px,mypage,myname,wth,hht,scroll)
{
if (! window.focus)return true;
var windowname="BookWindow";
var mylink="http://www.parkaph.co.uk/direct/aphbook.asp?agent=WA504&amp;";
var href;
var theairport = ap.value;
var theagent = agent.value;
var theday = ddd.value;
var themonth = ddm.value;
var theyear = ddy.value;
var thehour = dth.value;
var theminute = dtm.value;
var therday = rdd.value;
var thermonth = rdm.value;
var theryear = rdy.value;
var therhour = rth.value;
var therminute = rtm.value;
var thepx = px.value;
var thef = f.value;
var thex = x.value;
var theh = h.value;
var win = null;

if (typeof(mylink) == 'string'){
   href=mylink+"&f=" + thef + "&x=" + thex+ "&h=" + theh+"&ap=" + theairport + "&ddd=" + theday + "&ddm=" + themonth + "&ddy=" + theyear + "&dth=" + thehour + "&dtm=" + theminute + "&rdd=" + therday + "&rdm=" + thermonth + "&rdy=" + theryear + "&rth=" + therhour + "&rtm=" + theminute + "&px=" + thepx;
   //document.write(href);
   }
else
   href=mylink.href;

LeftPosition = (screen.width) ? (screen.width-wth)/2 : 0;
TopPosition = (screen.height) ? (screen.height-hht)/2 : 0;
settings = 'height='+hht+',width='+wth+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status,resizable,toolbar';
win = window.open(href,myname,settings)
if(win.window.focus){win.window.focus();}
}

function OpenTheWindow3(ProdType,ddd,ddm,ddy,zn,agent,ap,mypage,myname,wth,hht,scroll)
{
if (! window.focus)return true;
var windowname="BookWindow";
var mylink="https://www.parkaph.co.uk/hotels/aphbook.asp?agent=WA504&amp;";
var href;
var theprodtype = ProdType;
var theairport = ap.value;
var theagent = agent.value;
var theday = ddd.value;
var themonth = ddm.value;
var theyear = ddy.value;
var thezone = zn.value;
var win = null;

if (typeof(mylink) == 'string'){
   href=mylink+ "ProdType=" + theprodtype +  "&ddd=" + theday + "&ddm=" + themonth + "&ddy=" + theyear + "&zn=" + thezone + "&ap=" + theairport;
   //document.write(href);
   }
else
   href=mylink.href;

LeftPosition = (screen.width) ? (screen.width-wth)/2 : 0;
TopPosition = (screen.height) ? (screen.height-hht)/2 : 0;
settings = 'height='+hht+',width='+wth+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status,resizable,toolbar';
win = window.open(href,myname,settings)
if(win.window.focus){win.window.focus();}
}

function OpenTheWindow2(d,m,y,s,mypage,myname,wth,hht,scroll)
{
if (! window.focus)return true;
var windowname="BookWindow"
var mylink="http://www.holidayextras.co.uk/coastdirect/abcdirect.ASP"
var href;
var theairport = s.options[s.selectedIndex].value;
var theday = d.options[d.selectedIndex].value;
var themonth = m.options[m.selectedIndex].value;
var theyear = y.options[y.selectedIndex].value;
var win = null;

if (typeof(mylink) == 'string')
   href=mylink+"?loc=" + theairport + "&d=" + theday + "&m=" + themonth + "&y=" + theyear + "&p=o" + 
"&profile=parking4less&agent=wx372";
else
   href=mylink.href;

LeftPosition = (screen.width) ? (screen.width-wth)/2 : 0;
TopPosition = (screen.height) ? (screen.height-hht)/2 : 0;
settings = 'height='+hht+',width='+wth+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable';
win = window.open(href,myname,settings)
if(win.window.focus){win.window.focus();}
}

