<!--
//	THIS JAVASCRIPT FILE SHOULD BE USED WITH ALL CREATIVE DOMAIN'S WEB SITES IN ORDER TO MAINTAIN CONSISTENCY
//	DO NOT MODIFY TEMPLATE PORTION OF THIS FILE
//	ANY JAVASCRIPT THAT IS ADDED, SHOULD BE DONE SO BELOW TEMPLATE SECTION OF THIS FILE


//	**************************** //
//	***** TEMPLATE - START ***** //
//	**************************** //

//	MAIN FUNCTIONS IN THIS TEMPLATE:
//	MM_preloadImages 	-	PRELOADS IMAGES
//	MM_swapImage			-	ROLLOVERS/SWAP IMAGES
//	MM_swapImgRestore	-	RESTORES ROLLOVER/SWAP IMAGES
//	MM_showHideLayers	- SHOWS/HIDES LAYERS
//	adjustPopUp				- POPS UP A NEW WINDOW THAT IS SIZED IN THE HTML TAG (FOR UNIQUE SIZED WINDOWS)
//	fixedPopUp*				- POPS UP A NEW WINDOW THAT IS SIZED IN THE JAVASCRIPT (FOR MANY WIDOWS OF THE SAME SIZE AND TYPE)
//	WM_netscapeCssFix	-	FIXES THE CSS PROBLEM IN NETSCAPE WHEN WINDOW IS RESIZED


//	THIS IS THE ONLOAD ACTION
//	*** EXAMPLE - MORE THEN ONE "ONLOAD" ***
//	<body onLoad="WM_netscapeCssFixCheckIn(); MM_preloadImages('assets/images/blank.gif','assets/images/copyofblank.gif');">


// 	THIS IS THE PRELOAD IMAGE FUNCTION
//	*** EXAMPLE - PRELOAD IMAGE ***
//	<body onLoad="MM_preloadImages('assets/images/blank.gif','assets/images/copyofblank.gif')">
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


//	THIS IS THE ROLLOVER/SWAP IMAGE FUNCTION
//	*** EXAMPLE - ROLLOVER / SWAP IMGAE ***
// 	<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','assets/images/blank.gif',1)"><img src="assets/images/blank.gif" width="100" height="100" alt="" border="0" name="Image1"></a>

//	*** EXAMPLE 2  - ROLLOVER/SWAP IMAGE & SHOW/HIDE LAYERS/DIVS TOGETHER ***
//	<a href="#" onMouseOut="MM_swapImgRestore(); MM_showHideLayers('Layer1','','show')" onMouseOver="MM_swapImage('Image1','','assets/images/blank.gif',1); MM_showHideLayers('Layer1','','hide')">

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


//	THIS IS THE SHOW/HIDE LAYER/DIV FUNCTION
//	*** EXAMPLE - SHOW/HIDE LAYER/DIV ***
//	<a href="#" onMouseOver="MM_showHideLayers('Layer1','','show')" onMouseOut="MM_showHideLayers('Layer1','','hide')">Rollover To Show</a>

//	*** EXAMPLE 2  - SHOW/HIDE LAYERS/DIVS & ROLLOVER/SWAP IMAGE TOGETHER***
//	<a href="#" onMouseOut="MM_swapImgRestore(); MM_showHideLayers('Layer1','','show')" onMouseOver="MM_swapImage('Image1','','assets/images/blank.gif',1); MM_showHideLayers('Layer1','','hide')">

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


//	THIS IS THE ADJUSTABLE POPUP WINDOW FUNCTION
//	*** EXAMPLE - ADJUSTABLE POPUP WINDOW ***
//	<a href="javascript:adjustPopUp('index.asp','200','200','Name')">PopUp</a>
function adjustPopUp (url, w, h, name) {
	var winopts = "toolbar=no,location=no,directories=no,status=no,";
	winopts = winopts + "menubar=no,scrollbars=auto,resizable=no,";
	winopts = winopts + "width=" + w + ",height=" + h; remote = window.open(url,name,winopts);
}

//	THIS IS THE ADJUSTABLE POPUP WINDOW FUNCTION
//	*** EXAMPLE - ADJUSTABLE POPUP WINDOW ***
//	<a href="javascript:adjustPopUp('index.asp','200','200','Name')">PopUp</a>
function adjustPopUpScroll(url, w, h, name) {
	var winopts = "toolbar=no,location=no,directories=no,status=no,";
	winopts = winopts + "menubar=no,scrollbars=yes,resizable=no,";
	winopts = winopts + "width=" + w + ",height=" + h; remote = window.open(url,name,winopts);
}


//	THIS IS THE CSS NETSCAPE RESIZE FIX FUNCTION
//	*** EXAMPLE - SHOW/HIDE LAYER/DIV ***
//	<body onLoad="WM_netscapeCssFixCheckIn()">
function WM_netscapeCssFix() {
  /*
    Source: Webmonkey Code Library
    (http://www.hotwired.com/webmonkey/javascript/code_library/)

    Author: Taylor
    Author Email: taylor@wired.com
    Author URL: http://www.taylor.org/
    */

  // This part was inspired by Matthew_Baird@wayfarer.com
  // It gets around another unfortunate bug whereby Netscape 
  // fires a resize event when the scrollbars pop up. This 
  // checks to make sure that the window's available size 
  // has actually changed.
  if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth || document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function WM_netscapeCssFixCheckIn() {
  // This function checks to make sure the version of Netscape 
  // in use contains the bug; if so, it records the window's 
  // width and height and sets all resize events to be handled 
  // by the WM_netscapeCssFix() function.
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.WM == 'undefined'){
      document.WM = new Object;
    }
    if (typeof document.WM.WM_scaleFont == 'undefined') {
      document.WM.WM_netscapeCssFix = new Object;
      document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
      document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
    }
    window.onresize = WM_netscapeCssFix;
  }
}

//	THIS IS THE FULL SCREEN
//	*** EXAMPLE - FULL SCREEN ***
//	<a href="#" onClick="fullScreen('home.html', 'jimi')">Test</a>
function fullScreen(link, windowName) {
        //window.open(theURL, 'title','fullscreen=yes,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=yes');

        var scw = 0;
        var sch = 0;

        if (navigator.appName == 'Microsoft Internet Explorer' && (navigator.platform.substring(0,3) == 'Win')) { //{ // 
                window.open(link, windowName,'fullscreen=yes,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=yes');
        }

        else if (navigator.appName == 'Netscape' && navigator.platform == 'MacPPC') {
                var scw=screen.width;
                var sch=screen.height;
                window.open (link, windowName, "screenX=0,screenY=0,outerWidth=" + scw + ",outerHeight=" + sch);
        }
        else {
                var scw=screen.width;
                var sch=screen.height;
                window.open (link, windowName, "screenX=0,screenY=0,Width=" + scw + ",Height=" + sch);  
        }
}




//	************************** //
//	***** TEMPLATE - END ***** //
//	************************** //


// ***************************************************** //
// ***** ADD ADDTIONAL JAVASCRIPT BELOW THIS POINT ***** //
// ***************************************************** //

//	THIS IS THE FIXED POPUP WINDOW FUNCTION
//	*** EXAMPLE - FIXED POPUP WINDOW ***
//	<a href="javascript:fixedPopUp('index.asp','Name')">PopUp</a>
function fixedPopUp (url, name) {
	var winopts = "toolbar=no,location=no,directories=no,status=no,width=200,height=600";
	winopts = winopts + "menubar=no,scrollbars=auto,resizable=no,";
	remote = window.open(url,name,winopts);
}

function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

function openModalWindow(theURL,winName,features) { 
  window.showModalDialog(theURL,winName,features);
}

function msgposit(){ 
	//message.style.posLeft = event.x + 10 + document.body.scrollLeft;
	//message.style.posTop = event.y - 10 + document.body.scrollTop;
	if (parent.message.offsetWidth + event.x - 70 > 647)
	{
		parent.message.style.posLeft = event.x - parent.message.offsetWidth + 20;
	}else{
		parent.message.style.posLeft = event.x + 46;
	}

	if (parent.message.offsetHeight + event.y + 200 > 766)
	{
		parent.message.style.posTop = 766 - parent.message.offsetHeight - 120;
	}else{
		parent.message.style.posTop = event.y + 90;
	}
}

function msgset(sMemo){ 
	var text;
	text ='<table border="0" cellpadding="1" cellspacing="0" style="font-size:9pt; border-width:1; border-color:black; border-style:solid; word-break:break-all;"><tr><td width="350" bgcolor="white" style="filter:alpha(opacity=90);"><table cellpadding="6" cellspacing="0" width="100%"><tr><td width="340"><span style="font-size:9pt;">' + sMemo + '</span></td></tr></table></td></tr></table>';
	parent.message.innerHTML=text;
} 

function msghide(){
	parent.message.innerHTML='';
	parent.message.style.posLeft = 0;
	parent.message.style.posTop = 0;
}

function openImg(oFile){
	var sFile = oFile.src;
	sFile = sFile.substring(0,sFile.lastIndexOf(".")) + sFile.substring(sFile.lastIndexOf("."));
	var winImg = window.open("/js/openImg.htm?file="+sFile,'Img','status=no,scrollbars=no,resizable=no,width=500,height=450');
	winImg.focus();
}

function openImg2(oFile){
	var sFile = oFile.src;
	sFile = sFile.substring(0,sFile.lastIndexOf(".")-2) + sFile.substring(sFile.lastIndexOf("."));
	var winImg = window.open("../openImg.htm?file="+sFile,'Img','status=no,scrollbars=no,resizable=no,width=800,height=600');
	winImg.focus();
}

function setFont(){
	setSearchWord();

	var sFont = parent.getFont();
	if (sFont != null)
	{
		document.body.style.font = sFont.substring(5) + 'pt,' + sFont.substring(0,2);
	}
}

function setSearchWord(){
	var values = getValues();
	var word = unescape(values["word"]);

	if (word != ""){
		var aWord = word.split(" ");
		var sBody = document.body.innerHTML;
	
		for (i=0; i<aWord.length; i++){
			sBody = sBody.replace(new RegExp(aWord[i],"gi"),aWord[i]);
		}

		document.body.innerHTML = sBody;
	}
}

function getValues(){
	var sURL = document.location.href;
	//var sURL = document.URL;
	var urlEnd =sURL.indexOf('?');
	var values = new Array();
	var names;

	if (urlEnd != -1){
		var params = sURL.substring(urlEnd+1, sURL.length).split('&');
		for(i=0; i<params.length; i++) {
			names = params[i].split('=');
			values[names[0]] = names[1];
		}
	}
	return values;
}

function Print(){
		
		if (parent.MainFrame.document.all["ifrmContent"] != null){
			parent.MainFrame.ifrmContent.focus();
			window.print();
		}else{
			parent.MainFrame.focus();
			window.print();
			}
	}

<!--
var win1Open = null

function displayImage(picName, windowName, windowWidth, windowHeight){
return window.open(picName,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + (parseInt(windowWidth)+20) + ",height=" + (parseInt(windowHeight)+15)) 
}

function winClose(){
if(win1Open != null) win1Open.close() 
}

function doNothing(){}
//-->

<!-- 
function displayImage(picName, windowName, windowWidth, windowHeight){
var winHandle = window.open("" ,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + windowWidth + ",height=" + windowHeight)
if(winHandle != null){
var htmlString = "<html><head><title>Picture</title></head>" 
htmlString += "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>"
htmlString += "<a href=javascript:window.close()><img src=" + picName + " border=0 alt=´Ý±â></a>"
htmlString += "</body></html>"
winHandle.document.open()
winHandle.document.write(htmlString)
winHandle.document.close()
} 
if(winHandle != null) winHandle.focus()
return winHandle
}
//-->

<!--
function openNewWindow(window) {
open (window,"NewWindow","left=0, top=0, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=365, height=180");
}
function openNewWindow2(window) {
open (window,"NewWindow","left=0, top=0, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=365, height=330");
}
//-->

<!--
var win1Open = null

function displayImage(picName, windowName, windowWidth, windowHeight){
return window.open(picName,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + (parseInt(windowWidth)+20) + ",height=" + (parseInt(windowHeight)+15)) 
}

function winClose(){
if(win1Open != null) win1Open.close() 
}

function doNothing(){}
//-->

function OpenChild(cn) {
	div=document.getElementById(cn);
	visible=(div.style.display!="none");
	if (visible) {
		div.style.display="none";
	} else  {
		div.style.display="block";
		}//ÇÏÀ§ ¸Þ´º - mid_cate
}
//-->

<!--
function notice_getCookie( name )
{
        var nameOfCookie = name + "=";
        var x = 0;
        while ( x <= document.cookie.length )
        {
                var y = (x+nameOfCookie.length);
                if ( document.cookie.substring( x, y ) == nameOfCookie ) {
                        if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
                                endOfCookie = document.cookie.length;
                        return unescape( document.cookie.substring( y, endOfCookie ) );
                }
                x = document.cookie.indexOf( " ", x ) + 1;
                if ( x == 0 )
                        break;
        }
        return "";
}
function onchange_location(va) {
	window.open(va,'','');
}

function namosw_goto_byselect(sel, targetstr)
{
  var index = sel.selectedIndex;
  if (sel.options[index].value != '') {
     if (targetstr == 'blank') {
       window.open(sel.options[index].value, 'win1');
     } else {
       var frameobj;
       if ((frameobj = eval(targetstr)) != null)
       frameobj.location = sel.options[index].value;
     }
  }
}


<!-- ¹Ì´Ïº¸µå ·Ñ¿À¹ö
function onoff(obj)
{
var obj=document.getElementById(obj); 
if(obj.style.display=="inline") 
obj.style.display="none"; 
else obj.style.display="inline"; 
} 


function mainBoardChange(idx) {
	var obj;
	var obj2;
	for (var z=1; z<=5; z++) {
		obj = document.getElementById('mainBoard' + z);
		obj2 = document.getElementById('mainBoardMore' + z);
		obj3 = document.getElementById('bImg' + z);
		if ( obj && obj2 && obj3 ) {
			ln1 = obj3.src.substring(0,obj3.src.lastIndexOf(".") -1) + "2.gif";
			ln2 = obj3.src.substring(0,obj3.src.lastIndexOf(".") -1) + "1.gif";

			if (z == idx){
				obj.className="";
				obj2.className="more";
				obj3.src = ln1;
			} else {
				obj.className="hid";
				obj2.className="more_hid";
				obj3.src = ln2;
			}

		}
	}
}

//-->


//<!--
// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, À©µµ¿ì¸ðµå)
function flashWrite(url,w,h,id,bg,win){

	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr=
	"<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='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<embed src='"+url+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";
	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);

}
//È¸ÀÇ·Ï º¸±â ÆäÀÌÁö ¿­±â
function open_viewer(strUrl) {	
	var strTitle = "È¸ÀÇ·Ïº¸±â";	
	var width = "950";	
	var height = "600";	
	window.open(strUrl,strTitle,'width='+width+',height='+height+',resizable=yes,scrollbars=yes');	
	var viewer_win = window.open(strUrl,strTitle,'width='+width+',height='+height+',resizable=yes,scrollbars=yes');	
	viewer_win.focus();
}
//-->


