function set_author_other(id,name){
	tmp_author_1.value = name;
	tmp_author_2.value = id;
	tmp_author_1 = "";
	tmp_author_2 = "";
}
function find_author(obj1,obj2){
	tmp_author_1 = obj1;
	tmp_author_2 = obj2;
	window.open("/pop/find_author_pop.asp","find_author_pop","width=300px,height=300px, scrollbars=yes");
}

function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="/img") document.body.focus();
}
document.onfocusin=bluring;

function NewWindowOpen(uri,width,height,top,left) {
	if( uri != "")
		window.open(uri,"","scrollbars=no, menubar=no, statusbar=no, width="+width+", height="+height+", top="+top+", left="+left+"" );
}

function NewWindowOpen2(uri,width,height,top,left) {
	if( uri != "")
		window.open(uri,"","scrollbars=yes, menubar=no, statusbar=no, width="+width+", height="+height+", top="+top+", left="+left+"" );
}

function goUrl(url) {
opener.location.href=url;
self.close();
}

function memo_send() {
	window.open('/pop/memo.asp','memos','width=400 ,height=500, top=200, left=200, scrollbars=yes')
}

function memo_view(idx) {
	window.open('/pop/memoView.asp?idx='+idx,'memov','width=400 ,height=500, top=200, left=200, scrollbars=yes')
}

function memo_list() {
	window.open('/pop/memoList.asp','memov','width=400 ,height=500, top=200, left=200, scrollbars=yes')
}

function profile_view(member_id) {
	window.open('/pop/profile.asp?member_id='+member_id,'','width=700 ,height=500, top=200, left=200, scrollbars=yes')
}

function mnews_view(member_id) {
	window.open('/pop/news.asp?member_id='+member_id,'','width=570 ,height=500, top=200, left=200, scrollbars=yes')
}

function memo_send2(member_id) {
	window.open('/pop/memo.asp?receiver='+member_id,'memos','width=400 ,height=500, top=200, left=200, scrollbars=yes')
}

function gotofav_blog(val) {
	if ( val != "") {
	top.location.href='http://blog.scenariomarket.or.kr/'+val;
	}
}

function opener_gotofav_blog(val) {
	if ( val != "") {
	window.open('http://blog.scenariomarket.or.kr/'+val,'');
	//opener.top.location.href='http://blog.scenariomarket.or.kr/'+val;
	self.close();
	}
}

function executeHidden(strURL){
	var oIFRAME=document.createElement("<IFRAME style='display:none'></IFRAME>");
	document.body.appendChild(oIFRAME);
	oIFRAME.src=strURL;
}

function filedn(fileurl,filename) {
	//executeHidden('/pop/downfile.asp?fileurl='+fileurl);
	location.href='/pop/downfile.asp?fileurl='+fileurl+'&filename='+filename;
}

function null_func() {
	return;
}

function setCookie(name, value, expires){
	document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString() +  "; path=";
}

function getCookie(name){
	var search;
	search = name + "="
	var offset = document.cookie.indexOf(search)

	if (offset != -1){
		offset += search.length ;
		var end = document.cookie.indexOf(";", offset) ;

		if(end == -1)
			end = document.cookie.length;

		return unescape(document.cookie.substring(offset, end));
	}else
		return "";
}

function deleteCookie(name){
	var exp = new Date();
	exp.setTime(exp.getTime() - 1);
	setCookie(name, "", exp);
}

function swf(src,w,h){
	html = '';
	html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
    html += '<param name="quality" value="high">';
	html += '<param name="wmode" value="transparent">';
	html += '<embed src="'+src+'" quality="high" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object>';
	document.write(html);
}


function swf2(src,w,h){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="param" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="swliveconnect" value="true">';
	html += '<embed src="'+src+'" quality=high width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	document.write(html);
}