function setCookie(){	d = new Date();	today = new String(d.toLocaleString());		uniquevalue = document.getElementById('UniqueValue').value;	var formname = ""	if (document.getElementById('FormName'))	{	var formname = document.getElementById('FormName').value;	}					//remove spaces from date	today = today.split(" ").join("");	//remove colons from date	today = today.split(":").join("");		//Connects with HTMLFIELDS subform UniqueValue field	var session = uniquevalue;		var name = "#S";        var result=null;     var myCookie = " " + document.cookie + ";";     var searchName = " " + name + "=";     var startOfCookie = myCookie.indexOf(searchName);     var hasEDB=myCookie.toLowerCase().indexOf("#edb="); //Added by Hitesh Haran on 28-11-2006	var oSystem = navigator.appVersion;	var sRes = screen.width + "x" + screen.height;	var lang = navigator.userLanguage;	var video = "";     var curl = document.URL;     var rset =""            //if (document.getElementById('HTTP_Referer')) {   var referer = document.getElementById('HTTP_Referer').value;	}   //  else          														{	var referer= window.document.referrer;     }         var referer= new String(window.document.referrer);    if (referer.length > 400) { referer=referer.substring(0,399)}           if (startOfCookie == -1)      {     document.cookie = "#S=" + session + "~; path=/;  domain=.ashridge.org.uk"; }    document.cookie =  "#OS=" + escape(oSystem) + "~; path=/;  domain=.ashridge.org.uk";    document.cookie =  "#SR=" + sRes + "~; path=/;  domain=.ashridge.org.uk";    document.cookie =  "#L=" + lang + "~; path=/;  domain=.ashridge.org.uk";    document.cookie =  "#V=" + video + "~; path=/;  domain=.ashridge.org.uk";    document.cookie =  "#R=" + escape(referer) + "~; path=/; domain=.ashridge.org.uk";    document.cookie =  "#C=" + escape(curl) + "~; path=/; domain=.ashridge.org.uk";    document.cookie =  "#FP=" + getFlashVersion() + "~; path=/; domain=.ashridge.org.uk";    var strURL = document.getElementById('SURLConversion').value;       	if (formname != "") 	{	var strURL = document.getElementById('SFormURLConversion').value;   	}     	var strURL= strURL+ "&source=web" ;			//Added by Hitesh Haran on 28-11-2006 	if (hasEDB==-1){		var strEDB=strURL.slice(1,strURL.toLowerCase().indexOf(".nsf")+4);		document.cookie =  "#EDB=" + strEDB + "~; path=/;  domain=.ashridge.org.uk";				}			if (window.XMLHttpRequest)	{		xmlhttp=new XMLHttpRequest()			xmlhttp.open("GET",strURL,true)		xmlhttp.send(null)	}	// code for IE	else if (window.ActiveXObject)	{		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")		if (xmlhttp)		{		xmlhttp.open("GET",strURL,true)			xmlhttp.send()		}	}}	                                      function iLikeCookies(video){     document.cookie =  "#V=" + video + "~; path=/;  domain=.ashridge.org.uk"; }function updateDomLog(r){	var strVar = r;	document.cookie =  "#V=" + strVar+ "~; path=/;  domain=.ashridge.org.uk";	var strURL= self.location.href + "&source=web" ;	if (window.XMLHttpRequest)	{		xmlhttp=new XMLHttpRequest()			xmlhttp.open("GET",strURL,true)		xmlhttp.send(null)	}	// code for IE	else if (window.ActiveXObject)	{		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")		if (xmlhttp)		{			xmlhttp.open("GET",strURL,true)			xmlhttp.send()		}	}}	function getFlashVersion(){	if (flash.installed){		return flash.version;	}else{		return 'none'; 		}}/*******************************************************FLASH DETECT 2.5Credit where credit's due:Original code by Ryan Parman and mjac.http://www.skyzyx.com*******************************************************/// This script will test up to the following version.var flash_versions = 20;// Initialize variables and arraysvar flash = new Object();flash.installed=false;flash.version='0.0';// Dig through Netscape-compatible plug-ins first.if (navigator.plugins && navigator.plugins.length) {	for (var x=0; x < navigator.plugins.length; x++) {		if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) {			flash.version = navigator.plugins[x].description.split('Shockwave Flash ')[1];			flash.installed = true;			break;		}	}}// Then, dig through ActiveX-style plug-ins afterwordselse if (window.ActiveXObject) {	for (x = 2; x <= flash_versions; x++) {		try {			oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");			if(oFlash) {				flash.installed = true;				flash.version = x + '.0';			}		}		catch(e) {}	}}// Create sniffing variables in the following style: flash.ver[x]// Modified by mjacflash.ver = Array();for(var i = 4; i <= flash_versions; i++) {	eval("flash.ver[" + i + "] = (flash.installed && parseInt(flash.version) >= " + i + ") ? true : false;");}