<!-- Begin
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; 
	document.MM_sr=new Array; 
	for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null) {
		  document.MM_sr[j++]=x; 
		  if(!x.oSrc) x.oSrc=x.src; 
		  x.src=a[i+2];
	 }
}

function LogCheck() {
	var FormName=document.LogForm;
	if(FormName.u_id.value=='') {
		alert('¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù..');
		FormName.u_id.focus();
		return false;
	}
	if(FormName.u_pass.value=='') {
		alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù..');
		FormName.u_pass.focus();
		return false;
	}
	//act_ok=1;
  if(FormName.ssl_con.checked==true) 
    FormName.action="https://www.comic19.com/member/loginProcessing.php";
  else 
    FormName.action="http://www.comic19.com/member/loginProcessing.php";
  
  return true;
}

// ÅÇ ¸Þ´º Ç¥½Ã
function ff_show(divnum, obj, len) {
	for (i=0; i<len; i++) { 
		//alert("document."+obj+"_"+i+".style");
		if(document.layers) menu=eval("document."+obj+"_"+i+".style");
		if(document.all) menu=eval("document.all."+obj+"_"+i+".style");
		if(document.getElementById) menu=eval("document.getElementById('"+obj+"_"+i+"').style");
		 
		if (divnum==i) {
			if (menu.display=="block") 	return;
			else menu.display="block"; 
		} else menu.display="none";
	}
}

// ÅÇ ¸Þ´º Ç¥½Ã style2
function ff_show2(divnum, obj1, obj2, len) {
	for (i=0; i<len; i++) { 
		//alert("document."+obj+"_"+i+".style");
		if(document.layers) menu1=eval("document."+obj1+"_"+i+".style");
		if(document.all) menu1=eval("document.all."+obj1+"_"+i+".style");
		if(document.getElementById) menu1=eval("document.getElementById('"+obj1+"_"+i+"').style");

		if(document.layers) menu2=eval("document."+obj2+"_"+i+".style");
		if(document.all) menu2=eval("document.all."+obj2+"_"+i+".style");
		if(document.getElementById) menu2=eval("document.getElementById('"+obj2+"_"+i+"').style");
     
		if (divnum==i) {
			if (menu1.display=="block") 	return;
			else menu1.display="block"; 
		} else menu1.display="none";

		if (divnum==i) {
			if (menu2.display=="block") 	return;
			else menu2.display="block"; 
		} else menu2.display="none";
	}
}

function check_byte(content, target)
{
		var i = 0;
		var cnt = 0;
		var ch = '';
		var cont = document.getElementById(content).value;

		for (i=0; i<cont.length; i++) {
				ch = cont.charAt(i);
				if (escape(ch).length > 4) {
						cnt += 2;
				} else {
						cnt += 1;
				}
		}
		// ¼ýÀÚ¸¦ Ãâ·Â
		document.getElementById(target).innerHTML = cnt;

		return cnt;
}

function flash_write(Url,Width,Height,trans){                 
  document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + Width + "\" height=\"" + Height + "\">"); 
  document.writeln("<param name=\"movie\" value=\"" + Url + "\">"); 
	document.writeln('<param name="menu" value="false" />');
  document.writeln("<param name=\"quality\" value=\"high\" />");     
  if(trans!=0) 
		document.writeln("<param name=\"wmode\" value=\"transparent\">"); 
	document.writeln('<param name="salign" value="tl" />');
	document.writeln("<embed src=\"" + Url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" menu=\"false\" quality=\"high\" salign=\"tl\" scale=\"noscale\" width=\"" + Width + "\"  height=\"" + Height + "\">"); 
  document.writeln("</object>");     
} 

// ¸¸È­ ºä¾î¿ë ½ºÅ©¸³Æ® 
function fullview(code,vol,data_size) {
	if(typeof document.vmode_check!="undefined") {
		for(i=0; i < document.vmode_check.vmode.length;i++) { //¶óµð¿À ¹öÆ° °¹¼ö¸¸Å­ ·çÆ®·Î µ¹¸².
			if(document.vmode_check.vmode[i].checked==true){ 
				mode=document.vmode_check.vmode[i].value;	  
			}        
		}
	} else { mode=0; }
	if(mode==0) {
		if(screen.width<1152 || screen.height<864) {
			mode=1;
		} else {
			if(data_size>3) {
				mode=2;
			} else {
				mode=1;
			}
		}
	}	
	width=screen.width;
	height=screen.height;

	var path='/viewer/viewer.php?code='+code+'&vol='+vol+'&mode='+mode;
	if(typeof sess_id!="undefined") { 
		path=path+'&sess='+sess_id;
	}
	window.open(path, 'CViewer', 'width='+width+',height='+height+',top=0,left=0,scrollbars=no,resizable=yes,status=no');
}

// ¸¸È­ ¸Àº¸±â ºä¾î¿ë ½ºÅ©¸³Æ® 
function preview(code,vol,data_size) {
	var path='/viewer/pviewer.php?code='+code+'&vol='+vol;
	if(typeof sess_id!="undefined") { 
		path=path+'&sess='+sess_id;
	}
	width=screen.width;
	height=screen.height;
	window.open(path, 'CViewer', 'width='+width+',height='+height+',top=0,left=0,scrollbars=no,resizable=yes,status=no');
}
function sample_view(code) {
	var path='/comics/sample_viewer.php?tcode='+code;
	if(typeof sess_id!="undefined") { 
		path=path+'&sess='+sess_id;
	}
	width=902;
	height=650;
	window.open(path, 'SViewer', 'width='+width+',height='+height+',top=0,left=0,scrollbars=no,resizable=yes,status=no');
}

// µ¿¿µ»ó ºä¾î
function movie_view(item,def) {
	var path='/viewer/moviePlayer.php?item='+item+'&def='+def;
	if(typeof sess_id!="undefined") { 
		path=path+'&sess='+sess_id;
	}
	width=600;
	height=700;	
	window.open(path, 'MViewer', 'width='+width+',height='+height+',top=0,left=0,scrollbars=no,resizable=yes,status=no');
}

// ÀÌºÏ ºä¾î¿ë ½ºÅ©¸³Æ® 
function ebook_view(code,vol,ptype) {
	width=1016;
	height=742;

	var path='/viewer/ebookViewer.php?code='+code+'&vol='+vol+'&p_style='+ptype;
	if(typeof sess_id!="undefined") { 
		path=path+'&sess='+sess_id;
	}
	window.open(path, 'EViewer', 'width='+width+',height='+height+',top=0,left=0,scrollbars=no,resizable=yes,status=no');
}

function pay_view(val, rvalue) {
	var path='/member/popBill.php?div='+val+'&rvalue='+rvalue+'&vcp=1';
	if(typeof sess_id!="undefined") { 
		path=path+'&sess='+sess_id;
	}
	width=460;
	height=600;
	window.open(path, 'CViewer', 'width='+width+',height='+height+',top=0,left=0,scrollbars=no,resizable=yes,status=no');
}

function win_opener(url, name, option)
{
	var popup = window.open(url, name, option);
	popup.focus();
}

function MainReload()	{
	if(typeof top.mainCFrame!='undefined') {
		top.MainFrame.location.reload();
	} else {
		top.location.reload();
	}
}

function setCookie( name, value, expiredays ) { 
	var todayDate = new Date(); 
	todayDate.setDate( todayDate.getDate() + expiredays ); 
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" ;
} 
//  End -->