// JavaScript Document
<!--
var ii = -90
var tHide = 0
var tContact = 0
var Clicknum = 1
status = 'Welcome to go4less.ie - the low fares students site';
function addbookmark()
{
	
	if (navigator.appName=="Netscape"&&parseFloat(navigator.appVersion)>=4.0)
	{
		alert("Sorry this feature only works in an IE browser. To Bookmark this page please press CRTL+D");
		return;
	}
	bookmarkurl="http://www.go4less.ie/"
	bookmarktitle="Welcome To go4less"
	if (document.all)
	window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
//cromlesss window
function CromIT() {
	theURL="/Popups/contactus.asp"
	wname ="CHROMELESSWIN"
	W=400;
	H=200;
	windowCERRARa = "/Images/close_a.gif"
	windowCERRARd = "/Images/close_d.gif"
	windowCERRARo = "/Images/close_o.gif"
	windowNONEgrf = "/Images/none.gif"
	windowCLOCK	= "/Images/clock.gif"
	windowREALtit = "Contact Us @ go4less.ie"
	windowTIT = "<font face=verdana size=1>Contact Us @ go4less.ie</font>"
	windowBORDERCOLOR = "#000000"
	windowBORDERCOLORsel = "#999999"
	windowTITBGCOLOR = "#999999"
	windowTITBGCOLORsel = "#333333"
	openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}

function pop_window(url, width, height) {
	//remove a attribute if you don't want it to show up
	var popit = window.open(url,'console',',,,,,,,,');
}
function open_reg_window() {
window.open('/popups/register.asp',null,'height=350,width=550,status=no,top=100,left=120,scrollbars=no,toolbar=no,menubar=no,location=no')
}
function open_hot_window() {
window.open('http://www.go4less.ie/hotels/index.asp',null,'height=600,width=800,resizable=yes,status=yes,top=0,left=0,scrollbars=yes,toolbar=yes,menubar=yes,location=yes,directories=yes')
}
function open_tax_window() {
window.open('http://www.taxback.com',null,'height=600,width=800,resizable=yes,status=yes,top=0,left=0,scrollbars=yes,toolbar=yes,menubar=yes,location=yes,directories=yes')
}
function open_txt_window() {
window.open('/popups/txtForFares.htm',null,'height=500,width=330,status=no,top=100,left=120,scrollbars=no,toolbar=no,menubar=no,location=no')
}
function open_wes_window() {
window.open('http://www.westernunion.com/info/homePage.asp?country=IE',null,'height=600,width=800,resizable=yes,status=yes,top=0,left=0,scrollbars=yes,toolbar=yes,menubar=yes,location=yes,directories=yes')
}
function SubmitEmailForm(){

	if (isEmailAddr(document.SubEmail.email.value)){
	window.open('about:blank','ThankYou','width=250,height=200,menubar=no,scrollbars=no');
	document.SubEmail.submit();
	}
	else
	{alert('You email address seems to be invalid')}
}
function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function FormValidator(theForm)
{

  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (!isEmailAddr(theForm.email.value))
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.email.focus();
    return (false);
  }
   
  if (theForm.email.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }
  return (true);
}
//-->