/*XML 데이터 읽기*/
function toXML(requestResult) {
	var resultXML;
	var resultText = requestResult.responseText;
	
	try{
		var resultText = requestResult.responseText;
	  resultXML=new ActiveXObject("Microsoft.XMLDOM")
	resultXML.async="false";
	resultXML.loadXML(resultText);
	}
	catch(e) {
		var parser=new DOMParser();
		var resultText = requestResult.responseText;
		resultXML = parser.parseFromString(resultText, "text/xml");
	}
	/*
	catch(e) {
		resultXML = requestResult.responseXML;
	}*/

	return resultXML;
}

function drawFlash(url, name, width, height){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" id="'+name+'" align="middle">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="'+url+'" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#999999" /><embed src="'+url+'" quality="high" wmode="transparent" bgcolor="#999999" width="'+width+'" height="'+height+'" name="main_mov" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');

}



function showDetailPicture(URL){
	window.open("/common/showPic.php?url="+URL,'picWin','width=100,height=100,scrollbars=auto,status=no');
}


function deleteAlert(tar, needPass){
	if(confirm("글을 정말 삭제 하시겠습니까?"))
		window.location.href = tar.href;
	return false;
}
function deleteComment(tar){
	if(confirm("댓글을 정말 삭제 하시겠습니까?"))
		window.location.href = tar.href;
	return false;
}




function insertPass(){
	
}


function hback(){
	history.back();
}




function openLoginPop(){
	window.open('/member/member_login.html','login_win','width=550,height=273,status=no,scrollbars=no');
}






/* 세팅저장 */
function save_set( set_name , val ){
	var when = new Date();
	when.setDate(when.getDate()+30);
	var date = when.toGMTString();

	document.cookie = set_name + "=" + val + ";path=/;expires="+date;
}
 
 //인덱스에서 체크하는 부분
 function get_set( set_id ){
	cookies = document.cookie+";";
	if((pos = cookies.indexOf( set_id + "=" ))== -1) return false;
	else {
		spos = cookies.indexOf( "=" , pos );
		epos = cookies.indexOf( ";" , spos );
		return ( cookies.substring( spos+1 , epos ) )
	}
 }
 
 
 
function makeSavePara(str){
	str = str.replace(/&/g,escape('&'));
	str = str.replace(/\?/g,escape('?'));
	str = str.replace(/=/g,escape('='));
	str = str.replace(/%/g,escape('%'));
	return str;
}