SLWSignupForm = new function(){
	/*var LOCAL_URL 	= 'http://local.signup.slwpath.com/';
	var CONTENT_URL = 'http://signup.slwpath.com/';*/
	var CONTENT_URL = new Array(); 
	
	CONTENT_URL['live'] 	= 'http://signup.slwpath.com/';
	CONTENT_URL['local'] 	= 'http://local.signup.slwpath.com/';
	CONTENT_URL['staging'] 	= 'http://staging.signup.slwpath.com/';
	
	var CONTAINER	= 'SLW_container';
	var CONTAINER2	= 'SLW_container2';
	
	function loadSignupForm(hostType) {
		var container	= document.getElementById(CONTAINER);
		var container2	= document.getElementById(CONTAINER2);
		var ifrm		= document.createElement("IFRAME");
		
		var URL = CONTENT_URL[hostType];
		
		if (!window.SLW_himg) 	window.SLW_himg	= '';
		if (!window.SLW_rurl) 	window.SLW_rurl = '';
		if (!window.SLW_brite)	window.SLW_brite = '';
		if (!window.SLW_path)	window.SLW_path	= 'slw';
		if (!window.SLW_country)window.SLW_country = 'US';

		if (window.SLW_mobile) URL += "m/" + window.SLW_country;
		else URL += "s/";
		
		ifrm.setAttribute("src", URL + 
							"?serverId="+encodeURIComponent(window.SLW_serverID)+
							"&siteId="+encodeURIComponent(window.SLW_siteID)+
							"&colorScheme="+window.SLW_colorScheme+
							"&submitImg="+encodeURIComponent(window.SLW_submitImg)+
							"&customForm="+window.SLW_customForm +
							"&prefill=" + window.SLW_pre + 
							"&brite=" + window.SLW_brite +
							"&test=" + window.SLW_test +
							"&himg=" + encodeURIComponent(window.SLW_himg) +
							"&rurl=" + encodeURIComponent(window.SLW_rurl) + 
							"&path=" + encodeURIComponent(window.SLW_path)
		);
		
		ifrm.setAttribute("frameborder", 0);
		ifrm.setAttribute("ALLOWTRANSPARENCY", "true");
		ifrm.style.position	= "relative";
		ifrm.style.width 	= "100%";
		ifrm.style.height	= "100%";
		ifrm.style.margin	= "0px";
		ifrm.style.padding	= "0px";
		ifrm.style.overflow	= "hidden";
		container.innerHTML = "";
		container.appendChild(ifrm);
		
		if (container2) {
			var ifrm2		= document.createElement("IFRAME");

			ifrm2.setAttribute("src", URL + 
					"?serverId="+encodeURIComponent(window.SLW_serverID)+
					"&siteId="+encodeURIComponent(window.SLW_siteID)+
					"&colorScheme="+window.SLW_colorScheme+
					"&submitImg="+encodeURIComponent(window.SLW_submitImg2)+
					"&customForm="+window.SLW_customForm +
					"&preFill=" + window.SLW_pre + 
					"&brite=" + window.SLW_brite +
					"&test=" + window.SLW_test +
					"&himg=" + encodeURIComponent(window.SLW_himg) +
					"&rurl=" + encodeURIComponent(window.SLW_rurl) + 
					"&path=" + encodeURIComponent(window.SLW_path)
			);

			ifrm2.setAttribute("frameborder", 0);
			ifrm2.setAttribute("ALLOWTRANSPARENCY", "true");
			ifrm2.style.position	= "relative";
			ifrm2.style.width 	= "100%";
			ifrm2.style.height	= "100%";
			ifrm2.style.margin	= "0px";
			ifrm2.style.padding	= "0px";
			ifrm2.style.overflow	= "hidden";

			container2.innerHTML = "";
			container2.appendChild(ifrm2);
		}
	}
		
	this.init = loadSignupForm;
};

SLWSignupForm.init(window.SLW_hostType);
