	/**
	*
	*	お問い合わせリストにイラストレーターIDを保存する
	*
	*/
	function addInq(id)
	{
		var iframe;
		if(document.getElementById('inq_add')) {
			iframe = document.getElementById('inq_add');
		} else {
			//iframe作成
			iframe = document.createElement('iframe');
			iframe.id = 'inq_add';
			var body = document.getElementsByTagName('body').item(0);
			body.appendChild(iframe);
		}
		iframe.src = 'illustrator/?add=' + id;
		alert('追加しました');
	}
	
	/**
	*
	*	お問い合わせリストから削除
	*
	*/
	function delInq(obj, id)
	{
		//HTML削除
		var div = document.getElementById(obj);
		div.style.display = 'none';
		
		var iframe;
		if(document.getElementById('inq_add')) {
			iframe = document.getElementById('inq_add');
		} else {
			//iframe作成
			iframe = document.createElement('iframe')
			iframe.id = 'inq_add';
			var body = document.getElementsByTagName('body').item(0);
			body.appendChild(iframe);
		}
		iframe.src = 'illustrator/?del=' + id;
	
	
	}
	
	/**
	*
	*	作品リストから削除
	*
	*/
	function cancelUpload(num)
	{
		document.getElementById('tr' + num).style.display = 'none';
		document.getElementById('up' + num).value = '';
	}
	
	
	/**
	*
	*	郵便番号検索
	*
	*/
	var search_id = '_zip';
	function searchZip()
	{
		
		var zip = document.getElementById('zip').value;
		var body = document.getElementsByTagName('body').item(0);
		if(document.getElementById(search_id)) {
			body.removeChild(document.getElementById(search_id));
		}
		var script = document.createElement('script');
		script.id = search_id;
		body.appendChild(script);
		script.src = './regist/zip?zip=' + zip;

	
	}
	
	/**
	*
	*	検索結果を代入
	*
	*/
	function setValues(pref, address)
	{
		if(!pref || !address) {
			alert('該当する郵便番号はありません');
		
		} else {
			
			//住所
			document.getElementById('address').value = address;
			
			//都道府県
			var option = document.getElementById('pref').getElementsByTagName('option');
			for(i in option)
			{
				if(option[i].value == pref) {
					option[i].selected = true;
					break;
				}
			
			}
		}
	
	}