var calendar1; /*must be declared in global scope*/var calendar2; /*must be declared in global scope*/window.onload = function() {	// content dates initialisation	try {		calendar1 = new Epoch('cal1','popup',document.getElementById('xposted'),false);	} catch (e) {	}	// workflow dates initialisation	try {		calendar2 = new Epoch('cal2','popup',document.getElementById('EmbargoDate'),false);	} catch (e) {	}	// FCKeditor call to substitute rich text editor for textareas on form	//ReplaceAllTextareas();		// replace all of the textareas	try {		var allTextAreas = document.getElementsByTagName('textarea');    		for (var i=0; i < allTextAreas.length; i++) {			var areaName = allTextAreas[i].name;			if (( areaName != "xclientaddress" ) && (areaName != "xbusaddress") && (areaName != "xcampaignemail"))  {				var oFCKeditor = new FCKeditor( allTextAreas[i].name ) ;     	   		//oFCKeditor.BasePath = 'http://' + window.location.host + '/javascript/FCKeditor/';        				oFCKeditor.BasePath = '/javascript/FCKeditor/';     				oFCKeditor.ToolbarSet = 'WiredGov';				oFCKeditor.Height = '450';				oFCKeditor.ReplaceTextarea() ;			}					}			} catch (e) {		}}
