// JavaScript Document
function gotoPage(linkPath){
	var arrlink=linkPath.split(".");
	var img=arrlink[0].replace("-detail","");
		img=img.replace("-play","");
	var queryStr='';
					$.ajax({
					   type: "POST",
					   url: linkPath,
					   cache: false,
					   data: queryStr,
					   success: function(response){
						 setTimeout("finishAjax('boxContent','"+img+"', '"+escape(response)+"')", 500);
					   }
					 });
}
function finishAjax(id,name, response) {
  var himg='<img src="images/'+name+'/h_'+name+'.jpg" />';
  $('#imgDefault').hide();
  $('#hImage').html(himg);
  $('#'+id).html(unescape(response));
  $('#'+id).fadeIn();
}

function selectMenu(id){
	for(i=1;i<=6;i++){
		$('#menu'+i).removeClass("data_Grey_bold_12_Select");
		$('#menu'+i).addClass("data_Grey_bold_12");
	}
	$('#menu'+id).removeClass("data_Grey_bold_12");
	$('#menu'+id).addClass("data_Grey_bold_12_Select");
}

function changePic(linkPath){
	document.getElementById('mainpic').src=linkPath;
}
function changeSong(em){
	document.getElementById('boxPlay').innerHTML=unescape(em);
	document.getElementById('boxembed').value=em;
}


function gotoPageNews(linkPath){
	var queryStr='';
					$.ajax({
					   type: "POST",
					   url: linkPath,
					   cache: false,
					   data: queryStr,
					   success: function(response){
						 setTimeout("finishAjaxNews('boxContent', '"+escape(response)+"')", 500);
					   }
					 });
}
function finishAjaxNews(id, response) {
  $('#imgDefault').hide();
  $('#'+id).html(unescape(response));
  $('#'+id).fadeIn();
}

function fnGoto(nLink){
	//alert(nLink);
		window.open(nLink,'mywindow','');
}