

function CheckForm()
{ 
	if (Search.word.value=="")	{
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
		Search.word.focus();
		return false;
	}	
	document.Search.submit();
	return ;
}

function CheckMemo()
{ 
	if (Memo.comment_name.value=="")	{
		alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
		Memo.comment_name.focus();
		return false;
	}	
	if (Memo.comment_pass.value=="")	{
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
		Memo.comment_pass.focus();
		return false;
	}
	if (!Memo.comment_contents.value)	{
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
		Memo.comment_contents.focus();
		return false;
	}	
	
	
	document.Search.submit();
	return ;
}

function ClearField(field){
	if (field.value == field.defaultValue) {
		field.value = "";
	}
}

function FillField(field){
	if (!field.value) {
		field.value = field.defaultValue;
	}
}

function photoWindow(ref, width, height, toolbar, menubar, statusbar, scrollbar, resizable) {
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';

	window.open(ref, 'View','left=0,top=0, width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

var chk;
chk=false;

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function CheckAll1()
{

	if (!chk){
		for (i=0;i<document.list1.length;i++){
			if(document.list1[i].type=='checkbox'){
				document.list1[i].checked=true;
			}
		}
		chk=true;
	}else{
		for (i=0;i<document.list1.length;i++){
			if(document.list1[i].type=='checkbox'){
				document.list1[i].checked=false;
			}
		}
		chk=false;
	}
}

function listen_all1() {

	var i, chked=0;

	for(i=0;i<document.list1.length;i++){
		if(document.list1[i].type=='checkbox'){
			if(document.list1[i].checked) chked=1;
   		}
	}

	if(chked){
		document.list1.selected.value='';
		document.list1.exec.value='listen_all';
    		for(i=0;i<document.list1.length;i++){
     			if(document.list1[i].type=='checkbox'){
				if(document.list1[i].checked){
					document.list1.selected.value=document.list1[i].value+'^'+document.list1.selected.value;
				}
			}
		}
	window.open("./Skin/<?=$Skin?>/song_play1.php?id=<?=$DB?>&selected="+document.list1.selected.value,"listen_all","width=394, height=472, scrollbars=no, resizable=no, status=no, menubar=0");
	}else {alert('À½¾ÇÀ» ¸ÕÀú ¼±ÅÃÇØ ÁÖ¼¼¿ä');}
}

function CheckAll2()
{

	if (!chk){
		for (i=0;i<document.list2.length;i++){
			if(document.list2[i].type=='checkbox'){
				document.list2[i].checked=true;
			}
		}
		chk=true;
	}else{
		for (i=0;i<document.list2.length;i++){
			if(document.list2[i].type=='checkbox'){
				document.list2[i].checked=false;
			}
		}
		chk=false;
	}
}

function listen_all2() {

	var i, chked=0;

	for(i=0;i<document.list2.length;i++){
		if(document.list2[i].type=='checkbox'){
			if(document.list2[i].checked) chked=1;
   		}
	}

	if(chked){
		document.list2.selected.value='';
		document.list2.exec.value='listen_all';
    		for(i=0;i<document.list2.length;i++){
     			if(document.list2[i].type=='checkbox'){
				if(document.list2[i].checked){
					document.list2.selected.value=document.list2[i].value+'^'+document.list2.selected.value;
				}
			}
		}
	window.open("./Skin/<?=$Skin?>/song_play1.php?id=<?=$DB?>&selected="+document.list2.selected.value,"listen_all","width=394, height=472, scrollbars=no, resizable=no, status=no, menubar=0");
	}else {alert('À½¾ÇÀ» ¸ÕÀú ¼±ÅÃÇØ ÁÖ¼¼¿ä');}
}

//¿¬ÁÖÈ¸ 3
function CheckAll3()
{

	if (!chk){
		for (i=0;i<document.list3.length;i++){
			if(document.list3[i].type=='checkbox'){
				document.list3[i].checked=true;
			}
		}
		list3.submit.focus();
		chk=true;
	}else{
		for (i=0;i<document.list3.length;i++){
			if(document.list3[i].type=='checkbox'){
				document.list3[i].checked=false;
			}
		}
		list3.submit.focus();
		chk=false;
	}
}

function listen_all3() {

	var i, chked=0;

	for(i=0;i<document.list3.length;i++){
		if(document.list3[i].type=='checkbox'){
			if(document.list3[i].checked) chked=1;
   		}
	}

	if(chked){
		document.list3.selected.value='';
		document.list3.exec.value='listen_all';
    		for(i=0;i<document.list3.length;i++){
     			if(document.list3[i].type=='checkbox'){
				if(document.list3[i].checked){
					document.list3.selected.value=document.list3[i].value+'^'+document.list3.selected.value;
				}
			}
		}
	window.open("./Skin/<?=$Skin?>/song_play1.php?id=<?=$DB?>&selected="+document.list3.selected.value,"listen_all","width=394, height=472, scrollbars=no, resizable=no, status=no, menubar=0");
	}else {alert('À½¾ÇÀ» ¸ÕÀú ¼±ÅÃÇØ ÁÖ¼¼¿ä');}
}

	function toggle(checked)
	{
		len = document.del.elements.length;
		var i=0;
		for(i=0; i < len; i++)
		{
			document.del.elements[i].checked=checked;
		}
	}



