
function del_row(delete_id)
{
 	var body = document.getElementById("tbl_image");
	var i = 0;
	for(i = 0; i < body.rows.length; i++)
	{
		if(body.rows[i].id == delete_id)
		{
			body.deleteRow(i);
			return;
		}
	}
}

function open_select_window()
{
	var flag = document.getElementById("select_window_flag").value;
	//confirm(flag);
	//if(get_select_window_flag() == false)
	{
		sel_window = window.open('html/window/select_item.php',
					'_blank',
		 			'toolbar=no, location=no, directories=no, status=no,menubar=no, scrollbars=no, resizable=0,width=500,height=580');
		document.getElementById("select_window_flag").value = "true";
	}	
}


function vote(param, yesno)
{
/*
	var url = 'api/comment_vote.php?';
	url = url + 'value='+yesno.toString()+'&param='+param.toString();

	var ret = asyncGetValue(url);
	if(ret == "")
		location.reload();
*/

	var url = 'api/comment_vote.php?';
	url = url + 'value='+yesno.toString()+'&param='+param.toString();
	$(function(){
		var httpObj = jQuery.get(url, null, function(){
		if(httpObj.responseText == "") location.reload();;
		});
		});	
}

function delete_comment()
{
	document.getElementById("txt_mode").value="delete";
	form.submit();
}

function init_tab(){
	$('#newItem').css('display','block');
	$('#popItem').css('display','none');

	$('#t1').mouseover(function(){
		$(this).css('cursor','pointer');
	});
	$('#t2').mouseover(function(){
		$(this).css('cursor','pointer');
	});

	$('#t1').click(function(){
		$('#t1').attr('src','img/top/tab_new_item_ac.jpg');
		$('#t2').attr('src','img/top/tab_pop_item_off.jpg');
		$('#newItem').css('display','block');
		$('#popItem').css('display','none');
	});
	$('#t2').click(function(){
		$('#t1').attr('src','img/top/tab_new_item_off.jpg');
		$('#t2').attr('src','img/top/tab_pop_item_ac.jpg');
		$('#newItem').css('display','none');
		$('#popItem').css('display','block');
	});

}
