﻿function checkCallBack(namefield, phonefield) {
   
    namevalue = namefield.value;
    phonevalue = phonefield.value;

    if (namevalue != '' && namevalue != 'Your name...' && phonevalue != '' && phonevalue != 'Your phone...') {
        return true
    }
    else {
        alert('Please enter your name and your phone number.');
        return false
    }
   }

   function homepageFlash() {
   	// SWFObject embed
   	var flashvars = {
   		initialURL: escape(document.location)
   	}
   	var params = {
   		base: ".",
   		quality: "best",
   		bgcolor: "#5C2C56",
   		allowfullscreen: "false",
   		wmode: "transparent"
   	}
   	var attributes = {}

   	swfobject.embedSWF("/flash/xitrack_vid.swf", "xitrackvid", "250", "240", "9.0.0", false, flashvars, params, attributes);
   }

   function ctaVidEmbed(video) {
   	// SWFObject embed
   	var divid = video;
   	var vidsrc = "";
   	switch (video) {
   		case "aboutvid":
   			vidsrc = "CTA_about_vid"
   			break;
   		case "centenaryvid":
   			vidsrc = "CTA_cent_vid"
   			break;
   		case "bbfutures":
   			vidsrc = "CTA_bbfutures_vid"
   			break;
   		case "bbfuturesthanks":
   			vidsrc = "CTA_bbfuturesthanks_vid"
   			break;
   	};
   	var flashvars = {
   		initialURL: escape(document.location)
   	}
   	var params = {
   		base: ".",
   		quality: "best",
   		bgcolor: "#5C2C56",
   		allowfullscreen: "false",
   		wmode: "transparent"
   	}
   	var attributes = {}

   	swfobject.embedSWF("/flash/" + vidsrc + ".swf", divid, "199", "235", "9.0.0", false, flashvars, params, attributes);
   }
