
/****** VeriSign Secure****************************************************/

function popLink(Link){
popup = window.open(Link, 'sealWin','toolbar=no,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=700,height=650')
}


/******* LiveAgent *************************************************************************/		

function showLiveAgent(theURL,winName) { //v2.0
var w = 620, h = 340;
var popW=500, popH=326;

            if (document.all || document.layers) {
                        w = screen.availWidth;
                        h = screen.availHeight;
            }
            var leftPos = (w-popW)/2, topPos = (h-popH)/2;
            window.open(theURL,winName,'width=' + popW + ',height=' + popH + ',left=' + leftPos + ',top=' + topPos);
}

function show_LiveAgent(theURL,winName) { //v2.0
var w = 620, h = 340;
var popW=500, popH=326;

            if (document.all || document.layers) {
                        w = screen.availWidth;
                        h = screen.availHeight;
            }
            var leftPos = (w-popW)/2, topPos = (h-popH)/2;
            window.open(theURL,winName,'width=' + popW + ',height=' + popH + ',left=' + leftPos + ',top=' + topPos);
}

function openWindow(theURL,winName,popW,popH) { //v2.0
			var w = 480, h = 340;
			var emailobj = document.frmSubscribe.email.value;
			alert(theURL);
						if (document.all || document.layers) {
									w = screen.availWidth;
									h = screen.availHeight;
						}
						var leftPos = (w-popW)/2, topPos = (h-popH)/2;
						if ((emailobj != "") && (IsEmailValid(emailobj) == true)){
							window.open(theURL,winName,'width=' + popW + ',height=' + popH + ',left=' + leftPos + ',top=' + topPos);
						}else{
							alert("Please type in a valid email.");
							document.frmSubscribe.email.focus();						
						}
}

function IsEmailValid(ElemName)
{
var EmailOk=true;
var Temp=document.frmBooking.elements[ElemName];
var AtSym=Temp.value.indexOf('@');
var AtSym2=Temp.value.lastIndexOf('@');
var Period=Temp.value.lastIndexOf('.');
var Space=Temp.value.indexOf(' ');
var Comma=Temp.value.indexOf(',');
var Length=Temp.value.length-1;


if ((AtSym < 1) || (Period <= AtSym+1) || (Period == Length) || (Space != -1) || (Comma != -1) || (AtSym2 != AtSym))
  {
       EmailOk=false;
  }
return EmailOk;
}
/**********************************************/
