<?$this->load->view('downloads/tabs')?>

<h2>
	Download ARCHLine.XP Trial Version
</h2>


<div class="float-50">
	<p>
		<?=form_open('downloads/validate', array('id' => 'downloadFormJap'))?>
		<?=form_hidden('do','japtrial')?>
		<?=form_hidden('dllang','jap')?>
			<table width="100%">
				<tr>
					<td width="120"><strong>名前:</strong></td>
					<td><?=form_input(array('name'=>'nev','id'=>'nev','value'=>$this->input->post('nev'),'size'=>30,'onFocus'=>"checkError('nev')"))?></td>
				</tr>
				<tr>
					<td width="120"><strong>ふりがな:</strong></td>
					<td><?=form_input(array('name'=>'pron','id'=>'pron','value'=>$this->input->post('pron'),'size'=>30,'onFocus'=>"checkError('pron')"))?></td>
				</tr>
				<tr>
					<td width="120">会社:</td>
					<td><?=form_input(array('name'=>'cegnev','id'=>'cegnev','value'=>$this->input->post('cegnev'),'size'=>30))?></td>
				</tr>
				<tr>
					<td width="120"><b>住所:</b></td>
					<td><?=form_input(array('name'=>'cim','id'=>'cim','value'=>$this->input->post('cim'),'size'=>30,'onFocus'=>"checkError('cim')"))?></td>
				</tr>
				<tr>
					<td width="120"><strong>電話:</strong></td>
					<td><?=form_input(array('name'=>'tel','id'=>'tel','value'=>$this->input->post('tel'),'size'=>30,'onFocus'=>"checkError('tel')"))?></td>
				</tr>
				<tr>
					<td width="120">FAX:</td>
					<td><?=form_input(array('name'=>'fax','id'=>'fax','value'=>$this->input->post('fax'),'size'=>30))?></td>
				</tr>
				<tr>
					<td width="120"><strong>E-Mail:</strong></td>
					<td><?=form_input(array('name'=>'email','id'=>'email','value'=>$this->input->post('email'),'size'=>30,'onFocus'=>"checkError('email')"))?></td>
				</tr>
					<tr>
					<td width="75" valign="top">
						お使いのCAD:
					</td>
					<td>
						<input type="checkbox" name="cb1" id="cb1" /> AutoCAD  
						<input type="checkbox" name="cb2" id="cb2" /> VectorWorks <br />
						<input type="checkbox" name="cb3" id="cb3" /> ArchiCAD 
						<input type="checkbox" name="cb4" id="cb4" /> JWCAD<br /> 
						<input type="checkbox" name="cb5" id="cb5" /> ARCHITREND <br />
						<input type="checkbox" name="cb6" id="cb6" /> Google Sketchup<br /> 
						<input type="checkbox" name="cb7" id="cb7" /> DRACAD
						<input type="checkbox" name="cb8" id="cb8" /> SuperSoft<br /> 
						<input type="checkbox" name="cb9" id="cb9" /> その他 :
						<?=form_input(array('name'=>'other','size'=>'10','value'=>$this->input->post('other')))?>
					</td>
				</tr>
				<tr>
					<td width="75" nowrap="" valign="top">
						ご要望および質問：	 
					</td>
					<td>
						<?=form_textarea(array('name'=>'comment','cols'=>'30','rows'=>'5','value'=>$this->input->post('comment')))?>
					
					
				</tr>
			</table>
			<br />
			<center>
				<img style="border:0" onclick="checkFormJap()" onmouseover="style.cursor='pointer'" src="/public/img/gombok/download_button_<?=$this->muser->user['lang']?>.png" height="30" width="250" alt="Submit Form" />
				<br />
				<div id="message"></div>
			</center>

		</form>
	</p>
</div>

<div class="float-70">
	

<p>&nbsp;&nbsp;この申し込みフォームにご記入の上送信してください。ただし太字の項目は必ず入力してください。自動返信メールにてダウンロードアドレスをお教えいたします。
その際、下記シリアル番号が必要になります。”9600018240962659”

<p>&nbsp;&nbsp;【特徴】
<p>&nbsp;&nbsp;30日間、フル機能使えます。ただし、下記の制限があります。
<p>&nbsp;&nbsp;・レンダリング、印刷した場合“トライアル“という透かし文字が入ります。
<p>&nbsp;・30日後、デモバージョンに自動的に変わります。印刷・保存ができなくなります。
<p>&nbsp;　　詳細は、「<a href="http://www.archline.jp/page/show/162">機能一覧表</a>」をご覧になってください。

	
	
</div>

<div class="clear"></div>



<script type="text/javascript">
	
	window.onload = focus();
	
	function focus()
	{
		document.getElementsByName('nev')[0].focus();
		
		var name = document.getElementById('nev').value;
		var pron = $('pron').value;
		var tel = $('tel').value;
		var email = $('email').value;
		var cim = $('cim').value;
		
		$('nev').style.backgroundColor = '#FDDA10';
		$('pron').style.backgroundColor = '#FDDA10';
		$('tel').style.backgroundColor = '#FDDA10';
		$('email').style.backgroundColor = '#FDDA10';
		$('cim').style.backgroundColor = '#FDDA10';
	}
	
	function checkError(inputID)
	{
		if($(inputID).value == '<?=$this->lang->line('downloads_error_empty_field')?>' || $(inputID).value == '<?=$this->lang->line('downloads_error_email_field')?>')
		{
			$(inputID).value = '';
		}
	}
	

	function checkFormJap()
	{
		var nameok = false;
		var pronok = false;
		var telok = false;
		var emailok = false;
		var cimok = false;
		var at = '@';
		var dot = '.';
		
		var name = document.getElementById('nev').value;
		var pron = $('pron').value;
		var tel = $('tel').value;
		var email = $('email').value;
		var cim = $('cim').value;
		
		var message = $('message').value;
		$('message').innerHTML = '<?=$this->lang->line('downloads_wait')?>';
		
		if(name == '' || name == '<?=$this->lang->line('downloads_error_empty_field')?>')
		{
			$('nev').value = '<?=$this->lang->line('downloads_error_empty_field')?>';
			$('nev').style.backgroundColor = '#F9D3D3';
		}
		else
		{
			$('nev').style.backgroundColor = 'white';
			nameok = true;
		}
		
		
		if(pron == '' || pron == '<?=$this->lang->line('downloads_error_empty_field')?>')
		{
			$('pron').value = '<?=$this->lang->line('downloads_error_empty_field')?>';
			$('pron').style.backgroundColor = '#F9D3D3';
		}
		else
		{
			$('pron').style.backgroundColor = 'white';
			pronok = true;
		}
		
		if(tel == '' || tel == '<?=$this->lang->line('downloads_error_empty_field')?>')
		{
			$('tel').value = '<?=$this->lang->line('downloads_error_empty_field')?>';
			$('tel').style.backgroundColor = '#F9D3D3';
		}
		else
		{
			$('tel').style.backgroundColor = 'white';
			telok = true;
		}
		
		if(cim == '' || cim == '<?=$this->lang->line('downloads_error_empty_field')?>')
		{
			$('cim').value = '<?=$this->lang->line('downloads_error_empty_field')?>';
			$('cim').style.backgroundColor = '#F9D3D3';
		}
		else
		{
			$('cim').style.backgroundColor = 'white';
			cimok = true;
		}
		
		if(email == '' || email == '<?=$this->lang->line('downloads_error_empty_field')?>')
		{
			$('email').value = '<?=$this->lang->line('downloads_error_empty_field')?>';
			$('email').style.backgroundColor = '#F9D3D3';
		}
		else
		{
			if(email.indexOf(at)==-1 || email.indexOf(at)==0 || email.indexOf(at)==email.length-1 || email.indexOf(dot)==-1 || email.indexOf(dot)==0 || email.indexOf(dot)>=email.length-2)
			{
				$('email').value = '<?=$this->lang->line('downloads_error_email_field')?>';
				$('email').style.backgroundColor = '#F9D3D3';
			}
			else
			{
				$('email').style.backgroundColor = 'white';
				emailok = true;
			}
		}
		
		if(nameok==true  && telok==true && emailok==true && pronok == true && cimok == true)
		{
			$('downloadFormJap').submit();
		}
		else
		{
			$('message').innerHTML = '<?=$this->lang->line('downloads_error_div')?>';
		}
    }
</script>