	var dhxWins=new dhtmlXWindows();
	dhxWins.enableAutoViewport(false);
	dhxWins.attachViewportTo("windowCont");
	dhxWins.setImagePath("login/js/dhtmlxWindows/codebase/imgs/");
	function login() {
		$('#login-box').toggle();
/*		if (dhxWins.isWindow("w1")) closeWindow();
		else {
			var w1=dhxWins.createWindow("w1",1,1,280,160);
			w1.centerOnScreen();
			pos = dhxWins.window("w1").getPosition();
			dhxWins.window("w1").setPosition(pos[0], 200);
			w1.setText('Login form');
			w1.clearIcon();
			w1.denyResize();
			w1.denyPark();
	//		w1.setModal(true);
			htmlString ='<div align="center">'+
							'<form style="padding:0px;margin:0px;font-size:12px" action="include/actions.php?action=del_archive" name="submitform" method="post">'+
								'<div align="right" style="width:220px">'+
									'<div style="padding:10px 0px 5px">Username:&nbsp;<input type="edit" name="user" size="20"></div>'+
									'<div style="padding:5px 0px">Password:&nbsp;<input type="password" name="pass" size="20"></div>'+
									'</div>'+
								'<div style="padding: 5px 0px 10px"><a href="javascript:void(0)" onClick="javascript:register();">Register</a></div>'+
								'<input type="button" value="Login" onClick="document.submitform.submit();closeWindow();">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+
								'<input type="button" value="Cancel" onclick="closeWindow();">'+
							'</form>'+
						'</div>';
			w1.attachHTMLString(htmlString);
		}*/
	}
	function register() {
//		closeWindow();
		if (!dhxWins.isWindow("w1")) {
		var w1=dhxWins.createWindow("w1",1,1,510,1150);
		w1.centerOnScreen();
		pos = dhxWins.window("w1").getPosition();
		dhxWins.window("w1").setPosition(pos[0], 20);
		w1.setText('Register form');
		w1.clearIcon();
		w1.denyResize();
		w1.denyPark();
		w1.setModal(true);
		Accredited = "YOU ARE AN ACCREDITED INVESTORS IF ONE OR MORE OF THE FOLLOWING THREE (3) STATEMENTS, ARE TRUE:"+
			"_________ A. I certify that I am an accredited investor because I had individual income (exclusive of any income attributable to my spouse) of more than $200,000 in each of the most recent two (2) years and I reasonably expect to have an individual income in excess of $200,000 for the current year. For purposes of this Purchaser Questionnaire, individual income means adjusted gross income, as reported for federal income tax purposes, less any income attributable to a spouse or to property owned by a spouse, increased by the following amounts (but not including any amounts attributable to a spouse or to property owned by a spouse): (i) the amount of any tax exempt interest income received, (ii) the amount of losses claimed as a limited partner in a limited partnership, (iii) any deduction claimed for depletion, (iv) amounts contributed to an IRA or Keogh retirement plan, (v) alimony paid and (vi) any amount by which income from long-term capital gains has been reduced in arriving at adjusted gross income pursuant to the provisions of Section 1202 of the Internal Revenue Code."+
			"_________ B. I certify that I am an accredited investor because my spouse and I had joint income of more than $300,000 in each of the most recent two (2) years and I reasonably expect to have such joint income with my spouse in excess of $300,000 for the current year. For purposes of this Purchaser Questionnaire, joint income shall be determined as set forth in Item II (A) above for individual's income, except any income attributable to a spouse or property owned by a spouse shall be included."+
			"_________ C. I certify that I am an accredited investor because I have an individual net worth, or my spouse and I have a combined net worth, in excess of $1,000,000. For purposes of this paragraph, \"net worth\" means the excess of total assets at fair market value, including home and personal property, over total liabilities."+
			"-------------------------------------------------------------------"+
			"This Website is NOT a PPM"+
			"1) This website does not constitute an offer to sell, or a solicitation of an offer to buy or sell, any securities, and is intended for informational purposes only. Any such offers will be made via a Confidential Private Placement Memorandum (\"PPM\"). Prospective investors must read the PPM in its entirety before making an investment decision. Investments in private offerings are speculative and involve a degree of risk."+
			"2) The information on this Web site is provided solely for general illustration and instructional purposes and does not create a business or professional services relationship. Laws and regulations vary by jurisdiction and change from time to time; compliance with such standards depends on the particular circumstances. Any reliance on the information provided herein is solely at the user's own risk. The Web site is also not intended be an offering of any of the investments mentioned herein. Subscriptions must be made pursuant to a private placement memorandum. Nothing in this website should be construed as investment advice.";
		Institutional = "PUT HERE THE TEXT FOR AN INSTITUTIONAL INVESTOR";
		NotAccredited = "Unfortunately at this time we only handle investments for Accredited Investors.";
		htmlString ='<div align="center" style="font-size:12px;color:#666666;">'+
						'<form style="padding:0px;margin:0px" name="submitform" action="login/register.php" method="post">'+
							'<div align="left" style="width:490px;margin-bottom:10px">'+
								'<div style="margin-top:10px;padding:5px 0px;border: 1px solid #AAAAAA">'+
									'<div align="center" style="margin-bottom:5px;"><b>Create login and password</b></div>'+
									'<div align="right" style="width:250px;float:left" id="txtEmail_">Valid E-mail:&nbsp;</div><span><input type="edit" name="txtEmail" id="txtEmail" size="20"></span>'+
									'<div align="center" id="badEmail" style="color:#FF0000"></div>'+
									'<div align="right" style="width:250px;float:left" id="pwPW1_">Choose Password:&nbsp;</div><span><input type="password" name="pwPW1" id="pwPW1" size="20" onKeyUp="runPassword(this.value,\'pwPW1\');"></span>'+
									'<div style="width:100px;margin-left:250px">'+
										'<div id="pwPW1_text" style="font-size: 10px;"></div>'+
										'<div id="pwPW1_bar" style="font-size: 1px; height: 2px; width: 0px; border: 1px solid white;"></div>'+
									'</div>'+
									'<div align="center">Passwords are case-sensitive and must have 5 to 10 letters.</div>'+
									'<div align="right" style="width:250px;float:left;margin: 10px 0px" id="pwPW2_">Re-enter Password:&nbsp;</div><span style="margin: 10px 0px"><input type="password" name="pwPW2" id="pwPW2" size="20"></span>'+
									'<div align="right" valign="top" style="width:250px;float:left" id="textarea">Terms and Conditions:&nbsp;</div><span><textarea COLS="23" ROWS="5">'+
									'CONFIDENTIALITY, NONDISCLOSURE AND NON-CIRCUMVENTION AGREEMENT'+
									'This Confidentiality, Nondisclosure and Non-Circumvention Agreement ("Agreement") is by and between the Visitor, and JONATHAN ROSE COMPANY, LLC. ("Jonathan Rose Company"), their affiliates, agents, directors, officers, and subsidiaries, and is made the day the Visitor enters the domain and or website located at http://www.JONATHAN ROSE COMPANY.com and any websites or domains of subsidiaries and divisions associated with JONATHAN ROSE COMPANY.'+
									'PARTIES TO THE AGREEMENT'+
									'JONATHAN ROSE COMPANY. is a company incorporated pursuant to the laws of the State of New York, USA and is involved in the business of Green Energy Bonds .'+
									'"Visitor" refers to any natural person(s) and organizations, its agents, representatives, directors, officers, and subsidiaries who have signed the JONATHAN ROSE COMPANY register or enter the website or domain located at http://www.JONATHAN ROSE COMPANY.com'+
									'Visitor expressly acknowledges that they are cognizant of this document and its terms and willingly enter into this agreement upon signing or entering the site by submitting their information and agreement below.'+
									'RECITALS:'+
									'A. The parties wish to exchange trade secrets and other propriety information for the purpose of exploring mutual cooperation and possible business opportunities;'+
									'B. The parties have agreed to regard such information as confidential pursuant to the terms of this agreement.'+
									'C. The parties agree not to compete in the same type of business.'+
									'THEREFORE in consideration of the agreements set forth after this, the parties agree as follows:'+
									'1. Confidential information means any information or data disclosed by either Party to the other pursuant to this agreement and designated as confidential, or which, under the circumstances surrounding disclosure ought reasonably to be treated as confidential. Confidential Information includes, without limitation, any tangible material such as written or printed documents, samples, models, software, or intangible material such as intellectual and/or artistic concepts and/or designs; business formulas and/or strategies; product concept and/or design; branding, marketing and/or promotional strategies; website concepts and/or designs; any information pertaining to clients, vendors, investors and/or creative contacts or any oral disclosures, subject to the terms of this agreement.'+
									'2. The receiving Party has no obligation or restriction with respect to Confidential information which: '+
									'(a) has come into the public domain prior to, or after the disclosure through no wrongful act of the receiving Party; '+
									'(b) has been lawfully received from a third party without restrictions or breach of this agreement;'+
									'(c) has been or is published without violation of this agreement; '+
									'(d) is independently developed in good faith by the receiving Party, with the burden of proof being on the receiving party; '+
									'(e) is approved for release or use by written authorization of the disclosing Party; '+
									'(f) is not properly designated or confirmed as Confidential Information.'+
									'3. Nothing in this agreement shall be construed as compelling either Party to disclose any Confidential Information to the other, or to enter into any further contractual relationships. Each Party represents to the other that the disclosure of Confidential Information by and between themselves is not contrary to the laws and regulations of their respective countries.'+
									'4. The Confidential Information submitted by either Party to the other and which is designated as Confidential Information to the other shall be subject to the terms of the agreement, provided that the confidential nature of the information has been clearly marked, or when disclosed orally has been identified as Confidential Information at the time of disclosure and has been confirmed and designated in writing as Confidential information within a reasonable period of time or has been defined as Confidential Material in this Agreement.'+
									'5. Any Confidential Information disclosed by either Party to the other and copies made shall be and remain the sole property of the disclosing Party and shall be returned or verified via sworn notarized affidavit that is was destroyed by the receiving Party immediately upon request.'+
									'6. All Confidential Information disclosed to a receiving Party shall: '+
									'(a) be protected and kept in confidence by the receiving Party, who must use the degree of care and employ safeguards as are reasonable for such information; '+
									'(b) be used, duplicated and disclosed to those persons only within the receiving Party\'s company and on a need to know basis solely for the purpose of this agreement provided that such persons have been informed of the confidential nature of the information; '+
									'(c) segregate all such Confidential Information from other material in order In prevent co-mingling; '+
									'(d) not to be used in whole or in part for any purpose other than the purpose of this agreement.'+
									'7. The receiving Party shall not reverse engineer, decompile or disassemble any software or equipment disclosed to it.'+
									'8. If steps are taken by a third party to force a receiving Party to disclose Confidential Information, the disclosing Party shall be notified forthwith. The receiving Party shall cooperate with the disclosing Party in any reasonable effort taken to prevent disclosure. In the event that disclosure cannot be prevented, the receiving Party shall furnish only that portion of the Confidential Information which it is legally required to do furnish, and will use all reasonable means to obtain assurance that confidential treatment will be accorded to the Confidential Information so disclosed.'+
									'9. It is expressly understood and agreed by the Parties that the disclosure and provision of Confidential Information under this agreement shall not be construed as granting to the receiving Party any rights whether express or implied by license or otherwise on the matters or inventions to which such Confidential Information pertains or to any patent, patent pending industrial design, copyright, trademark or trade secret rights, clients, investors, shareholders, designs, written or printed documents, samples, models, software, or intangible material such as intellectual and/or artistic concepts and/or design; business formulas and/or strategies; product concept and/or design; branding, marketing and/or promotional strategies; website concepts and/or design; any information pertaining to clients, vendors, investors, shareholders and/or creative contacts. The receiving party acknowledges that all such rights remain the sole and exclusive property of JONATHAN ROSE COMPANY.'+
									'10. The receiving Party shall notify the disclosing party immediately upon discovery of any unauthorized use or disclosure of Confidential Information, or any breach of this Agreement, and shall cooperate with the disclosing Party in every reasonable manner to prevent unauthorized use.'+
									'11. The Parties recognize that a breach by a Party of the terms of this agreement would result in damages to the other and that a monetary award would not adequately compensate the other for such damages. Accordingly, the Parties agree that in the event of such a breach, the other Party is entitled as a matter of right to apply to a court of competent jurisdiction for such relief by way of restraining order, injunction, decree or otherwise, as may be appropriate to ensure compliance with this agreement. The parties further agree that all restrictions contained in this agreement are necessary and fundamental to the protection of the business of the disclosing Party and are reasonable and valid, and all defenses to the strict enforcement of this agreement are hereby waived, If any provision of this Agreement is held to be illegal, invalid or unenforceable in whole or in part, such provision shall be severed from this agreement and the remaining provisions of this Agreement shall remain in full force and effect.'+
									'12. Each Party warrants that the Confidential Information it provides to the other is in the same form and content used for its own purposes and to the best of its knowledge believes it has the right and power to disclose such Confidential Information for the purposes of this agreement. Neither Party warrants that the Proprietary Information it discloses will meet the requirements of the other or that when used in a particular manner by the recipient will be sufficient or suitable for the recipients\' purposes.'+
									'13. In consideration of JONATHAN ROSE COMPANY disclosing information to the Confidante pursuant to the agreement, the Confidante agrees that it will not either individually or in partnership or jointly or in conjunction with any person, firm, association, syndicate or company, as principal, agent, shareholder or in any other manner whatever, compete with Jonathan Rose Company with respect to the development or manufacture of technology or products which use or are based in anyway on the Confidential Information anywhere in the world for a period of five (5) years after the date of this agreement.'+
									'14. The Confidante agrees not to contract, or make an offer of any sort to, any employee, consultant, investor, shareholder, advisor, vendor, client or any other person that JONATHAN ROSE COMPANY has or is negotiating a relationship with, including without limitation any consultant, researcher, or employee for a period of five (5) years after the date of this agreement'+
									'15. All disputes arising out of or in connection with this agreement, or in respect of any defined legal relationship associated therewith or derived there from, shall be referred to and finally resolved in either State of California Small claims court, State of New York Superior court or United States Federal court. The jurisdiction shall be  Los Angeles, New York, USA.'+
									'16. This agreement contains the entire understanding between the Parties on the subject matter agreed upon and supersedes all prior discussions, understandings, or agreements relating to the same subject matter.'+
									'17. This agreement is governed and shall be interpreted by the laws of the State of New York, USA.'+
									'IN WITNESS TO THIS AGREEMENT the parties have executed out above in accordance with the laws of the State of California as of the day and year set out below.'+
									'Agreed:'+
									'SIGNED, SEALED AND DELIVERED by'+
									'The Visitor : /s/ Electronic Signature and ip address as per accepting to enter the JONATHAN ROSE COMPANY, LLC site below.'+
									'Jonathan Rose Company, LLC: '+
									'by its authorized signatory '+
									'---- Jonathan Rose '+
									'</textarea></span>'+
									'<div align="right" style="margin: 5px 50px">I Agree&nbsp;<input type="radio" name="terms" id="terms" value="agree">&nbsp;I Disagree&nbsp;<input type="radio" name="terms" value="disagree"></div>'+
								'</div>'+

								'<div style="margin-top:10px;padding:5px 5px;border: 1px solid #AAAAAA">'+
									'<div align="center" style="margin-bottom:5px"><b>Investment information</b></div>'+
									'<div align="right" style="width:250px;float:left">Select Investor Type&nbsp;</div><span><select name="quest1" id="quest1" onChange="javascript:changeInvestType()">'+
									'<option value-"Please Select" selected>Please Select'+
										'<option value="Accredited investor" selected>Accredited investor'+
										'<option value="Institutional investor">Institutional investor'+
										'<option value="Not an accredited investor">Not an accredited investor'+
									'</select></span><br>'+
									'<div align="right" valign="top" style="width:250px;float:left">Details:&nbsp;</div><span><textarea COLS="19" ROWS="5" id="details"></textarea></span>'+
									'<div align="right" style="margin: 5px 50px">I Agree&nbsp;<input type="radio" name="terms1" id="terms1" value="agree">&nbsp;I Disagree&nbsp;<input type="radio" name="terms1" value="disagree"></div>'+
									'<div align="right" style="width:300px;float:left">How much are you looking to invest?&nbsp;</div><span><select name="invest" id="invest">'+
										'<option value="0">'+
										'<option value="100k - 200k">100k - 200k'+
										'<option value="200k - 500k">200k - 500k'+
										'<option value="500k - 1m">500k - 1m'+
										'<option value="1m - 5m">1m - 5m'+
										'<option value="5m - 10m">5m - 10m'+
										'<option value="10m - 25m">10m - 25m'+
										'<option value="25m - 50m">25m - 50m'+
										'<option value="50m+">50m+'+
									'</select></span>'+
									'<div align="right" style="width:300px;float:left">Are you in a position to invest immediately?&nbsp;</div><span><select name="quest2" id="quest2">'+
										'<option value="0">'+
										'<option value="immediately">immediately'+
										'<option value="3 months">3 months'+
										'<option value="6 months">6 months'+
										'<option value="1 year">1 year'+
									'</select></span><br>'+
									'<div align="right" style="width:300px;float:left">Do you make your investment decisions yourself?&nbsp;</div><span><input type="checkbox" name="quest3" id="quest3" onClick="javascript:checkMaker();" size="20">Yes</span><br>'+
									'<div align="right" style="width:300px;float:left" id="makername_">Decision maker Name:&nbsp;</div><span><input type="edit" name="makername" id="makername" size="20"></span><br>'+
									'<div align="right" style="width:300px;float:left" id="makeremail_">Decision maker Email:&nbsp;</div><span><input type="edit" name="makeremail" id="makeremail" size="20"></span>'+
								'</div>'+
								
								'<div style="margin-top:10px;padding:5px 0px;border: 1px solid #AAAAAA">'+
									'<div align="center" style="margin-bottom:5px"><b>Contact information</b></div>'+
									'<div align="right" style="width:250px;float:left" id="first_">*First Name:&nbsp;</div><span><input type="edit" name="first" id="first" size="20"></span>'+
									'<div align="right" style="width:250px;float:left" id="last_">*Last Name:&nbsp;</div><span><input type="edit" name="last" id="last" size="20"></span>'+
									'<div align="right" style="width:250px;float:left">Company Name:&nbsp;</div><span><input type="edit" name="company" id="company" size="20"></span>'+
									'<div align="right" id="country_">*Country:&nbsp<select name="country" id="country" onChange="javascript:changeCountry()">'+
										'<option value="0">'+
										'<option value="US">United States'+
										'<option value="UK">United Kingdom'+
										'<option value="CH">Switzerland'+
										'<option value="IL">Israel'+
										'<option value="DE">Germany'+
										'<option value="MC">Monaco'+
										'<option value="AE">United Arab Emirates'+
										'<option value="SA">Saudi Arabia'+
										'<option value="AF">Afghanistan'+
										'<option value="AL">Albania'+
										'<option value="DZ">Algeria'+
										'<option value="AS">American Samoa'+
										'<option value="AD">Andorra'+
										'<option value="AO">Angola'+
										'<option value="AI">Anguilla'+
										'<option value="AQ">Antarctica'+
										'<option value="AG">Antigua And Barbuda'+
										'<option value="AR">Argentina'+
										'<option value="AM">Armenia'+
										'<option value="AW">Aruba'+
										'<option value="AU">Australia'+
										'<option value="AT">Austria'+
										'<option value="AZ">Azerbaijan'+
										'<option value="BS">Bahamas'+
										'<option value="BH">Bahrain'+
										'<option value="BD">Bangladesh'+
										'<option value="BB">Barbados'+
										'<option value="BY">Belarus'+
										'<option value="BE">Belgium'+
										'<option value="BZ">Belize'+
										'<option value="BJ">Benin'+
										'<option value="BM">Bermuda'+
										'<option value="BT">Bhutan'+
										'<option value="BO">Bolivia'+
										'<option value="BA">Bosnia And Herzegovina'+
										'<option value="BW">Botswana'+
										'<option value="BV">Bouvet Island'+
										'<option value="BR">Brazil'+
										'<option value="IO">British Indian Ocean Territory'+
										'<option value="BN">Brunei'+
										'<option value="BG">Bulgaria'+
										'<option value="BF">Burkina Faso'+
										'<option value="BI">Burundi'+
										'<option value="KH">Cambodia'+
										'<option value="CM">Cameroon'+
										'<option value="CA">Canada'+
										'<option value="CV">Cape Verde'+
										'<option value="KY">Cayman Islands'+
										'<option value="CF">Central African Republic'+
										'<option value="TD">Chad'+
										'<option value="CL">Chile'+
										'<option value="CN">China'+
										'<option value="CX">Christmas Island'+
										'<option value="CC">Cocos (Keeling) Islands'+
										'<option value="CO">Columbia'+
										'<option value="KM">Comoros'+
										'<option value="CG">Congo'+
										'<option value="CK">Cook Islands'+
										'<option value="CR">Costa Rica'+
										'<option value="CI">Cote D\'Ivorie (Ivory Coast)'+
										'<option value="HR">Croatia (Hrvatska)'+
										'<option value="CU">Cuba'+
										'<option value="CY">Cyprus'+
										'<option value="CZ">Czech Republic'+
										'<option value="CD">Democratic Republic Of Congo (Zaire)'+
										'<option value="DK">Denmark'+
										'<option value="DJ">Djibouti'+
										'<option value="DM">Dominica'+
										'<option value="DO">Dominican Republic'+
										'<option value="TP">East Timor'+
										'<option value="EC">Ecuador'+
										'<option value="EG">Egypt'+
										'<option value="SV">El Salvador'+
										'<option value="GQ">Equatorial Guinea'+
										'<option value="ER">Eritrea'+
										'<option value="EE">Estonia'+
										'<option value="ET">Ethiopia'+
										'<option value="FK">Falkland Islands (Malvinas)'+
										'<option value="FO">Faroe Islands'+
										'<option value="FJ">Fiji'+
										'<option value="FI">Finland'+
										'<option value="FR">France'+
										'<option value="FX">France, Metropolitan'+
										'<option value="GF">French Guinea'+
										'<option value="PF">French Polynesia'+
										'<option value="TF">French Southern Territories'+
										'<option value="GA">Gabon'+
										'<option value="GM">Gambia'+
										'<option value="GE">Georgia'+
										'<option value="GH">Ghana'+
										'<option value="GI">Gibraltar'+
										'<option value="GR">Greece'+
										'<option value="GL">Greenland'+
										'<option value="GD">Grenada'+
										'<option value="GP">Guadeloupe'+
										'<option value="GU">Guam'+
										'<option value="GT">Guatemala'+
										'<option value="GN">Guinea'+
										'<option value="GW">Guinea-Bissau'+
										'<option value="GY">Guyana'+
										'<option value="HT">Haiti'+
										'<option value="HM">Heard And McDonald Islands'+
										'<option value="HN">Honduras'+
										'<option value="HK">Hong Kong'+
										'<option value="HU">Hungary'+
										'<option value="IS">Iceland'+
										'<option value="IN">India'+
										'<option value="ID">Indonesia'+
										'<option value="IR">Iran'+
										'<option value="IQ">Iraq'+
										'<option value="IE">Ireland'+
										'<option value="IT">Italy'+
										'<option value="JM">Jamaica'+
										'<option value="JP">Japan'+
										'<option value="JO">Jordan'+
										'<option value="KZ">Kazakhstan'+
										'<option value="KE">Kenya'+
										'<option value="KI">Kiribati'+
										'<option value="KW">Kuwait'+
										'<option value="KG">Kyrgyzstan'+
										'<option value="LA">Laos'+
										'<option value="LV">Latvia'+
										'<option value="LB">Lebanon'+
										'<option value="LS">Lesotho'+
										'<option value="LR">Liberia'+
										'<option value="LY">Libya'+
										'<option value="LI">Liechtenstein'+
										'<option value="LT">Lithuania'+
										'<option value="LU">Luxembourg'+
										'<option value="MO">Macau'+
										'<option value="MK">Macedonia'+
										'<option value="MG">Madagascar'+
										'<option value="MW">Malawi'+
										'<option value="MY">Malaysia'+
										'<option value="MV">Maldives'+
										'<option value="ML">Mali'+
										'<option value="MT">Malta'+
										'<option value="MH">Marshall Islands'+
										'<option value="MQ">Martinique'+
										'<option value="MR">Mauritania'+
										'<option value="MU">Mauritius'+
										'<option value="YT">Mayotte'+
										'<option value="MX">Mexico'+
										'<option value="FM">Micronesia'+
										'<option value="MD">Moldova'+
										'<option value="MN">Mongolia'+
										'<option value="MS">Montserrat'+
										'<option value="MA">Morocco'+
										'<option value="MZ">Mozambique'+
										'<option value="MM">Myanmar (Burma)'+
										'<option value="NA">Namibia'+
										'<option value="NR">Nauru'+
										'<option value="NP">Nepal'+
										'<option value="NL">Netherlands'+
										'<option value="AN">Netherlands Antilles'+
										'<option value="NC">New Caledonia'+
										'<option value="NZ">New Zealand'+
										'<option value="NI">Nicaragua'+
										'<option value="NE">Niger'+
										'<option value="NG">Nigeria'+
										'<option value="NU">Niue'+
										'<option value="NF">Norfolk Island'+
										'<option value="KP">North Korea'+
										'<option value="MP">Northern Mariana Islands'+
										'<option value="NO">Norway'+
										'<option value="OM">Oman'+
										'<option value="PK">Pakistan'+
										'<option value="PW">Palau'+
										'<option value="PA">Panama'+
										'<option value="PG">Papua New Guinea'+
										'<option value="PY">Paraguay'+
										'<option value="PE">Peru'+
										'<option value="PH">Philippines'+
										'<option value="PN">Pitcairn'+
										'<option value="PL">Poland'+
										'<option value="PT">Portugal'+
										'<option value="PR">Puerto Rico'+
										'<option value="QA">Qatar'+
										'<option value="RE">Reunion'+
										'<option value="RO">Romania'+
										'<option value="RU">Russia'+
										'<option value="RW">Rwanda'+
										'<option value="SH">Saint Helena'+
										'<option value="KN">Saint Kitts And Nevis'+
										'<option value="LC">Saint Lucia'+
										'<option value="PM">Saint Pierre And Miquelon'+
										'<option value="VC">Saint Vincent And The Grenadines'+
										'<option value="SM">San Marino'+
										'<option value="ST">Sao Tome And Principe'+
										'<option value="SN">Senegal'+
										'<option value="SC">Seychelles'+
										'<option value="SL">Sierra Leone'+
										'<option value="SG">Singapore'+
										'<option value="SK">Slovak Republic'+
										'<option value="SI">Slovenia'+
										'<option value="SB">Solomon Islands'+
										'<option value="SO">Somalia'+
										'<option value="ZA">South Africa'+
										'<option value="GS">South Georgia And South Sandwich Islands'+
										'<option value="KR">South Korea'+
										'<option value="ES">Spain'+
										'<option value="LK">Sri Lanka'+
										'<option value="SD">Sudan'+
										'<option value="SR">Suriname'+
										'<option value="SJ">Svalbard And Jan Mayen'+
										'<option value="SZ">Swaziland'+
										'<option value="SE">Sweden'+
										'<option value="SY">Syria'+
										'<option value="TW">Taiwan'+
										'<option value="TJ">Tajikistan'+
										'<option value="TZ">Tanzania'+
										'<option value="TH">Thailand'+
										'<option value="TG">Togo'+
										'<option value="TK">Tokelau'+
										'<option value="TO">Tonga'+
										'<option value="TT">Trinidad And Tobago'+
										'<option value="TN">Tunisia'+
										'<option value="TR">Turkey'+
										'<option value="TM">Turkmenistan'+
										'<option value="TC">Turks And Caicos Islands'+
										'<option value="TV">Tuvalu'+
										'<option value="UG">Uganda'+
										'<option value="UA">Ukraine'+
										'<option value="UM">United States Minor Outlying Islands'+
										'<option value="UY">Uruguay'+
										'<option value="UZ">Uzbekistan'+
										'<option value="VU">Vanuatu'+
										'<option value="VA">Vatican City (Holy See)'+
										'<option value="VE">Venezuela'+
										'<option value="VN">Vietnam'+
										'<option value="VG">Virgin Islands (British)'+
										'<option value="VI">Virgin Islands (US)'+
										'<option value="WF">Wallis And Futuna Islands'+
										'<option value="EH">Western Sahara'+
										'<option value="WS">Western Samoa'+
										'<option value="YE">Yemen'+
										'<option value="YU">Yugoslavia'+
										'<option value="ZM">Zambia'+
										'<option value="ZW">Zimbabwe'+
									'</select></div>'+
									'<div align="right" style="width:250px;float:left" id="address_">*Address:&nbsp;</div><span><input type="edit" name="address" id="address" size="20"></span>'+
									'<div align="right" style="width:250px;float:left" id="city_">*City:&nbsp;</div><span><input type="edit" name="city" id="city" size="20"></span>'+
									'<div align="right" style="width:250px;float:left" id="state_">*State:&nbsp</div><span><select name="state" id="state">'+
										'<option value="0">'+
										'<option value="AL">Alabama'+
										'<option value="AK">Alaska'+
										'<option value="AZ">Arizona'+
										'<option value="AR">Arkansas'+
										'<option value="CA">California'+
										'<option value="CO">Colorado'+
										'<option value="CT">Connecticut'+
										'<option value="DE">Delaware'+
										'<option value="DC">District Of Columbia'+
										'<option value="FL">Florida'+
										'<option value="GA">Georgia'+
										'<option value="HI">Hawaii'+
										'<option value="ID">Idaho'+
										'<option value="IL">Illinois'+
										'<option value="IN">Indiana'+
										'<option value="IA">Iowa'+
										'<option value="KS">Kansas'+
										'<option value="KY">Kentucky'+
										'<option value="LA">Louisiana'+
										'<option value="ME">Maine'+
										'<option value="MD">Maryland'+
										'<option value="MA">Massachusetts'+
										'<option value="MI">Michigan'+
										'<option value="MN">Minnesota'+
										'<option value="MS">Mississippi'+
										'<option value="MO">Missouri'+
										'<option value="MT">Montana'+
										'<option value="NE">Nebraska'+
										'<option value="NV">Nevada'+
										'<option value="NH">New Hampshire'+
										'<option value="NJ">New Jersey'+
										'<option value="NM">New Mexico'+
										'<option value="NY">New York'+
										'<option value="NC">North Carolina'+
										'<option value="ND">North Dakota'+
										'<option value="OH">Ohio'+
										'<option value="OK">Oklahoma'+
										'<option value="OR">Oregon'+
										'<option value="PA">Pennsylvania'+
										'<option value="RI">Rhode Island'+
										'<option value="SC">South Carolina'+
										'<option value="SD">South Dakota'+
										'<option value="TN">Tennessee'+
										'<option value="TX">Texas'+
										'<option value="UT">Utah'+
										'<option value="VT">Vermont'+
										'<option value="VA">Virginia'+
										'<option value="WA">Washington'+
										'<option value="WV">West Virginia'+
										'<option value="WI">Wisconsin'+
										'<option value="WY">Wyoming'+
									'</select></span>'+
									'<div align="right" style="width:250px;float:left">State (if outside U.S.):&nbsp;</div><span><input type="edit" name="stateout" size="20"></span>'+
									'<div align="right" style="width:250px;float:left" id="zip_">*Zip/postal code:&nbsp;</div><span><input type="edit" name="zip" id="zip" size="20"></span><br>'+
									'<div align="right" style="width:250px;float:left" id="addrtype_">*Address Type:&nbsp;</div><span>Business&nbsp;<input type="radio" name="addrtype" id="addrtypeb" value="Business">&nbsp;Private&nbsp;<input type="radio" name="addrtype" id="addrtypep" value="Private"></span>'+
									'<div align="right" style="width:250px;float:left" id="phone_">*Phone:&nbsp;</div><span><input type="edit" name="phone" id="phone" size="20"></span><br>'+
									'<div align="right" style="width:250px;float:left">Time Zone:&nbsp</div><span><select name="timezone" id="timezone">'+
										'<option value="0">'+
										'<option value="EST">EST'+
										'<option value="PST">PST'+
										'<option value="MST">MST'+
										'<option value="CST">CST'+
										'<option value="UK">UK'+
										'<option value="Israel">Israel'+
										'<option value="HK">HK'+
									'</select></span><br>'+
									'<div align="right" style="width:250px;float:left">Best way to contact you:&nbsp;</div><span><select name="bestcontact" id="bestcontact">'+
										'<option value="0">'+
										'<option value="Phone">Phone'+
										'<option value="Email">Email'+
										'<option value="Mail">Mail'+
										'<option value="Personal Visit">Personal Visit'+
										'<option value="Come into our offices">Come into our offices'+
									'</select></span><br>'+
									'<div align="right" style="width:250px;float:left">If by phone, best time to call:&nbsp;</div><span><select name="besttime" id="besttime">'+
										'<option value="0">'+
										'<option value="1">1'+
										'<option value="2">2'+
										'<option value="3">3'+
										'<option value="4">4'+
										'<option value="5">5'+
										'<option value="6">6'+
										'<option value="7">7'+
										'<option value="8">8'+
										'<option value="9">9'+
										'<option value="10">10'+
										'<option value="11">11'+
										'<option value="12">12'+
									'</select>'+
									'&nbsp;AM&nbsp;<input type="radio" name="time" id="timeam" value="AM">&nbsp;PM&nbsp;<input type="radio" name="time" id="timepm" value="PM"></span>'+
								'</div>'+
								
							'</div>'+
							'<img id="piccode" src="login/captcha/securimage_show.php?sid='+Math.random()+'" style="margin-bottom:5px"><br>'+
							'<span id="code_">Input code:&nbsp;</span><input type="text" id="code" style="margin-bottom:5px"><br>'+
							'<input type="button" value="Register" onClick="javascript:validate();">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+
							'<input type="button" value="Cancel" onclick="closeWindow();">'+
						'</form>'+
					'</div>';
		w1.attachHTMLString(htmlString);
		document.getElementById("details").innerHTML = Accredited;
		document.getElementById("state").disabled = true;
		}
	}
	function closeWindow() {
		dhxWins.window("w1").close();
	}
	function changeInvestType() {
		if (document.getElementById("quest1").value == 'Accredited investor') {
			document.getElementById("addrtypep").disabled = false;
			document.getElementById("details").innerHTML = Accredited;
		}
		if (document.getElementById("quest1").value == 'Institutional investor') {
			document.getElementById("addrtypeb").checked = true;
			document.getElementById("addrtypep").disabled = true;
			document.getElementById("details").innerHTML = Institutional;
		}
		if (document.getElementById("quest1").value == 'Not an accredited investor') {
			document.getElementById("details").innerHTML = NotAccredited;
		}
	}
	function validateLogin() {
		document.getElementById("loginerror").style.visibility = 'hidden';
		request = 	"username="+document.getElementById("login-username").value+
					"&password="+document.getElementById("login-password").value+
					"&action=validate";
		dhtmlxAjax.post("autorization.php",request,outputResponse2);
	}
	function outputResponse2(loader) {
		var error = false;
		if(loader.xmlDoc.responseXML!=null) {
			doc = loader.xmlDoc.responseXML;
			field = doc.getElementsByTagName("field");
			if (field.item(0).firstChild.data == 1) document.getElementById("loginerror").style.visibility = 'visible';
			else {
				document.getElementById("loginerror").style.visibility = 'hidden';
				document.loginform.submit();
			}
		}
	}
	function validate() {
		request = 	"param1="+document.getElementById("txtEmail").value+
					"&param2="+document.getElementById("pwPW1").value+
					"&param3="+document.getElementById("pwPW2").value+
					"&param4="+document.getElementById("country").value+
					"&param5="+document.getElementById("zip").value+
					"&param6="+document.getElementById("code").value+
					"&param7="+document.getElementById("makeremail").value;
		dhtmlxAjax.post("/login/getValidate.php",request,outputResponse);
	}
	function outputResponse(loader) {
		var error = false;
		if(loader.xmlDoc.responseXML!=null) {
			doc = loader.xmlDoc.responseXML;
			field = doc.getElementsByTagName("field");
			if (field.item(0).firstChild.data == 1 || field.item(0).firstChild.data == 2) {
				document.getElementById("txtEmail_").style.color = '#ff0000';
				error = true;
			}
			else document.getElementById("txtEmail_").style.color = '#666666';
			if (field.item(0).firstChild.data == 2)	document.getElementById("badEmail").innerHTML = 'This E-mail Address already exists. Please choose a different one.';
			else document.getElementById("badEmail").innerHTML = '';
			if (field.item(1).firstChild.data == 1) {
				document.getElementById("pwPW1_").style.color = '#ff0000';
				document.getElementById("pwPW2_").style.color = '#ff0000';
				document.getElementById("pwPW1").value = '';
				document.getElementById("pwPW2").value = '';
				runPassword(document.getElementById("pwPW1").value,"pwPW1");
				error = true;
			}
			else {
				document.getElementById("pwPW1_").style.color = '#666666';
				document.getElementById("pwPW2_").style.color = '#666666';
			}
			if (field.item(2).firstChild.data == 1) {
				document.getElementById("zip_").style.color = '#ff0000';
				error = true;
			}
			else document.getElementById("zip_").style.color = '#666666';
			if (field.item(3).firstChild.data == 1) {
				document.getElementById("code_").style.color = '#ff0000';
				error = true;
			}
			else document.getElementById("code_").style.color = '#666666';
			if (field.item(4).firstChild.data == 1 && document.getElementById("quest3").checked == false) {
				document.getElementById("makeremail_").style.color = '#ff0000';
				error = true;
			}
			else document.getElementById("makeremail_").style.color = '#666666';
		}
		if (!document.getElementById("terms").checked) {
			document.getElementById("textarea").style.color = '#ff0000';
			error = true;
			}
		if (!document.getElementById("terms1").checked) {
			document.getElementById("textarea").style.color = '#ff0000';
			error = true;
		}
		else document.getElementById("textarea").style.color = '#666666';
		if (document.getElementById("first").value == '') {
			document.getElementById("first_").style.color = '#ff0000';
			error = true;
		}
		else document.getElementById("first_").style.color = '#666666';
		if (document.getElementById("last").value == '') {
			document.getElementById("last_").style.color = '#ff0000';
			error = true;
		}
		else document.getElementById("last_").style.color = '#666666';
		if (document.getElementById("address").value == '') {
			document.getElementById("address_").style.color = '#ff0000';
			error = true;
		}
		else document.getElementById("address_").style.color = '#666666';
		if (document.getElementById("city").value == '') {
			document.getElementById("city_").style.color = '#ff0000';
			error = true;
		}
		else document.getElementById("city_").style.color = '#666666';
		if (document.getElementById("state").value == 0 && document.getElementById("country").value == 'US') {
			document.getElementById("state_").style.color = '#ff0000';
			error = true;
		}
		else document.getElementById("state_").style.color = '#666666';
		if (document.getElementById("phone").value == '') {
			document.getElementById("phone_").style.color = '#ff0000';
			error = true;
		}
		else document.getElementById("phone_").style.color = '#666666';
		if (!document.getElementById("addrtypeb").checked && !document.getElementById("addrtypep").checked) {
			document.getElementById("addrtype_").style.color = '#ff0000';
			error = true;
		}
		else document.getElementById("addrtype_").style.color = '#666666';
		if (document.getElementById("country").value == 0) {
			document.getElementById("country_").style.color = '#ff0000';
			error = true;
		}
		else document.getElementById("country_").style.color = '#666666';
		if (!error) {	
			request = 	"txtEmail="+document.getElementById("txtEmail").value+
						"&pwPW1="+document.getElementById("pwPW1").value+
						"&first="+document.getElementById("first").value+
						"&last="+document.getElementById("last").value+
						"&company="+document.getElementById("company").value+
						"&address="+document.getElementById("address").value+
						"&city="+document.getElementById("city").value+
						"&state="+document.getElementById("state").value+
						"&zip="+document.getElementById("zip").value+
						"&country="+document.getElementById("country").value+
						"&phone="+document.getElementById("phone").value+
						"&timezone="+document.getElementById("timezone").value+
						"&bestcontact="+document.getElementById("bestcontact").value+
						"&besttime="+document.getElementById("besttime").value+
						"&quest1="+document.getElementById("quest1").value+
						"&invest="+document.getElementById("invest").value+
						"&quest2="+document.getElementById("quest2").value;
			if (document.getElementById("addrtypeb").checked) request += "&addrtype=Business";
			else request += "&addrtype=Private";
			if (document.getElementById("timeam").checked) request += "&time=AM";
			if (document.getElementById("timepm").checked) request += "&time=PM";
			if (document.getElementById("quest3").checked) request += "&quest3=on";
			else request += "&quest3=";
			if (document.getElementById("quest3").checked == false) {
				request += "&makername="+document.getElementById("makername").value;
				request += "&makeremail="+document.getElementById("makeremail").value;
			}
			else {
				request += "&makername=";
				request += "&makeremail=";
			}
			dhtmlxAjax.post("/login/register.php",request,outputResponse1);
		}
		else {
			document.getElementById("piccode").src = "login/captcha/securimage_show.php?sid="+Math.random();
			document.getElementById("code").value = "";
		}
	}
	function outputResponse1(loader) {
		if(loader.xmlDoc.responseXML!=null) {
			doc = loader.xmlDoc.responseXML;
			field = doc.getElementsByTagName("field");
			if (field.item(0).firstChild.data == 1) {
				closeWindow();
				var w1=dhxWins.createWindow("w1",1,1,280,160);
				w1.centerOnScreen();
				pos = dhxWins.window("w1").getPosition();
				dhxWins.window("w1").setPosition(pos[0], 200);
				w1.setText('Confirmation form');
				w1.clearIcon();
				w1.denyResize();
				w1.denyPark();
			//	w1.setModal(true);
				htmlString ='<div align="center" style="font-size:12px;color:#666666;margin-top:50px">'+
								'<div style="margin: 5px 0px">You have registered successfully.</div>'+
								'<div style="margin: 5px 0px"><a href="javascript:void(0)" onClick="javascript:closeWindow();">Proceed to Login</a> or '+
									'<a href="javascript:void(0)" onClick="javascript:jump()">Invite your friends</a></div>'+
							'</div>';
				w1.attachHTMLString(htmlString);
			}
		}
	}
	function jump() {
		location.replace("http://www.jonathanrosecompany.com/inviter/inviter.php");
	}
	function checkMaker() {
		if (document.getElementById("quest3").checked == true) {
			document.getElementById("makername").disabled = true;
			document.getElementById("makeremail").disabled = true;
		}
		else {
			document.getElementById("makername").disabled = false;
			document.getElementById("makeremail").disabled = false;
		}
	}
	function changeCountry() {
		if (document.getElementById("country").value == 'US') document.getElementById("state").disabled = false;
		else document.getElementById("state").disabled = true;
	}