/*********************************
Collateral Mortgage Opt-In Code:
Since ASP.NET only allows 1 form to be used, we have to change the
form action to the provided Vertical Response action, http://oi.vresp.com?fid=xxxx.

With this, we are also gathering the "fid" value from a hidden div tag within the page
content that allows the content contributor admin to change the fid value as they add new
opt-in forms to the various content pages on the site. 

Lastly, we have to set the form action back to the default ASP.NET form action. 
*********************************/

function sendForm() {
	var defaultAction = document.aspnetForm.action; //save the current form action so we can reset it after we're through
	var fid = document.getElementById("hiddenfid").innerHTML; //example of fid data: 46fe6c71e2
	document.aspnetForm.action="http://oi.vresp.com?fid="+fid; //set the form action to Vertical Response's supplied action along with the admin specified fid value 
	document.aspnetForm.target="vr_optin_popup"; //set the target for the optin form
	document.aspnetForm.submit(); //submit the form to Vertical Response's provided action above
	window.open("http://www.verticalresponse.com", "vr_optin_popup", "scrollbars=yes,width=600,height=450" );	 //open the optin window into new window
	return true;
	}