function sendAct(f)
{
	f.submit();
	
	return true;
}

function sendDest(f)
{
	var i;
	
	for (i=0; i<f.length; i++) {
		if (f.options[i].selected) {
			if (f.options[i].value!="-") {
				location.href = f.options[i].value;
			}
	   	} 
	}
	return;
}

var isNS	= (navigator.appName.indexOf("Netscape") != -1) ? true : false;
var isNS3	= (isNS && parseFloat(navigator.appVersion) <  4) ? 1 : 0;
var isNS4	= (isNS && parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
var isIE	= (document.all) ? 1 : 0;
var isIE5	= (isIE && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0;

function WinCenter(wfile, wname, ww, wh) {
	var maxwidth, maxheight;
	var xpos, ypos;

	if (isNS4 || isIE) {
		maxwidth 	= (isNS4?innerWidth:screen.availWidth);
		maxheight	= (isNS4?innerHeight:screen.availHeight);
		xpos = maxwidth/2 - ww/2;
		ypos = maxheight/2 - wh/2 -20;
	}

	return open(wfile, wname,"left="+xpos +",top="+ypos +",width="+ww +",height="+wh +",resizable=1,scrollbars=1,menubar=no");
}

function TermOfUse()
{
	var WTerm;

	if (WTerm==null || WTerm.closed) {
		WTerm = WinCenter("/terms.asp","TermWin", 482, 300);
	} else {
		WTerm.location.href = "/terms.asp";
	}
	return;
}

function how_to_claim()
{
	var WTerm;

	if (WTerm==null || WTerm.closed) {
		WTerm = WinCenter("/checkmyref/how_to_claim.asp","ClaimWin", 482, 300);
	} else {
		WTerm.location.href = "/checkmyref/how_to_claim.asp";
	}
	return;
}

function opening_hours()
{
	var WTerm;

	if (WTerm==null || WTerm.closed) {
		WTerm = WinCenter("/home/popup.opening_hours.asp","PrvWin", 482, 340);
	} else {
		WTerm.location.href = "/home/popup.opening_hours.asp";
	}
	return;
}

function Privacy()
{
	var WTerm;

	if (WTerm==null || WTerm.closed) {
		WTerm = WinCenter("/privacy.asp","PrvWin", 482, 340);
	} else {
		WTerm.location.href = "/privacy.asp?POP=1";
	}
	return;
}

function Insurance()
{
	var WTerm;

	if (WTerm==null || WTerm.closed) {
		WTerm = WinCenter("http://www.sunwayholidays.ie/marketing/insurance.html","InsurWin", 482, 400);
	} else {
		WTerm.location.href = "http://www.sunwayholidays.ie/marketing/insurance.html";
	}
	return;
}

function IBE_discount()
{
	var WTerm;

	if (WTerm==null || WTerm.closed) {
		WTerm = WinCenter("/bookonline/online_discount.asp","PrvWin", 482, 540);
	} else {
		WTerm.location.href = "/bookonline/online_discount.asp?POP=1";
	}
	return;
}


function CancellationPolicy()
{
	var WTerm;

	if (WTerm==null || WTerm.closed) {
		WTerm = WinCenter("/htmls/cancellation.htm?POP=1","CanWin", 550, 480);
	} else {
		WTerm.location.href = "/htmls/cancellation.htm?POP=1";
	}
	return;
}

function CreditcardPolicy()
{
	var WTerm;

	if (WTerm==null || WTerm.closed) {
		WTerm = WinCenter("/htmls/creditcard.htm?POP=1","CanWin", 300, 300);
	} else {
		WTerm.location.href = "/htmls/creditcard.htm?POP=1";
	}
	return;
}

function searchDB()
{
	document.searchform.submit();
	return;
}

function show_picGallery_large(url){
aWindow=window.open(url,"thewindow","toolbar=yes,width=483,height=550,status=yes,scrollbars=yes,resize=0,menubar=no");
}



function sendQSearch(fm)
{
	var i, f, fv;
	
	if (fm.svalue.value=="") {
		return false;
	}
	
	f 	= fm.stype;
	fv 	= fm.svalue;
	for (i=0; i<f.length; i++) {
		if (f.options[i].selected) {
			if (f.options[i].value!="-") {
				location.href = f.options[i].value+fv.value;
			}
	   	} 
	}
	return true;
}


function describe(text) {
	window.status = text;
	return true;
	}

function clearstatus() {
	window.status="";
}


win = 2;
function popup() {
	win = window.open('/bookonline/please_wait.html','progress','width=330,height=150,top=240,left=320,status=no');
         
                }


function unpop() {

if (win && win.open && !win.closed) win.close();
                  
                }
  


