function emailcheck(myForm){
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.email.value)){
reset();
yu();
yu1();
yv();
yz();
changeSelect11();
handleClick1();
changevalue2a();
changevalue3a();
changevalue4a();
changevalue2();
changevalue3();
changevalue4();
}
alert("Invalid E-mail Address! Please re-enter.")
return (false);
}
function yrt(){
GB_show('Popups for this site are disabled in your browser', 'http://geographyfieldwork.com/popup.htm', '390')
}
function IsPopupBlocker() {
var PUtest = window.open(null,"","width=100,height=100");
try { PUtest.close(); return false; }
catch(e) { return true; }
}
function detectPopupBlocker() {
var myTest = window.open("about:blank","","directories=no,height=1,width=1,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,top=0,location=no");
if (!myTest) {
setTimeout("alert('Our Quote System wll be affected by a POP-UP BLOCKER in your browser toolbar.  Please turn off your POP-UP BLOCKER(S)')",3000);
} else {
myTest.close();
}
}
function detectPopupBlocker1() {
var myTest = window.open("about:blank","","directories=no,height=1,width=1,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,top=0,location=no");
if (!myTest) {
alert('        If you cannot see your quote\n\nPlease turn off your POP-UP BLOCKER(S)');
} else {
myTest.close();
}
}
//window.onload = IsPopupBlocker();
//window.onload = detectPopupBlocker();
function ActionDeterminator()
{
if(document.calc.email!="") {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/emailquote2010.php';
}
return true;
}
function ActionDeterminator1()
{
if(document.calc.email!="" && document.calc.d1.value=="") {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/emailinvoice2010.php';
}
else if(document.calc.email!="" && document.calc.d1.value!="") {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/emailinvoice12010.php';
}
return true;
}
function ActionDeterminator2()
{
if(document.calc.email!="" && document.calc.e1.value=="" && document.calc.group1select.checked) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/emailgroup1invoices2010.php';
}
else if(document.calc.email!="" && document.calc.e1.value!="" && document.calc.group1select.checked) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/emailgroup1finalinvoice2010.php';
}
if(document.calc.email!="" && document.calc.f1.value=="" && document.calc.group2select.checked) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/emailgroup2invoices2010.php';
}
else if(document.calc.email!="" && document.calc.f1.value!="" && document.calc.group2select.checked) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/emailgroup2finalinvoice2010.php';
}
if(document.calc.email!="" && !document.calc.group1select.checked && !document.calc.group2select.checked) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/emailinvoice2010.php';
}
return true;
}
function ActionDeterminator3()
{
if(document.calc.email!="" && document.calc.group1select.checked) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/emailgroup1quote2010.php';
}
if(document.calc.email!="" && document.calc.group2select.checked) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/emailgroup2quote2010.php';
}
else if(document.calc.email!="" && !document.calc.group1select.checked && !document.calc.group2select.checked) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/emailquote2010.php';
}
return true;
}
function ActionDeterminator4()
{
if(document.calc.Travel[1].selected) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/confirmedbookingair2010.php';
}
if(document.calc.Travel[2].selected||document.calc.Travel[3].selected) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/confirmedbookingcoach2010.php';
}
else if(document.calc.Travel[0].selected) {
alert('Please select a Travel Option');
}
return true;
}
function ActionDeterminator5()
{
if(document.calc.Travel[1].selected) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/confirmedbookinggroup1air2010.php';
}
if(document.calc.Travel[2].selected||document.calc.Travel[3].selected) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/confirmedbookinggroup1coach2010.php';
}
else if(document.calc.Travel[0].selected) {
alert('Please select a Travel Option');
}
return true;
}
function ActionDeterminator6()
{
if(document.calc.Travel[1].selected) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/confirmedbookinggroup2air2010.php';
}
if(document.calc.Travel[2].selected||document.calc.Travel[3].selected) {
IsPopupBlocker();
detectPopupBlocker1();
document.calc.action = 'http://geographyfieldwork.com/Tariffs/2010/confirmedbookinggroup2coach2010.php';
}
else if(document.calc.Travel[0].selected) {
alert('Please select a Travel Option');
}
return true;
}
function insertSpace()
{
var initialValue = document.calc.organisation.value;
var spacePattern = /\'+/;
var space = "";
var replaceSpace = initialValue.replace(spacePattern, space);
var replaceSpace2 = replaceSpace.replace(spacePattern, space);
document.calc.organisation.value = replaceSpace2;
}
function insertSpace1()
{
var initialValue = document.calc.organisation.value;
var spacePattern = /\ +/;
var space = "_";
var replaceSpace = initialValue.replace(spacePattern, space);
var replaceSpace2 = replaceSpace.replace(spacePattern, space);
document.calc.organisation.value = replaceSpace2;
}
function removespace(){
var formcontent=document.calc.organisation.value;
formcontent=formcontent.split(" ")
if (formcontent.length >=2){
document.calc.organisation.style.backgroundColor = '#FF0000';
alert("You have used too many words - the safe maximum is 7");
return;
}
}