function addfavorites()
{
	if (document.all)
		window.external.AddFavorite("http://www.mizblog.co.kr/","No.1 ¿©¼ºÇÁ·Î½´¸Ó ¸ÞÅ¸ºí·Î±×")
}

function openwin(pUrl,pName,pScroll,pWidth,pHeight,pLeft,pTop)
{
	newwin=window.open(pUrl,pName,"width="+pWidth+", height="+pHeight+", left="+pLeft+", top="+pTop+", scrollbars="+pScroll+", toolbars=no, status=no");
	newwin.focus();
}

// Flash Àü¿ë È£ÃâÇÔ¼ö p_id_name : ID¶Ç´ÂName °ª, p_swf_name : ¼îÅ©¿þÀÌºêÆÄÀÏ °æ·Î(ÀÌ¸§,GET°ªÆ÷ÇÔ), wdith: ³ÐÀÌ°ª, height: ³ôÀÌ°ª
function swf_func(p_id_name,p_swf_name,p_width,p_height){
document.writeln("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='/asset/flash/swflash.cab#version=8,0,0,0' width='"+p_width+"' height='"+p_height+"' id='"+p_id_name+"' align='middle'>");
document.writeln("<param name='allowScriptAccess' value='always'>");
document.writeln("<param name='movie' value='"+p_swf_name+"'>");
document.writeln("<param name='quality' value='high'>");
document.writeln("<param name='bgcolor' value='#F4F6EB'>");
document.writeln("<param name='wmode' Value='Transparent'>");
document.writeln("<param name='scale' value='noscale' />");
document.writeln("<param name='salign' value='lb' />");
document.writeln("</object>");
}

function ChkBoxCnt(f) {
	var length = f.length;
	var num = 0;
	
	for(var i=0; i<length; i++) {
		if(f[i].checked == true) {
			num++;					
		}
	}	
	return num;
}

function GetCookie( name )
{
	var start = document.cookie.indexOf( name + "=" );
	var len = start + name.length + 1;

	if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) )
	{
		return null;
	}

	if ( start == -1 ) return null;
	var end = document.cookie.indexOf( ";", len );
	if ( end == -1 ) end = document.cookie.length;

	return unescape( document.cookie.substring( len, end ) );
}

function SetCookie( name, value, expiredays ){
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function DeleteCookie( name, path, domain )
{
	if ( GetCookie( name ) ) document.cookie = name + "=" +
										   ( ( path )   ? ";path=" + path : "") +
										   ( ( domain ) ? ";domain=" + domain : "" ) +
										   ";expires=Thu, 01-Jan-1970 00:00:01 GMT" ;
}

function LPopup_TodayClose(v) {
	
	var Expdate = new Date();
	Expdate.setTime(Expdate.getTime() + 1000 * 3600 * 24 * 1); 			//1ÀÏµ¿¾È off
	
	SetCookie(v,"off",1)
	LPopup_Close(v)
}

function LPopup_Close(v) {
	$(v).style.visibility = "hidden";
}

function WPopup_TodayClose(v) {
	var Expdate = new Date();
	Expdate.setTime(Expdate.getTime() + 1000 * 3600 * 24 * 1); 			//1ÀÏµ¿¾È off
	
	SetCookie(v,"off", 1)
	self.close();
}

function fn_idfind(){
	window.open('', 'idfind', 'width=400,height=250,scrollbars=1, fullscreen=no');
	document.loginfrm.loginact.value = "idfind";
	document.loginfrm.target = "idfind";
	document.loginfrm.action = "http://www.mizblog.co.kr/popup/idpwfind.asp";
	document.loginfrm.submit();
}

function fn_pwfind(){
	window.open('', 'pwfind', 'width=400,height=300,scrollbars=1, fullscreen=no');
	document.loginfrm.loginact.value = "pwfind";
	document.loginfrm.target = "pwfind";
	document.loginfrm.action = "http://www.mizblog.co.kr/popup/idpwfind.asp";
	document.loginfrm.submit();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//  AJax »ç¿ë¿¡ ÇÊ¿äÇÑ ÇÔ¼ö¸ðÀ½
function sendRequest(callback,data,method,url,async,sload,user,password){
	var oj = createHttpRequest();
	if( oj == null ) return null;
	var sload = (!!sendRequest.arguments[5])?sload:false;
	if(sload || method.toUpperCase() == 'GET')url += "?";
	//if(sload)url=url+"t="+(new Date()).getTime();
	var bwoj = new chkAjaBrowser();
	var opera	  = bwoj.bw.opera;
	var safari	  = bwoj.bw.safari;
	var konqueror = bwoj.bw.konqueror;
	var mozes	  = bwoj.bw.mozes ;
	if(method.toUpperCase() == 'GET') {
		url += data
	}
	if(oj){
		oj.open(method,url,async,user,password);
		setEncHeader(oj)
		oj.onreadystatechange =function ()
		{
			if ( oj.readyState == 4 ){
				callback(oj);
			}
		}
	}
	oj.send(data);
	return oj
}
function createHttpRequest()
{
	if(window.ActiveXObject){
		 //Win e4,e5,e6éÄ
		try {
			return new ActiveXObject("Msxml2.XMLHTTP") ;
		} catch (e) {
			try {
				return new ActiveXObject("Microsoft.XMLHTTP") ;
			} catch (e2) {
				return null ;
 			}
 		}
	} else if(window.XMLHttpRequest){
		 //Win Mac Linux m1,f1,o8 Mac s1 Linux k3éÄ
		return new XMLHttpRequest() ;
	} else {
		return null ;
	}
}
function setEncHeader(oj){
	var contentTypeUrlenc = 'application/x-www-form-urlencoded; charset=euc-kr';
	if((typeof oj.setRequestHeader) == 'function')
		oj.setRequestHeader('Content-Type',contentTypeUrlenc);
	return oj
}
function chkAjaBrowser()
{
	var a,ua = navigator.userAgent;
	this.bw= { 
	  safari    : ((a=ua.split('AppleWebKit/')[1])?a.split('(')[0]:0)>=124 ,
	  konqueror : ((a=ua.split('Konqueror/')[1])?a.split(';')[0]:0)>=3.3 ,
	  mozes     : ((a=ua.split('Gecko/')[1])?a.split(" ")[0]:0) >= 20011128 ,
	  opera     : (!!window.opera) && ((typeof XMLHttpRequest)=='function') ,
	  msie      : (!!window.ActiveXObject)?(!!createHttpRequest()):false
	}
	return (this.bw.safari||this.bw.konqueror||this.bw.mozes||this.bw.opera||this.bw.msie)
}
// AJax ÇÔ¼ö ¸ðÀ½ ³¡
