<?php
include_once('./_common.php');

// 타이틀 설정
switch($action) {
	case 'emo'		: $title = ' : 이모티콘'; break;
	case 'cemo'		: $title = ' : 이모티콘'; break;
	case 'photo'	: $title = ' : 회원사진'; break;
	case 'map'		: $title = ' : 구글맵'; break;
	case 'help'		: $title = ' : 도움말'; break;
	case 'poll'		: $title = ' : 설문조사'; break;
	case 'icon'		: $title = ' : 내용아이콘'; break;
	case 'scon'		: $title = ' : 제목아이콘'; break;
	default			: $title = ''; break;
}

$g5['title'] = $g4['title'] = $title;

include_once(G5_PATH.'/head.sub.php');

?>
<style>
	body { margin:0px; padding:0px; font:normal 12px dotum; -webkit-text-size-adjust:100%; background:#fff; color:#222; }
	a { color:#222; text-decoration:none; }
	a:hover { color:crimson; }
	.clear { width: 100%; height: 0px; overflow: hidden; clear: both; }
</style>
<?php include_once(AMINA_PATH.'/css.php'); ?>

<?php if($action == 'emo') { 
	//이모티콘
	if(!$bo_table) amina_alert('값이 넘어오지 않았습니다.', 'fbox');
	if(!$amina['emo_cnt']) amina_alert('이모티콘 설정값이 없습니다.', 'fbox');	
	
?>
	<style>
		.box { text-align:center; margin-left:10px; margin-bottom:10px; }
		.emo { width:50px; height:50px; margin:10px 10px 0px 0px; cursor:pointer; border:1px solid #ddd; }
	</style>
	<div class="box">
		<?php for($k=1; $k<=$amina['emo_cnt']; $k++) echo "<img src=\"{$emo_skin_url}/{$k}.gif\" onclick=\"emo_insert('{$k}');\" class=\"emo\" alt=\"\" />\n"; ?>
	</div>

	<script> 
		function emo_insert(emo){
			var skin_url = "<?php echo $emo_skin_url; ?>";
			parent.document.fwrite.emo_icon.src = skin_url + "/" + emo + ".gif";
			parent.document.fwrite.post_icon.value = emo;
			parent.document.fwrite.wr_subject.focus();
			parent.jQuery.fancybox.close();
		}
	</script>

<?php } else if($action == 'ticon') { 
	//글내용 이모티콘
	if(!$bo_table) amina_alert('값이 넘어오지 않았습니다.', 'fbox');

	// 모바일에서는 DHTML 에디터 사용불가
	$is_dhtml_editor = (!G5_IS_MOBILE && $board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level']) ? true : false;

	//DHTML Editor Type
	$dhtml_editor = '';
	if($is_dhtml_editor) {
		if($amina['editor'] == 1) {
			$dhtml_editor = "SEditor2"; //NHN SmartEditor2
		} else if($amina['editor'] == 2) {
			$dhtml_editor = "DEditor"; //Daum Editor
		} else {
			if(AMINA) {
				$dhtml_editor = $config['cf_editor'] ? $config['cf_editor'] : 'ckeditor4';
			} else {
				$dhtml_editor = 'cheditor';
			}
		}
	}

	$arr = array();
	$handle = opendir(AMINA_PATH.'/app/emoticon');
	while ($file = readdir($handle)) {
		if(preg_match("/\.(jpg|jpeg|gif|png)$/i", $file)) {
			$arr[] = $file;
		}
    }
    closedir($handle);

    sort($arr);

	$arr_cnt = count($arr);

?>
	<style>
		.box { text-align:center; margin-left:10px; margin-bottom:10px; }
		.emo { width:50px; height:50px; margin:10px 10px 0px 0px; cursor:pointer; border:1px solid #ddd; }
	</style>
	<div class="box">
		<?php for($i=0; $i < $arr_cnt; $i++) echo '<img src="'.AMINA_URL.'/app/emoticon/'.$arr[$i].'" onclick="emo_insert(\''.$arr[$i].'\');" class="emo" alt="" />'."\n"; ?>
	</div>

	<script> 
		var editor_type = "<?php echo $dhtml_editor; ?>"; // 에디터 종류
		var emo_url = "<?php echo AMINA_URL; ?>/app/emoticon";
		var emo_type = "<?php echo $type;?>";

		function emo_editor(html) {
			if(editor_type == 'SEditor2') {
				parent.oEditors.getById["wr_content"].exec("PASTE_HTML", [html]);
			} else if(editor_type == 'DEditor') {
				parent.pasteImage(html);
			} else if(editor_type == 'cheditor' || editor_type == 'cheditor5') {
				parent.ed_wr_content.insertContents(html);
			} else if(editor_type == 'ckeditor4') {
				var editor = parent.CKEDITOR.instances.wr_content;
				if (editor.mode == 'wysiwyg')	{
					editor.insertHtml(html);
				} else {
					alert( 'WYSIWYG 모드에서만 가능합니다.' );
				}
			}
		}

		function emo_insert(emo){
			if(emo_type == "cmt" || editor_type == "") {
				html = "{이모티콘:" + emo + ":50}";
				parent.document.getElementById("wr_content").value += html;
			} else {
				html = "<img src=\"" + emo_url + "/" + emo + "\" width=50 alt=\"\">";
				emo_editor(html);
			}
			parent.jQuery.fancybox.close();
		}
	</script>

<?php } else if($action == 'help') { 
	//도움말							
	if (!$bo_table) amina_alert('값이 넘어오지 않았습니다.');
?>
	<style>
		.title { padding:12px; text-align:center; font:bold 14px dotum; color:gold; background:#333; border:0px; }
		.box { padding:15px; }
		.box .wr-tip{ padding:10px; background:#f5f5f5; font-weight:bold; }
		.box li { line-height:1.7; }
		.box ul li { list-style:disc; line-height:1.7; }
	</style>
	<div class="title">게시물 등록 관련 도움말</div>
	<div class="box">
		<div class="wr-tip">동영상(오디오) 등록 안내</div>
		<ol>
		<li><b>등록가능 동영상 공유주소형태 안내</b>
			<ul>
			<li>유튜브 : http://youtu.be/oL2AlXWVbKU 또는 http://www.youtube.com/watch?v=oL2AlXWVbKU</li>
			<li>비메오 : http://vimeo.com/18923281</li>
			<li>다음TV : http://tvpot.daum.net/v/kxxUvNy1ndg$</li>
			<li>네이트TV : http://pann.nate.com/video/221313865</li>
			<li>판도라TV : http://channel.pandora.tv/channel/video.ptv?ch_userid=sobboso&prgid=47491832</li>
			<li>태그스토리 : http://www.tagstory.com/video/100470056</li>
			<li>테드(TED) : http://www.ted.com/talks/lang/ko/cesar_kuriyama_one_second_every_day.html</li>
			<li>데일리모션 : http://www.dailymotion.com/video/xzh0jv_iron-man-3-review_shortfilms</li>
			<li>페이스북 동영상 : https://www.facebook.com/photo.php?v=337102899759854&set=vb.470756562961560&type=2&theater</li>
			<li>네이버tvcast & 블로그: http://tvcast.naver.com/v/92491</li>
			<li>슬라이더쉐어: http://www.slideshare.net/boozcompany/2013-innovation-100-study-v3</li>
			</ul>
		</li>
		<li><b>직접 입력방법</b>
			<ul>
			<li>첨부파일로 동영상 또는 오디오 파일 첨부</li>
			<li>동영상 입력창에 각 동영상별 공유주소 또는 파일 입력</li>
			</ul>
		</li>
		<li><b>본문에 동영상(오디오) 삽입 방법</b>
			<ul>
			<li>본문에 {동영상:동영상 공유주소 } 형태로 입력 ex) {동영상:http://youtu.be/oL2AlXWVbKU }</li>
			<li>또는 본문에 {동영상:동영상/오디오 파일주소|file=1 } 형태로 입력 ex) {동영상:http://xxx.xxx.xxx/xxx.mp4|file=1 }</li>
			<li>동영상용 이미지를 별도로 넣고자 할 경우 {동영상:동영상 공유주소|img=이미지URL } 형태 또는 {동영상:동영상 파일주소|file=1 img=이미지URL } 형태로 입력</li>
			<li>본문에 넣는 동영상은 갯수제한없이 입력 가능</li>
			</ul>
		</li>
		</ol>

		<div class="wr-tip">파일/이미지 등록 안내</div>
		<ol>
		<li>첨부이미지 위치가 본문상단 또는 하단일 경우에만 '붙이기' 기능이 작동합니다.</li>
		<li>첨부이미지 본문삽입 방법
			<ul>
			<li>본문에 {이미지:0}, {이미지:1}, {이미지:2} 형태로 입력(숫자는 첨부순서)</li>
			<li>{이미지:0:width=숫자} 또는 {이미지:0:width=숫자 height=숫자} 형태로 이미지 크기조정 가능</li>
			<li>html 태그 또는 에디트의 정렬기능을 이용하여 이미지 정렬 가능</li>
			</ul>
		</li>
		</ol>

		<div class="wr-tip">첨부이미지 자동 리사이즈 안내</div>
		<ul>
		<?php if($amina['upimg_size'] > 0 && $amina['upimg_quality'] > 0) { ?>
			<li>본 게시판은 첨부이미지 자동 리사이즈 설정이 적용되어 있습니다.(제한크기 : <?php echo $amina['upimg_size']?>px)</li>
		<?php } else { ?>
			<li>본 게시판은 첨부이미지 자동 리사이즈 설정이 적용되어 있지 않습니다.</li>
		<?php } ?>
		<li>첨부이미지 자동 리사이즈란 첨부이미지의 폭(width)이 설정한 크기보다 클 경우 글등록시 자동 리사이즈되는 것을 말하며, 이때 원본 이미지 자체가 리사이즈된 이미지로 교체됩니다.</li>
		<li>JPG 파일의 경우 리사이즈시 다소 화질저하가 있을 수 있으며, 첨부이미지가 많을 경우 글등록에 시간이 걸릴 수 있습니다.</li>
		</ul>

		<div class="wr-tip">설문조사 등록 방법</div>
		<ol>
		<li>설문조사 등록은 게시판설정 또는 회원등급에 따라 등록권한이 설정됩니다.</li>
		<li>'등록하기'를 클릭하여 설문입력창을 오픈합니다.</li>
		<li>조사하고자 하는 설문제목, 기간, 항목 등을 입력합니다.</li>
		<li>설문항목은 최대 9개까지 설정 가능합니다.</li>
		</ol>

		<div class="wr-tip">획득 MP 등록 안내</div>
		<ul>
		<li>획득 MP 등록은 게시판설정 또는 회원등급에 따라 등록권한이 설정됩니다.</li>
		<li><b>열람 MP</b>는 글 열람시 약속된 룰에 따라 글작성자에게 적립되는 MP를 말합니다.</li>
		<li>열람 MP 적립이 발생할 경우 설정한
		<?php if($amina['po_view_fee'] > 0) { ?>
			MP에서 수수료 <?php echo $amina['po_view_fee']?>% 차감후 적립됩니다.
		<?php } else { ?>
			MP만틈 적립됩니다.</li>
		<?php } ?>
		<?php if($amina['po_view_term'] > 0) { ?>
			(적립기간 : 등록후 <?php echo $amina['po_view_term']?>일)
		<?php } ?>
		</li>
		<li><b>다운 MP</b>는 자료 다운로드시 약속된 룰에 따라 글작성자에게 적립되는 MP를 말합니다.</li>
		<li>다운 MP 적립이 발생할 경우 설정한
		<?php if($amina['po_down_fee'] > 0) { ?>
			다운 MP에서 수수료 <?php echo $amina['po_down_fee']?>% 차감후 적립됩니다.
		<?php } else { ?>
			다운 MP만틈 적립됩니다.
		<?php } ?>
		<?php if($amina['po_down_term'] > 0) { ?>
			(적립기간 : 등록후 <?php echo $amina['po_down_term']?>일)
		<?php } ?>
		</li>
		<li><b><?php echo $amina['cmt_choice_txt']?>포인트</b>로 건 MP는 글등록시 선차감되며, 글등록후 수정 또는 복구되지 않습니다.</li>
		<li>게시판 설정에 따라 글작성자에게는 MP가 아닌 AP로 적립될 수도 있습니다.</li>
		</ul>

		<div class="wr-tip">관련글/태그 등록 안내</div>
		<ul>
			<li>관련글과 태그 등록은 게시판설정 또는 회원등급에 따라 등록권한이 설정됩니다.</li>
			<li>관련글은 등록된 태그 또는 태그관련 단어를 입력하며, 복수 입력시 각 단어는 콤마(,)로 구분합니다.</li>
			<li>태그는 '등록'이 체크되어야 저장되며, 복수 입력시 각 태그는 콤마(,)로 구분합니다.</li>
		</ul>
	</div>

<?php } else if($action == 'map') { 
	//구글지도
	$lat = '37.566535';
	$lng = '126.977969';
	$zoom = 14;
	$map_width = '100%';
	$map_height = '500px';
?>
	<style>
		table, form { margin:0; padding:0; font:normal 12px dotum; -webkit-text-size-adjust:100%; }
		button { border-radius:0;-webkit-appearance:none; }
		input[type="text"] { border:1px solid #ddd; height:22px; line-height:22px; border-radius:0;-webkit-appearance:none; }
		.title { padding:12px; text-align:center; font:bold 14px verdana; color:gold; background:#333 !important; border:0px; }
		.tbl { border-collapse:collapse; width:100%; } 
		.tbl th { width:30px; text-align:center; background:#fafafa; border:1px solid #ddd; padding: 6px 10px; line-height:1.6; font-size:12px; -webkit-text-size-adjust:100%;}
		.tbl td { background:#fff; border:1px solid #ddd; padding: 6px 10px; line-height:1.6; font-size:12px; -webkit-text-size-adjust:100%;}
		.tbl span { font-size:12px; -webkit-text-size-adjust:100%; }
		.btn_save { letter-spacing:-1px; font-family:dotum; cursor:pointer; padding:4px 6px; background:red; font-weight:bold; color:#ffffff; border:0px; cursor:pointer; border-radius:0;-webkit-appearance:none;}
		.btn_search { letter-spacing:-1px; font-family:dotum; cursor:pointer; padding:4px 6px; background:#333333; font-weight:bold; color:gold; border:0px; cursor:pointer; border-radius:0;-webkit-appearance:none;}
		div#map { position: relative; overflow:hidden; }
		div#crosshair {
			position: absolute;
		    top: 214px;
			height: 22px;
		    width: 22px;
			left: 50%;
		    margin-left: -10px;
			display: block;
		    background-image: url('./img/crosshair.gif');
			background-position: center center;
		    background-repeat: no-repeat;
		}
	</style>
	<script src="http://maps.google.com/maps/api/js?v=3.3&sensor=true&language=ko"></script>
	<script>
		var map;
		var geocoder;
		var centerChangedLast;
		var reverseGeocodedLast;
		var currentReverseGeocodeResponse;

		function initialize() {
			var latlng = new google.maps.LatLng(<?=$lat?>, <?=$lng?>);
			var myOptions = {
				zoom: <?=$zoom?>,
				scaleControl: true,
				center: latlng,
				mapTypeId: google.maps.MapTypeId.ROADMAP
			};

			map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
			geocoder = new google.maps.Geocoder();
 
			google.maps.event.addListener(map, 'zoom_changed', function() {
				document.getElementById("zoom_level").innerHTML = map.getZoom();
				document.getElementById("map_zoom").value = map.getZoom();

				zoomLevel = map.getZoom(); 
				if (zoomLevel > 19) { 
					map.setZoom(19); 
				}   
				if (zoomLevel < 1) { 
					map.setZoom(1); 
				}   
			});

			setupEvents();
			centerChanged();
		}
 
		function setupEvents() {
			reverseGeocodedLast = new Date();
			centerChangedLast = new Date();
 
			setInterval(function() {
				if((new Date()).getSeconds() - centerChangedLast.getSeconds() > 1) {
					if(reverseGeocodedLast.getTime() < centerChangedLast.getTime())
					reverseGeocode();
				}
			}, 1000);
 
			google.maps.event.addListener(map, 'center_changed', centerChanged);
 
			google.maps.event.addDomListener(document.getElementById('crosshair'),'dblclick', function() {
				map.setZoom(map.getZoom() + 1);
			});
		}
 
		function getCenterLatLngText() {
 
			var nn = 1000000;
			var tmpLat = Math.round(map.getCenter().lat()*nn)/nn;
			var tmpLng = Math.round(map.getCenter().lng()*nn)/nn;
 
			document.getElementById("map_lat").value = tmpLat;
			document.getElementById("map_lng").value = tmpLng;

			return tmpLat +', '+ tmpLng;
		}
 
		function centerChanged() {
			centerChangedLast = new Date();
			var latlng = getCenterLatLngText();
			var loc = latlng.split(',');	
			geocoder.geocode({latLng:map.getCenter()},reverseGeocodeResult);
			document.getElementById('lat').innerHTML = loc[0];
			document.getElementById('lng').innerHTML = loc[1];
			document.getElementById('formatedAddress').innerHTML = '';
			currentReverseGeocodeResponse = null;
		}
 
		function reverseGeocode() {
			reverseGeocodedLast = new Date();
			geocoder.geocode({latLng:map.getCenter()},reverseGeocodeResult);
		}
 
		function reverseGeocodeResult(results, status) {
			currentReverseGeocodeResponse = results;
			if(status == 'OK') {
				if(results.length == 0) {
					document.getElementById('formatedAddress').innerHTML = 'None';
				} else {
					document.getElementById('formatedAddress').innerHTML = results[0].formatted_address;
				}
			} else {
				document.getElementById('formatedAddress').innerHTML = 'Error';
			}
		}

	 	function geocode() {
			var address = document.getElementById("address").value;
			geocoder.geocode({
				'address': address,
				'partialmatch': true}, geocodeResult);
		}
 
		function geocodeResult(results, status) {
			if (status == 'OK' && results.length > 0) {
				map.fitBounds(results[0].geometry.viewport);
			} else {
				alert("Info : " + status);
			}
		}
	</script>

	<div class="title">Google Map</div>

	<table border="1" class="tbl">
	<tbody>
	<tr>
	<th scope="col">찾기</th>
	<td> 
		<input type="text" id="address" style="width:60%;" onKeyDown="if(event.keyCode==13){geocode();}" />
		&nbsp;<input type="button" class="btn_search" value=" 검색 " onclick="geocode()">
		&nbsp;<input type="button" class="btn_save" value=" 코드생성하기 " onclick="geocode_submit()">

		<input type="hidden" id="map_lat" value="<?php echo $lat; ?>">
		<input type="hidden" id="map_lng" value="<?php echo $lng; ?>">
		<input type="hidden" id="map_zoom" value="<?php echo $zoom;?>">
	</td>
	</tr>
	<tr><th scope="col">주소</th><td colspan=3><span id="formatedAddress"></span></td></tr>
	<tr><th scope="col">위치</th><td>
		위도 : <span id="lat"></span> / 경도 : <span id="lng"></span> / 줌 : <span id="zoom_level"><?php echo $zoom; ?></span>
	</td>
	</tr>
	<tr><th scope="col">마커</th><td>
		<input type="text" id="map_marker" size=50 style="width:60%;" value="<?php echo $marker; ?>" /> 
		&nbsp; &nbsp;
		크기 <input type="text" id="map_width" name="map_width" size=4 value="<?php echo $width; ?>" /> x <input type="text" id="map_height" name="map_height" size=4 value="<?php echo $height; ?>" /> px 
	</td>
	</tr>
	<tr><th scope="col">기타</th><td>
		<input type="text" id="map_attach" name="map_attach" size=4 value="" /> 번째 첨부사진의 GPS 정보로 지도 생성
	</td>
	</tr>
	</table>

	<div id="map">
		<div id="map_canvas" style="width:<?php echo $map_width; ?>; height:<?php echo $map_height; ?>;"></div>
		<div id="crosshair"></div>
	</div>

	<script> 
		function geocode_submit() {
			var code_loc;
			var code_lat = document.getElementById("map_lat").value;
			var code_lng = document.getElementById("map_lng").value;
			var code_zoom = document.getElementById("map_zoom").value;
			var code_width = document.getElementById("map_width").value;
			var code_height = document.getElementById("map_height").value;
			var code_marker = document.getElementById("map_marker").value;
			var code_attach = document.getElementById("map_attach").value;

			if(code_attach) {
				code_loc = " img=" + code_attach;
			} else {
				code_loc = " loc=" + code_lat + "," + code_lng;
			}
			if(code_zoom && code_zoom != 14) {
				code_zoom = " z=" + code_zoom;
			} else {
				code_zoom = "";
			}
			if(code_width) code_width = " w=" + code_width;
			if(code_height) code_height = " h=" + code_height;
			if(code_marker) code_marker = " m=\"" + code_marker + "\"";

			parent.document.fwrite.map_code.value = "{지도:" + code_loc + code_zoom + code_width + code_height + code_marker + "}";
			parent.jQuery.fancybox.close();
	    }

		addLoadEvent(function() {
			initialize();
		});
	</script>

<?php } else if($action == 'poll') { 
	//설문조사
	if (!$bo_table) amina_alert('값이 넘어오지 않았습니다.');
	$is_poll = false;
	if($is_admin || $amina['poll_level'] == 1 || ($amina['poll_level'] > 1 && $member['mb_level'] >= $amina['poll_level'])) {
		;
	} else {
		amina_alert('설문을 등록할 권한이 없습니다.');
	}
?>
	<script>
		function initialize() {
			document.getElementById("poll_subject").value = parent.document.fwrite.poll_subject.value;
			document.getElementById("poll_y").value = parent.document.fwrite.poll_y.value;
			document.getElementById("poll_m").value = parent.document.fwrite.poll_m.value;
			document.getElementById("poll_d").value = parent.document.fwrite.poll_d.value;
			document.getElementById("poll_h").value = parent.document.fwrite.poll_h.value;
			document.getElementById("poll_i").value = parent.document.fwrite.poll_i.value;
			if(parent.document.fwrite.poll_level.value) {
				document.getElementById("poll_level").checked = true;
			}
			if(parent.document.fwrite.poll_location.value) {
				document.getElementById("poll_location").checked = true;
			}
			document.getElementById("poll_point").value = parent.document.fwrite.poll_point.value;
			document.getElementById("poll_item1").value = parent.document.fwrite.poll_item1.value;
			document.getElementById("poll_item2").value = parent.document.fwrite.poll_item2.value;
			document.getElementById("poll_item3").value = parent.document.fwrite.poll_item3.value;
			document.getElementById("poll_item4").value = parent.document.fwrite.poll_item4.value;
			document.getElementById("poll_item5").value = parent.document.fwrite.poll_item5.value;
			document.getElementById("poll_item6").value = parent.document.fwrite.poll_item6.value;
			document.getElementById("poll_item7").value = parent.document.fwrite.poll_item7.value;
			document.getElementById("poll_item8").value = parent.document.fwrite.poll_item8.value;
			document.getElementById("poll_item9").value = parent.document.fwrite.poll_item9.value;
		}
	</script>
	<style>
		table, form { margin:0; padding:0; font:normal 12px dotum; -webkit-text-size-adjust:100%; }
		table { width:100%; border-collapse:collapse; border:0px; padding:0px; margin:0px; } 
		th { border:0px; border-bottom:1px solid #ddd; padding:6px 15px; background-color: #f5f5f5; font-weight:bold; text-align:left; }
		td { border:0px; border-bottom:1px solid #ddd; padding:6px 10px; }
		th, td  { vertical-align:middle !important; }
		th { padding-left:20px !important; white-space:nowrap; width:80px !important; font-weight:bold; }
		label { font-weight:normal !important; vertical-align: middle; display:inline !important; margin-right:5px; }
		input, select, button {	margin:0px; display:inline !important; padding:5px 10px; font-size:12px; }
		input[type=checkbox], input[type=radio] { vertical-align: middle; margin:0px; padding:5px; }
		input[type=text], input[type=input], input[type=password], select {	border:1px solid #ddd; border-radius:3px; }
		input[type=text], input[type=input], input[type=password], button, textarea { -webkit-appearance:none; }
		.s-i { width:30px !important; }
		.s-l { width:94%; }
		.s-t { width:40px !important; margin-right:8px; }
	</style>

	<table border=0 class="table">
	<tr>
	<th colspan=2 style="background:#000; color:#fff; padding:15px 10px;"><i class="fa fa-bar-chart-o fa-lg"></i> 설문조사 설정</th>
	</tr>
	<tr>
	<th>설문제목</th>
	<td><input type="text" size="40" id="poll_subject" name="poll_subject" itemname="설문제목" value="" class="s-l" placeholder="설문제목을 입력하세요."></td>
	</tr>
	<tr>
	<th>설문기간</th>
	<td>
		<input type="text" size="4" id="poll_y" name="poll_y" value="" class="s-t">년 
		<input type="text" size="4" id="poll_m" name="poll_m" value="" class="s-t">월
		<input type="text" size="4" id="poll_d" name="poll_d" value="" class="s-t">일
		<input type="text" size="4" id="poll_h" name="poll_h" value="" class="s-t">시
		<input type="text" size="4" id="poll_i" name="poll_i" value="" class="s-t">분 까지
	</td>
	</tr>
	<tr>
	<th>설문옵션</th>
	<td>
		<label><input type="checkbox" id="poll_level" name="poll_level" value="1"> 회원만 투표</label>
		&nbsp; &nbsp;
		<label><input type="checkbox" id="poll_location" name="poll_location" value="1"> 본문상단 출력</label>
		<?php if($is_admin) { ?>
			&nbsp; <i class="fa fa-gift fa-lg"></i> 참여시 적립 MP
			<input type="text" size="4" id="poll_point" name="poll_point" itemname="참여시 적립 MP" value="" class="s-t">
		<?php } else { ?>
			<input type="hidden" id="poll_point" name="poll_point" itemname="참여시 적립 MP" value="">
		<?php } ?>	
	</td>
	</tr>
	<tr>
	<th>항목 01</th>
	<td>
		<input type="text" size="40" id="poll_item1" name="poll_item1" itemname="항목1" value="" class="s-l" placeholder="1번 설문항목 입력">
	</td>
	</tr>
	<tr>
	<th>항목 02</th>
	<td>
		<input type="text" size="40" id="poll_item2" name="poll_item2" itemname="항목2" value="" class="s-l" placeholder="2번 설문항목 입력">
	</td>
	</tr>
	<tr>
	<th>항목 03</th>
	<td>
		<input type="text" size="40" id="poll_item3" name="poll_item3" itemname="항목3" value="" class="s-l" placeholder="3번 설문항목 입력">
	</td>
	</tr>
	<tr>
	<th>항목 04</th>
	<td>
		<input type="text" size="40" id="poll_item4" name="poll_item4" itemname="항목4" value="" class="s-l" placeholder="4번 설문항목 입력">
	</td>
	</tr>
	<tr>
	<th>항목 05</th>
	<td>
		<input type="text" size="40" id="poll_item5" name="poll_item5" itemname="항목5" value="" class="s-l" placeholder="5번 설문항목 입력">
	</td>
	</tr>
	<tr>
	<th>항목 06</th>
	<td>
		<input type="text" size="40" id="poll_item6" name="poll_item6" itemname="항목6" value="" class="s-l" placeholder="6번 설문항목 입력">
	</td>
	</tr>
	<tr>
	<th>항목 07</th>
	<td>
		<input type="text" size="40" id="poll_item7" name="poll_item7" itemname="항목7" value="" class="s-l" placeholder="7번 설문항목 입력">
	</td>
	</tr>
	<tr>
	<th>항목 08</th>
	<td>
		<input type="text" size="40" id="poll_item8" name="poll_item8" itemname="항목8" value="" class="s-l" placeholder="8번 설문항목 입력">
	</td>
	</tr>
	<tr>
	<th>항목 09</th>
	<td>
		<input type="text" size="40" id="poll_item9" name="poll_item9" itemname="항목9" value="" class="s-l" placeholder="9번 설문항목 입력">
	</td>
	</tr>
	<tr>
	<th colspan=2 style="padding:10px !important;">
		<button onclick="javascript:poll_submit();" style="background:#000; color:#fff; font-weight:bold; width:100%;padding:10px; border:1px solid #000; cursor:pointer;">
			<b>등록하기</b>
		</button>
	</th>
	</tr>
	</table>

	<script> 
		function poll_submit() {

			parent.document.fwrite.poll_subject.value = document.getElementById("poll_subject").value;
			parent.document.fwrite.poll_y.value = document.getElementById("poll_y").value;
			parent.document.fwrite.poll_m.value = document.getElementById("poll_m").value;
			parent.document.fwrite.poll_d.value = document.getElementById("poll_d").value;
			parent.document.fwrite.poll_h.value = document.getElementById("poll_h").value;
			parent.document.fwrite.poll_i.value = document.getElementById("poll_i").value;

			if(document.getElementById("poll_level").checked == true) {
				parent.document.fwrite.poll_level.value = '1';
			} else {
				parent.document.fwrite.poll_level.value = '';
			}

			if(document.getElementById("poll_location").checked == true) {
				parent.document.fwrite.poll_location.value = '1';
			} else {
				parent.document.fwrite.poll_location.value = '';
			}

			parent.document.fwrite.poll_point.value = document.getElementById("poll_point").value;
			parent.document.fwrite.poll_item1.value = document.getElementById("poll_item1").value;
			parent.document.fwrite.poll_item2.value = document.getElementById("poll_item2").value;
			parent.document.fwrite.poll_item3.value = document.getElementById("poll_item3").value;
			parent.document.fwrite.poll_item4.value = document.getElementById("poll_item4").value;
			parent.document.fwrite.poll_item5.value = document.getElementById("poll_item5").value;
			parent.document.fwrite.poll_item6.value = document.getElementById("poll_item6").value;
			parent.document.fwrite.poll_item7.value = document.getElementById("poll_item7").value;
			parent.document.fwrite.poll_item8.value = document.getElementById("poll_item8").value;
			parent.document.fwrite.poll_item9.value = document.getElementById("poll_item9").value;
			parent.document.fwrite.chk_poll.checked = true;
			parent.jQuery.fancybox.close();

	    }

		addLoadEvent(function() {
			initialize();
		});
	</script>

<?php } else if($action == 'icon' || $action == 'scon') { ?>
	<style>
		.page-header { padding:10px; margin:0px 0px 15px; background:#000; color:#fff; font-family:tahoma;}
		a { color:#333; margin:7px; text-align:center; width:30px; line-height:30px; display:inline-block; text-decoration:none;}
		a:hover { color:crimson; text-decoration:none; }
		.btn_del { letter-spacing:-1px; font-family:dotum; cursor:pointer; padding:4px 6px; background:red; font-weight:bold; color:#ffffff; border:0px; cursor:pointer; border-radius:0;-webkit-appearance:none;}
	</style>

	<section id="web-application">
	<h2 class="page-header">Web Application Icons</h2>
<a href="javascript:insert_icon('adjust');"><i class="fa fa-adjust fa-2x"></i></a>    
<a href="javascript:insert_icon('anchor');"><i class="fa fa-anchor fa-2x"></i></a>    
<a href="javascript:insert_icon('archive');"><i class="fa fa-archive fa-2x"></i></a>    
<a href="javascript:insert_icon('arrows');"><i class="fa fa-arrows fa-2x"></i></a>    
<a href="javascript:insert_icon('arrows-h');"><i class="fa fa-arrows-h fa-2x"></i></a>    
<a href="javascript:insert_icon('arrows-v');"><i class="fa fa-arrows-v fa-2x"></i></a>    
<a href="javascript:insert_icon('asterisk');"><i class="fa fa-asterisk fa-2x"></i></a>    
<a href="javascript:insert_icon('ban');"><i class="fa fa-ban fa-2x"></i></a>    
<a href="javascript:insert_icon('bar-chart-o');"><i class="fa fa-bar-chart-o fa-2x"></i></a>    
<a href="javascript:insert_icon('barcode');"><i class="fa fa-barcode fa-2x"></i></a>    
<a href="javascript:insert_icon('bars');"><i class="fa fa-bars fa-2x"></i></a>    
<a href="javascript:insert_icon('beer');"><i class="fa fa-beer fa-2x"></i></a>    
<a href="javascript:insert_icon('bell');"><i class="fa fa-bell fa-2x"></i></a>    
<a href="javascript:insert_icon('bell-o');"><i class="fa fa-bell-o fa-2x"></i></a>    
<a href="javascript:insert_icon('bolt');"><i class="fa fa-bolt fa-2x"></i></a>    
<a href="javascript:insert_icon('book');"><i class="fa fa-book fa-2x"></i></a>    
<a href="javascript:insert_icon('bookmark');"><i class="fa fa-bookmark fa-2x"></i></a>    
<a href="javascript:insert_icon('bookmark-o');"><i class="fa fa-bookmark-o fa-2x"></i></a>    
<a href="javascript:insert_icon('briefcase');"><i class="fa fa-briefcase fa-2x"></i></a>    
<a href="javascript:insert_icon('bug');"><i class="fa fa-bug fa-2x"></i></a>    
<a href="javascript:insert_icon('building-o');"><i class="fa fa-building-o fa-2x"></i></a>    
<a href="javascript:insert_icon('bullhorn');"><i class="fa fa-bullhorn fa-2x"></i></a>    
<a href="javascript:insert_icon('bullseye');"><i class="fa fa-bullseye fa-2x"></i></a>    
<a href="javascript:insert_icon('calendar');"><i class="fa fa-calendar fa-2x"></i></a>    
<a href="javascript:insert_icon('calendar-o');"><i class="fa fa-calendar-o fa-2x"></i></a>    
<a href="javascript:insert_icon('camera');"><i class="fa fa-camera fa-2x"></i></a>    
<a href="javascript:insert_icon('camera-retro');"><i class="fa fa-camera-retro fa-2x"></i></a>    
<a href="javascript:insert_icon('caret-square-o-down');"><i class="fa fa-caret-square-o-down fa-2x"></i></a>    
<a href="javascript:insert_icon('caret-square-o-left');"><i class="fa fa-caret-square-o-left fa-2x"></i></a>    
<a href="javascript:insert_icon('caret-square-o-right');"><i class="fa fa-caret-square-o-right fa-2x"></i></a>    
<a href="javascript:insert_icon('caret-square-o-up');"><i class="fa fa-caret-square-o-up fa-2x"></i></a>    
<a href="javascript:insert_icon('certificate');"><i class="fa fa-certificate fa-2x"></i></a>    
<a href="javascript:insert_icon('check');"><i class="fa fa-check fa-2x"></i></a>    
<a href="javascript:insert_icon('check-circle');"><i class="fa fa-check-circle fa-2x"></i></a>    
<a href="javascript:insert_icon('check-circle-o');"><i class="fa fa-check-circle-o fa-2x"></i></a>    
<a href="javascript:insert_icon('check-square');"><i class="fa fa-check-square fa-2x"></i></a>    
<a href="javascript:insert_icon('check-square-o');"><i class="fa fa-check-square-o fa-2x"></i></a>    
<a href="javascript:insert_icon('circle');"><i class="fa fa-circle fa-2x"></i></a>    
<a href="javascript:insert_icon('circle-o');"><i class="fa fa-circle-o fa-2x"></i></a>    
<a href="javascript:insert_icon('clock-o');"><i class="fa fa-clock-o fa-2x"></i></a>    
<a href="javascript:insert_icon('cloud');"><i class="fa fa-cloud fa-2x"></i></a>    
<a href="javascript:insert_icon('cloud-download');"><i class="fa fa-cloud-download fa-2x"></i></a>    
<a href="javascript:insert_icon('cloud-upload');"><i class="fa fa-cloud-upload fa-2x"></i></a>    
<a href="javascript:insert_icon('code');"><i class="fa fa-code fa-2x"></i></a>    
<a href="javascript:insert_icon('code-fork');"><i class="fa fa-code-fork fa-2x"></i></a>    
<a href="javascript:insert_icon('coffee');"><i class="fa fa-coffee fa-2x"></i></a>    
<a href="javascript:insert_icon('cog');"><i class="fa fa-cog fa-2x"></i></a>    
<a href="javascript:insert_icon('cogs');"><i class="fa fa-cogs fa-2x"></i></a>    
<a href="javascript:insert_icon('comment');"><i class="fa fa-comment fa-2x"></i></a>    
<a href="javascript:insert_icon('comment-o');"><i class="fa fa-comment-o fa-2x"></i></a>    
<a href="javascript:insert_icon('comments');"><i class="fa fa-comments fa-2x"></i></a>    
<a href="javascript:insert_icon('comments-o');"><i class="fa fa-comments-o fa-2x"></i></a>    
<a href="javascript:insert_icon('compass');"><i class="fa fa-compass fa-2x"></i></a>    
<a href="javascript:insert_icon('credit-card');"><i class="fa fa-credit-card fa-2x"></i></a>    
<a href="javascript:insert_icon('crop');"><i class="fa fa-crop fa-2x"></i></a>    
<a href="javascript:insert_icon('crosshairs');"><i class="fa fa-crosshairs fa-2x"></i></a>    
<a href="javascript:insert_icon('cutlery');"><i class="fa fa-cutlery fa-2x"></i></a>    
<a href="javascript:insert_icon('desktop');"><i class="fa fa-desktop fa-2x"></i></a>    
<a href="javascript:insert_icon('dot-circle-o');"><i class="fa fa-dot-circle-o fa-2x"></i></a>    
<a href="javascript:insert_icon('download');"><i class="fa fa-download fa-2x"></i></a>    
<a href="javascript:insert_icon('ellipsis-h');"><i class="fa fa-ellipsis-h fa-2x"></i></a>    
<a href="javascript:insert_icon('ellipsis-v');"><i class="fa fa-ellipsis-v fa-2x"></i></a>    
<a href="javascript:insert_icon('envelope');"><i class="fa fa-envelope fa-2x"></i></a>    
<a href="javascript:insert_icon('envelope-o');"><i class="fa fa-envelope-o fa-2x"></i></a>    
<a href="javascript:insert_icon('eraser');"><i class="fa fa-eraser fa-2x"></i></a>    
<a href="javascript:insert_icon('exchange');"><i class="fa fa-exchange fa-2x"></i></a>    
<a href="javascript:insert_icon('exclamation');"><i class="fa fa-exclamation fa-2x"></i></a>    
<a href="javascript:insert_icon('exclamation-circle');"><i class="fa fa-exclamation-circle fa-2x"></i></a>    
<a href="javascript:insert_icon('exclamation-triangle');"><i class="fa fa-exclamation-triangle fa-2x"></i></a>    
<a href="javascript:insert_icon('external-link');"><i class="fa fa-external-link fa-2x"></i></a>    
<a href="javascript:insert_icon('external-link-square');"><i class="fa fa-external-link-square fa-2x"></i></a>    
<a href="javascript:insert_icon('eye');"><i class="fa fa-eye fa-2x"></i></a>    
<a href="javascript:insert_icon('eye-slash');"><i class="fa fa-eye-slash fa-2x"></i></a>    
<a href="javascript:insert_icon('female');"><i class="fa fa-female fa-2x"></i></a>    
<a href="javascript:insert_icon('fighter-jet');"><i class="fa fa-fighter-jet fa-2x"></i></a>    
<a href="javascript:insert_icon('film');"><i class="fa fa-film fa-2x"></i></a>    
<a href="javascript:insert_icon('filter');"><i class="fa fa-filter fa-2x"></i></a>    
<a href="javascript:insert_icon('fire');"><i class="fa fa-fire fa-2x"></i></a>    
<a href="javascript:insert_icon('fire-extinguisher');"><i class="fa fa-fire-extinguisher fa-2x"></i></a>    
<a href="javascript:insert_icon('flag');"><i class="fa fa-flag fa-2x"></i></a>    
<a href="javascript:insert_icon('flag-checkered');"><i class="fa fa-flag-checkered fa-2x"></i></a>    
<a href="javascript:insert_icon('flag-o');"><i class="fa fa-flag-o fa-2x"></i></a>    
<a href="javascript:insert_icon('flask');"><i class="fa fa-flask fa-2x"></i></a>    
<a href="javascript:insert_icon('folder');"><i class="fa fa-folder fa-2x"></i></a>    
<a href="javascript:insert_icon('folder-o');"><i class="fa fa-folder-o fa-2x"></i></a>    
<a href="javascript:insert_icon('folder-open');"><i class="fa fa-folder-open fa-2x"></i></a>    
<a href="javascript:insert_icon('folder-open-o');"><i class="fa fa-folder-open-o fa-2x"></i></a>    
<a href="javascript:insert_icon('frown-o');"><i class="fa fa-frown-o fa-2x"></i></a>    
<a href="javascript:insert_icon('gamepad');"><i class="fa fa-gamepad fa-2x"></i></a>    
<a href="javascript:insert_icon('gavel');"><i class="fa fa-gavel fa-2x"></i></a>    
<a href="javascript:insert_icon('gift');"><i class="fa fa-gift fa-2x"></i></a>    
<a href="javascript:insert_icon('glass');"><i class="fa fa-glass fa-2x"></i></a>    
<a href="javascript:insert_icon('globe');"><i class="fa fa-globe fa-2x"></i></a>    
<a href="javascript:insert_icon('hdd-o');"><i class="fa fa-hdd-o fa-2x"></i></a>    
<a href="javascript:insert_icon('headphones');"><i class="fa fa-headphones fa-2x"></i></a>    
<a href="javascript:insert_icon('heart');"><i class="fa fa-heart fa-2x"></i></a>    
<a href="javascript:insert_icon('heart-o');"><i class="fa fa-heart-o fa-2x"></i></a>    
<a href="javascript:insert_icon('home');"><i class="fa fa-home fa-2x"></i></a>    
<a href="javascript:insert_icon('inbox');"><i class="fa fa-inbox fa-2x"></i></a>    
<a href="javascript:insert_icon('info');"><i class="fa fa-info fa-2x"></i></a>    
<a href="javascript:insert_icon('info-circle');"><i class="fa fa-info-circle fa-2x"></i></a>    
<a href="javascript:insert_icon('key');"><i class="fa fa-key fa-2x"></i></a>    
<a href="javascript:insert_icon('keyboard-o');"><i class="fa fa-keyboard-o fa-2x"></i></a>    
<a href="javascript:insert_icon('laptop');"><i class="fa fa-laptop fa-2x"></i></a>    
<a href="javascript:insert_icon('leaf');"><i class="fa fa-leaf fa-2x"></i></a>    
<a href="javascript:insert_icon('lemon-o');"><i class="fa fa-lemon-o fa-2x"></i></a>    
<a href="javascript:insert_icon('level-down');"><i class="fa fa-level-down fa-2x"></i></a>    
<a href="javascript:insert_icon('level-up');"><i class="fa fa-level-up fa-2x"></i></a>    
<a href="javascript:insert_icon('lightbulb-o');"><i class="fa fa-lightbulb-o fa-2x"></i></a>    
<a href="javascript:insert_icon('location-arrow');"><i class="fa fa-location-arrow fa-2x"></i></a>    
<a href="javascript:insert_icon('lock');"><i class="fa fa-lock fa-2x"></i></a>    
<a href="javascript:insert_icon('magic');"><i class="fa fa-magic fa-2x"></i></a>    
<a href="javascript:insert_icon('magnet');"><i class="fa fa-magnet fa-2x"></i></a>    
<a href="javascript:insert_icon('mail-reply-all');"><i class="fa fa-mail-reply-all fa-2x"></i></a>    
<a href="javascript:insert_icon('male');"><i class="fa fa-male fa-2x"></i></a>    
<a href="javascript:insert_icon('map-marker');"><i class="fa fa-map-marker fa-2x"></i></a>    
<a href="javascript:insert_icon('meh-o');"><i class="fa fa-meh-o fa-2x"></i></a>    
<a href="javascript:insert_icon('microphone');"><i class="fa fa-microphone fa-2x"></i></a>    
<a href="javascript:insert_icon('microphone-slash');"><i class="fa fa-microphone-slash fa-2x"></i></a>    
<a href="javascript:insert_icon('minus');"><i class="fa fa-minus fa-2x"></i></a>    
<a href="javascript:insert_icon('minus-circle');"><i class="fa fa-minus-circle fa-2x"></i></a>    
<a href="javascript:insert_icon('minus-square');"><i class="fa fa-minus-square fa-2x"></i></a>    
<a href="javascript:insert_icon('minus-square-o');"><i class="fa fa-minus-square-o fa-2x"></i></a>    
<a href="javascript:insert_icon('mobile');"><i class="fa fa-mobile fa-2x"></i></a>    
<a href="javascript:insert_icon('mobile');"><i class="fa fa-mobile-phone fa-2x"></i></a>    
<a href="javascript:insert_icon('money');"><i class="fa fa-money fa-2x"></i></a>    
<a href="javascript:insert_icon('moon-o');"><i class="fa fa-moon-o fa-2x"></i></a>    
<a href="javascript:insert_icon('music');"><i class="fa fa-music fa-2x"></i></a>    
<a href="javascript:insert_icon('pencil');"><i class="fa fa-pencil fa-2x"></i></a>    
<a href="javascript:insert_icon('pencil-square');"><i class="fa fa-pencil-square fa-2x"></i></a>    
<a href="javascript:insert_icon('pencil-square-o');"><i class="fa fa-pencil-square-o fa-2x"></i></a>    
<a href="javascript:insert_icon('phone');"><i class="fa fa-phone fa-2x"></i></a>    
<a href="javascript:insert_icon('phone-square');"><i class="fa fa-phone-square fa-2x"></i></a>    
<a href="javascript:insert_icon('picture-o');"><i class="fa fa-picture-o fa-2x"></i></a>    
<a href="javascript:insert_icon('plane');"><i class="fa fa-plane fa-2x"></i></a>    
<a href="javascript:insert_icon('plus');"><i class="fa fa-plus fa-2x"></i></a>    
<a href="javascript:insert_icon('plus-circle');"><i class="fa fa-plus-circle fa-2x"></i></a>    
<a href="javascript:insert_icon('plus-square');"><i class="fa fa-plus-square fa-2x"></i></a>    
<a href="javascript:insert_icon('plus-square-o');"><i class="fa fa-plus-square-o fa-2x"></i></a>    
<a href="javascript:insert_icon('power-off');"><i class="fa fa-power-off fa-2x"></i></a>    
<a href="javascript:insert_icon('print');"><i class="fa fa-print fa-2x"></i></a>    
<a href="javascript:insert_icon('puzzle-piece');"><i class="fa fa-puzzle-piece fa-2x"></i></a>    
<a href="javascript:insert_icon('qrcode');"><i class="fa fa-qrcode fa-2x"></i></a>    
<a href="javascript:insert_icon('question');"><i class="fa fa-question fa-2x"></i></a>    
<a href="javascript:insert_icon('question-circle');"><i class="fa fa-question-circle fa-2x"></i></a>    
<a href="javascript:insert_icon('quote-left');"><i class="fa fa-quote-left fa-2x"></i></a>    
<a href="javascript:insert_icon('quote-right');"><i class="fa fa-quote-right fa-2x"></i></a>    
<a href="javascript:insert_icon('random');"><i class="fa fa-random fa-2x"></i></a>    
<a href="javascript:insert_icon('refresh');"><i class="fa fa-refresh fa-2x"></i></a>    
<a href="javascript:insert_icon('reply');"><i class="fa fa-reply fa-2x"></i></a>    
<a href="javascript:insert_icon('reply-all');"><i class="fa fa-reply-all fa-2x"></i></a>    
<a href="javascript:insert_icon('retweet');"><i class="fa fa-retweet fa-2x"></i></a>    
<a href="javascript:insert_icon('road');"><i class="fa fa-road fa-2x"></i></a>    
<a href="javascript:insert_icon('rocket');"><i class="fa fa-rocket fa-2x"></i></a>    
<a href="javascript:insert_icon('rss');"><i class="fa fa-rss fa-2x"></i></a>    
<a href="javascript:insert_icon('rss-square');"><i class="fa fa-rss-square fa-2x"></i></a>    
<a href="javascript:insert_icon('search');"><i class="fa fa-search fa-2x"></i></a>    
<a href="javascript:insert_icon('search-minus');"><i class="fa fa-search-minus fa-2x"></i></a>    
<a href="javascript:insert_icon('search-plus');"><i class="fa fa-search-plus fa-2x"></i></a>    
<a href="javascript:insert_icon('share');"><i class="fa fa-share fa-2x"></i></a>    
<a href="javascript:insert_icon('share-square');"><i class="fa fa-share-square fa-2x"></i></a>    
<a href="javascript:insert_icon('share-square-o');"><i class="fa fa-share-square-o fa-2x"></i></a>    
<a href="javascript:insert_icon('shield');"><i class="fa fa-shield fa-2x"></i></a>    
<a href="javascript:insert_icon('shopping-cart');"><i class="fa fa-shopping-cart fa-2x"></i></a>    
<a href="javascript:insert_icon('sign-in');"><i class="fa fa-sign-in fa-2x"></i></a>    
<a href="javascript:insert_icon('sign-out');"><i class="fa fa-sign-out fa-2x"></i></a>    
<a href="javascript:insert_icon('signal');"><i class="fa fa-signal fa-2x"></i></a>    
<a href="javascript:insert_icon('sitemap');"><i class="fa fa-sitemap fa-2x"></i></a>    
<a href="javascript:insert_icon('smile-o');"><i class="fa fa-smile-o fa-2x"></i></a>    
<a href="javascript:insert_icon('sort');"><i class="fa fa-sort fa-2x"></i></a>    
<a href="javascript:insert_icon('sort-alpha-asc');"><i class="fa fa-sort-alpha-asc fa-2x"></i></a>    
<a href="javascript:insert_icon('sort-alpha-desc');"><i class="fa fa-sort-alpha-desc fa-2x"></i></a>    
<a href="javascript:insert_icon('sort-amount-asc');"><i class="fa fa-sort-amount-asc fa-2x"></i></a>    
<a href="javascript:insert_icon('sort-amount-desc');"><i class="fa fa-sort-amount-desc fa-2x"></i></a>    
<a href="javascript:insert_icon('sort-asc');"><i class="fa fa-sort-asc fa-2x"></i></a>    
<a href="javascript:insert_icon('sort-desc');"><i class="fa fa-sort-desc fa-2x"></i></a>    
<a href="javascript:insert_icon('sort-asc');"><i class="fa fa-sort-down fa-2x"></i></a>    
<a href="javascript:insert_icon('sort-numeric-asc');"><i class="fa fa-sort-numeric-asc fa-2x"></i></a>    
<a href="javascript:insert_icon('sort-numeric-desc');"><i class="fa fa-sort-numeric-desc fa-2x"></i></a>    
<a href="javascript:insert_icon('sort-desc');"><i class="fa fa-sort-up fa-2x"></i></a>    
<a href="javascript:insert_icon('spinner');"><i class="fa fa-spinner fa-2x"></i></a>    
<a href="javascript:insert_icon('square');"><i class="fa fa-square fa-2x"></i></a>    
<a href="javascript:insert_icon('square-o');"><i class="fa fa-square-o fa-2x"></i></a>    
<a href="javascript:insert_icon('star');"><i class="fa fa-star fa-2x"></i></a>    
<a href="javascript:insert_icon('star-half');"><i class="fa fa-star-half fa-2x"></i></a>    
<a href="javascript:insert_icon('star-half-o');"><i class="fa fa-star-half-empty fa-2x"></i></a>    
<a href="javascript:insert_icon('star-half-o');"><i class="fa fa-star-half-full fa-2x"></i></a>    
<a href="javascript:insert_icon('star-half-o');"><i class="fa fa-star-half-o fa-2x"></i></a>    
<a href="javascript:insert_icon('star-o');"><i class="fa fa-star-o fa-2x"></i></a>    
<a href="javascript:insert_icon('subscript');"><i class="fa fa-subscript fa-2x"></i></a>    
<a href="javascript:insert_icon('suitcase');"><i class="fa fa-suitcase fa-2x"></i></a>    
<a href="javascript:insert_icon('sun-o');"><i class="fa fa-sun-o fa-2x"></i></a>    
<a href="javascript:insert_icon('superscript');"><i class="fa fa-superscript fa-2x"></i></a>    
<a href="javascript:insert_icon('tablet');"><i class="fa fa-tablet fa-2x"></i></a>    
<a href="javascript:insert_icon('tachometer');"><i class="fa fa-tachometer fa-2x"></i></a>    
<a href="javascript:insert_icon('tag');"><i class="fa fa-tag fa-2x"></i></a>    
<a href="javascript:insert_icon('tags');"><i class="fa fa-tags fa-2x"></i></a>    
<a href="javascript:insert_icon('tasks');"><i class="fa fa-tasks fa-2x"></i></a>    
<a href="javascript:insert_icon('terminal');"><i class="fa fa-terminal fa-2x"></i></a>    
<a href="javascript:insert_icon('thumb-tack');"><i class="fa fa-thumb-tack fa-2x"></i></a>    
<a href="javascript:insert_icon('thumbs-down');"><i class="fa fa-thumbs-down fa-2x"></i></a>    
<a href="javascript:insert_icon('thumbs-o-down');"><i class="fa fa-thumbs-o-down fa-2x"></i></a>    
<a href="javascript:insert_icon('thumbs-o-up');"><i class="fa fa-thumbs-o-up fa-2x"></i></a>    
<a href="javascript:insert_icon('thumbs-up');"><i class="fa fa-thumbs-up fa-2x"></i></a>    
<a href="javascript:insert_icon('ticket');"><i class="fa fa-ticket fa-2x"></i></a>    
<a href="javascript:insert_icon('times');"><i class="fa fa-times fa-2x"></i></a>    
<a href="javascript:insert_icon('times-circle');"><i class="fa fa-times-circle fa-2x"></i></a>    
<a href="javascript:insert_icon('times-circle-o');"><i class="fa fa-times-circle-o fa-2x"></i></a>    
<a href="javascript:insert_icon('tint');"><i class="fa fa-tint fa-2x"></i></a>    
<a href="javascript:insert_icon('trash-o');"><i class="fa fa-trash-o fa-2x"></i></a>    
<a href="javascript:insert_icon('trophy');"><i class="fa fa-trophy fa-2x"></i></a>    
<a href="javascript:insert_icon('truck');"><i class="fa fa-truck fa-2x"></i></a>    
<a href="javascript:insert_icon('umbrella');"><i class="fa fa-umbrella fa-2x"></i></a>    
<a href="javascript:insert_icon('unlock');"><i class="fa fa-unlock fa-2x"></i></a>    
<a href="javascript:insert_icon('unlock-alt');"><i class="fa fa-unlock-alt fa-2x"></i></a>    
<a href="javascript:insert_icon('upload');"><i class="fa fa-upload fa-2x"></i></a>    
<a href="javascript:insert_icon('user');"><i class="fa fa-user fa-2x"></i></a>    
<a href="javascript:insert_icon('users');"><i class="fa fa-users fa-2x"></i></a>    
<a href="javascript:insert_icon('video-camera');"><i class="fa fa-video-camera fa-2x"></i></a>    
<a href="javascript:insert_icon('volume-down');"><i class="fa fa-volume-down fa-2x"></i></a>    
<a href="javascript:insert_icon('volume-off');"><i class="fa fa-volume-off fa-2x"></i></a>    
<a href="javascript:insert_icon('volume-up');"><i class="fa fa-volume-up fa-2x"></i></a>    
<a href="javascript:insert_icon('wheelchair');"><i class="fa fa-wheelchair fa-2x"></i></a>    
<a href="javascript:insert_icon('wrench');"><i class="fa fa-wrench fa-2x"></i></a>    
	</section>

	<section id="currency">
	<h2 class="page-header">Form Control Icons</h2>
<a href="javascript:insert_icon('check-square');"><i class="fa fa-check-square fa-2x"></i></a>    
<a href="javascript:insert_icon('check-square-o');"><i class="fa fa-check-square-o fa-2x"></i></a>
<a href="javascript:insert_icon('circle');"><i class="fa fa-circle fa-2x"></i></a>
<a href="javascript:insert_icon('circle-o');"><i class="fa fa-circle-o fa-2x"></i></a>
<a href="javascript:insert_icon('dot-circle-o');"><i class="fa fa-dot-circle-o fa-2x"></i></a>
<a href="javascript:insert_icon('minus-square');"><i class="fa fa-minus-square fa-2x"></i></a>
<a href="javascript:insert_icon('minus-square-o');"><i class="fa fa-minus-square-o fa-2x"></i></a>
<a href="javascript:insert_icon('plus-square');"><i class="fa fa-plus-square fa-2x"></i></a>
<a href="javascript:insert_icon('plus-square-o');"><i class="fa fa-plus-square-o fa-2x"></i></a>
<a href="javascript:insert_icon('square');"><i class="fa fa-square fa-2x"></i></a>
<a href="javascript:insert_icon('square-o');"><i class="fa fa-square-o fa-2x"></i></a>
	</section>

	<section id="currency">
	<h2 class="page-header">Currency Icons</h2>
<a href="javascript:insert_icon('btc');"><i class="fa fa-btc fa-2x"></i></a>
<a href="javascript:insert_icon('usd');"><i class="fa fa-dollar fa-2x"></i></a>
<a href="javascript:insert_icon('eur');"><i class="fa fa-eur fa-2x"></i></a>
<a href="javascript:insert_icon('gbp');"><i class="fa fa-gbp fa-2x"></i></a>
<a href="javascript:insert_icon('inr');"><i class="fa fa-inr fa-2x"></i></a>
<a href="javascript:insert_icon('jpy');"><i class="fa fa-jpy fa-2x"></i></a>
<a href="javascript:insert_icon('krw');"><i class="fa fa-krw fa-2x"></i></a>
<a href="javascript:insert_icon('money');"><i class="fa fa-money fa-2x"></i></a>
<a href="javascript:insert_icon('rub');"><i class="fa fa-rub fa-2x"></i></a>
<a href="javascript:insert_icon('inr');"><i class="fa fa-rupee fa-2x"></i></a>
<a href="javascript:insert_icon('try');"><i class="fa fa-try fa-2x"></i></a>
<a href="javascript:insert_icon('usd');"><i class="fa fa-usd fa-2x"></i></a>
	</section>

	<section id="text-editor">
	<h2 class="page-header">Text Editor Icons</h2>
<a href="javascript:insert_icon('align-center');"><i class="fa fa-align-center fa-2x"></i></a>
<a href="javascript:insert_icon('align-justify');"><i class="fa fa-align-justify fa-2x"></i></a>
<a href="javascript:insert_icon('align-left');"><i class="fa fa-align-left fa-2x"></i></a>
<a href="javascript:insert_icon('align-right');"><i class="fa fa-align-right fa-2x"></i></a>
<a href="javascript:insert_icon('bold');"><i class="fa fa-bold fa-2x"></i></a>
<a href="javascript:insert_icon('chain-broken');"><i class="fa fa-chain-broken fa-2x"></i></a>
<a href="javascript:insert_icon('clipboard');"><i class="fa fa-clipboard fa-2x"></i></a>
<a href="javascript:insert_icon('columns');"><i class="fa fa-columns fa-2x"></i></a>
<a href="javascript:insert_icon('eraser');"><i class="fa fa-eraser fa-2x"></i></a>
<a href="javascript:insert_icon('file');"><i class="fa fa-file fa-2x"></i></a>
<a href="javascript:insert_icon('file-o');"><i class="fa fa-file-o fa-2x"></i></a>
<a href="javascript:insert_icon('file-text');"><i class="fa fa-file-text fa-2x"></i></a>
<a href="javascript:insert_icon('file-text-o');"><i class="fa fa-file-text-o fa-2x"></i></a>
<a href="javascript:insert_icon('files-o');"><i class="fa fa-files-o fa-2x"></i></a>
<a href="javascript:insert_icon('floppy-o');"><i class="fa fa-floppy-o fa-2x"></i></a>
<a href="javascript:insert_icon('font');"><i class="fa fa-font fa-2x"></i></a>
<a href="javascript:insert_icon('indent');"><i class="fa fa-indent fa-2x"></i></a>
<a href="javascript:insert_icon('italic');"><i class="fa fa-italic fa-2x"></i></a>
<a href="javascript:insert_icon('link');"><i class="fa fa-link fa-2x"></i></a>
<a href="javascript:insert_icon('list');"><i class="fa fa-list fa-2x"></i></a>
<a href="javascript:insert_icon('list-alt');"><i class="fa fa-list-alt fa-2x"></i></a>
<a href="javascript:insert_icon('list-ol');"><i class="fa fa-list-ol fa-2x"></i></a>
<a href="javascript:insert_icon('list-ul');"><i class="fa fa-list-ul fa-2x"></i></a>
<a href="javascript:insert_icon('outdent');"><i class="fa fa-outdent fa-2x"></i></a>
<a href="javascript:insert_icon('paperclip');"><i class="fa fa-paperclip fa-2x"></i></a>
<a href="javascript:insert_icon('repeat');"><i class="fa fa-repeat fa-2x"></i></a>
<a href="javascript:insert_icon('scissors');"><i class="fa fa-scissors fa-2x"></i></a>
<a href="javascript:insert_icon('strikethrough');"><i class="fa fa-strikethrough fa-2x"></i></a>
<a href="javascript:insert_icon('table');"><i class="fa fa-table fa-2x"></i></a>
<a href="javascript:insert_icon('text-height');"><i class="fa fa-text-height fa-2x"></i></a>
<a href="javascript:insert_icon('text-width');"><i class="fa fa-text-width fa-2x"></i></a>
<a href="javascript:insert_icon('th');"><i class="fa fa-th fa-2x"></i></a>
<a href="javascript:insert_icon('th-large');"><i class="fa fa-th-large fa-2x"></i></a>
<a href="javascript:insert_icon('th-list');"><i class="fa fa-th-list fa-2x"></i></a>
<a href="javascript:insert_icon('underline');"><i class="fa fa-underline fa-2x"></i></a>
<a href="javascript:insert_icon('undo');"><i class="fa fa-undo fa-2x"></i></a>
	</section>

	<section id="directional">
	<h2 class="page-header">Directional Icons</h2>
<a href="javascript:insert_icon('angle-double-down');"><i class="fa fa-angle-double-down fa-2x"></i></a>
<a href="javascript:insert_icon('angle-double-left');"><i class="fa fa-angle-double-left fa-2x"></i></a>
<a href="javascript:insert_icon('angle-double-right');"><i class="fa fa-angle-double-right fa-2x"></i></a>
<a href="javascript:insert_icon('angle-double-up');"><i class="fa fa-angle-double-up fa-2x"></i></a>
<a href="javascript:insert_icon('angle-down');"><i class="fa fa-angle-down fa-2x"></i></a>
<a href="javascript:insert_icon('angle-left');"><i class="fa fa-angle-left fa-2x"></i></a>
<a href="javascript:insert_icon('angle-right');"><i class="fa fa-angle-right fa-2x"></i></a>
<a href="javascript:insert_icon('angle-up');"><i class="fa fa-angle-up fa-2x"></i></a>
<a href="javascript:insert_icon('arrow-circle-down');"><i class="fa fa-arrow-circle-down fa-2x"></i></a>
<a href="javascript:insert_icon('arrow-circle-left');"><i class="fa fa-arrow-circle-left fa-2x"></i></a>
<a href="javascript:insert_icon('arrow-circle-o-down');"><i class="fa fa-arrow-circle-o-down fa-2x"></i></a>
<a href="javascript:insert_icon('arrow-circle-o-left');"><i class="fa fa-arrow-circle-o-left fa-2x"></i></a>
<a href="javascript:insert_icon('arrow-circle-o-right');"><i class="fa fa-arrow-circle-o-right fa-2x"></i></a>
<a href="javascript:insert_icon('arrow-circle-o-up');"><i class="fa fa-arrow-circle-o-up fa-2x"></i></a>
<a href="javascript:insert_icon('arrow-circle-right');"><i class="fa fa-arrow-circle-right fa-2x"></i></a>
<a href="javascript:insert_icon('arrow-circle-up');"><i class="fa fa-arrow-circle-up fa-2x"></i></a>
<a href="javascript:insert_icon('arrow-down');"><i class="fa fa-arrow-down fa-2x"></i></a>
<a href="javascript:insert_icon('arrow-left');"><i class="fa fa-arrow-left fa-2x"></i></a>
<a href="javascript:insert_icon('arrow-right');"><i class="fa fa-arrow-right fa-2x"></i></a>
<a href="javascript:insert_icon('arrow-up');"><i class="fa fa-arrow-up fa-2x"></i></a>
<a href="javascript:insert_icon('arrows');"><i class="fa fa-arrows fa-2x"></i></a>
<a href="javascript:insert_icon('arrows-alt');"><i class="fa fa-arrows-alt fa-2x"></i></a>
<a href="javascript:insert_icon('arrows-h');"><i class="fa fa-arrows-h fa-2x"></i></a>
<a href="javascript:insert_icon('arrows-v');"><i class="fa fa-arrows-v fa-2x"></i></a>
<a href="javascript:insert_icon('caret-down');"><i class="fa fa-caret-down fa-2x"></i></a>
<a href="javascript:insert_icon('caret-left');"><i class="fa fa-caret-left fa-2x"></i></a>
<a href="javascript:insert_icon('caret-right');"><i class="fa fa-caret-right fa-2x"></i></a>
<a href="javascript:insert_icon('caret-square-o-down');"><i class="fa fa-caret-square-o-down fa-2x"></i></a>
<a href="javascript:insert_icon('caret-square-o-left');"><i class="fa fa-caret-square-o-left fa-2x"></i></a>
<a href="javascript:insert_icon('caret-square-o-right');"><i class="fa fa-caret-square-o-right fa-2x"></i></a>
<a href="javascript:insert_icon('caret-square-o-up');"><i class="fa fa-caret-square-o-up fa-2x"></i></a>
<a href="javascript:insert_icon('caret-up');"><i class="fa fa-caret-up fa-2x"></i></a>
<a href="javascript:insert_icon('chevron-circle-down');"><i class="fa fa-chevron-circle-down fa-2x"></i></a>
<a href="javascript:insert_icon('chevron-circle-left');"><i class="fa fa-chevron-circle-left fa-2x"></i></a>
<a href="javascript:insert_icon('chevron-circle-right');"><i class="fa fa-chevron-circle-right fa-2x"></i></a>
<a href="javascript:insert_icon('chevron-circle-up');"><i class="fa fa-chevron-circle-up fa-2x"></i></a>
<a href="javascript:insert_icon('chevron-down');"><i class="fa fa-chevron-down fa-2x"></i></a>
<a href="javascript:insert_icon('chevron-left');"><i class="fa fa-chevron-left fa-2x"></i></a>
<a href="javascript:insert_icon('chevron-right');"><i class="fa fa-chevron-right fa-2x"></i></a>
<a href="javascript:insert_icon('chevron-up');"><i class="fa fa-chevron-up fa-2x"></i></a>
<a href="javascript:insert_icon('hand-o-down');"><i class="fa fa-hand-o-down fa-2x"></i></a>
<a href="javascript:insert_icon('hand-o-left');"><i class="fa fa-hand-o-left fa-2x"></i></a>
<a href="javascript:insert_icon('hand-o-right');"><i class="fa fa-hand-o-right fa-2x"></i></a>
<a href="javascript:insert_icon('hand-o-up');"><i class="fa fa-hand-o-up fa-2x"></i></a>
<a href="javascript:insert_icon('long-arrow-down');"><i class="fa fa-long-arrow-down fa-2x"></i></a>
<a href="javascript:insert_icon('long-arrow-left');"><i class="fa fa-long-arrow-left fa-2x"></i></a>
<a href="javascript:insert_icon('long-arrow-right');"><i class="fa fa-long-arrow-right fa-2x"></i></a>
<a href="javascript:insert_icon('long-arrow-up');"><i class="fa fa-long-arrow-up fa-2x"></i></a>
	</section>

	<section id="video-player">
	<h2 class="page-header">Video Player Icons</h2>
<a href="javascript:insert_icon('arrows-alt');"><i class="fa fa-arrows-alt fa-2x"></i></a>
<a href="javascript:insert_icon('backward');"><i class="fa fa-backward fa-2x"></i></a>
<a href="javascript:insert_icon('compress');"><i class="fa fa-compress fa-2x"></i></a>
<a href="javascript:insert_icon('eject');"><i class="fa fa-eject fa-2x"></i></a>
<a href="javascript:insert_icon('expand');"><i class="fa fa-expand fa-2x"></i></a>
<a href="javascript:insert_icon('fast-backward');"><i class="fa fa-fast-backward fa-2x"></i></a>
<a href="javascript:insert_icon('fast-forward');"><i class="fa fa-fast-forward fa-2x"></i></a>
<a href="javascript:insert_icon('forward');"><i class="fa fa-forward fa-2x"></i></a>
<a href="javascript:insert_icon('pause');"><i class="fa fa-pause fa-2x"></i></a>
<a href="javascript:insert_icon('play');"><i class="fa fa-play fa-2x"></i></a>
<a href="javascript:insert_icon('play-circle');"><i class="fa fa-play-circle fa-2x"></i></a>
<a href="javascript:insert_icon('play-circle-o');"><i class="fa fa-play-circle-o fa-2x"></i></a>
<a href="javascript:insert_icon('step-backward');"><i class="fa fa-step-backward fa-2x"></i></a>
<a href="javascript:insert_icon('step-forward');"><i class="fa fa-step-forward fa-2x"></i></a>
<a href="javascript:insert_icon('stop');"><i class="fa fa-stop fa-2x"></i></a>
<a href="javascript:insert_icon('youtube-play');"><i class="fa fa-youtube-play fa-2x"></i></a>
	</section>

	<section id="brand">
	<h2 class="page-header">Brand Icons</h2>
<a href="javascript:insert_icon('adn');"><i class="fa fa-adn fa-2x"></i></a>
<a href="javascript:insert_icon('android');"><i class="fa fa-android fa-2x"></i></a>
<a href="javascript:insert_icon('apple');"><i class="fa fa-apple fa-2x"></i></a>
<a href="javascript:insert_icon('bitbucket');"><i class="fa fa-bitbucket fa-2x"></i></a>
<a href="javascript:insert_icon('bitbucket-square');"><i class="fa fa-bitbucket-square fa-2x"></i></a>
<a href="javascript:insert_icon('btc');"><i class="fa fa-bitcoin fa-2x"></i></a>
<a href="javascript:insert_icon('btc');"><i class="fa fa-btc fa-2x"></i></a>
<a href="javascript:insert_icon('css3');"><i class="fa fa-css3 fa-2x"></i></a>
<a href="javascript:insert_icon('dribbble');"><i class="fa fa-dribbble fa-2x"></i></a>
<a href="javascript:insert_icon('dropbox');"><i class="fa fa-dropbox fa-2x"></i></a>
<a href="javascript:insert_icon('facebook');"><i class="fa fa-facebook fa-2x"></i></a>
<a href="javascript:insert_icon('facebook-square');"><i class="fa fa-facebook-square fa-2x"></i></a>
<a href="javascript:insert_icon('flickr');"><i class="fa fa-flickr fa-2x"></i></a>
<a href="javascript:insert_icon('foursquare');"><i class="fa fa-foursquare fa-2x"></i></a>
<a href="javascript:insert_icon('github');"><i class="fa fa-github fa-2x"></i></a>
<a href="javascript:insert_icon('github-alt');"><i class="fa fa-github-alt fa-2x"></i></a>
<a href="javascript:insert_icon('github-square');"><i class="fa fa-github-square fa-2x"></i></a>
<a href="javascript:insert_icon('gittip');"><i class="fa fa-gittip fa-2x"></i></a>
<a href="javascript:insert_icon('google-plus');"><i class="fa fa-google-plus fa-2x"></i></a>
<a href="javascript:insert_icon('google-plus-square');"><i class="fa fa-google-plus-square fa-2x"></i></a>
<a href="javascript:insert_icon('html5');"><i class="fa fa-html5 fa-2x"></i></a>
<a href="javascript:insert_icon('instagram');"><i class="fa fa-instagram fa-2x"></i></a>
<a href="javascript:insert_icon('linkedin');"><i class="fa fa-linkedin fa-2x"></i></a>
<a href="javascript:insert_icon('linkedin-square');"><i class="fa fa-linkedin-square fa-2x"></i></a>
<a href="javascript:insert_icon('linux');"><i class="fa fa-linux fa-2x"></i></a>
<a href="javascript:insert_icon('maxcdn');"><i class="fa fa-maxcdn fa-2x"></i></a>
<a href="javascript:insert_icon('pagelines');"><i class="fa fa-pagelines fa-2x"></i></a>
<a href="javascript:insert_icon('pinterest');"><i class="fa fa-pinterest fa-2x"></i></a>
<a href="javascript:insert_icon('pinterest-square');"><i class="fa fa-pinterest-square fa-2x"></i></a>
<a href="javascript:insert_icon('renren');"><i class="fa fa-renren fa-2x"></i></a>
<a href="javascript:insert_icon('skype');"><i class="fa fa-skype fa-2x"></i></a>
<a href="javascript:insert_icon('stack-exchange');"><i class="fa fa-stack-exchange fa-2x"></i></a>
<a href="javascript:insert_icon('stack-overflow');"><i class="fa fa-stack-overflow fa-2x"></i></a>
<a href="javascript:insert_icon('trello');"><i class="fa fa-trello fa-2x"></i></a>
<a href="javascript:insert_icon('tumblr');"><i class="fa fa-tumblr fa-2x"></i></a>
<a href="javascript:insert_icon('tumblr-square');"><i class="fa fa-tumblr-square fa-2x"></i></a>
<a href="javascript:insert_icon('twitter');"><i class="fa fa-twitter fa-2x"></i></a>
<a href="javascript:insert_icon('twitter-square');"><i class="fa fa-twitter-square fa-2x"></i></a>
<a href="javascript:insert_icon('vimeo-square');"><i class="fa fa-vimeo-square fa-2x"></i></a>
<a href="javascript:insert_icon('vk');');"><i class="fa fa-vk fa-2x"></i></a>
<a href="javascript:insert_icon('weibo');');"><i class="fa fa-weibo fa-2x"></i></a>
<a href="javascript:insert_icon('windows');');"><i class="fa fa-windows fa-2x"></i></a>
<a href="javascript:insert_icon('xing');');"><i class="fa fa-xing fa-2x"></i></a>
<a href="javascript:insert_icon('xing-square');');"><i class="fa fa-xing-square fa-2x"></i></a>
<a href="javascript:insert_icon('youtube');');"><i class="fa fa-youtube fa-2x"></i></a>
<a href="javascript:insert_icon('youtube-play');');"><i class="fa fa-youtube-play fa-2x"></i></a>
<a href="javascript:insert_icon('youtube-square');');"><i class="fa fa-youtube-square fa-2x"></i></a>
	</section>

	<section id="medical">
	<h2 class="page-header">Medical Icons</h2>
<a href="javascript:insert_icon('ambulance');');"><i class="fa fa-ambulance fa-2x"></i></a>
<a href="javascript:insert_icon('h-square');');"><i class="fa fa-h-square fa-2x"></i></a>
<a href="javascript:insert_icon('hospital-o');');"><i class="fa fa-hospital-o fa-2x"></i></a>
<a href="javascript:insert_icon('medkit');');"><i class="fa fa-medkit fa-2x"></i></a>
<a href="javascript:insert_icon('plus-square');');"><i class="fa fa-plus-square fa-2x"></i></a>
<a href="javascript:insert_icon('stethoscope');');"><i class="fa fa-stethoscope fa-2x"></i></a>
<a href="javascript:insert_icon('user-md');');"><i class="fa fa-user-md fa-2x"></i></a>
<a href="javascript:insert_icon('wheelchair');');"><i class="fa fa-wheelchair fa-2x"></i></a>
	</section>

	<?php if($action == 'scon') { ?>
		<button onclick="javascript:delete_icon('','del');" style="background:#000; color:#fff; font-weight:bold; width:100%;padding:10px; border:1px solid #000; cursor:pointer; font-size:12px; ">
			<i class="fa fa-times fa-lg"></i> 등록아이콘 삭제
		</button>
	<?php } ?>

	<?php
		// 모바일에서는 DHTML 에디터 사용불가
		$is_dhtml_editor = (!G5_IS_MOBILE && $board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level']) ? true : false;

		//DHTML Editor Type
		$dhtml_editor = '';
		if($is_dhtml_editor) {
			if($amina['editor'] == 1) {
				$dhtml_editor = "SEditor2"; //NHN SmartEditor2
			} else if($amina['editor'] == 2) {
				$dhtml_editor = "DEditor"; //Daum Editor
			} else {
				if(AMINA) {
					$dhtml_editor = $config['cf_editor'] ? $config['cf_editor'] : 'ckeditor4';
				} else {
					$dhtml_editor = 'cheditor';
				}
			}
		}
	?>
	<script> 
		var editor_type = "<?php echo $dhtml_editor; ?>"; // 에디터 종류
		var icon_type = "<?php echo $type;?>";

		function icon_editor(html) {
			if(editor_type == 'SEditor2') {
				parent.oEditors.getById["wr_content"].exec("PASTE_HTML", [html]);
			} else if(editor_type == 'DEditor') {
				parent.pasteImage(html);
			} else if(editor_type == 'cheditor' || editor_type == 'cheditor5') {
				parent.ed_wr_content.insertContents(html);
			} else if(editor_type == 'ckeditor4') {
				var editor = parent.CKEDITOR.instances.wr_content;
				if (editor.mode == 'wysiwyg')	{
					editor.insertHtml(html);
				} else {
					alert( 'WYSIWYG 모드에서만 가능합니다.' );
				}
			}
		}

		function delete_icon(icon){
			parent.document.fwrite.subj_icon.value = icon;
			parent.document.getElementById('btn_subj_icon').innerHTML = '<i class="fa fa-info-circle fa-lg"></i>';
			parent.jQuery.fancybox.close();
		}

		function insert_icon(icon){
			<?php if($action == 'scon') { ?>
				parent.document.getElementById('btn_subj_icon').innerHTML = '<i class="fa fa-'+icon+' fa-lg"></i>';
			<?php } else { ?>
				var html = "{아이콘:" + icon + "}";
				if(icon_type == "cmt" || editor_type == "") {
					parent.document.getElementById("wr_content").value += html;
				} else {
					icon_editor(html);
				}
			<?php } ?>
			parent.jQuery.fancybox.close();
		}
	</script>
<?php } ?>

<?php include_once(G5_PATH.'/tail.sub.php'); ?>
