function $(id) { return document.getElementById(id); }

try { 
 document.execCommand("BackgroundImageCache", false, true); 
} catch(err) {} 


var wIN=null; 
function zPop(URL,W,H,S,R,N){ // 0ÀÏ¶§´Â NO 1ÀÏ¶§´Â YES 
	var wINWIDTH = (screen.width-W)/2; 
	var wINHEIGHT = (screen.height-H)/2; 
	var PopSet  ='width='+W+','; // °¡·Î
	PopSet  +='height='+H+','; // ¼¼·Î
	PopSet  +='top='+wINHEIGHT+','; 
	PopSet  +='left='+wINWIDTH+','; 
	PopSet  +='scrollbars='+S+','; // ½ºÅ©·Ñ¹Ù
	PopSet  +='resizable='+R; // ¸®»çÀÌÁî
	wIN=window.open(URL,'_zPopWindow'+N,PopSet); 
	if(parseInt(navigator.appVersion) >= 4){wIN.window.focus();} 
} 

// for swf
if(typeof com=="undefined"){var com=new Object()}if(typeof com.deconcept=="undefined"){com.deconcept=new Object()}if(typeof com.deconcept.util=="undefined"){com.deconcept.util=new Object()}if(typeof com.deconcept.FlashObjectUtil=="undefined"){com.deconcept.FlashObjectUtil=new Object()}com.deconcept.FlashObject=function(a,c,b,d,f,g,h,i,j,k,l){if(!document.createElement||!document.getElementById){return}this.DETECT_KEY=l?l:"detectflash";this.skipDetect=com.deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();this.useExpressInstall=h;if(a){this.setAttribute("swf",a)}if(c){this.setAttribute("id",c)}if(b){this.setAttribute("width",b)}if(d){this.setAttribute("height",d)}if(f){this.setAttribute("version",new com.deconcept.PlayerVersion(f.toString().split(".")))}this.installedVer=com.deconcept.FlashObjectUtil.getPlayerVersion(this.getAttribute("version"),h);if(g){this.addParam("bgcolor",g)}var m=i?i:"high";this.addParam("quality",m);var n=(j)?j:window.location;this.setAttribute("xiRedirectUrl",n);this.setAttribute("redirectUrl","");if(k){this.setAttribute("redirectUrl",k)}};com.deconcept.FlashObject.prototype={setAttribute:function(a,c){this.attributes[a]=c},getAttribute:function(a){return this.attributes[a]},addParam:function(a,c){this.params[a]=c},getParams:function(){return this.params},addVariable:function(a,c){this.variables[a]=c},getVariable:function(a){return this.variables[a]},getVariables:function(){return this.variables},createParamTag:function(a,c){var b=document.createElement("param");b.setAttribute("name",a);b.setAttribute("value",c);return b},getVariablePairs:function(){var a=new Array();var c;var b=this.getVariables();for(c in b){a.push(c+"="+b[c])}return a},getFlashHTML:function(){var a="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn")}a="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";a+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var c=this.getParams();for(var b in c){a+=[b]+"=\""+c[b]+"\" "}var d=this.getVariablePairs().join("&");if(d.length>0){a+="flashvars=\""+d+"\""}a+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX")}a="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";a+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var f=this.getParams();for(var b in f){a+="<param name=\""+b+"\" value=\""+f[b]+"\" />"}var g=this.getVariablePairs().join("&");if(g.length>0){a+="<param name=\"flashvars\" value=\""+g+"\" />"}a+="</object>"}return a},write:function(a){if(this.useExpressInstall){var c=new com.deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(c)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}else{this.setAttribute("doExpressInstall",false)}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var b=(typeof a=="string")?document.getElementById(a):a;b.innerHTML=this.getFlashHTML()}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}}};com.deconcept.FlashObjectUtil.getPlayerVersion=function(a,c){var b=new com.deconcept.PlayerVersion(0,0,0);if(navigator.plugins&&navigator.mimeTypes.length){var d=navigator.plugins["Shockwave Flash"];if(d&&d.description){b=new com.deconcept.PlayerVersion(d.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");for(var g=3;f!=null;g++){f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+g);b=new com.deconcept.PlayerVersion([g,0,0])}}catch(e){}if(a&&b.major>a.major){return b}if(!a||((a.minor!=0||a.rev!=0)&&b.major==a.major)||b.major!=6||c){try{b=new com.deconcept.PlayerVersion(f.GetVariable("$version").split(" ")[1].split(","))}catch(e){}}}return b};com.deconcept.PlayerVersion=function(a){this.major=parseInt(a[0])||0;this.minor=parseInt(a[1])||0;this.rev=parseInt(a[2])||0};com.deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major){return false}if(this.major>a.major){return true}if(this.minor<a.minor){return false}if(this.minor>a.minor){return true}if(this.rev<a.rev){return false}return true};com.deconcept.util={getRequestParameter:function(a){var c=document.location.search||document.location.hash;if(c){var b=c.indexOf(a+"=");var d=(c.indexOf("&",b)>-1)?c.indexOf("&",b):c.length;if(c.length>1&&b>-1){return c.substring(c.indexOf("=",b)+1,d)}}return""},removeChildren:function(a){while(a.hasChildNodes()){a.removeChild(a.firstChild)}}};if(Array.prototype.push==null){Array.prototype.push=function(a){this[this.length]=a;return this.length}}var getQueryParamValue=com.deconcept.util.getRequestParameter;var FlashObject=com.deconcept.FlashObject;

// for sub menu
function sMenu_a(jsn){location.href=''+jsn+'';}
function sMenu_a2(jsn){zPop(''+jsn+'', '800', '650', '0', '0', 'dccc');}
function sMenu_a3(jsn){zPop(''+jsn+'', '800', '600', '0', '0', 'dccc');}

function opGame(){ // °ÔÀÓÇÑÆÇ
	zPop('/romans/kromans_games/', '700', '650', '0', '0', 'dGame');
}


function subBt(btno){ // ´Ü¹Ì±×¸°ºñ ¼Ò°³(1), ÅëÇÕ°Ë»ö(2)
	if(btno=="1"){
		location.href='/ver6/in_page/about_dan.php';
	}else{
		SLB('<form action=\'http://www.kromans.com/Gsearch/Gsearch.php\' method=\'post\' name=\'sch\' onsubmit=\'return check_sch(this)\'><input type=\'hidden\' name=\'check[3]\' value=\'subject\' /><input type=\'hidden\' name=\'check[2]\' value=\'memo\' /><input type=\'hidden\' name=\'check[6]\' value=\'or\' /><input type=\'hidden\' name=\'check[5]\' value=\'30\' /><div class=\'tSc_div\'><img src=\'http://www.kromans.com/tm_ver/tm_images/tSc_close.gif\' style=\'width:9px; height:8px; float:right; cursor:pointer;\' onclick=\'SLB();\' alt=\'Ãë¼Ò\' /><br /><span class=\'tSc_tt\'>°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.</span><br /><input type=\'text\' name=\'str\' id=\'str\' class=\'tSc_ip\' /><input type=\'image\' src=\'http://www.kromans.com/tm_ver/tm_images/tSc_btn.gif\' style=\'width:40px; height:23px; vertical-align:middle; margin-top:-6px; margin-left:3px;\' title=\'°Ë»ö\' /><br /><br /></div></form>','html',true);
	}
}




function changeopacity(obdiv_id, opacity) {
	var obdiv = document.getElementById(obdiv_id);
	obdiv.style.opacity = (opacity/100);
	obdiv.style.MozOpacity = (opacity /100);
	obdiv.style.KhtmlOpacity = (opacity/100);
	obdiv.style.filter = "alpha(opacity="+ opacity +")";
} 



// http://www.alik.info/work/slb2.html
var SLB_cnt=0;function SLB(url,type)
{var a=document.getElementById('SLB_film');var b=document.getElementById('SLB_content');var c=document.getElementById('SLB_loading');if(url){a.style.top=0;a.style.left=0;a.style.display="";if(document.documentElement.scrollHeight>document.body.scrollHeight){a.style.height=document.documentElement.scrollHeight+'px';}else{a.style.height=document.body.scrollHeight+'px';}
c.style.display="block";SLB_setCenter(c,true);if(type=='image'){b.innerHTML="<img src="+url+" class='SLB_center' onload='SLB_setCenter(this);' />";if(arguments[2])a.onclick=function(){SLB()};if(arguments[3])b.innerHTML+="<div class='SLB_caption'>"+arguments[3]+"</div>";;}else if(type=='iframe'){b.innerHTML="<iframe id='SLB_iframe' src="+url+" width="+arguments[2]+" height="+arguments[3]+" class='SLB_center' marginwidth='0' marginheight='0' frameborder='0' vspace='0' hspace='0' onload='tryReHeight("+arguments[5]+");'/></iframe>";if(arguments[4]){b.innerHTML+="<div class='SLB_close' onclick='SLB();' title='??'>close</div>";}
b.onclick='';b.firstChild.style.cursor='default';}else if(type='html'){b.innerHTML=url;SLB_setCenter(b.firstChild);if(arguments[2])b.onclick='';}
hideSelect();}else{a.onclick='';a.style.display="none";a.style.height='100%';a.style.width='100%';b.innerHTML="";b.onclick=function(){SLB()};c.style.display="none";showSelect();SLB_cnt=0;}}
function SLB_setCenter(obj){if(obj){var h=(window.innerHeight||self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight);var w=(window.innerWidth||self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);var l=((window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft)+((w-(obj.width||parseInt(obj.style.width)||obj.offsetWidth))/2));var t=((window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)+((h-(obj.height||parseInt(obj.style.height)||obj.offsetHeight))/2));if((obj.width||parseInt(obj.style.width)||obj.offsetWidth)>=w)l=0;if((obj.height||parseInt(obj.style.height)||obj.offsetHeight)>=h)t=(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop);if(!arguments[2]){if(obj.tagName!="IFRAME"&&obj.tagName!="IMG"){document.getElementById('SLB_content').style.left=l+"px";}else{document.getElementById('SLB_content').style.left=w/2+"px";}}
if(SLB_cnt==0){if(arguments[2]||(obj.tagName!="IFRAME"&&obj.tagName!="IMG")){document.getElementById('SLB_content').style.top=t+"px";}else{document.getElementById('SLB_content').style.top=h/2+"px";}
if(document.getElementById('SLB_content').offsetHeight>=h-20){SLB_cnt++;}
if(obj.nextSibling&&(obj.nextSibling.className=='SLB_close'||obj.nextSibling.className=='SLB_caption')){obj.nextSibling.style.display='block';if((t-(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop))>(obj.nextSibling.offsetHeight/2)){document.getElementById('SLB_content').style.top=parseInt(document.getElementById('SLB_content').style.top)-(obj.nextSibling.offsetHeight/2)+"px";}}}
if(!arguments[1]){document.getElementById('SLB_loading').style.display="none";}else{obj.style.left=l+"px";obj.style.top=t+"px";}
if(!arguments[2]&&(obj.tagName=="IFRAME"||obj.tagName=="IMG")){var finalx=(obj.width||parseInt(obj.style.width)||obj.offsetWidth);var finaly=(obj.height||parseInt(obj.style.height)||obj.offsetHeight);obj.width=0;obj.height=0}
obj.style.visibility='visible';if(!arguments[2]&&(obj.tagName=="IFRAME"||obj.tagName=="IMG")){elemResize(obj,[0,0],[finalx,finaly],1,1,1,1);elemMove(document.getElementById('SLB_content'),[w/2,h/2+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)],[l,t],1,1,1);}}}
function hideSelect(){var windows=window.frames.length;var selects=document.getElementsByTagName("SELECT");for(i=0;i<selects.length;i++)
{selects[i].style.visibility="hidden";}
if(windows>0){for(i=0;i<windows;i++){try{var selects=window.frames[i].document.getElementsByTagName("SELECT");for(j=0;j<selects.length;j++)
{selects[j].style.visibility="hidden";}}catch(e){}}}}
function showSelect(){var windows=window.frames.length;var selects=document.getElementsByTagName("SELECT");for(i=0;i<selects.length;i++)
{selects[i].style.visibility="visible";}
if(windows>0){for(i=0;i<windows;i++){try{var selects=window.frames[i].document.getElementsByTagName("SELECT");for(j=0;j<selects.length;j++)
{selects[j].style.visibility="visible";}}catch(e){}}}}
function tryReHeight(sign){var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1];var FFextraHeight=parseFloat(getFFVersion)>=0.1?16:0;var currentfr=document.getElementById('SLB_iframe');if(sign==true){try{if(currentfr.contentDocument&&currentfr.contentDocument.body.offsetHeight){setIframeSize(currentfr.contentDocument.body.offsetHeight+FFextraHeight);}else if(currentfr.Document&&currentfr.Document.body.scrollHeight){setIframeSize(currentfr.Document.body.scrollHeight);}}catch(e){}}else{SLB_setCenter(currentfr);}}
function setIframeSize(h,w){SLB_cnt=0;var ifr=currentfr=document.getElementById('SLB_iframe');if(ifr){if(w){ifr.width=w;}
if(h){ifr.height=h;}
SLB_setCenter(ifr);}}
function elemMove(elem,startPos,endPos,steps,intervals,powr){if(elem.posChangeMemInt)window.clearInterval(elem.posChangeMemInt);var actStep=0;elem.posChangeMemInt=window.setInterval(function(){elem.currentPos=[changeValue(startPos[0],endPos[0],steps,actStep,powr),changeValue(startPos[1],endPos[1],steps,actStep,powr)];elem.style.left=elem.currentPos[0]+"px";elem.style.top=elem.currentPos[1]+"px";actStep++;if(actStep>steps)window.clearInterval(elem.posChangeMemInt);},intervals);}
function elemResize(elem,startDim,endDim,steps,intervals,powr,mode){if(elem.dimChangeMemInt)window.clearInterval(elem.dimChangeMemInt);var actStep=0;elem.dimChangeMemInt=window.setInterval(function(){elem.currentDim=[changeValue(startDim[0],endDim[0],steps,actStep,powr),changeValue(startDim[1],endDim[1],steps,actStep,powr)];if(mode==1){elem.width=elem.currentDim[0];elem.height=elem.currentDim[1];}else{elem.style.width=elem.currentDim[0]+"px";elem.style.height=elem.currentDim[1]+"px";}
actStep++;if(actStep>steps)window.clearInterval(elem.dimChangeMemInt);},intervals);}
function changeValue(minValue,maxValue,totalSteps,actualStep,powr){totalSteps=Math.max(totalSteps,1)
var delta=maxValue-minValue;var stepp=minValue+(Math.pow(((1/totalSteps)*actualStep),powr)*delta);return Math.ceil(stepp)}
var prevOnScroll=window.onscroll;window.onscroll=function(){if(prevOnScroll!=undefined)prevOnScroll();if(document.documentElement.scrollHeight>document.body.scrollHeight){document.getElementById('SLB_film').style.height=document.documentElement.scrollHeight+'px';}else{document.getElementById('SLB_film').style.height=document.body.scrollHeight+'px';}
document.getElementById('SLB_film').style.width=document.body.scrollWidth+'px';SLB_setCenter(document.getElementById('SLB_content').firstChild,false,true);changeopacity('SLB_film',10);}
var prevOnResize=window.onresize;window.onresize=function(){if(prevOnResize!=undefined)prevOnResize();if(document.documentElement.scrollHeight>document.body.scrollHeight){document.getElementById('SLB_film').style.height=document.documentElement.scrollHeight+'px';}else{document.getElementById('SLB_film').style.height=document.body.scrollHeight+'px';}
document.getElementById('SLB_film').style.width=document.body.offsetWidth+'px';SLB_setCenter(document.getElementById('SLB_content').firstChild,false,true);}
//////

function changeopacity(obdiv_id, opacity) {
	var obdiv = document.getElementById(obdiv_id);
	obdiv.style.opacity = (opacity/100);
	obdiv.style.MozOpacity = (opacity /100);
	obdiv.style.KhtmlOpacity = (opacity/100);
	obdiv.style.filter = "alpha(opacity="+ opacity +")";
}
//////

function mOpen(){
window.open('http://www.kromans.com/romans/member_memo.php','memo', 'width=700px, height=500px, left=100px, top=50px, scrollbars=yes, resizable=no, status=no, menubar=0'); }

/// ajax

	var loadedobjects="";var rootdomain="http://"+window.location.hostname;function ajaxload(url,containerid){var page_request=false;if(window.XMLHttpRequest){page_request=new XMLHttpRequest();}else{if(window.ActiveXObject){try{page_request=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{page_request=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}else{return false;}}page_request.onreadystatechange=function(){loadpage(page_request,containerid);};url=url+"&rnd="+Math.random();page_request.open("GET",url,true);page_request.send(null);}function loadpage(page_request,containerid){if(page_request.readyState==4&&(page_request.status==200||window.location.href.indexOf("http")==-1)){document.getElementById(containerid).innerHTML=page_request.responseText;}}function loadobjs(){if(!document.getElementById){return ;}for(i=0;i<arguments.length;i++){var file=arguments[i];var fileref="";if(loadedobjects.indexOf(file)==-1){if(file.indexOf(".js")!=-1){fileref=document.createElement("script");fileref.setAttribute("type","text/javascript");fileref.setAttribute("src",file);}else{if(file.indexOf(".css")!=-1){fileref=document.createElement("link");fileref.setAttribute("rel","stylesheet");fileref.setAttribute("type","text/css");fileref.setAttribute("href",file);}}}if(fileref!=""){document.getElementsByTagName("head").item(0).appendChild(fileref);loadedobjects+=file+" ";}}}


// quick
String.prototype.toInteger=function(){return this.replace(/[^0-9]/g,'')*1;}
function floatScroll(div_id,origin_top,limit_top,margin_top){var d,t,s,g,target_height;origin_top*=1;limit_top*=1;margin_top*=1;d=document.getElementById(div_id);s=document.body.scrollTop+"";target_height=s.toInteger()+margin_top;if(target_height<limit_top){target_height=origin_top;}
t=d.style.top.toInteger();if(t!=target_height){g=Math.ceil((t-target_height)/5);if(g>1000){g=1000;}
else if(g<-1000){g=-1000;}
d.style.top=(t-g)+"px";}
setTimeout("floatScroll('"+div_id+"', "+origin_top+", "+limit_top+", "+margin_top+")",1);}
function quick() {
	b = document.getElementById("floatmenu");
	floatScroll("floatmenu", 508, 508, 300); //ÃÊ±âÀ§Ä¡, ½ºÅ©·ÑÈÄ À§Ä¡, 10Àº ½ºÅ©·ÑÈÄ ÃÖ»óÀ§¿ÍÀÇ °£°Ý
}
