if(typeof(eCatalogGb) == 'undefined') {
	
	var eCatalogGb = true;

	function eCatalog(root,host,site,mode,category,page,pagenum,search) {
		
		if(mode == "1" && screen.width < 1024) mode = "2";
		if(!category) category=0;
		if(!page) page=0;
		if(!pagenum) pagenum=0;
		if(!search) search = '';
		
		opt = "";
		if(mode == "1") {		// 1024x768
			
			w = 1020; h = 716; t = 0; l = 0;
			if(screen.width > 1024) {
				l = (screen.availWidth-w)/2;
				t = (screen.availHeight-h)/2;
				if(t < 50) t = 0;
				if(l < 50) l = 0;
			}
			// ¼­ºñ½ºÆÑ2 ÀÏ¶§´Â fullscreen À» ºÙ¿©¾ß À©µµ¿ìÀÛ¾÷Ç¥½ÃÁÙÀ» °¡¸±¼ö ÀÖ´Ù.
			// ¼­ºñ½ºÆÑ2 ÀÌ°í À©µµ¿ì °íÀüÀÏ¶§ PC¿¡¼­ ½ÇÇà½ÃÅ°¸é ¿ø·¡ fullscreen À¸·Î ¶°¹ö¸°´Ù.
			// ÀÏºÎ xp2 ¿¡¼­ ¿ÏÀüfullscreen À¸·Î ¶ß°í ÀÖ¾úÀ½, ÇØ°áÀ§ÇØ¼­ channelmode=yes À¸·Î º¯°æ, À©µµ¿ìÀÛ¾÷Ç¥½ÃÁÙ¸¸ °¡¸®´Â ±â´É
			if(document.location.toString().indexOf("http://") > -1) {
				if( navigator.userAgent.indexOf("; SV1") > -1 && screen.width == 1024 && screen.height == 768 ) opt = ",channelmode=yes";
			}
			
		} else if(mode == "2") {	// full
			
			w = screen.availWidth; 
			h = screen.availHeight; 
			t = 0; l = 0;
			if(document.location.toString().indexOf("http://") > -1) {
				if( navigator.userAgent.indexOf("; SV1") > -1 ) opt = ",channelmode=yes";
			}
		
		} else {	// before
			
			w = 800;
			h = 800;
			l = -5000;
			t = 0;
		}
		window.open(root+'/src/viewer/main.php?host='+host+'&site='+site+'&category='+category+'&page='+page+'&pagenum='+pagenum+'&ref='+Urlencode(document.location.toString())+'&search='+Urlencode(search),'','top='+t+',left='+l+',width='+w+',height='+h+',titlebar=yes,status=yes'+opt);
	}
	
	function UCCOpen(root,host,site) {
		
		w = 800; 
		h = 465;
		l = (screen.availWidth-w)/2;
		t = (screen.availHeight-h)/2;
		opt = '';
		
		window.open(root+'/src/uccviewer/main.php?host='+host+'&site='+site+'&ref='+Urlencode(document.location.toString()),'','top='+t+',left='+l+',width='+w+',height='+h+',titlebar=yes,status=yes'+opt);
	}
	
	function Urlencode(str) {
	
		str = str.replace(/ /g,'%20');
		str = str.replace(/\?/g,'%3F');
		str = str.replace(/"/g,'%22');
		str = str.replace(/&/g,'%26');
		str = str.replace(/=/g,'%3D');	
		return str;	
	}
}