var WEB_SERVER = "";

//document.domain = "spicus.com";
document.title = "WishingWell Einglish School";
document.write("<script type='text/javascript' src='/common/js/prototype.js'></script>");


var IE = (navigator.appName.indexOf("Microsoft")>-1);
var IE6 = (navigator.appName.indexOf("Microsoft")>-1)&&(navigator.userAgent.indexOf("MSIE 6")>-1);
var IE7 = (navigator.appName.indexOf("Microsoft")>-1)&&(navigator.userAgent.indexOf("MSIE 7")>-1);

u0=new Array(WEB_SERVER+"/index.asp","Home");
u1=new Array(WEB_SERVER+"/about/company.html","½ºÇÇÄí½º ½ºÄð");
	u1_1=new Array(WEB_SERVER+"/about/company.html","È¸»ç¼Ò°³ ¹× ºñÀü");
	u1_2=new Array(WEB_SERVER+"/about/spicus_school.html","½ºÇÇÄí½º ½ºÄðÀÌ¶õ?");
	u1_3=new Array(WEB_SERVER+"/about/video.html","È­»ó¼­ºñ½º");
	u1_4=new Array(WEB_SERVER+"/about/teaching_center.html","¼¾ÅÍ ¹× ³×ÀÌÆ¼ºê Æ©ÅÍ");
	u1_5=new Array(WEB_SERVER+"/about/pr_list.asp","È«º¸ÀÚ·á½Ç");

u2=new Array(WEB_SERVER+"/program/system.html","ÇÁ·Î±×·¥ ¾È³»");
	u2_1=new Array(WEB_SERVER+"/program/system.html","ÇÐ½À ½Ã½ºÅÛ");
	u2_2=new Array(WEB_SERVER+"/program/process.html","ÇÐ½À ½Ã½ºÅÛ");
	u2_3=new Array(WEB_SERVER+"/program/program.html","ÇÁ·Î±×·¥ ±¸¼º");

u3=new Array(WEB_SERVER+"/partnership/join_condition.html","°¡¸Í¾È³»");
	u3_1=new Array(WEB_SERVER+"/partnership/join_condition.html","°¡¸ÍÁ¶°Ç");
	u3_2=new Array(WEB_SERVER+"/partnership/join_process.html","°¡¸ÍÀýÂ÷");
	u3_3=new Array(WEB_SERVER+"/partnership/join_counsel.asp","°¡¸Í¹®ÀÇ");

u4=new Array(WEB_SERVER+"/service/notice_list.asp","°í°´¼­ºñ½º");
	u4_1=new Array(WEB_SERVER+"/service/notice_list.asp","Notice & News");
	u4_2=new Array(WEB_SERVER+"/service/faq.asp","FAQ");

u5=new Array(WEB_SERVER+"/sitemap/sitemap.html","»çÀÌÆ®¸Ê");

u6=new Array("javascript:toggleHairpin('TabVisitInfo');","FOR VISIT");
u7=new Array("javascript:toggleHairpin('TabRecruitInfo');","RECRUIT");
u10=new Array("javascript:pop('','name','width','height');","");

var file_server = "";
document.title="WishingWell Einglish School";

/*ActiveX ÇÃ·¡½¬*/
// id: flash id
// url: source url
// w: source width
// h: source height
// t: wmode (window/transparent/opaque)
function Flash(id,url,w,h,bg,t){
document.write("\
<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width="+w+" height="+h+" id="+id+">\
<param name='movie' value="+url+" />\
<param name='wmode' value="+t+" />\
<param name='bgcolor' value="+bg+" />\
<param name='allowScriptAccess' value='sameDomain' />\
<param name='quality' value='high' />\
<param name='menu' value='false' />\
<embed src="+url+" wmode="+t+" width="+w+" height="+h+" name="+id+" bgcolor="+bg+" allowScriptAccess='sameDomain' quality='high' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\
</object>\
");
}

var hn="0",sn="0",cn="0",tn="0",globalId="0",flaFarm="0",logCheck="0";
function mnav(){ //»ó´Ü³×ºñ
	var DepthName = new Array("hn","sn");
	for(i=0;i<arguments.length;i++){
		eval( DepthName[i] + "=" + arguments[i] );
		globalId = ((i==0)?"": globalId + "_") + arguments[i] ;
		flaFarm = ((i==0)?"": flaFarm + "&") + DepthName[i] + "=" + arguments[i] ;
	}
	Flash('Mainnav','/inc/fla/GNB.swf?'+flaFarm,'720','60','#FFFFFF','transparent');
}

function snav(){ //¼­ºê³×ºñ
	var DepthName = new Array("hn","sn");
	for(i=0;i<arguments.length;i++){
		eval( DepthName[i] + "=" + arguments[i] );
		globalId = ((i==0)?"": globalId + "_") + arguments[i] ;
		flaFarm = ((i==0)?"": flaFarm + "&") + DepthName[i] + "=" + arguments[i] ;
	}
	Flash("snavFla","/inc/fla/sub"+hn+".swf?"+flaFarm,"263","496","#FFFFFF","transparent");
}

function link(){
	var url = "";
	var depth = arguments.length;
	try {
		if(depth==0) return;
		else if(depth==1) url = eval("u"+arguments[0]+"[0]");
		else if(depth==2) url = eval("u"+arguments[0]+"_"+arguments[1]+"[0]");
		else if(depth==3) url = eval("u"+arguments[0]+"_"+arguments[1]+"_"+arguments[2]+"[0]");
		if(url=="") alert("ÁØºñÁßÀÔ´Ï´Ù");
		else location.href = url;
	}catch(e) { alert("ÁØºñÁßÀÔ´Ï´Ù.."); }
}

// ÆÄÀÏÆÐ½º
path = function() {
	try{
		lineMapStr ="";
		index = 0;
		currentPath="u"+globalId;
		setString("u"+globalId);
		document.write(lineMapStr);
	}catch(e){
		document.write("¿¹¿ÜÃ³¸® ¹ß»ý : " +  e);
	}
};

// ÆÄÀÏÆÐ½º ¼³Á¤
setString = function(node){
	var spStr = "" , last="";
	try{
		var url  = eval(node+"[0]");
		var name = eval(node+"[1]");
	}
	catch(e){
		document.write("¾ÆÀÌµð°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù : " + node);
	}
	var nodeId  = node;
	var spStr = " > ";
	if(node.lastIndexOf('_') != -1) setString(node.substring(0,node.lastIndexOf('_')));
	else lineMapStr += "<a href='"+eval("u0[0]")+"' class='crumb'>"+ eval("u0[1]")+"</a>" + spStr;
	if(currentPath != nodeId) lineMapStr += "<a href='"+url+"' class='crumb'>"+ name+"</a>" + spStr;
	else lineMapStr += "<strong class='crumblast'>"+ name+"</strong>";
};

// Footer---------
function Footer() {
document.write("\
<div id='footerWrap'>\
	<p class='f_logo'><img src='/img/common/footer_logo.gif' alt='SK Communications' /></p>\
	<address>\
		<p class='f_copyright'><img src='/img/common/footer_copyright.gif' alt='COPYRIGHT©Ï 2009 SPICUS SCHOOL. ALL RIGHTS RESEVED' /></p>\
		<p class='f_addr'><img src='/img/common/footer_addr.gif' alt='¼­¿ï½Ã °­³²±¸ ³íÇöµ¿ 82-18 º¥Ã³Ä³½½ºôµù SK Communications. TEL 02.3432.1114 FAX 02.3432.1625' /></p>\
	</address>\
	<p class='f_security'><img src='/img/common/footer_security.gif' alt='°³ÀÎÁ¤º¸ Ãë±Þ¹æÄ§' /></p>\
	<p class='f_spicus'><a href='http://www.spicus.com/' target='_blank'><img src='/img/common/footer_spicus.gif' alt='SPICUS' /></a></p>\
	<p class='f_langstern'><a href='http://www.langstern.com/' target='_blank'><img src='/img/common/footer_langstern.gif' alt='langstern' /></a></p>\
</div>\
");
}
// ---------Footer

// ·¹ÀÌ¾î : Å¬¸¯°ú µ¿½Ã¿¡ ¼û±â°í ´Ù¸¥ ³»¿ë ÆîÄ¡±â 
function layer_toggle(obj) {
	if(obj.style.display == 'none') obj.style.display = 'block';
	else if (obj.style.display == 'block') obj.style.display = 'none';	
}

// FAQ ³»¿ë ÆúµùÀ» À§ÇÑ Æã¼Ç 
function View(num)
{
	var answer = document.getElementById("view"+num);
	var shape = document.getElementById("title"+num);


	if (answer.style.display == "block") {
		answer.style.display = "none";
		shape.className="q";
	}else {
		answer.style.display = "block"
		shape.className="q2";
	}
}

function show(id) {
	for(num=1; num<=22; num++) document.getElementById('a'+num).style.display="none";// FAQ °³¼ö
	document.getElementById(id).style.display="block";
}

// PopUp---------
function pop(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=no,status=1,top=0,left=0') } //Popup(½ºÅ©·Ñ¹Ù¾øÀ½)
function pops(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=yes,top=0,left=0') } //Popup(½ºÅ©·Ñ¹ÙÀÖÀ½)
function popss(url,name){ window.open(url,name,'width='+screen.width+',height='+screen.height+',scrollbars=no,status=1,top=0,left=0') } //Popup(½ºÅ©·Ñ¹Ù¾øÀ½)
function newwin(url){ window.open(url,'new','location=1,directories=1,resizable=1,status=1,toolbar=1,menubar=1,scrollbars=1') } //NewPopup(½ºÅ©·Ñ¹Ù¾øÀ½)
// ---------PopUp

// Äü¸Þ´º
   function initMoving(target, position, topLimit, btmLimit) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = position;
	obj.topLimit = topLimit;
	obj.bottomLimit = document.documentElement.scrollHeight - btmLimit;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;

	if (typeof(window.pageYOffset) == "number") {
		obj.getTop = function() {
			return window.pageYOffset;
		}
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		obj.getTop = function() {
			return document.documentElement.scrollTop;
		}
	} else {
		obj.getTop = function() {
			return 0;
		}
	}

	if (self.innerHeight) {
		obj.getHeight = function() {
			return self.innerHeight;
		}
	} else if(document.documentElement.clientHeight) {
		obj.getHeight = function() {
			return document.documentElement.clientHeight;
		}
	} else {
		obj.getHeight = function() {
			return 500;
		}
	}

	obj.move = setInterval(function() {
		if (obj.initTop > 0) {
			pos = obj.getTop() + obj.initTop;
		} else {
			pos = obj.getTop() + obj.getHeight() + obj.initTop;
			//pos = obj.getTop() + obj.getHeight() / 2 - 15;
		}

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit;
		if (pos < obj.topLimit)
			pos = obj.topLimit;

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 30)
}

// RollOver
function imageOver(imgs) {
	imgs.src = imgs.src.replace("off.jpg", "on.jpg");
}
function imageOut(imgs) {
	imgs.src = imgs.src.replace("on.jpg", "off.jpg");
//  onmouseover="imageOver(this);" onmouseout="imageOut(this);"
} 



/* ÀÎ¼âÇÏ±â */
var initBody;
function beforePrint(){ 
	initBody = document.body.innerHTML; 
	document.body.innerHTML = idPrint.innerHTML;
}
function afterPrint(){ 
	document.body.innerHTML = initBody;
}
function printArea() { 
	window.print(); 
}
	window.onbeforeprint = beforePrint; 
	window.onafterprint = afterPrint;

/*ÀÛÀº ÀÌ¹ÌÁö ¿À¹ö ÇßÀ» ¶§ Å« ÀÌ¹ÌÁö º¯°æ ÇÏ±â*/
function changeimage(towhat){
	if (document.images){
	document.images.targetimage.src=towhat.src
	}
}

var myimages=new Array()

function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}

preloadimages("/img/about/teaching_big_1.gif",
"/img/about/teaching_big_2.gif",
"/img/about/teaching_big_3.gif",
"/img/about/teaching_big_4.gif")


/*Æ©ÅÍ ±³À° ÇÁ·Î±×·¥*/
<!--
function fncClick( obj )
{
    var fm  = document.frm;
    var img = fm.menu;

    for( var i=0; i<img.length; i++ )
    {
        if( img[i] === obj )
        {
            if( img[i].src.indexOf('_on') == -1 )
            {
                img[i].src = img[i].src.replace('.jpg','_on.jpg');
            }
        }
        else
        {
            img[i].src = img[i].src.replace('_on','');
        }
    }
}

//-->

/*·¹ÀÌ¾î ÆîÄ¡°í ´ÝÈ÷±â*/
function toggleLayer(whichLayer) {
	var elem, vis;
	if(document.getElementById) // this is the way the standards work
	elem = document.getElementById(whichLayer);
	else if(document.all) // this is the way old msie versions work
	elem = document.all[whichLayer];
	else if(document.layers) // this is the way nn4 works
	elem = document.layers[whichLayer];
	vis = elem.style;
	// if the style.display value is blank we try to figure it out here
	if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
	vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
	vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}
