insert into #__sfg_forms set `status`='1',`name`='Registration_custom',`description`='',`form`='<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form name=\"Registration_custom\" ext_access=\"111\">\n  <database name=\"sfg_example_registrationform\">\n    <map sfgfield=\"\" dbfield=\"id\" />\n    <map sfgfield=\"firstname\" dbfield=\"firstname\" />\n    <map sfgfield=\"lastname\" dbfield=\"lastname\" />\n    <map sfgfield=\"gender\" dbfield=\"gender\" />\n    <map sfgfield=\"country_id\" dbfield=\"country_id\" />\n    <map sfgfield=\"city\" dbfield=\"city\" />\n    <map sfgfield=\"postcode\" dbfield=\"postcode\" />\n    <map sfgfield=\"phone\" dbfield=\"phone\" />\n    <map sfgfield=\"email\" dbfield=\"email\" />\n    <map sfgfield=\"street\" dbfield=\"street\" />\n    <map sfgfield=\"dob\" dbfield=\"dob\" />\n    <map sfgfield=\"regionText\" dbfield=\"region\" />\n  </database>\n  <globalphp>\n    /*******************************************************************/\n/* SmartFormer Gold © Form PHP controller                                                     */\n/*                                                                                                                  */\n/* Product of IToris © 2009 http://www.itoris.com                                       */\n/*                                                                                                                  */\n/*******************************************************************/\n\n$session = Mage::getSingleton(\'customer/session\');\nif ($session-&gt;isLoggedIn()) {\n		Mage::app()-&gt;getResponse()-&gt;setRedirect(Mage::getUrl(\'customer/account\'));\n		return;\n}\n\n$form-&gt;getPostedValues();\n\n$form-&gt;doAfterSubmitAction();\n\nif($form-&gt;page == 2){\n	register($form);\n}\n\n\n\n$form-&gt;renderForm();\n\nMage::app()-&gt;getLayout()-&gt;getBlock(\'root\')-&gt;setTemplate(\'page/1column.phtml\');\nMage::app()-&gt;getLayout()-&gt;getMessagesBlock()-&gt;setMessages($session-&gt;getMessages(true));\necho Mage::app()-&gt;getLayout()-&gt;getMessagesBlock()-&gt;getGroupedHtml().$form-&gt;page_html;\n\nfunction register($form){\n\n	$session = Mage::getSingleton(\'customer/session\');\n        if ($session-&gt;isLoggedIn()) {\n\n           $form-&gt;page = 3;\n            return;\n        }\n        $session-&gt;setEscapeMessages(true); // prevent XSS injection in user input\n        if (true) {\n            $errors = array();\n\n            if (!$customer = Mage::registry(\'current_customer\')) {\n                $customer = Mage::getModel(\'customer/customer\')-&gt;setId(null);\n            }\n\n            $data = $form-&gt;data;\n  \n            $data[\'street\'] = array($data[\'street\']);\n\n            foreach (Mage::getConfig()-&gt;getFieldset(\'customer_account\') as $code=&gt;$node) {\n                if ($node-&gt;is(\'create\') &amp;&amp; isset($data[$code])) {\n                    if ($code == \'email\') {\n                        $data[$code] = trim($data[$code]);\n                    }\n                    $customer-&gt;setData($code, $data[$code]);\n                }\n            }\n\n	    if(isset($data[\'is_subscribed\']) &amp;&amp; $data[\'is_subscribed\'] == 1){\n	    	$customer-&gt;setIsSubscribed(1);\n	    }\n\n            /**\n             * Initialize customer group id\n             */\n            $customer-&gt;getGroupId();\n\n            if (isset($data[\'create_address\'])) {\n                $address = Mage::getModel(\'customer/address\')\n                    -&gt;setData($data)\n                    -&gt;setIsDefaultBilling(isset($data[\'billing_default\']))\n                    -&gt;setIsDefaultShipping(isset($data[\'shipping_default\']))\n                    -&gt;setId(null);\n                $customer-&gt;addAddress($address);\n\n                $errors = $address-&gt;validate();\n                if (!is_array($errors)) {\n                    $errors = array();\n                }\n            }\n\n            try {\n                $validationCustomer = $customer-&gt;validate();\n                if (is_array($validationCustomer)) {\n                    $errors = array_merge($validationCustomer, $errors);\n                }\n                $validationResult = count($errors) == 0;\n\n                if (true === $validationResult) {\n                    $customer-&gt;save();\n\n                    if ($customer-&gt;isConfirmationRequired()) {\n                        $customer-&gt;sendNewAccountEmail(\'confirmation\', $session-&gt;getBeforeAuthUrl());\n                        $session-&gt;addSuccess(\'Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please &lt;a href=\"\'.Mage::helper(\'customer\')-&gt;getEmailConfirmationUrl($customer-&gt;getEmail()).\'\"&gt;click here&lt;/a&gt;.\' );\n                        //$this-&gt;_redirectSuccess(Mage::getUrl(\'*/*/index\', array(\'_secure\'=&gt;true)));\n                        return;\n                    }\n                    else {\n                        $session-&gt;setCustomerAsLoggedIn($customer);\n                        $url = _welcomeCustomer($customer);\n                        Mage::app()-&gt;getResponse()-&gt;setRedirect($url);\n                       // $this-&gt;_redirectSuccess($url);\n                        return;\n                    }\n                } else {\n                    $session-&gt;setCustomerFormData($data);\n                    if (is_array($errors)) {\n                        foreach ($errors as $errorMessage) {\n                            $session-&gt;addError($errorMessage);\n                        }\n                    }\n                    else {\n                        $session-&gt;addError(\'Invalid customer data\');\n                    }\n                }\n            }\n            catch (Mage_Core_Exception $e) {\n                $session-&gt;setCustomerFormData($data);\n                if ($e-&gt;getCode() === Mage_Customer_Model_Customer::EXCEPTION_EMAIL_EXISTS) {\n                    $url = Mage::getUrl(\'customer/account/forgotpassword\');\n                    $message = \'There is already an account with this emails address. If you are sure that it is your email address, &lt;a href=\"\'.$url.\'\"&gt;click here&lt;/a&gt; to get your password and access your account.\';\n                    $session-&gt;setEscapeMessages(false);\n                }\n                else {\n                    $message = $e-&gt;getMessage();\n                }\n                $session-&gt;addError($message);\n            }\n            catch (Exception $e) {\n                $session-&gt;setCustomerFormData($data)\n                    -&gt;addException($e, \'Can\\\'t save customer\');\n            }\n        }\n        $form-&gt;page--;\n\n}\n\n    function _welcomeCustomer(Mage_Customer_Model_Customer $customer, $isJustConfirmed = false)\n    {\n        Mage::getSingleton(\'customer/session\')-&gt;addSuccess(\'Thank you for registering with \'.Mage::app()-&gt;getStore()-&gt;getFrontendName());\n\n        $customer-&gt;sendNewAccountEmail($isJustConfirmed ? \'confirmed\' : \'registered\');\n\n        $successUrl = Mage::getUrl(\'customer/account/index\', array(\'_secure\'=&gt;true));\n        if (Mage::getSingleton(\'customer/session\')-&gt;getBeforeAuthUrl()) {\n            $successUrl = Mage::getSingleton(\'customer/session\')-&gt;getBeforeAuthUrl(true);\n        }\n        return $successUrl;\n    }\n  </globalphp>\n  <globaljs>\n    /*******************************************************************/\n// SmartFormer Gold © Form JS controller\n//\n// Product of IToris © 2009 http://www.itoris.com\n//\n/*******************************************************************/\n\nfunction formSubmit(submitter) {\n	//getting list of elements\n	var nodes = document.getElementById(\'sfg_fieldset\').childNodes;\n	var objects = Array();\n	for (var i=0; i&lt;nodes.length; i++) if (nodes[i].tagName) objects[objects.length] = nodes[i];\n	// perform validation\n	var isFormValid = true;\n	for (var vl=0; vl&lt;sfg_validation.length; vl++) if (window[\'validator\'+sfg_validation[vl][1]] &amp;&amp; objects[sfg_validation[vl][0]]) {\n		var msg = window[\'validator\'+sfg_validation[vl][1]](objects[sfg_validation[vl][0]], sfg_validation[vl][2], sfg_validation[vl][3] ? sfg_validation[vl][3] : \'\');\n		if (msg) {\n			isFormValid = false;\n			alert(msg);\n			objects[sfg_validation[vl][0]].focus();\n			return;\n		}\n	}\n	\n	var countryId = document.getElementsByName(\'country_id\')[0];\n	if(countryId){\n		if(countryId.value == \'US\'){\n			if(getByName(\'region_id\').value == \'\'){\n				alert(\'Field: State/Region. Field is required\');\n				return;\n			}\n		}else{\n			if(getByName(\'region\').value == \'\'){\n				alert(\'Field: State/Region. Field is required\');\n				return;\n			}\n		}\n	}\n	\n	document.getElementById(\'sfg_submitter\').value = submitter;\n	document.sfgForm.submit();\n}\n\n\nfunction getByName(name){\n	return document.getElementsByName(name)[0];\n}\n\nfunction dobChanged(){\n	var data = new Array();\n	data[1] = getByName(\'dob_day\').value;\n	data[0] = getByName(\'dob_month\').value;\n	data[2] = getByName(\'dob_year\').value;\n	\n	var value = data.join(\'/\');\n	getByName(\'dob\').value = value;\n	\n}\n\nfunction changeRegionInput(){\n	var contry = getByName(\'country_id\').value;\n\n	if(contry == \'US\'){\n		getByName(\'region\').style.display = \'none\';\n		getByName(\'region_id\').style.display = \'block\';\n		\n	}else{\n		getByName(\'region_id\').style.display = \'none\';\n		getByName(\'region\').style.display = \'block\';\n	}\n}\n\n Event.observe(window, \'load\', function() {\n        changeRegionInput();\n    });\n  </globaljs>\n  <globalhtml>\n    &lt;!-- SmartFormer Gold code part --&gt;\n\n&lt;form action=\"\" method=\"post\" name=\"sfgForm\" enctype=\"multipart/form-data\"&gt;\n&lt;%form_html%&gt;\n&lt;/form&gt;\n\n&lt;!-- End of SmartFormer Gold code part --&gt;\n  </globalhtml>\n  <globalcss>\n    #sfg_err_message {\n	font-family: Arial;\n	font-size: 12px;\n	font-weight: bold;\n	color: #ff0000;\n}\n  </globalcss>\n  <page name=\"Page 1\" id=\"0\" />\n  <page name=\"Page 2\" id=\"1\" />\n  <page name=\"Page 3\" id=\"2\" />\n  <page name=\"Page 4\" id=\"3\" />\n  <page name=\"Page 5\" id=\"4\" />\n  <page name=\"Page 6\" id=\"5\" />\n  <page name=\"Page 7\" id=\"6\" />\n  <page name=\"Page 8\" id=\"7\" />\n  <page name=\"Page 9\" id=\"8\" />\n  <page name=\"Page 10\" id=\"9\" />\n  <element sfgalias=\"\" tag=\"div\" page=\"1\">\n    <style name=\"left\" value=\"0px\" />\n    <style name=\"top\" value=\"22px\" />\n    <style name=\"background-image\" value=\"url({live_site}/skin/frontend/default/default/images/bkg_main2.gif)\" />\n    <style name=\"width\" value=\"415px\" />\n    <style name=\"height\" value=\"350px\" />\n    <style name=\"border\" value=\"1px solid #465b5d\" />\n    <style name=\"background-repeat\" value=\"no-repeat\" />\n  </element>\n  <element sfgalias=\"\" tag=\"div\" page=\"0\">\n    <style name=\"left\" value=\"0px\" />\n    <style name=\"top\" value=\"414px\" />\n    <style name=\"width\" value=\"415px\" />\n    <style name=\"height\" value=\"200px\" />\n    <style name=\"background-image\" value=\"url({live_site}/skin/frontend/default/default/images/bkg_main2.gif)\" />\n    <style name=\"border\" value=\"1px solid #465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"div\" page=\"0\">\n    <style name=\"left\" value=\"0px\" />\n    <style name=\"top\" value=\"21px\" />\n    <style name=\"width\" value=\"415px\" />\n    <style name=\"height\" value=\"125px\" />\n    <style name=\"background-image\" value=\"url({live_site}/skin/frontend/default/default/images/bkg_main2.gif)\" />\n    <style name=\"border\" value=\"1px solid #465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"div\" page=\"0\">\n    <style name=\"left\" value=\"0px\" />\n    <style name=\"top\" value=\"180px\" />\n    <style name=\"width\" value=\"415px\" />\n    <style name=\"height\" value=\"200px\" />\n    <style name=\"background-image\" value=\"url({live_site}/skin/frontend/default/default/images/bkg_main2.gif)\" />\n    <style name=\"border\" value=\"1px solid #465b5d\" />\n    <style name=\"behavior\" value=\"\" />\n  </element>\n  <element sfgalias=\"\" tag=\"div\" page=\"0\">\n    <style name=\"left\" value=\"0px\" />\n    <style name=\"top\" value=\"648px\" />\n    <style name=\"width\" value=\"415px\" />\n    <style name=\"height\" value=\"163px\" />\n    <style name=\"background-image\" value=\"url({live_site}/skin/frontend/default/default/images/bkg_main2.gif)\" />\n    <style name=\"border\" value=\"1px solid #465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      First Name &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"16px\" />\n    <style name=\"top\" value=\"32px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Last Name &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"16px\" />\n    <style name=\"top\" value=\"57px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Gender &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"16px\" />\n    <style name=\"top\" value=\"87px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Birthday &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"16px\" />\n    <style name=\"top\" value=\"115px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"First Name\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"text\" />\n    <attribute name=\"name\" value=\"firstname\" />\n    <style name=\"width\" value=\"180px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"left\" value=\"94px\" />\n    <style name=\"top\" value=\"32px\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"Last Name\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"text\" />\n    <attribute name=\"name\" value=\"lastname\" />\n    <style name=\"width\" value=\"180px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"left\" value=\"94px\" />\n    <style name=\"top\" value=\"57px\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Male\n    </content>\n    <style name=\"left\" value=\"94px\" />\n    <style name=\"top\" value=\"80px\" />\n    <style name=\"border-width\" value=\"\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Female\n    </content>\n    <style name=\"left\" value=\"128px\" />\n    <style name=\"top\" value=\"80px\" />\n    <style name=\"height\" value=\"19px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"Gender\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"radio\" />\n    <attribute name=\"name\" value=\"gender\" />\n    <attribute name=\"value\" value=\"male\" />\n    <style name=\"left\" value=\"100px\" />\n    <style name=\"top\" value=\"98px\" />\n    <param name=\"group-required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"Gender\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"radio\" />\n    <attribute name=\"name\" value=\"gender\" />\n    <attribute name=\"value\" value=\"female\" />\n    <style name=\"left\" value=\"138px\" />\n    <style name=\"top\" value=\"98px\" />\n    <param name=\"group-required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"Birth Month\" tag=\"select\" page=\"0\">\n    <content>\n      |-- month --\n1|January	\n2|February	\n3|March 	\n4|April 	\n5|May 		\n6|June 		\n7|July 		\n8|August 	\n9|September\n10|October \n11|November\n12|December\n    </content>\n    <attribute name=\"name\" value=\"dob_month\" />\n    <style name=\"width\" value=\"109px\" />\n    <style name=\"height\" value=\"21px\" />\n    <style name=\"left\" value=\"94px\" />\n    <style name=\"top\" value=\"115px\" />\n    <event name=\"onchange\" value=\"dobChanged();\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"Birth Day\" tag=\"select\" page=\"0\">\n    <content>\n      |-- day --\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n    </content>\n    <attribute name=\"name\" value=\"dob_day\" />\n    <style name=\"width\" value=\"97px\" />\n    <style name=\"height\" value=\"21px\" />\n    <style name=\"left\" value=\"208px\" />\n    <style name=\"top\" value=\"115px\" />\n    <event name=\"onchange\" value=\"dobChanged();\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"Birth Year\" tag=\"select\" page=\"0\">\n    <content>\n      |-- year --\n2005|2005\n2004|2004\n2003|2003\n2002|2002\n2001|2001\n2000|2000\n1999|1999\n1998|1998\n1997|1997\n1996|1996\n1995|1995\n1994|1994\n1993|1993\n1992|1992\n1991|1991\n1990|1990\n1989|1989\n1988|1988\n1987|1987\n1986|1986\n1985|1985\n1984|1984\n1983|1983\n1982|1982\n1981|1981\n1980|1980\n1979|1979\n1978|1978\n1977|1977\n1976|1976\n1975|1975\n1974|1974\n1973|1973\n1972|1972\n1971|1971\n1970|1970\n1969|1969\n1968|1968\n1967|1967\n1966|1966\n1965|1965\n1964|1964\n1963|1963\n1962|1962\n1961|1961\n1960|1960\n1959|1959\n1958|1958\n1957|1957\n1956|1956\n1955|1955\n1954|1954\n1953|1953\n1952|1952\n1951|1951\n1950|1950\n1949|1949\n1948|1948\n1947|1947\n1946|1946\n1945|1945\n1944|1944\n1943|1943\n1942|1942\n1941|1941\n1940|1940\n    </content>\n    <attribute name=\"name\" value=\"dob_year\" />\n    <style name=\"width\" value=\"98px\" />\n    <style name=\"height\" value=\"21px\" />\n    <style name=\"left\" value=\"309px\" />\n    <style name=\"top\" value=\"115px\" />\n    <event name=\"onchange\" value=\"dobChanged();\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Location\n    </content>\n    <attribute name=\"class\" value=\"\" />\n    <attribute name=\"id\" value=\"\" />\n    <style name=\"left\" value=\"0px\" />\n    <style name=\"top\" value=\"158px\" />\n    <style name=\"font-family\" value=\"Arial\" />\n    <style name=\"font-size\" value=\"14px\" />\n    <style name=\"width\" value=\"150px\" />\n    <style name=\"height\" value=\"20px\" />\n    <style name=\"color\" value=\"white\" />\n    <style name=\"background-color\" value=\"#3a5056\" />\n    <style name=\"background-image\" value=\"\" />\n    <style name=\"border\" value=\"1px solid #465b5d\" />\n    <style name=\"padding-left\" value=\"10px\" />\n    <style name=\"line-height\" value=\"20px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Country &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"16px\" />\n    <style name=\"top\" value=\"188px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      State/Region &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"16px\" />\n    <style name=\"top\" value=\"214px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      City &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"16px\" />\n    <style name=\"top\" value=\"239px\" />\n    <style name=\"border-width\" value=\"\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      ZIP/Postal &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"16px\" />\n    <style name=\"top\" value=\"263px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Phone &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"16px\" />\n    <style name=\"top\" value=\"312px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"Country\" tag=\"select\" page=\"0\">\n    <content>\n      |-- country --\nAF|Afghanistan\nAL|Albania\nDZ|Algeria\nAS|American Samoa\nAD|Andorra\nAO|Angola\nAI|Anguilla\nAQ|Antarctica\nAG|Antigua and Barbuda\nAR|Argentina\nAM|Armenia\nAW|Aruba\nAU|Australia\nAT|Austria\nAZ|Azerbaijan\nBS|Bahamas\nBH|Bahrain\nBD|Bangladesh\nBB|Barbados\nBY|Belarus\nBE|Belgium\nBZ|Belize\nBJ|Benin\nBM|Bermuda\nBT|Bhutan\nBO|Bolivia\nBA|Bosnia and Herzegovina\nBW|Botswana\nBV|Bouvet Island\nBR|Brazil\nIO|British Indian Ocean Territory\nVG|British Virgin Islands\nBN|Brunei\nBG|Bulgaria\nBF|Burkina Faso\nBI|Burundi\nKH|Cambodia\nCM|Cameroon\nCA|Canada\nCV|Cape Verde\nKY|Cayman Islands\nCF|Central African Republic\nTD|Chad\nCL|Chile\nCN|China\nCX|Christmas Island\nCC|Cocos [Keeling] Islands\nCO|Colombia\nKM|Comoros\nCG|Congo - Brazzaville\nCD|Congo - Kinshasa\nCK|Cook Islands\nCR|Costa Rica\nHR|Croatia\nCU|Cuba\nCY|Cyprus\nCZ|Czech Republic\nCI|Cote d’Ivoire\nDK|Denmark\nDJ|Djibouti\nDM|Dominica\nDO|Dominican Republic\nEC|Ecuador\nEG|Egypt\nSV|El Salvador\nGQ|Equatorial Guinea\nER|Eritrea\nEE|Estonia\nET|Ethiopia\nFK|Falkland Islands\nFO|Faroe Islands\nFJ|Fiji\nFI|Finland\nFR|France\nGF|French Guiana\nPF|French Polynesia\nTF|French Southern Territories\nGA|Gabon\nGM|Gambia\nGE|Georgia\nDE|Germany\nGH|Ghana\nGI|Gibraltar\nGR|Greece\nGL|Greenland\nGD|Grenada\nGP|Guadeloupe\nGU|Guam\nGT|Guatemala\nGG|Guernsey\nGN|Guinea\nGW|Guinea-Bissau\nGY|Guyana\nHT|Haiti\nHM|Heard Island and McDonald Islands\nHN|Honduras\nHK|Hong Kong SAR China\nHU|Hungary\nIS|Iceland\nIN|India\nID|Indonesia\nIR|Iran\nIQ|Iraq\nIE|Ireland\nIM|Isle of Man\nIL|Israel\nIT|Italy\nJM|Jamaica\nJP|Japan\nJE|Jersey\nJO|Jordan\nKZ|Kazakhstan\nKE|Kenya\nKI|Kiribati\nKW|Kuwait\nKG|Kyrgyzstan\nLA|Laos\nLV|Latvia\nLB|Lebanon\nLS|Lesotho\nLR|Liberia\nLY|Libya\nLI|Liechtenstein\nLT|Lithuania\nLU|Luxembourg\nMO|Macau SAR China\nMK|Macedonia\nMG|Madagascar\nMW|Malawi\nMY|Malaysia\nMV|Maldives\nML|Mali\nMT|Malta\nMH|Marshall Islands\nMQ|Martinique\nMR|Mauritania\nMU|Mauritius\nYT|Mayotte\nMX|Mexico\nFM|Micronesia\nMD|Moldova\nMC|Monaco\nMN|Mongolia\nME|Montenegro\nMS|Montserrat\nMA|Morocco\nMZ|Mozambique\nMM|Myanmar [Burma]\nNA|Namibia\nNR|Nauru\nNP|Nepal\nNL|Netherlands\nAN|Netherlands Antilles\nNC|New Caledonia\nNZ|New Zealand\nNI|Nicaragua\nNE|Niger\nNG|Nigeria\nNU|Niue\nNF|Norfolk Island\nKP|North Korea\nMP|Northern Mariana Islands\nNO|Norway\nOM|Oman\nPK|Pakistan\nPW|Palau\nPS|Palestinian Territories\nPA|Panama\nPG|Papua New Guinea\nPY|Paraguay\nPE|Peru\nPH|Philippines\nPN|Pitcairn Islands\nPL|Poland\nPT|Portugal\nPR|Puerto Rico\nQA|Qatar\nRO|Romania\nRU|Russia\nRW|Rwanda\nRE|Reunion\nBL|Saint Barthelemy\nSH|Saint Helena\nKN|Saint Kitts and Nevis\nLC|Saint Lucia\nMF|Saint Martin\nPM|Saint Pierre and Miquelon\nVC|Saint Vincent and the Grenadines\nWS|Samoa\nSM|San Marino\nSA|Saudi Arabia\nSN|Senegal\nRS|Serbia\nSC|Seychelles\nSL|Sierra Leone\nSG|Singapore\nSK|Slovakia\nSI|Slovenia\nSB|Solomon Islands\nSO|Somalia\nZA|South Africa\nGS|South Georgia and the South Sandwich Islands\nKR|South Korea\nES|Spain\nLK|Sri Lanka\nSD|Sudan\nSR|Suriname\nSJ|Svalbard and Jan Mayen\nSZ|Swaziland\nSE|Sweden\nCH|Switzerland\nSY|Syria\nST|Sao Tome and Principe\nTW|Taiwan\nTJ|Tajikistan\nd=|elected\" value=\"TZ\"&gt;Tanzania\nTH|Thailand\nTL|Timor-Leste\nTG|Togo\nTK|Tokelau\nTO|Tonga\nTT|Trinidad and Tobago\nTN|Tunisia\nTR|Turkey\nTM|Turkmenistan\nTC|Turks and Caicos Islands\nTV|Tuvalu\nUM|U.S. Minor Outlying Islands\nVI|U.S. Virgin Islands\nUG|Uganda\nUA|Ukraine\nAE|United Arab Emirates\nGB|United Kingdom\nUS|United States\nUY|Uruguay\nUZ|Uzbekistan\nVU|Vanuatu\nVA|Vatican City\nVE|Venezuela\nVN|Vietnam\nWF|Wallis and Futuna\nEH|Western Sahara\nYE|Yemen\nZM|Zambia\nZW|Zimbabwe\nAX|Aland Islands\n    </content>\n    <attribute name=\"name\" value=\"country_id\" />\n    <style name=\"width\" value=\"185px\" />\n    <style name=\"height\" value=\"21px\" />\n    <style name=\"left\" value=\"104px\" />\n    <style name=\"top\" value=\"188px\" />\n    <event name=\"onchange\" value=\"changeRegionInput();\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"State\" tag=\"select\" page=\"0\">\n    <content>\n      |-- state --\n1|Alabama\n2|Alaska\n3|American Samoa\n4|Arizona\n5|Arkansas\n6|Armed Forces Africa\n7|Armed Forces Americas\n8|Armed Forces Canada\n9|Armed Forces Europe\n10|Armed Forces Middle East\n11|Armed Forces Pacific\n12|California\n13|Colorado\n14|Connecticut\n15|Delaware\n16|District of Columbia\n17|Federated States Of Micronesia\n18|Florida\n19|Georgia\n20|Guam\n21|Hawaii\n22|Idaho\n23|Illinois\n24|Indiana\n25|Iowa\n26|Kansas\n27|Kentucky\n28|Louisiana\n29|Maine\n30|Marshall Islands\n31|Maryland\n32|Massachusetts\n33|Michigan\n34|Minnesota\n35|Mississippi\n36|Missouri\n37|Montana\n38|Nebraska\n39|Nevada\n40|New Hampshire\n41|New Jersey\n42|New Mexico\n43|New York\n44|North Carolina\n45|North Dakota\n46|Northern Mariana Islands\n47|Ohio\n48|Oklahoma\n49|Oregon\n50|Palau\n51|Pennsylvania\n52|Puerto Rico\n53|Rhode Island\n54|South Carolina\n55|South Dakota\n56|Tennessee\n57|Texas\n58|Utah\n59|Vermont\n60|Virgin Islands\n61|Virginia\n62|Washington\n63|West Virginia\n64|Wisconsin\n65|Wyoming\n    </content>\n    <attribute name=\"name\" value=\"region_id\" />\n    <style name=\"width\" value=\"184px\" />\n    <style name=\"height\" value=\"20px\" />\n    <style name=\"left\" value=\"104px\" />\n    <style name=\"top\" value=\"214px\" />\n  </element>\n  <element sfgalias=\"City\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"text\" />\n    <attribute name=\"name\" value=\"city\" />\n    <style name=\"width\" value=\"180px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"left\" value=\"104px\" />\n    <style name=\"top\" value=\"239px\" />\n    <style name=\"visibility\" value=\"\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"Zip\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"text\" />\n    <attribute name=\"name\" value=\"postcode\" />\n    <style name=\"width\" value=\"180px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"left\" value=\"104px\" />\n    <style name=\"top\" value=\"263px\" />\n  </element>\n  <element sfgalias=\"Phone\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"text\" />\n    <attribute name=\"name\" value=\"telephone\" />\n    <style name=\"width\" value=\"180px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"left\" value=\"104px\" />\n    <style name=\"top\" value=\"312px\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Terms and News\n    </content>\n    <style name=\"left\" value=\"0px\" />\n    <style name=\"top\" value=\"392px\" />\n    <style name=\"font-size\" value=\"14px\" />\n    <style name=\"font-family\" value=\"Arial\" />\n    <style name=\"width\" value=\"150px\" />\n    <style name=\"padding-left\" value=\"10px\" />\n    <style name=\"line-height\" value=\"20px\" />\n    <style name=\"height\" value=\"20px\" />\n    <style name=\"border-bottom\" value=\"\" />\n    <style name=\"border\" value=\"1px solid #465b5d\" />\n    <style name=\"background-color\" value=\"#2c444f\" />\n    <style name=\"color\" value=\"white\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Terms of Service\n    </content>\n    <style name=\"left\" value=\"16px\" />\n    <style name=\"top\" value=\"428px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"textarea\" page=\"0\">\n    <content>\n      ~~Terms and Conditions~~\nLorem ipsum dolor sit amen Lorem ipsum dolor sit amen\nLorem ipsum dolor sit amen\nLorem ipsum dolor sit amen\nLorem ipsum dolor sit amen\n    </content>\n    <attribute name=\"rows\" value=\"5\" />\n    <attribute name=\"cols\" value=\"30\" />\n    <attribute name=\"readonly\" value=\"true\" />\n    <style name=\"width\" value=\"275px\" />\n    <style name=\"height\" value=\"117px\" />\n    <style name=\"left\" value=\"120px\" />\n    <style name=\"top\" value=\"428px\" />\n  </element>\n  <element sfgalias=\"Terms and Conditions\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"checkbox\" />\n    <attribute name=\"id\" value=\"\" />\n    <attribute name=\"name\" value=\"Terms_and_Conditions\" />\n    <attribute name=\"value\" value=\"1\" />\n    <style name=\"left\" value=\"120px\" />\n    <style name=\"top\" value=\"559px\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      &lt;span style=\"color:red;\"&gt;*&lt;/span&gt; I agree to the Terms and Conditions\n    </content>\n    <style name=\"left\" value=\"140px\" />\n    <style name=\"top\" value=\"556px\" />\n    <style name=\"width\" value=\"273px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"checkbox\" />\n    <attribute name=\"name\" value=\"is_subscribed\" />\n    <attribute name=\"value\" value=\"1\" />\n    <style name=\"left\" value=\"120px\" />\n    <style name=\"top\" value=\"581px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Sign me up to receive newsletters\n    </content>\n    <style name=\"left\" value=\"146px\" />\n    <style name=\"top\" value=\"579px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Login Information\n    </content>\n    <style name=\"left\" value=\"0px\" />\n    <style name=\"top\" value=\"626px\" />\n    <style name=\"font-size\" value=\"14px\" />\n    <style name=\"font-family\" value=\"Arial\" />\n    <style name=\"border\" value=\"1px solid #465b5d\" />\n    <style name=\"width\" value=\"150px\" />\n    <style name=\"padding-left\" value=\"10px\" />\n    <style name=\"height\" value=\"20px\" />\n    <style name=\"line-height\" value=\"20px\" />\n    <style name=\"background-image\" value=\"\" />\n    <style name=\"background-color\" value=\"#2c444f\" />\n    <style name=\"border-width\" value=\"\" />\n    <style name=\"color\" value=\"white\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      E-mail address &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"14px\" />\n    <style name=\"top\" value=\"657px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Password &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"14px\" />\n    <style name=\"top\" value=\"681px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Confirm Password &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"14px\" />\n    <style name=\"top\" value=\"703px\" />\n    <style name=\"height\" value=\"19px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"Email\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"text\" />\n    <attribute name=\"name\" value=\"email\" />\n    <style name=\"width\" value=\"180px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"left\" value=\"129px\" />\n    <style name=\"top\" value=\"657px\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"Password\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"password\" />\n    <attribute name=\"name\" value=\"password\" />\n    <style name=\"width\" value=\"180px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"left\" value=\"129px\" />\n    <style name=\"top\" value=\"680px\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"Confirmation\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"password\" />\n    <attribute name=\"value\" value=\"\" />\n    <attribute name=\"name\" value=\"confirmation\" />\n    <style name=\"width\" value=\"180px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"left\" value=\"129px\" />\n    <style name=\"top\" value=\"703px\" />\n    <param name=\"required\" value=\"true\" />\n    <param name=\"equal-to\" value=\"password\" />\n  </element>\n  <element sfgalias=\"\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"button\" />\n    <attribute name=\"value\" value=\"Next\" />\n    <style name=\"width\" value=\"85px\" />\n    <style name=\"left\" value=\"332px\" />\n    <style name=\"top\" value=\"820px\" />\n    <style name=\"height\" value=\"26px\" />\n    <param name=\"on-click-action\" value=\"1\" />\n    <param name=\"save-data\" value=\"true\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Please confirm the data\n    </content>\n    <style name=\"left\" value=\"0px\" />\n    <style name=\"top\" value=\"0px\" />\n    <style name=\"font-size\" value=\"14px\" />\n    <style name=\"width\" value=\"170px\" />\n    <style name=\"height\" value=\"20px\" />\n    <style name=\"padding-left\" value=\"10px\" />\n    <style name=\"border\" value=\"1px solid #465b5d\" />\n    <style name=\"border-bottom\" value=\"\" />\n    <style name=\"color\" value=\"white\" />\n    <style name=\"background-color\" value=\"#374d55\" />\n    <style name=\"border-width\" value=\"\" />\n    <style name=\"line-height\" value=\"20px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your first name is:\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"53px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your last name is:\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"79px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your gender is:\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"103px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your birthday date is:\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"128px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      {firstname}\n    </content>\n    <style name=\"left\" value=\"146px\" />\n    <style name=\"top\" value=\"53px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      {lastname}\n    </content>\n    <style name=\"left\" value=\"146px\" />\n    <style name=\"top\" value=\"79px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      {gender}\n    </content>\n    <style name=\"left\" value=\"146px\" />\n    <style name=\"top\" value=\"103px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      {dob}\n    </content>\n    <style name=\"left\" value=\"146px\" />\n    <style name=\"top\" value=\"128px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your country is:\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"181px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your state is:\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"205px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your city is:\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"228px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your zip is:\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"274px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your phone is:\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"297px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your e-mail address is:\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"345px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your personal information\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"32px\" />\n    <style name=\"font-size\" value=\"14px\" />\n    <style name=\"width\" value=\"393px\" />\n    <style name=\"border-bottom\" value=\"1px solid #465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your login information\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"322px\" />\n    <style name=\"font-size\" value=\"14px\" />\n    <style name=\"width\" value=\"393px\" />\n    <style name=\"border-bottom\" value=\"1px solid #465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your location\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"159px\" />\n    <style name=\"font-size\" value=\"14px\" />\n    <style name=\"border-bottom\" value=\"1px solid #465b5d\" />\n    <style name=\"width\" value=\"393px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <contentphp>\n      //global $form;\n$c = array();\n$c[\'AF\'] = \'Afghanistan\';\n$c[\'AL\'] = \'Albania\';\n$c[\'DZ\'] = \'Algeria\';\n$c[\'AS\'] = \'American Samoa\';\n$c[\'AD\'] = \'Andorra\';\n$c[\'AO\'] = \'Angola\';\n$c[\'AI\'] = \'Anguilla\';\n$c[\'AQ\'] = \'Antarctica\';\n$c[\'AG\'] = \'Antigua and Barbuda\';\n$c[\'AR\'] = \'Argentina\';\n$c[\'AM\'] = \'Armenia\';\n$c[\'AW\'] = \'Aruba\';\n$c[\'AU\'] = \'Australia\';\n$c[\'AT\'] = \'Austria\';\n$c[\'AZ\'] = \'Azerbaijan\';\n$c[\'BS\'] = \'Bahamas\';\n$c[\'BH\'] = \'Bahrain\';\n$c[\'BD\'] = \'Bangladesh\';\n$c[\'BB\'] = \'Barbados\';\n$c[\'BY\'] = \'Belarus\';\n$c[\'BE\'] = \'Belgium\';\n$c[\'BZ\'] = \'Belize\';\n$c[\'BJ\'] = \'Benin\';\n$c[\'BM\'] = \'Bermuda\';\n$c[\'BT\'] = \'Bhutan\';\n$c[\'BO\'] = \'Bolivia\';\n$c[\'BA\'] = \'Bosnia and Herzegovina\';\n$c[\'BW\'] = \'Botswana\';\n$c[\'BV\'] = \'Bouvet Island\';\n$c[\'BR\'] = \'Brazil\';\n$c[\'IO\'] = \'British Indian Ocean Territory\';\n$c[\'VG\'] = \'British Virgin Islands\';\n$c[\'BN\'] = \'Brunei\';\n$c[\'BG\'] = \'Bulgaria\';\n$c[\'BF\'] = \'Burkina Faso\';\n$c[\'BI\'] = \'Burundi\';\n$c[\'KH\'] = \'Cambodia\';\n$c[\'CM\'] = \'Cameroon\';\n$c[\'CA\'] = \'Canada\';\n$c[\'CV\'] = \'Cape Verde\';\n$c[\'KY\'] = \'Cayman Islands\';\n$c[\'CF\'] = \'Central African Republic\';\n$c[\'TD\'] = \'Chad\';\n$c[\'CL\'] = \'Chile\';\n$c[\'CN\'] = \'China\';\n$c[\'CX\'] = \'Christmas Island\';\n$c[\'CC\'] = \'Cocos [Keeling] Islands\';\n$c[\'CO\'] = \'Colombia\';\n$c[\'KM\'] = \'Comoros\';\n$c[\'CG\'] = \'Congo - Brazzaville\';\n$c[\'CD\'] = \'Congo - Kinshasa\';\n$c[\'CK\'] = \'Cook Islands\';\n$c[\'CR\'] = \'Costa Rica\';\n$c[\'HR\'] = \'Croatia\';\n$c[\'CU\'] = \'Cuba\';\n$c[\'CY\'] = \'Cyprus\';\n$c[\'CZ\'] = \'Czech Republic\';\n$c[\'CI\'] = \'Cote d’Ivoire\';\n$c[\'DK\'] = \'Denmark\';\n$c[\'DJ\'] = \'Djibouti\';\n$c[\'DM\'] = \'Dominica\';\n$c[\'DO\'] = \'Dominican Republic\';\n$c[\'EC\'] = \'Ecuador\';\n$c[\'EG\'] = \'Egypt\';\n$c[\'SV\'] = \'El Salvador\';\n$c[\'GQ\'] = \'Equatorial Guinea\';\n$c[\'ER\'] = \'Eritrea\';\n$c[\'EE\'] = \'Estonia\';\n$c[\'ET\'] = \'Ethiopia\';\n$c[\'FK\'] = \'Falkland Islands\';\n$c[\'FO\'] = \'Faroe Islands\';\n$c[\'FJ\'] = \'Fiji\';\n$c[\'FI\'] = \'Finland\';\n$c[\'FR\'] = \'France\';\n$c[\'GF\'] = \'French Guiana\';\n$c[\'PF\'] = \'French Polynesia\';\n$c[\'TF\'] = \'French Southern Territories\';\n$c[\'GA\'] = \'Gabon\';\n$c[\'GM\'] = \'Gambia\';\n$c[\'GE\'] = \'Georgia\';\n$c[\'DE\'] = \'Germany\';\n$c[\'GH\'] = \'Ghana\';\n$c[\'GI\'] = \'Gibraltar\';\n$c[\'GR\'] = \'Greece\';\n$c[\'GL\'] = \'Greenland\';\n$c[\'GD\'] = \'Grenada\';\n$c[\'GP\'] = \'Guadeloupe\';\n$c[\'GU\'] = \'Guam\';\n$c[\'GT\'] = \'Guatemala\';\n$c[\'GG\'] = \'Guernsey\';\n$c[\'GN\'] = \'Guinea\';\n$c[\'GW\'] = \'Guinea-Bissau\';\n$c[\'GY\'] = \'Guyana\';\n$c[\'HT\'] = \'Haiti\';\n$c[\'HM\'] = \'Heard Island and McDonald Islands\';\n$c[\'HN\'] = \'Honduras\';\n$c[\'HK\'] = \'Hong Kong SAR China\';\n$c[\'HU\'] = \'Hungary\';\n$c[\'IS\'] = \'Iceland\';\n$c[\'IN\'] = \'India\';\n$c[\'ID\'] = \'Indonesia\';\n$c[\'IR\'] = \'Iran\';\n$c[\'IQ\'] = \'Iraq\';\n$c[\'IE\'] = \'Ireland\';\n$c[\'IM\'] = \'Isle of Man\';\n$c[\'IL\'] = \'Israel\';\n$c[\'IT\'] = \'Italy\';\n$c[\'JM\'] = \'Jamaica\';\n$c[\'JP\'] = \'Japan\';\n$c[\'JE\'] = \'Jersey\';\n$c[\'JO\'] = \'Jordan\';\n$c[\'KZ\'] = \'Kazakhstan\';\n$c[\'KE\'] = \'Kenya\';\n$c[\'KI\'] = \'Kiribati\';\n$c[\'KW\'] = \'Kuwait\';\n$c[\'KG\'] = \'Kyrgyzstan\';\n$c[\'LA\'] = \'Laos\';\n$c[\'LV\'] = \'Latvia\';\n$c[\'LB\'] = \'Lebanon\';\n$c[\'LS\'] = \'Lesotho\';\n$c[\'LR\'] = \'Liberia\';\n$c[\'LY\'] = \'Libya\';\n$c[\'LI\'] = \'Liechtenstein\';\n$c[\'LT\'] = \'Lithuania\';\n$c[\'LU\'] = \'Luxembourg\';\n$c[\'MO\'] = \'Macau SAR China\';\n$c[\'MK\'] = \'Macedonia\';\n$c[\'MG\'] = \'Madagascar\';\n$c[\'MW\'] = \'Malawi\';\n$c[\'MY\'] = \'Malaysia\';\n$c[\'MV\'] = \'Maldives\';\n$c[\'ML\'] = \'Mali\';\n$c[\'MT\'] = \'Malta\';\n$c[\'MH\'] = \'Marshall Islands\';\n$c[\'MQ\'] = \'Martinique\';\n$c[\'MR\'] = \'Mauritania\';\n$c[\'MU\'] = \'Mauritius\';\n$c[\'YT\'] = \'Mayotte\';\n$c[\'MX\'] = \'Mexico\';\n$c[\'FM\'] = \'Micronesia\';\n$c[\'MD\'] = \'Moldova\';\n$c[\'MC\'] = \'Monaco\';\n$c[\'MN\'] = \'Mongolia\';\n$c[\'ME\'] = \'Montenegro\';\n$c[\'MS\'] = \'Montserrat\';\n$c[\'MA\'] = \'Morocco\';\n$c[\'MZ\'] = \'Mozambique\';\n$c[\'MM\'] = \'Myanmar [Burma]\';\n$c[\'NA\'] = \'Namibia\';\n$c[\'NR\'] = \'Nauru\';\n$c[\'NP\'] = \'Nepal\';\n$c[\'NL\'] = \'Netherlands\';\n$c[\'AN\'] = \'Netherlands Antilles\';\n$c[\'NC\'] = \'New Caledonia\';\n$c[\'NZ\'] = \'New Zealand\';\n$c[\'NI\'] = \'Nicaragua\';\n$c[\'NE\'] = \'Niger\';\n$c[\'NG\'] = \'Nigeria\';\n$c[\'NU\'] = \'Niue\';\n$c[\'NF\'] = \'Norfolk Island\';\n$c[\'KP\'] = \'North Korea\';\n$c[\'MP\'] = \'Northern Mariana Islands\';\n$c[\'NO\'] = \'Norway\';\n$c[\'OM\'] = \'Oman\';\n$c[\'PK\'] = \'Pakistan\';\n$c[\'PW\'] = \'Palau\';\n$c[\'PS\'] = \'Palestinian Territories\';\n$c[\'PA\'] = \'Panama\';\n$c[\'PG\'] = \'Papua New Guinea\';\n$c[\'PY\'] = \'Paraguay\';\n$c[\'PE\'] = \'Peru\';\n$c[\'PH\'] = \'Philippines\';\n$c[\'PN\'] = \'Pitcairn Islands\';\n$c[\'PL\'] = \'Poland\';\n$c[\'PT\'] = \'Portugal\';\n$c[\'PR\'] = \'Puerto Rico\';\n$c[\'QA\'] = \'Qatar\';\n$c[\'RO\'] = \'Romania\';\n$c[\'RU\'] = \'Russia\';\n$c[\'RW\'] = \'Rwanda\';\n$c[\'RE\'] = \'Reunion\';\n$c[\'BL\'] = \'Saint Barthelemy\';\n$c[\'SH\'] = \'Saint Helena\';\n$c[\'KN\'] = \'Saint Kitts and Nevis\';\n$c[\'LC\'] = \'Saint Lucia\';\n$c[\'MF\'] = \'Saint Martin\';\n$c[\'PM\'] = \'Saint Pierre and Miquelon\';\n$c[\'VC\'] = \'Saint Vincent and the Grenadines\';\n$c[\'WS\'] = \'Samoa\';\n$c[\'SM\'] = \'San Marino\';\n$c[\'SA\'] = \'Saudi Arabia\';\n$c[\'SN\'] = \'Senegal\';\n$c[\'RS\'] = \'Serbia\';\n$c[\'SC\'] = \'Seychelles\';\n$c[\'SL\'] = \'Sierra Leone\';\n$c[\'SG\'] = \'Singapore\';\n$c[\'SK\'] = \'Slovakia\';\n$c[\'SI\'] = \'Slovenia\';\n$c[\'SB\'] = \'Solomon Islands\';\n$c[\'SO\'] = \'Somalia\';\n$c[\'ZA\'] = \'South Africa\';\n$c[\'GS\'] = \'South Georgia and the South Sandwich Islands\';\n$c[\'KR\'] = \'South Korea\';\n$c[\'ES\'] = \'Spain\';\n$c[\'LK\'] = \'Sri Lanka\';\n$c[\'SD\'] = \'Sudan\';\n$c[\'SR\'] = \'Suriname\';\n$c[\'SJ\'] = \'Svalbard and Jan Mayen\';\n$c[\'SZ\'] = \'Swaziland\';\n$c[\'SE\'] = \'Sweden\';\n$c[\'CH\'] = \'Switzerland\';\n$c[\'SY\'] = \'Syria\';\n$c[\'ST\'] = \'Sao Tome and Principe\';\n$c[\'TW\'] = \'Taiwan\';\n$c[\'TJ\'] = \'Tajikistan\';\n$c[\'TZ\'] = \'Tanzania\';\n$c[\'TH\'] = \'Thailand\';\n$c[\'TL\'] = \'Timor-Leste\';\n$c[\'TG\'] = \'Togo\';\n$c[\'TK\'] = \'Tokelau\';\n$c[\'TO\'] = \'Tonga\';\n$c[\'TT\'] = \'Trinidad and Tobago\';\n$c[\'TN\'] = \'Tunisia\';\n$c[\'TR\'] = \'Turkey\';\n$c[\'TM\'] = \'Turkmenistan\';\n$c[\'TC\'] = \'Turks and Caicos Islands\';\n$c[\'TV\'] = \'Tuvalu\';\n$c[\'UM\'] = \'U.S. Minor Outlying Islands\';\n$c[\'VI\'] = \'U.S. Virgin Islands\';\n$c[\'UG\'] = \'Uganda\';\n$c[\'UA\'] = \'Ukraine\';\n$c[\'AE\'] = \'United Arab Emirates\';\n$c[\'GB\'] = \'United Kingdom\';\n$c[\'US\'] = \'United States\';\n$c[\'UY\'] = \'Uruguay\';\n$c[\'UZ\'] = \'Uzbekistan\';\n$c[\'VU\'] = \'Vanuatu\';\n$c[\'VA\'] = \'Vatican City\';\n$c[\'VE\'] = \'Venezuela\';\n$c[\'VN\'] = \'Vietnam\';\n$c[\'WF\'] = \'Wallis and Futuna\';\n$c[\'EH\'] = \'Western Sahara\';\n$c[\'YE\'] = \'Yemen\';\n$c[\'ZM\'] = \'Zambia\';\n$c[\'ZW\'] = \'Zimbabwe\';\n$c[\'AX\'] = \'Aland Islands\';\n\necho $c[$this-&gt;data[\'country_id\']];\n    </contentphp>\n    <style name=\"left\" value=\"146px\" />\n    <style name=\"top\" value=\"181px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <contentphp>\n      $r = array();\n\n\n$r[\'1\'] = \'Alabama\';\n$r[\'2\'] = \'Alaska\';\n$r[\'3\'] = \'American Samoa\';\n$r[\'4\'] = \'Arizona\';\n$r[\'5\'] = \'Arkansas\';\n$r[\'6\'] = \'Armed Forces Africa\';\n$r[\'7\'] = \'Armed Forces Americas\';\n$r[\'8\'] = \'Armed Forces Canada\';\n$r[\'9\'] = \'Armed Forces Europe\';\n$r[\'10\'] = \'Armed Forces Middle East\';\n$r[\'11\'] = \'Armed Forces Pacific\';\n$r[\'12\'] = \'California\';\n$r[\'13\'] = \'Colorado\';\n$r[\'14\'] = \'Connecticut\';\n$r[\'15\'] = \'Delaware\';\n$r[\'16\'] = \'District of Columbia\';\n$r[\'17\'] = \'Federated States Of Micronesia\';\n$r[\'18\'] = \'Florida\';\n$r[\'19\'] = \'Georgia\';\n$r[\'20\'] = \'Guam\';\n$r[\'21\'] = \'Hawaii\';\n$r[\'22\'] = \'Idaho\';\n$r[\'23\'] = \'Illinois\';\n$r[\'24\'] = \'Indiana\';\n$r[\'25\'] = \'Iowa\';\n$r[\'26\'] = \'Kansas\';\n$r[\'27\'] = \'Kentucky\';\n$r[\'28\'] = \'Louisiana\';\n$r[\'29\'] = \'Maine\';\n$r[\'30\'] = \'Marshall Islands\';\n$r[\'31\'] = \'Maryland\';\n$r[\'32\'] = \'Massachusetts\';\n$r[\'33\'] = \'Michigan\';\n$r[\'34\'] = \'Minnesota\';\n$r[\'35\'] = \'Mississippi\';\n$r[\'36\'] = \'Missouri\';\n$r[\'37\'] = \'Montana\';\n$r[\'38\'] = \'Nebraska\';\n$r[\'39\'] = \'Nevada\';\n$r[\'40\'] = \'New Hampshire\';\n$r[\'41\'] = \'New Jersey\';\n$r[\'42\'] = \'New Mexico\';\n$r[\'43\'] = \'New York\';\n$r[\'44\'] = \'North Carolina\';\n$r[\'45\'] = \'North Dakota\';\n$r[\'46\'] = \'Northern Mariana Islands\';\n$r[\'47\'] = \'Ohio\';\n$r[\'48\'] = \'Oklahoma\';\n$r[\'49\'] = \'Oregon\';\n$r[\'50\'] = \'Palau\';\n$r[\'51\'] = \'Pennsylvania\';\n$r[\'52\'] = \'Puerto Rico\';\n$r[\'53\'] = \'Rhode Island\';\n$r[\'54\'] = \'South Carolina\';\n$r[\'55\'] = \'South Dakota\';\n$r[\'56\'] = \'Tennessee\';\n$r[\'57\'] = \'Texas\';\n$r[\'58\'] = \'Utah\';\n$r[\'59\'] = \'Vermont\';\n$r[\'60\'] = \'Virgin Islands\';\n$r[\'61\'] = \'Virginia\';\n$r[\'62\'] = \'Washington\';\n$r[\'63\'] = \'West Virginia\';\n$r[\'64\'] = \'Wisconsin\';\n$r[\'65\'] = \'Wyoming\';\n\n\nif($this-&gt;data[\'country_id\'] == \'US\'){\n	$text =  $r[$this-&gt;data[\'region_id\']];\n}else{\n	$text = $this-&gt;data[\'region\'];\n}\n\n$this-&gt;data[\'regionText\'] = $text;\necho $text;\n    </contentphp>\n    <style name=\"left\" value=\"146px\" />\n    <style name=\"top\" value=\"205px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      {city}\n    </content>\n    <style name=\"left\" value=\"146px\" />\n    <style name=\"top\" value=\"228px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      {postcode}\n    </content>\n    <style name=\"left\" value=\"146px\" />\n    <style name=\"top\" value=\"274px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      {phone}\n    </content>\n    <style name=\"left\" value=\"146px\" />\n    <style name=\"top\" value=\"297px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      {email}\n    </content>\n    <style name=\"left\" value=\"146px\" />\n    <style name=\"top\" value=\"345px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"input\" page=\"1\">\n    <attribute name=\"type\" value=\"button\" />\n    <attribute name=\"value\" value=\"Back\" />\n    <style name=\"width\" value=\"85px\" />\n    <style name=\"left\" value=\"241px\" />\n    <style name=\"top\" value=\"380px\" />\n    <style name=\"height\" value=\"26px\" />\n    <param name=\"on-click-action\" value=\"1\" />\n    <param name=\"disable-validation\" value=\"true\" />\n    <param name=\"after-submit\" value=\"1\" />\n  </element>\n  <element sfgalias=\"\" tag=\"input\" page=\"1\">\n    <attribute name=\"type\" value=\"button\" />\n    <attribute name=\"value\" value=\"Submit\" />\n    <style name=\"width\" value=\"85px\" />\n    <style name=\"left\" value=\"332px\" />\n    <style name=\"top\" value=\"380px\" />\n    <style name=\"height\" value=\"26px\" />\n    <param name=\"on-click-action\" value=\"1\" />\n    <param name=\"save-data\" value=\"true\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"3\">\n    <content>\n      You currently logged in.\n    </content>\n    <style name=\"left\" value=\"17px\" />\n    <style name=\"top\" value=\"15px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"text\" />\n    <attribute name=\"name\" value=\"create_address\" />\n    <attribute name=\"value\" value=\"1\" />\n    <style name=\"width\" value=\"150px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"left\" value=\"363px\" />\n    <style name=\"top\" value=\"609px\" />\n    <style name=\"visibility\" value=\" hidden\" />\n  </element>\n  <element sfgalias=\"State/Region\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"text\" />\n    <attribute name=\"name\" value=\"region\" />\n    <style name=\"width\" value=\"180px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"left\" value=\"104px\" />\n    <style name=\"top\" value=\"214px\" />\n  </element>\n  <element sfgalias=\"Street address\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"text\" />\n    <attribute name=\"name\" value=\"street\" />\n    <style name=\"width\" value=\"180px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"left\" value=\"104px\" />\n    <style name=\"top\" value=\"287px\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Street &lt;span style=\"color:red;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"16px\" />\n    <style name=\"top\" value=\"287px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Protection Code:&lt;span style=\"color:#ff0000;\"&gt;*&lt;/span&gt;\n    </content>\n    <style name=\"left\" value=\"14px\" />\n    <style name=\"top\" value=\"727px\" />\n    <style name=\"font-weight\" value=\"bold\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Please, enter the text shown in the image into the field below.\n    </content>\n    <style name=\"left\" value=\"129px\" />\n    <style name=\"top\" value=\"746px\" />\n    <style name=\"font-size\" value=\"9px\" />\n  </element>\n  <element sfgalias=\"Protection Code\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"text\" />\n    <attribute name=\"name\" value=\"captcha_field\" />\n    <style name=\"width\" value=\"180px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"left\" value=\"129px\" />\n    <style name=\"top\" value=\"726px\" />\n    <param name=\"required\" value=\"true\" />\n  </element>\n  <element sfgalias=\"\" tag=\"img\" page=\"0\">\n    <attribute name=\"src\" value=\"{captcha0}\" />\n    <attribute name=\"alt\" value=\"captcha code\" />\n    <attribute name=\"name\" value=\"captcha_image\" />\n    <style name=\"left\" value=\"129px\" />\n    <style name=\"top\" value=\"764px\" />\n    <param name=\"captcha-type\" value=\"0\" />\n    <param name=\"captcha-length\" value=\"6\" />\n    <param name=\"captcha-symbols\" value=\"abcsefghijklmnopqrstuvwxyz023456789\" />\n    <param name=\"captcha-field\" value=\"captcha_field\" />\n  </element>\n  <element sfgalias=\"\" tag=\"img\" page=\"0\">\n    <attribute name=\"src\" value=\"{live_site}/skin/adminhtml/default/default/itoris_sfg/jsf/images/reload.gif\" />\n    <attribute name=\"alt\" value=\"reload\" />\n    <attribute name=\"title\" value=\"Reload Captcha\" />\n    <style name=\"left\" value=\"281px\" />\n    <style name=\"top\" value=\"772px\" />\n    <style name=\"width\" value=\"16px\" />\n    <style name=\"height\" value=\"16px\" />\n    <style name=\"cursor\" value=\"pointer\" />\n    <event name=\"onclick\" value=\"captchaReload(this, \'captcha_image\')\" />\n    <param name=\"on-click-action\" value=\"4\" />\n  </element>\n  <element sfgalias=\"\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"checkbox\" />\n    <attribute name=\"name\" value=\"billing_default\" />\n    <attribute name=\"value\" value=\"1\" />\n    <style name=\"left\" value=\"104px\" />\n    <style name=\"top\" value=\"340px\" />\n    <style name=\"width\" value=\"1px\" />\n    <param name=\"required\" value=\"\" />\n  </element>\n  <element sfgalias=\"\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"checkbox\" />\n    <attribute name=\"name\" value=\"shipping_default\" />\n    <attribute name=\"value\" value=\"1\" />\n    <style name=\"left\" value=\"104px\" />\n    <style name=\"top\" value=\"358px\" />\n    <style name=\"width\" value=\"13px\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Set as my default biling addres\n    </content>\n    <style name=\"left\" value=\"122px\" />\n    <style name=\"top\" value=\"337px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Set as my default shipping adress\n    </content>\n    <style name=\"left\" value=\"122px\" />\n    <style name=\"top\" value=\"355px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"text\" />\n    <attribute name=\"name\" value=\"dob\" />\n    <attribute name=\"value\" value=\"\" />\n    <style name=\"width\" value=\"150px\" />\n    <style name=\"height\" value=\"11px\" />\n    <style name=\"left\" value=\"256px\" />\n    <style name=\"top\" value=\"98px\" />\n    <style name=\"display\" value=\"none\" />\n    <style name=\"filter\" value=\"\" />\n  </element>\n  <element sfgalias=\"State/Region\" tag=\"input\" page=\"0\">\n    <attribute name=\"type\" value=\"text\" />\n    <attribute name=\"name\" value=\"regionText\" />\n    <attribute name=\"id\" value=\"\" />\n    <style name=\"width\" value=\"150px\" />\n    <style name=\"height\" value=\"21px\" />\n    <style name=\"left\" value=\"261px\" />\n    <style name=\"top\" value=\"188px\" />\n    <style name=\"display\" value=\"none\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"0\">\n    <content>\n      Personal Information\n    </content>\n    <style name=\"left\" value=\"0px\" />\n    <style name=\"top\" value=\"0px\" />\n    <style name=\"word-spacing\" value=\"\" />\n    <style name=\"width\" value=\"150px\" />\n    <style name=\"height\" value=\"20px\" />\n    <style name=\"background-color\" value=\"#374d55\" />\n    <style name=\"border-color\" value=\"\" />\n    <style name=\"border-width\" value=\"\" />\n    <style name=\"color\" value=\"white\" />\n    <style name=\"padding-left\" value=\"10px\" />\n    <style name=\"line-height\" value=\"20px\" />\n    <style name=\"font-size\" value=\"14px\" />\n    <style name=\"border\" value=\"1px solid #465b5d\" />\n    <style name=\"border-bottom\" value=\"\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      Your street is:\n    </content>\n    <style name=\"left\" value=\"12px\" />\n    <style name=\"top\" value=\"251px\" />\n    <style name=\"color\" value=\"#465b5d\" />\n  </element>\n  <element sfgalias=\"\" tag=\"span\" page=\"1\">\n    <content>\n      {street}\n    </content>\n    <style name=\"left\" value=\"146px\" />\n    <style name=\"top\" value=\"251px\" />\n  </element>\n  <email_template name=\"email to user\" from_name=\"admin of website\" from_email=\"admin@website.com\" subject=\"Your details on website.com\" cc=\"\" bcc=\"\" id=\"1\" format=\"1\">\n    &lt;p&gt;Dear user! &lt;br /&gt;Thank you for using our services on mysite.com. &lt;br /&gt;Your details are the following:&lt;/p&gt;\n&lt;p&gt;\n&lt;table border=\"0\"&gt;\n&lt;tbody&gt;\n&lt;tr&gt;\n&lt;td&gt;&lt;strong&gt;Field name&lt;/strong&gt;&lt;/td&gt;\n&lt;td&gt;&lt;strong&gt;Data&lt;/strong&gt;&lt;/td&gt;\n&lt;/tr&gt;\n&lt;tr&gt;\n&lt;td&gt;Field 1&lt;/td&gt;\n&lt;td&gt;Here you should insert dynamic variable&lt;/td&gt;\n&lt;/tr&gt;\n&lt;tr&gt;\n&lt;td&gt;Field 2&lt;br /&gt;&lt;/td&gt;\n&lt;td&gt;&amp;nbsp;&lt;/td&gt;\n&lt;/tr&gt;\n&lt;tr&gt;\n&lt;td&gt;Field 3&lt;br /&gt;&lt;/td&gt;\n&lt;td&gt;&amp;nbsp;&lt;/td&gt;\n&lt;/tr&gt;\n&lt;tr&gt;\n&lt;td&gt;&amp;nbsp;&lt;/td&gt;\n&lt;td&gt;&amp;nbsp;&lt;/td&gt;\n&lt;/tr&gt;\n&lt;/tbody&gt;\n&lt;/table&gt;\n&lt;br /&gt;&lt;em&gt;P.S. Please do not answer on this e-mail. It has been generated automatically. &lt;/em&gt;&lt;/p&gt;\n  </email_template>\n  <email_template name=\"email to admin\" from_name=\"admin of website\" from_email=\"admin@website.com\" subject=\"New user details\" cc=\"\" bcc=\"\" id=\"2\" format=\"1\">\n    &lt;p&gt;Dear admin!&lt;br /&gt; New user has left his details on mysite.som &lt;br /&gt;The details are the folowing: :&lt;/p&gt;\n&lt;p&gt;\n&lt;table border=\"0\"&gt;\n&lt;tbody&gt;\n&lt;tr&gt;\n&lt;td&gt;&lt;strong&gt;Field name&lt;/strong&gt;&lt;/td&gt;\n&lt;td&gt;&lt;strong&gt;Data&lt;/strong&gt;&lt;/td&gt;\n&lt;/tr&gt;\n&lt;tr&gt;\n&lt;td&gt;Field 1&lt;/td&gt;\n&lt;td&gt;Here you should insert dynamic variable&lt;/td&gt;\n&lt;/tr&gt;\n&lt;tr&gt;\n&lt;td&gt;Field 2&lt;br /&gt;&lt;/td&gt;\n&lt;td&gt;&amp;nbsp;&lt;/td&gt;\n&lt;/tr&gt;\n&lt;tr&gt;\n&lt;td&gt;Field 3&lt;br /&gt;&lt;/td&gt;\n&lt;td&gt;&amp;nbsp;&lt;/td&gt;\n&lt;/tr&gt;\n&lt;tr&gt;\n&lt;td&gt;&amp;nbsp;&lt;/td&gt;\n&lt;td&gt;&amp;nbsp;&lt;/td&gt;\n&lt;/tr&gt;\n&lt;/tbody&gt;\n&lt;/table&gt;\n&lt;/p&gt;\n  </email_template>\n  <email_template name=\"your custom email\" from_name=\"From Name\" from_email=\"from@email.com\" subject=\"Custom email subject\" cc=\"\" bcc=\"\" id=\"3\" format=\"1\">\n    &lt;p&gt;Fill in your custom email. You can create as meny templates as you wish. Click \'New Document\' icon to start&lt;/p&gt;\n  </email_template>\n  <validator name=\"Required\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Field is required\';\nmsg = msg.replace(\'%s\', sfgName); \nif (obj.type &amp;&amp; (obj.type.toLowerCase()==\'checkbox\' || obj.type.toLowerCase()==\'radio\') &amp;&amp; !obj.checked) return msg; \nif (obj.tagName.toLowerCase()==\'select\' &amp;&amp; (obj.selectedIndex==-1 || obj.selectedIndex==0)) return msg; \nif (obj.value==\'\') return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Field is required\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\nif (!isset($form-&gt;data[$htmlName]) || !is_array($form-&gt;data[$htmlName]) &amp;&amp; trim($form-&gt;data[$htmlName])==\'\') return $msg;\nif (is_array($form-&gt;data[$htmlName]) &amp;&amp; trim(implode(\'\',$form-&gt;data[$htmlName]))==\'\') return $msg;\n    </php>\n  </validator>\n  <validator name=\"Group Required\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Group: %s. Please select a value\';\nmsg = msg.replace(\'%s\', sfgName); \nvar objs = document.getElementsByName(obj.name); \nvar checked = false; \nfor (i=0; i&lt;objs.length; i++) if (objs[i].checked) { checked = true; break; } \nif (!checked) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Group: \'.$obj[\'sfgalias\'].\'. Please select a value\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\nif (!isset($form-&gt;data[$htmlName]) || !is_array($form-&gt;data[$htmlName]) &amp;&amp; trim($form-&gt;data[$htmlName])==\'\') return $msg;\nif (is_array($form-&gt;data[$htmlName]) &amp;&amp; trim(implode(\'\',$form-&gt;data[$htmlName]))==\'\') return $msg;\n    </php>\n  </validator>\n  <validator name=\"Check identical\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object, obj2 - another HTML element for comparing\nvar msg = \'Field: %s. Entities are not identival\';\nmsg = msg.replace(\'%s\', sfgName);\nvar el2 = document.getElementsByName(obj2)[0];\nif (el2 &amp;&amp; obj.value != el2.value) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation, $obj - another element\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Entities are not identival\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\n$htmlName2 = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $obj2);\n$htmlName2 = strtolower($htmlName2);\nif ($form-&gt;data[$htmlName]!=$form-&gt;data[$htmlName2]) return $msg;\n    </php>\n  </validator>\n  <validator name=\"Email\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Invalid email. Please specify a valid value\';\nmsg = msg.replace(\'%s\', sfgName);\nvar RegExp=/^((([a-z]|[0-9]|!|#|$|%|&amp;|\'|\\*|\\+|\\-|\\/|=|\\?|\\^|_|`|\\{|\\||\\}|~)+(\\.([a-z]|[0-9]|!|#|$|%|&amp;|\'|\\*|\\+|\\-|\\/|=|\\?|\\^|_|`|\\{|\\||\\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\\-){0,61}([a-z]|[0-9])\\.))*([a-z]|[0-9])([a-z]|[0-9]|\\-){0,61}([a-z]|[0-9])\\.)[\\w]{2,4}|(((([0-9]){1,3}\\.){3}([0-9]){1,3}))|(\\[((([0-9]){1,3}\\.){3}([0-9]){1,3})\\])))$/;\nif (obj.value!=\'\' &amp;&amp; !RegExp.test(obj.value.toLowerCase())) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Invalid email. Please specify a valid value\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\n$RegExp=\"/^((([a-z]|[0-9]|!|#|$|%|&amp;|\'|\\*|\\+|\\-|\\/|=|\\?|\\^|_|`|\\{|\\||\\}|~)+(\\.([a-z]|[0-9]|!|#|$|%|&amp;|\'|\\*|\\+|\\-|\\/|=|\\?|\\^|_|`|\\{|\\||\\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\\-){0,61}([a-z]|[0-9])\\.))*([a-z]|[0-9])([a-z]|[0-9]|\\-){0,61}([a-z]|[0-9])\\.)[\\w]{2,4}|(((([0-9]){1,3}\\.){3}([0-9]){1,3}))|(\\[((([0-9]){1,3}\\.){3}([0-9]){1,3})\\])))$/\";\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; !preg_match($RegExp, strtolower($form-&gt;data[$htmlName]))) return $msg;\n    </php>\n  </validator>\n  <validator name=\"Zip\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Please specify a correct zip/postal\';\nmsg = msg.replace(\'%s\', sfgName);\nvar letters=\'qwertyuiopasdfghjklzxcvbnm -1234567890\';\nvar ps=false;\nfor(i=0;i&lt;obj.value.length;i++) if (letters.indexOf(obj.value.toLowerCase().substr(i,1))&lt;0) ps=true;\nif (ps || obj.value.length&gt;10) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Please specify a correct zip/postal\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\n$letters = \'qwertyuiopasdfghjklzxcvbnm -1234567890\';\nif (isset($form-&gt;data[$htmlName])) $value = strtolower($form-&gt;data[$htmlName]); else $value=\'\';\nfor($i=0; $i&lt;strlen($value); $i++) if (strpos($letters, substr($value, $i, 1))===false) return $msg;\n    </php>\n  </validator>\n  <validator name=\"ZipUS\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Invalid US Zip. Please specify a valid value\';\nmsg = msg.replace(\'%s\', sfgName);\nvar zipPattern1=/^(\\d{5})$/;\nvar zipPattern2=/^(\\d{5})\\-(\\d{4})$/;\nif ((obj.value.match(zipPattern1)==null)&amp;&amp;(obj.value.match(zipPattern2)==null)&amp;&amp;obj.value.length&gt;0) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Invalid US Zip. Please specify a valid value\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\n$zipPattern1=\"/^(\\d{5})$/\";\n$zipPattern2=\"/^(\\d{5})\\-(\\d{4})$/\";\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; !preg_match($zipPattern1, $form-&gt;data[$htmlName]) &amp;&amp; !preg_match($zipPattern2, $form-&gt;data[$htmlName])) return $msg;\n    </php>\n  </validator>\n  <validator name=\"Phone\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Please specify a correct phone number\';\nmsg = msg.replace(\'%s\', sfgName);\nvar letters=\'1234567890 -.()+\';\nvar ps=false;\nfor(i=0;i&lt;obj.value.length;i++) if (letters.indexOf(obj.value.toLowerCase().substr(i,1))&lt;0) ps=true;\nif (ps || obj.value.length&gt;10) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Please specify a correct phone number\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\n$letters = \'1234567890 -.()+\';\nif (isset($form-&gt;data[$htmlName])) $value = strtolower($form-&gt;data[$htmlName]); else $value=\'\';\nfor($i=0; $i&lt;strlen($value); $i++) if (strpos($letters, substr($value, $i, 1))===false) return $msg;\n    </php>\n  </validator>\n  <validator name=\"PhoneUS\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Invalid value! Please, provide a phone number in format XXX-XXX-XXXX, where X is a digit.\';\nmsg = msg.replace(\'%s\', sfgName);\nvar phonePattern=/^(\\d{3})\\-(\\d{3})\\-(\\d{4})$/;\nif ((obj.value.match(phonePattern)==null)&amp;&amp;obj.value.length&gt;0) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Invalid value! Please, provide a phone number in format XXX-XXX-XXXX, where X is a digit.\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\n$phonePattern=\"/^(\\d{3})\\-(\\d{3})\\-(\\d{4})$/\";\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; !preg_match($phonePattern, strtolower($form-&gt;data[$htmlName]))) return $msg;\n    </php>\n  </validator>\n  <validator name=\"Password\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. The password should contain 6 to 12 symbols\';\nmsg = msg.replace(\'%s\', sfgName);\nif ((obj.value.length&lt;6 || obj.value.length&gt;12) &amp;&amp; obj.value.length!=0) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. The password should contain 6 to 12 symbols\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; (strlen($form-&gt;data[$htmlName])&lt;6 || strlen($form-&gt;data[$htmlName])&gt;12)) return $msg;\n    </php>\n  </validator>\n  <validator name=\"CreditCardNumber\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Please specify a correct credit card number\';\nmsg = msg.replace(\'%s\', sfgName);\nvar ccPattern=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$/;\nif ((obj.value.match(ccPattern)==null)&amp;&amp;obj.value.length&gt;0) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Please specify a correct credit card number\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\n$ccPattern=\"/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$/\";\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; !preg_match($ccPattern, strtolower($form-&gt;data[$htmlName]))) return $msg;\n    </php>\n  </validator>\n  <validator name=\"CreditCardCVV\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Please specify a correct credit card CVV\';\nmsg = msg.replace(\'%s\', sfgName);\nvar letters=\'1234567890\';\nvar ps=false;\nfor(i=0;i&lt;obj.value.length;i++) if (letters.indexOf(obj.value.toLowerCase().substr(i,1))&lt;0) ps=true;\nif (ps || (obj.value.length&lt;3 &amp;&amp; obj.value.length!=0) || obj.value.length&gt;4) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Please specify a correct credit card CVV\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; (strlen($form-&gt;data[$htmlName])&lt;3 || strlen($form-&gt;data[$htmlName])&gt;4 || !is_numeric($form-&gt;data[$htmlName]))) return $msg;\n    </php>\n  </validator>\n  <validator name=\"Money\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Please specify currency correctly\';\nmsg = msg.replace(\'%s\', sfgName);\nvar letters=\'1234567890.\';\nvar ps=false; for(i=0;i&lt;obj.value.length;i++) if (letters.indexOf(obj.value.toLowerCase().substr(i,1))&lt;0) ps=true;\nif (ps || obj.value.length&gt;10 || Math.floor(obj.value*100)/100!=obj.value-0) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Please specify currency correctly\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; (floor(floatval($form-&gt;data[$htmlName])*100)/100!=floatval($form-&gt;data[$htmlName]) || !is_numeric($form-&gt;data[$htmlName]))) return $msg;\n    </php>\n  </validator>\n  <validator name=\"URL\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Please specify a valid URL\';\nmsg = msg.replace(\'%s\', sfgName);\nvar RegExp=/^(([\\w]+:)?\\/\\/)?(([\\d\\w]|%[a-fA-f\\d]{2,2})+(:([\\d\\w]|%[a-fA-f\\d]{2,2})+)?@)?([\\d\\w][-\\d\\w]{0,253}[\\d\\w]\\.)+[\\w]{2,4}(:[\\d]+)?(\\/([-+_~.\\d\\w]|%[a-fA-f\\d]{2,2})*)*(\\?(&amp;?([-+_~.\\d\\w]|%[a-fA-f\\d]{2,2})=?)*)?(#([-+_~.\\d\\w]|%[a-fA-f\\d]{2,2})*)?$/;\nif (obj.value!=\'\' &amp;&amp; !RegExp.test(obj.value)) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Please specify a valid URL\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\n$RegExp=\"/^(([\\w]+:)?\\/\\/)?(([\\d\\w]|%[a-fA-f\\d]{2,2})+(:([\\d\\w]|%[a-fA-f\\d]{2,2})+)?@)?([\\d\\w][-\\d\\w]{0,253}[\\d\\w]\\.)+[\\w]{2,4}(:[\\d]+)?(\\/([-+_~.\\d\\w]|%[a-fA-f\\d]{2,2})*)*(\\?(&amp;?([-+_~.\\d\\w]|%[a-fA-f\\d]{2,2})=?)*)?(#([-+_~.\\d\\w]|%[a-fA-f\\d]{2,2})*)?$/\";\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; !preg_match($RegExp, strtolower($form-&gt;data[$htmlName]))) return $msg;\n    </php>\n  </validator>\n  <validator name=\"IP\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Please specify a correct IP\';\nmsg = msg.replace(\'%s\', sfgName);\nvar RegExp=/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/;\nvar a=obj.value.split(\'.\');\nif (obj.value!=\'\' &amp;&amp; !RegExp.test(obj.value) || a[0]&gt;255 || a[1]&gt;255 || a[2]&gt;255 || a[3]&gt;255) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Please specify a correct IP\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\n$RegExp=\"/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/\";\nif (isset($form-&gt;data[$htmlName])) $parts = explode(\'.\', $form-&gt;data[$htmlName]); else $parts = array(999,999,999,999);\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; (!preg_match($RegExp, $form-&gt;data[$htmlName]) || intval($parts[0])&gt;255 || intval($parts[1])&gt;255 || intval($parts[2])&gt;255 || intval($parts[3])&gt;255)) return $msg;\n    </php>\n  </validator>\n  <validator name=\"SSN\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Invalid value! Please, provide a SSN in format XXX-XX-XXXX or XX-XXXXXXX, where X is a digit.\';\nmsg = msg.replace(\'%s\', sfgName);\nvar ssnPattern1 = /^(\\d{3})\\-(\\d{2})\\-(\\d{4})$/;\nvar ssnPattern2 = /^(\\d{2})\\-(\\d{7})$/;\nif ((obj.value.match(ssnPattern1)==null)&amp;&amp;(obj.value.match(ssnPattern2)==null)&amp;&amp;obj.value.length&gt;0) return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Invalid value! Please, provide a SSN in format XXX-XX-XXXX or XX-XXXXXXX, where X is a digit.\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\n$ssnPattern1=\"/^(\\d{3})\\-(\\d{2})\\-(\\d{4})$/\";\n$ssnPattern2=\"/^(\\d{2})\\-(\\d{7})$/\";\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; !preg_match($ssnPattern1, $form-&gt;data[$htmlName]) &amp;&amp; !preg_match($ssnPattern2, $form-&gt;data[$htmlName])) return $msg;\n    </php>\n  </validator>\n  <validator name=\"Date\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Invalid value! Field value should be in MM/DD/YYYY format.\';\nmsg = msg.replace(\'%s\', sfgName);\nvar a=obj.value.split(\'/\');\nif (a[0]-0&gt;0 &amp;&amp; a[0]-0&lt;=12 &amp;&amp; a[1]-0&gt;0 &amp;&amp; a[1]-0&lt;=31 &amp;&amp; a[2]-0&gt;1000 &amp;&amp; a[2]-0&lt;=9999 &amp;&amp; a[3]==null ||obj.value.length==0) return null; else return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Invalid value! Field value should be in MM/DD/YYYY format.\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\nif (isset($form-&gt;data[$htmlName])) $parts=explode(\'/\', $form-&gt;data[$htmlName]); else $parts=array(0,0,0);\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; (count($parts)!=3 || !checkdate(intval($parts[0]), intval($parts[1]), intval($parts[2])))) return $msg;\n    </php>\n  </validator>\n  <validator name=\"DateShort\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Invalid value! Field value should be in MM/DD/YY format\';\nmsg = msg.replace(\'%s\', sfgName);\nvar a=obj.value.split(\'/\');\nif (a[0]-0&gt;0 &amp;&amp; a[0]-0&lt;=12 &amp;&amp; a[1]-0&gt;0 &amp;&amp; a[1]-0&lt;=31 &amp;&amp; a[2]-0&gt;=0 &amp;&amp; a[2]-0&lt;=99 &amp;&amp; a[3]==null ||obj.value.length==0) return null; else return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Invalid value! Field value should be in MM/DD/YY format.\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\nif (isset($form-&gt;data[$htmlName])) $parts=explode(\'/\', $form-&gt;data[$htmlName]); else $parts=array(0,0,0);\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; (count($parts)!=3 || !is_numeric($parts[2]) || !checkdate(intval($parts[0]), intval($parts[1]), intval($parts[2])+2000))) return $msg;\n    </php>\n  </validator>\n  <validator name=\"Time\">\n    <js>\n      // incoming variables: obj - HTML element firing the event, sfgName - system name of the object \nvar msg = \'Field: %s. Invalid value! Field value should be in HH:MM format.\';\nmsg = msg.replace(\'%s\', sfgName);\nvar a=obj.value.split(\':\');\nif (a[0]-0&gt;=0 &amp;&amp; a[0]-0&lt;24 &amp;&amp; a[1]-0&gt;=0 &amp;&amp; a[1]-0&lt;60 &amp;&amp; a[2]==null ||obj.value.length==0) return null; else return msg;\n    </js>\n    <php>\n      // incoming variables: $form - the form object, $obj - structured object of element firing the validation\n$msg = \'Field: \'.$obj[\'sfgalias\'].\'. Invalid value! Field value should be in HH:MM format.\';\n$htmlName = str_replace(array(\'[\', \']\', \' \'), array(\'\',\'\',\'\'), $form-&gt;getProp($obj[\'attributes\'], \'name\'));\n$htmlName = strtolower($htmlName);\nif (isset($form-&gt;data[$htmlName])) $parts=explode(\':\', $form-&gt;data[$htmlName]); else $parts=array(99,99);\nif (isset($form-&gt;data[$htmlName]) &amp;&amp; $form-&gt;data[$htmlName]!=\'\' &amp;&amp; !is_array($form-&gt;data[$htmlName]) &amp;&amp; (count($parts)!=2 || !is_numeric($parts[0]) || !is_numeric($parts[1]) || intval($parts[0])&lt;0 || intval($parts[0])&gt;23 || intval($parts[1])&lt;0 || intval($parts[1])&gt;59)) return $msg;\n    </php>\n  </validator>\n</form>\n',`params`=''; 
###sfg_dump_separator### 
create table if not exists `sfg_example_registrationform` (`id` int(11) NOT NULL  auto_increment, `firstname` varchar(255) NOT NULL default '' , `lastname` varchar(255) NOT NULL default '' , `gender` varchar(255) NOT NULL default '' , `country_id` varchar(255) NOT NULL default '' , `city` varchar(255) NOT NULL default '' , `postcode` varchar(255) NOT NULL default '' , `phone` varchar(255) NOT NULL default '' , `email` varchar(255) NOT NULL default '' , `street` varchar(255) NOT NULL default '' , `dob` varchar(255) NOT NULL default '' , `region` varchar(255) NOT NULL default '' ,  PRIMARY KEY (id)); 
