/* XHR for Free Download *//*YAHOO.namespace("view.qotw");var fieldJSON = {	"FirstName" : ["First Name", /\w/i],	"LastName" : ["Last Name", /\w/i],	"Company" : ["Company Name", /\w/i],	"emailAddress" : ["E-mail Address", /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i]}function submitQOTW() {	f = document.forms['_qotw'];	rbField = f.surveyQuestion;	for(i = 0; i != rbField.length; ++i) {		if(rbField[i].checked) {			var answer = f.surveyQuestion[i].value;			break;		}	}	var weekOf = f.weekOf.value;	var remoteAddress = f.REMOTE_ADDR.value;	valid = true;	/*	for(fld in fieldJSON) {		if(!fieldJSON[fld][1].test(f.elements[fld].value)) {			str = "Please fill in all fields.";			createFreeButtonDialog(str);			YAHOO.view.qotw.simpledialog1.show();						valid = false;			return;		}	}	*/	/*	//assemble the loading panel	//createDownloadDialog();	var download = false;	// Define the callback object for Connection Manager that will set the body of our content area when the content has loaded	var callback = {		success : function(o) {					var rC = o.responseText;		//YAHOO.view.qotw.wait.hide();		if(rC.indexOf("success") > -1) {			//create a cookie to store the user's emaail address for quick viewing			str = "Thank you for your answer!";			createQOTWDialog(str, true);			YAHOO.view.qotw.simpledialog1.show();					} else {			str = "There was a problem submitting your survey answer.";			createQOTWDialog(str, false);			YAHOO.view.qotw.simpledialog1.show();		}	}}		// Show the loading panel		//YAHOO.view.qotw.wait.show();		// Connect to our data source and load the data		connUrl = dbPath + "/qotw?openAgent";		hash = hex_sha1(weekOf + answer);		WM_setCookie (weekOf, hash, 2400, "/", "198.6.84.24", false);		var postData = "&data=" + weekOf + "&data=" + answer + "&data=" + remoteAddress; 		var conn = YAHOO.util.Connect.asyncRequest("POST", connUrl, callback, postData);}	var createDownloadDialog = function() {	var content = document.getElementById("content");	content.innerHTML = "";	alert(content);	/*	if (!YAHOO.view.qotw.wait) {		// Initialize the temporary Panel to display while waiting for external content to load		YAHOO.view.qotw.wait = 			new YAHOO.widget.Panel("wait",  			{ 					width: "275px", 				fixedcenter: false, 				close: true, 				draggable: false, 				zindex: 4,				modal: true,				visible: false			} 		);		YAHOO.view.qotw.wait.setHeader("Please wait...");		YAHOO.view.qotw.wait.setBody("<img src=\"" + dbPath + "/rel_interstitial_loading.gif?openImageResource\"/>");		YAHOO.view.qotw.wait.render(document.body);		YAHOO.view.qotw.wait.cfg.setProperty("xy", [200,200]);	}	*//*}	YAHOO.namespace("view.qotw");function createQOTWDialog(msg, d) {	// Define various event handlers for Dialog	var handleYes = function() {	this.hide();	document.forms['_qotw'].surveyQuestion.focus();	if(d == true) {		document.forms['_qotw'].surveyQuestion[0].checked = true;	}};var handleNo = function() {	this.hide();};// Instantiate the DialogYAHOO.view.qotw.simpledialog1 = new YAHOO.widget.SimpleDialog("simpledialog1", { 	width: "400px",	fixedcenter: true,	visible: false,	draggable: false,	close: true,	text: msg,	icon: YAHOO.widget.SimpleDialog.ICON_INFO,	constraintoviewport: true,	buttons: [ { text:"OK", handler:handleYes, isDefault:true }]	});	YAHOO.view.qotw.simpledialog1.setHeader("THE VIEW Question of the Week");		// Render the Dialog	YAHOO.view.qotw.simpledialog1.render("container");}*/