


//index menu °æ·Î //

mainlink1 = [		//1
	"/q.asp?pID=1"
];
mainlink2 = [		//2
	"/q.asp?pID=2"
];
mainlink3 = [		//3
	"/q.asp?pID=3&idx=sacred_read"
];
mainlink4 = [		//4
	"/q.asp?pID=4"
];
mainlink5 = [		//5
	"/q.asp?pID=5"
];

mainlink6 = [		//6
	"/q.asp?pID=6"
];
mainlink7 = [		//7
	"/q.asp?pID=7&idx=kilsang_notice"
];







//index link ½ºÅ©¸³Æ® //
function mainlink(Tar){
	menuTar = this['mainlink'+Tar];
	location.href= menuTar;
}


//main sub_menu °æ·Î//

mainsublink11 = [	//1
"/q.asp?pID=1&cID=0",		//
"/q.asp?pID=1&cID=6",		//
"/q.asp?pID=1&cID=1",		//
"/q.asp?pID=1&cID=2&idx=fixed_buddhist",		//
"/q.asp?pID=1&cID=3",		//
"/q.asp?pID=1&cID=4",		//
"/q.asp?pID=1&cID=5",		//

];
mainsublink12 = [	//2
"/q.asp?pID=2&cID=0",		//
"/q.asp?pID=2&cID=1&idx=snim_book",		//
"/q.asp?pID=2&cID=2&idx=snim",		//
];

mainsublink13 = [	//3
"/q.asp?pID=3&cID=0&idx=sacred_read",		//
"/q.asp?pID=3&cID=1&idx=buddhist_snim",		//
"/q.asp?pID=3&cID=2",		//
"/q.asp?pID=3&cID=3&idx=study_qna",		//
]; 

mainsublink14 = [	//4
"/q.asp?pID=4&cID=0",		//
"/q.asp?pID=4&cID=1",		//
"/q.asp?pID=4&cID=2",		//
"/q.asp?pID=4&cID=3",		//
"/q.asp?pID=4&cID=4",		//
"/q.asp?pID=4&cID=4",		//
"/q.asp?pID=4&cID=6&idx=temp_gallery",		//

];

mainsublink15 = [	//5
"/q.asp?pID=5&cID=1&idx=literature",		//
"/q.asp?pID=5&cID=2&idx=gallery_view",		//
"/q.asp?pID=5&cID=3&idx=music",		//
"/q.asp?pID=5&cID=4&idx=food",		//
"/q.asp?pID=5&cID=5&idx=ani",		//
"/q.asp?pID=5&cID=6&idx=movie2",		//
];


mainsublink16 = [	//6
"/q.asp?pID=6&cID=1&idx=shinhang_notice",		//
"/q.asp?pID=6&cID=2&idx=shinhang1",		//
"/q.asp?pID=6&cID=3&idx=shinhang2",		//
"/q.asp?pID=6&cID=4&idx=shinhang3",		//
"/q.asp?pID=6&cID=5&idx=shinhang4",		//
"/q.asp?pID=6&cID=6&idx=shinhang5",		//
"/q.asp?pID=6&cID=7&idx=shinhang6",		//
"/q.asp?pID=6&cID=8&idx=shinhang_other",		//

];


mainsublink17 = [	//7
"/q.asp?pID=7&cID=0&idx=kilsang_notice",		//
"/q.asp?pID=7&cID=1&idx=sangdam",		//
"/q.asp?pID=7&cID=2",		//
"/q.asp?pID=7&cID=3&idx=movie",		//
];



//main link ½ºÅ©¸³Æ® //
function mainsublink(subTar,subNum,subTNum){
	menusubTar = this['mainsublink'+subTar+''+subNum][subTNum-1];
	location.href= menusubTar;
}





//etc menu °æ·Î //

etclink1 = [
"/"	        //È¨
];
etclink2 = [
"/q.asp?pID=1&cID=4"					                                  //contact us
];

etclink3 = [
"/q.asp?pID=9"					                                  //sitemap
];


etclink4 = [
"/admin/ "					                                  //admin
];





//etc link ½ºÅ©¸³Æ® //
function etclink(Tar){
	menuTar = this['etclink'+Tar];
	location.href= menuTar;
}




// Flying Banner
function setVariables() {
	if (navigator.appName == "Netscape") {
		v=".top=";
		dS="document.";
		sD="";
		y="window.pageYOffset";
	}
	else {
		v=".pixelTop=";
		dS="";
		sD=".style";
		y="document.body.scrollTop";
   }
}
function checkLocation() {
	object="flyBan";
	yy=eval(y);
	eval(dS+object+sD+v+yy);
	setTimeout("checkLocation()",10);
}





// Flying Banner

var stmnLEFT = 898; // ¿ÞÂÊ ¿©¹é (ÅÂ±×ÀÎ³Ý°¡ ¿ÞÂÊ¿¡¼­ 10ÇÈ¼¿ ¶³¾îÁø °÷¿¡ º¸¿©Áý´Ï´Ù) 
var stmnGAP1 = 180; // À§ÂÊ ¿©¹é (ÅÂ±×ÀÎ³Ý°¡ À§¿¡¼­ 10ÇÈ¼¿ ¶³¾îÁø °÷¿¡ º¸¿©Áý´Ï´Ù) 
var stmnGAP2 = 0; // ½ºÅ©·Ñ½Ã ºê¶ó¿ìÀú À§ÂÊ°ú ¶³¾îÁö´Â °Å¸® 
var stmnBASE = 150; // ½ºÅ©·Ñ ½ÃÀÛÀ§Ä¡ 
var stmnActivateSpeed = 200; 
var stmnScrollSpeed = 10; 

var stmnTimer; 

function ReadCookie(name) 
{ 
var label = name + "="; 
var labelLen = label.length; 
var cLen = document.cookie.length; 
var i = 0; 

while (i < cLen) { 
                var j = i + labelLen; 

                if (document.cookie.substring(i, j) == label) { 
                                var cEnd = document.cookie.indexOf(";", j); 
                                if (cEnd == -1) cEnd = document.cookie.length; 

                                return unescape(document.cookie.substring(j, cEnd)); 
                } 

                i++; 
} 

return ""; 
} 

function SaveCookie(name, value, expire) 
{ 
var eDate = new Date(); 
eDate.setDate(eDate.getDate() + expire); 
document.cookie = name + "=" + value + "; expires=" +  eDate.toGMTString()+ "; path=/"; 
} 

function RefreshStaticMenu() 
{ 
var stmnStartPoint, stmnEndPoint, stmnRefreshTimer; 

stmnStartPoint = parseInt(STATICMENU.style.top, 10); 
stmnEndPoint = document.body.scrollTop + stmnGAP2; 
if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1; 

stmnRefreshTimer = stmnActivateSpeed; 

if ( stmnStartPoint != stmnEndPoint ) { 
                stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 ); 
                STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount ); 
                stmnRefreshTimer = stmnScrollSpeed; 
} 

stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer); 
} 

function ToggleAnimate() 
{ 
if (ANIMATE.checked) { 
                RefreshStaticMenu(); 
                SaveCookie("ANIMATE", "true", 300); 
} 
else { 
                clearTimeout(stmnTimer); 
                STATICMENU.style.top = stmnGAP1; 
                SaveCookie("ANIMATE", "false", 300); 
} 
} 

function InitializeStaticMenu() 
{ 
STATICMENU.style.left = stmnLEFT; 

         if (ReadCookie("ANIMATE") == "false") { 
                ANIMATE.checked = false; 
                STATICMENU.style.top = document.body.scrollTop + stmnGAP1; 
} 
else { 
                ANIMATE.checked = true; 
                STATICMENU.style.top = document.body.scrollTop + stmnBASE; 
                RefreshStaticMenu(); 
} 
} 
