<?xml version="1.0" encoding="iso-8859-1" ?>
<FacileFormsPackage id="JSCalendar" type="autoincrement" version="1.4.7">
	<name>JSCalendar for FacileForms</name>
	<title>JSCalendar_v1.0</title>
	<version>v1.0</version>
	<creationDate>2006-10-03 18:01:04</creationDate>
	<author>zANavAShi</author>
	<authorEmail>zanavashi@gmx.net</authorEmail>
	<authorUrl>http://www.facileforms.biz/forum/</authorUrl>
	<description>Calendar form which uses the stripped jscalendar-1.0 in Mambo/Joomla!</description>
	<copyright>This FacileForms package is released under the GNU/GPL license</copyright>
	<form id="16">
		<package>JSCalendar</package>
		<name>JSCalendar</name>
		<title>JSCalendar 1.0 Sample Form</title>
		<description>This is a FacileForms sample calendar which calls on jscalendar-1.0 instead of the default \r\nMambo/Joomla calendar which is known to cause problems with other multi-page form elements.\r\nThanks to FVDS and Ash at FacileForms forum and Wene at Joomla forums their help and ideas.</description>
		<width>400</width>
		<height>200</height>
		<prevmode>1</prevmode>
		<piece1cond>2</piece1cond>
		<piece1code>// load the standard FacileForms library\r\n$this-\x3EexecPieceByName(\x27ff_InitLib\x27)\x3B\r\n\r\n// include the javascript functions for dates\r\necho (\x27\r\n  \x3Cscript language=\x22javascript\x22 src=\x22{mossite}/includes/js/mambojavascript.js\x22 type=\x22text/javascript\x22\x3E\x3C/script\x3E\r\n  \x3Cscript type=\x22text/javascript\x22 src=\x22{mossite}/includes/js/jscalendar-1.0/calendar_stripped.js\x22\x3E\x3C/script\x3E\r\n  \x3Cscript type=\x22text/javascript\x22 src=\x22{mossite}/includes/js/jscalendar-1.0/calendar-setup_stripped.js\x22\x3E\x3C/script\x3E\r\n  \x3Cscript type=\x22text/javascript\x22 src=\x22{mossite}/includes/js/jscalendar-1.0/lang/calendar-en.js\x22\x3E\x3C/script\x3E\r\n  \x3Clink rel=\x22stylesheet\x22 type=\x22text/css\x22 media=\x22all\x22 href=\x22{mossite}/includes/js/jscalendar-1.0/calendar-system.css\x22\x3E\r\n\x27)\x3B</piece1code>
		<piece2cond>2</piece2cond>
		<piece2code>// include to configure calendar behaviour\r\necho (\x27\r\n  \x3Cscript type=\x22text/javascript\x22\x3E\r\n    Calendar.setup(\r\n      {\r\n        inputField  : \x22ff_elem269\x22\x2C    // ID of the input field\r\n        ifFormat    : \x22%A\x2C %d %B\x2C %Y\x22\x2C // the date format\r\n        button      : \x22ff_elem270\x22\x2C    // ID of the button\r\n        singleClick : true\x2C            // close popup on single click\r\n        firstDay    : 1\x2C               // Monday as first day of the week\r\n        range       : [2005\x2C2020]      // min and max years allowed\r\n      }\r\n    )\x3B\r\n    Calendar.setup(\r\n      {\r\n        inputField  : \x22ff_elem272\x22\x2C    // ID of the input field\r\n        ifFormat    : \x22%A\x2C %d %B\x2C %Y\x22\x2C // the date format\r\n        button      : \x22ff_elem273\x22\x2C    // ID of the button\r\n        singleClick : true\x2C            // close popup on single click\r\n        firstDay    : 1\x2C               // Monday as first day of the week\r\n        range       : [2005\x2C2020]      // min and max years allowed\r\n      }\r\n    )\x3B\r\n  \x3C/script\x3E\r\n\x27)\x3B</piece2code>
		<piece3cond>2</piece3cond>
		<piece3code>// load the standard FacileForms library\r\n$this-\x3EexecPieceByName(\x27ff_InitLib\x27)\x3B\r\n\r\n// Get the date entered\r\n$startdate = \x27\x27\x3B\r\n$enddate   = \x27\x27\x3B\r\nforeach ($this-\x3Esubmitdata as $data)\r\n    switch ($data[1]) {\r\n        case \x27StartDate\x27 : $startdate = date(\x22l\x2C d F\x2C Y\x22\x2Cstrtotime($data[4]))\x3B\r\n                              break\x3B\r\n        case \x27EndDate\x27   : $enddate   = date(\x22l\x2C d F\x2C Y\x22\x2Cstrtotime($data[4]))\x3B\r\n                              break\x3B\r\n        default          : break\x3B\r\n    }\x3B // switch</piece3code>
		<element id="276">
			<name>arrivetext</name>
			<title>Arrive text</title>
			<posx>0</posx>
			<posy>5</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cfont style=\x22font-size: 11px\x22\x3EArrival date:\x3C/font\x3E</data1>
		</element>
		<element id="269">
			<name>StartDate</name>
			<title>Arrive date</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>100</posx>
			<posy>0</posy>
			<width>200</width>
			<widthmode>1</widthmode>
			<height>29</height>
			<flag2>2</flag2>
			<data1>\x3C?php return date(\x27l\x2C d F\x2C Y\x27)\x3B ?\x3E</data1>
			<script3cond>1</script3cond>
			<script3id>38</script3id>
			<script3name>ff_valuenotempty</script3name>
			<script3msg>Oops. it looks like you forgot to enter your arrival date.</script3msg>
		</element>
		<element id="270">
			<name>SelectDate1</name>
			<title>Select arrival</title>
			<type>Regular Button</type>
			<posx>310</posx>
			<posy>0</posy>
			<width>0</width>
			<height>0</height>
			<data2>Select</data2>
			<script2cond>2</script2cond>
			<script2code>// When button clicked\x2C call the javascript function to show the calendar\r\n// and pass the value back to the input text field.  \r\n// NB: the value \x22StartDate\x22 below must match the input text field name\r\n\r\nfunction ff_SelectDate1_action(element\x2C action)\r\n{\r\n    switch (action) {\r\n        case \x27click\x27:\r\n            return showCalendar(ff_getElementByName(\x27StartDate\x27).id\x2C \x27l\x2C d F\x2C Y\x27)\x3B\r\n            break\x3B\r\n        default:\x3B\r\n    } // switch\r\n}\x3B // ff_SelectDate1_action</script2code>
			<script2flag1>1</script2flag1>
		</element>
		<element id="271">
			<name>SelectInfo1</name>
			<title>Select Arrival Date</title>
			<type>Tooltip</type>
			<posx>377</posx>
			<posy>1</posy>
			<width>0</width>
			<height>0</height>
			<data2>Click on the \x22Select\x22 button and a small calendar window will \r\npop up where you can choose your preferred date of arrival.</data2>
		</element>
		<element id="277">
			<name>departtext</name>
			<title>Depart text</title>
			<posx>0</posx>
			<posy>34</posy>
			<width>0</width>
			<height>0</height>
			<data1>\x3Cfont style=\x22font-size: 11px\x22\x3EDeparture date:\x3C/font\x3E</data1>
		</element>
		<element id="272">
			<name>EndDate</name>
			<title>Depart date</title>
			<type>Text</type>
			<class2>inputbox</class2>
			<posx>100</posx>
			<posy>29</posy>
			<width>200</width>
			<widthmode>1</widthmode>
			<height>29</height>
			<flag2>2</flag2>
			<data1>\x3C?php return date(\x27l\x2C d F\x2C Y\x27)\x3B ?\x3E</data1>
			<script3cond>1</script3cond>
			<script3id>38</script3id>
			<script3name>ff_valuenotempty</script3name>
			<script3msg>Oops. it looks like you forgot to enter your departure date.</script3msg>
		</element>
		<element id="273">
			<name>SelectDate2</name>
			<title>Select departure</title>
			<type>Regular Button</type>
			<posx>310</posx>
			<posy>29</posy>
			<width>0</width>
			<height>0</height>
			<data2>Select</data2>
			<script2cond>2</script2cond>
			<script2code>// When button clicked\x2C call the javascript function to show the calendar\r\n// and pass the value back to the input text field.  \r\n// NB: the value \x22StartDate\x22 below must match the input text field name\r\n\r\nfunction ff_SelectDate2_action(element\x2C action)\r\n{\r\n    switch (action) {\r\n        case \x27click\x27:\r\n            return showCalendar(ff_getElementByName(\x27EndDate\x27).id\x2C \x27l\x2C d F\x2C Y\x27)\x3B\r\n            break\x3B\r\n        default:\x3B\r\n    } // switch\r\n} // ff_SelectDate2_action</script2code>
			<script2flag1>1</script2flag1>
		</element>
		<element id="274">
			<name>SelectInfo2</name>
			<title>Select Departure Date</title>
			<type>Tooltip</type>
			<posx>377</posx>
			<posy>30</posy>
			<width>0</width>
			<height>0</height>
			<data2>Click on the \x22Select\x22 button and a small calendar window will \r\npop up where you can choose your preferred date of departure.</data2>
		</element>
		<element id="275">
			<name>Submit</name>
			<title>Submit</title>
			<type>Regular Button</type>
			<posx>0</posx>
			<posy>80</posy>
			<width>0</width>
			<height>0</height>
			<data2>Submit</data2>
			<script2cond>1</script2cond>
			<script2id>36</script2id>
			<script2name>ff_validate_submit</script2name>
			<script2flag1>1</script2flag1>
		</element>
	</form>
</FacileFormsPackage>
