// 스크랩 관련 

var source_location_code = 19;
var clickAreaCheck = false;
function onOffScrapLayer(evt){
	var evt = (evt) ? evt : ((window.event) ? window.event : null);	

	evt.stopPropagation? evt.stopPropagation():evt.cancelBubble = true; 
	document.getElementById("scrapLyer").style.top = evt.clientY +document.documentElement.scrollTop  + "px" ;
	document.getElementById("scrapLyer").style.left = evt.clientX + document.documentElement.scrollLeft   +"px";	
	if(clickAreaCheck){
		divDisplay('scrapLyer' ,'none');
		clickAreaCheck = false;
	}else{
	
		divDisplay('scrapLyer' ,'block');
		clickAreaCheck = true;
	}
}
document.onclick= function(){
	divDisplay('scrapLyer' ,'none');
	clickAreaCheck = false;
}
function divDisplay(objId, act) {
	if (document.getElementById(objId)) {
		document.getElementById(objId).style.display = act;
	}
}

function goScrapCafe(instid) {
	window.open("http://scrap.cafe.daum.net/_dss_/scrap_cafe?location_id=1&folder_id=1&data_id=" + instid + "&source_location_code="+source_location_code+"&source_etc=1",'scrap','width=620, height=460', 'resizable=yes,scrollbars=yes');

}
function goScrapBlog(instid) {
	window.open("http://scrap.cafe.daum.net/_dss_/scrap_cafe?location_id=1&folder_id=1&data_id="+instid+"&source_location_code="+source_location_code+"&source_etc=1&target_location_code=4",'scrap','width=620, height=460', 'resizable=yes,scrollbars=yes');

}

function goScrap( location_id ,  dataid , location_node ){
	var source_location_code = 8; // tv팟 8 번
	var scrap_url ="http://scrap.cafe.daum.net/_dss_/scrap_tvpot?folder_id=0&source_etc=";
	scrap_url = scrap_url + "&location_id="+location_id;
	scrap_url = scrap_url + "&data_id="+dataid;
	scrap_url = scrap_url + "&target_location_code="+location_node;
	scrap_url = scrap_url + "&source_location_code="+source_location_code;

	window.open(scrap_url,'scrap','width=620, height=460', 'resizable=yes,scrollbars=yes');
}
function goMyPotScrap( clipid ){

	var scrap_url ="/scrap/AddScrap.do?clipid="+clipid;
	window.open(scrap_url,'scrap','width=620, height=460', 'resizable=yes,scrollbars=yes');
}
function itUrlCopy () 
{
	var loc = location.href;
	
	if(loc.indexOf("&lu=")!=-1)
	{
		loc= loc.substring(0, loc.indexOf("&lu="));
	}	
	try {
		window.clipboardData.setData('Text', loc);
	}catch(e){}			
	alert("주소가 복사 되었습니다.    ");
}