function bluring(){ 
        if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") 
     document.body.focus(); 
} 
document.onfocusin=bluring; 

function resizeme(obj, wd){
	if (obj.offsetWidth > wd) {
		obj.style.width = wd;
	}
}

function openApp() {
	MidWindow("/application/login","app","width=1024,height=768,scrollbars=0");
	//location.href="/application/login/";
}

function MidWindow(url,winname,features) {

	features = features.toLowerCase();
	var sumchar= '', onechar = '';

	for(var i=1, len=features.length; i <= len; i++){	// ºóÄ­ Á¦°Å
		onechar = features.substr(i-1, 1);
		if(onechar != ' ') sumchar += onechar;
	}

	features = sumchar; 
	var sp = new Array();
	sp = features.split(',', 10);	// ¹è¿­¿¡ ¿É¼ÇÀ» ºÐ¸®ÇØ¼­ ÀÔ·Â

	var width, height;
	
	for(var i=0, splen=sp.length; i < splen; i++){	// width, height °ªÀ» ±¸ÇÏ±â À§ÇÑ ºÎºÐ
		if(sp[i].indexOf('width=') == 0){	// width °ªÀÏ¶§
			width = Number(sp[i].substring(6)); 
		} else if (sp[i].indexOf('height=') == 0){	// height °ªÀÏ¶§
			height = Number(sp[i].substring(7)); 
		}
	}
	
	var sleft, stop;

	sleft = (screen.width - width)/2;
	stop = (screen.height - height)/2 -50;
	features = features + ',left=' + sleft + ',top=' + stop;
	return window.open(url,winname,features); 
}

