

function XMLtoAraay(fileName, depth1, depth2)
{	
	var depth3 = null;

	var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); 
	xmlDoc.async = false;
	xmlDoc.load(fileName);

	var menuList = new Array();

	if (xmlDoc.readyState == 4)
	{
		var root = xmlDoc.documentElement;
		var titleMenu = new Array();
		
		menuList[0] = root.attributes[0].value;

		for(var i=0; i<root.childNodes.length; i++)
		{
			var tmp = new Array();
			tmp[0] = root.childNodes[i].attributes[0].value;
			tmp[1] = root.childNodes[i].attributes[1].value;
			tmp[2] = root.childNodes[i].attributes[2].value;
			
			titleMenu[i] = tmp;
		}
		
		menuList[1] = titleMenu;
		
		if(depth1 != null) 
		{
			menuList[2] = depth1;
			var arrDepth1 = new Array();
			
			for(var i=0; i<root.childNodes[depth1].childNodes.length; i++)
			{
				var tmp = new Array();
				try
				{
					tmp[0] = root.childNodes[depth1].childNodes[i].attributes[0].value;
					tmp[1] = root.childNodes[depth1].childNodes[i].attributes[1].value;
					tmp[2] = root.childNodes[depth1].childNodes[i].attributes[2].value;
					arrDepth1[i] = tmp;
				}
				catch(e)
				{
				}
			}
			
			menuList[3] = arrDepth1;
			
			if(depth2 != null)
			{
				menuList[4] = depth2;
				var arrDepth2 = new Array();
				
				for(var i=0; i<root.childNodes[depth1].childNodes[depth2].childNodes.length; i++)
				{
					var tmp = new Array();
					tmp[0] = root.childNodes[depth1].childNodes[depth2].childNodes[i].attributes[0].value;
					tmp[1] = root.childNodes[depth1].childNodes[depth2].childNodes[i].attributes[1].value;
					tmp[2] = root.childNodes[depth1].childNodes[depth2].childNodes[i].attributes[2].value;
				
					arrDepth2[i] = tmp;
				}
				
				menuList[5] = arrDepth2;
				
				if(depth3 != null)
				{
					menuList[6] = depth3;
					var arrDepth3 = new Array();
					
					for(var i=0; i<root.childNodes[depth1].childNodes[depth2].childNodes[depth3].childNodes.length; i++)
					{
						var tmp = new Array();
						tmp[0] = root.childNodes[depth1].childNodes[depth2].childNodes[depth3].childNodes[i].attributes[0].value;
						tmp[1] = root.childNodes[depth1].childNodes[depth2].childNodes[depth3].childNodes[i].attributes[1].value;
						tmp[2] = root.childNodes[depth1].childNodes[depth2].childNodes[depth3].childNodes[i].attributes[2].value;
						
						arrDepth3[i] = tmp;
					}
					
					menuList[7] = arrDepth3;
				}
			}
		}
	}
	else
	{
		alert("XML 파일을 찾을 수 없습니다.");
	}
	
	if(menuList.length > 0)
	{
		return menuList;
	}
	else
	{
		return null;
	}
}

function StyleXMLtoAraay(fileName, styleType)
{
	var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); 
	xmlDoc.async = false;
	xmlDoc.load(fileName);

	var StyleList = new Array();

	if (xmlDoc.readyState == 4)
	{
		var root = xmlDoc.documentElement;
		
		StyleList[0] = root.attributes[0].value;
	
		for(var i=0; i<root.childNodes.length; i++)
		{
			if(styleType == root.childNodes[i].attributes[0].value)
			{
				StyleList[1] = root.childNodes[i].childNodes[0].childNodes[0].nodeValue;
				StyleList[2] = root.childNodes[i].childNodes[1].childNodes[0].nodeValue;
				StyleList[3] = root.childNodes[i].childNodes[2].childNodes[0].nodeValue;
				StyleList[4] = root.childNodes[i].childNodes[3].childNodes[0].nodeValue;
				StyleList[5] = root.childNodes[i].childNodes[4].childNodes[0].nodeValue;
				StyleList[6] = root.childNodes[i].childNodes[5].childNodes[0].nodeValue;
			}
		}
	}
	else
	{
		alert("XML 파일을 찾을 수 없습니다.");
	}

	if(StyleList.length > 0)
	{
		return StyleList;
	}
	else
	{
		return null;
	}
} 

function CreateMenu(menuList, styleList, depth2, depth3, locationInfo)
{
	if(menuList != null || menuList.length > 0)
	{
		var styleURL = styleList[0];
		var mainURL = menuList[0];

		var LinkStyle01Def1 = 'font-family: \"굴림\", \"굴림체\", \"Arial\", \"Verdana\"; text-decoration:none; cursor:hand; padding-top:10px; padding-left:27px; font-size:12px; color:#58595B; width:100%; height:100%';
		var LinkStyle01Def2 = 'font-family: \"굴림\", \"굴림체\", \"Arial\", \"Verdana\"; text-decoration:none; cursor:hand; padding-top:10px; padding-left:27px; font-size:12px; color:#ffffff; width:100%; height:100%';
		var LinkStyle01Out  = 'style.fontFamily= \"굴림\", \"굴림체\", \"Arial\", \"Verdana\"; style.textDecoration=\"none\"; style.cursor=\"hand\"; style.paddingTop=\"10px\"; style.paddingLeft=\"27px\"; style.fontSize=\"12px\"; style.color=\"#58595B\";';
		var LinkStyle01Ove  = 'style.fontFamily= \"굴림\", \"굴림체\", \"Arial\", \"Verdana\"; style.textDecoration=\"none\"; style.cursor=\"hand\"; style.paddingTop=\"10px\"; style.paddingLeft=\"27px\"; style.fontSize=\"12px\"; style.color=\"#ffffff\";';

		var LinkStyle02Def1 = 'font-family: \"굴림\", \"굴림체\", \"Arial\", \"Verdana\"; text-decoration:none; cursor:hand; padding-top:7px; padding-left:30px; font-size:12px; color:#58595B; width:100%; height:100%';
		var LinkStyle02Def2 = 'style.fontFamily= \"굴림\", \"굴림체\", \"Arial\", \"Verdana\"; style.textDecoration=\"none\"; style.cursor=\"hand\"; style.paddingTop=\"7px\"; style.paddingLeft=\"30px\"; style.fontSize=\"12px\"; style.color=\"#ffffff\"; style.width=\"100%\"; style.height=\"100%\"; ';
		var LinkStyle02Out  = 'style.fontFamily= \"굴림\", \"굴림체\", \"Arial\", \"Verdana\"; style.textDecoration=\"none\"; style.cursor=\"hand\"; style.paddingTop=\"7px\"; style.paddingLeft=\"30px\"; style.fontSize=\"12px\"; style.color=\"#58595B\"; ';
		var LinkStyle02Ove  = 'style.fontFamily= \"굴림\", \"굴림체\", \"Arial\", \"Verdana\"; style.textDecoration=\"none\"; style.cursor=\"hand\"; style.paddingTop=\"7px\"; style.paddingLeft=\"30px\"; style.fontSize=\"12px\"; style.color=\"' + styleList[4] + '\"; ';

		var LinkStyle03Def1 = 'font-family: \"굴림\", \"굴림체\", \"Arial\", \"Verdana\"; text-decoration:none; cursor:hand; padding-top:7px; padding-left:36px; font-size:11px; color:#58595B; width:100%; height:100%';
		var LinkStyle03Def2 = 'style.fontFamily= \"굴림\", \"굴림체\", \"Arial\", \"Verdana\"; style.textDecoration=\"none\"; style.cursor=\"hand\"; style.paddingTop=\"7px\"; style.paddingLeft=\"36px\"; style.fontSize=\"11px\"; style.color=\"#ffffff\"; style.width=\"100%\"; style.height=\"100%\"; ';
		var LinkStyle03Out  = 'style.fontFamily= \"굴림\", \"굴림체\", \"Arial\", \"Verdana\"; style.textDecoration=\"none\"; style.cursor=\"hand\"; style.paddingTop=\"7px\"; style.paddingLeft=\"36px\"; style.fontSize=\"11px\"; style.color=\"#58595B\"; ';
		var LinkStyle03Ove  = 'style.fontFamily= \"굴림\", \"굴림체\", \"Arial\", \"Verdana\"; style.textDecoration=\"none\"; style.cursor=\"hand\"; style.paddingTop=\"7px\"; style.paddingLeft=\"36px\"; style.fontSize=\"11px\"; style.color=\"' + styleList[4] + '\"; ';


		var menu = '';
		menu += "<table width='195px' border='0' cellspacing='0px' cellpadding='0px'>";
		menu += "	<tr>";
		menu += "		<td><img src='" + styleURL + styleList[5] + "' width='195' height='128'></td>";
		menu += "	</tr>";
		menu += "   <tr>";
        menu += "		<td height='10'></td>";
		menu += "   </tr>";
		menu += "		<table width='195px' height='100%' border='0' cellpadding='0' cellspacing='0' >";

		for(var i=0; i<menuList[1].length; i++)
		{
			var LinkType = '';
			if(menuList[1][i][1] == '1')
			{
				LinkType = "#' onClick=\"window.open('" + menuList[1][i][2] + "', '', ''); return false;\" ";
			}else{
				LinkType = menuList[0] + menuList[1][i][2] + "'";
			}

			var depth = -1;
			if(depth2 == null)
			{
				depth = locationInfo;
			}else{
				depth = depth2;
			}

			menu += "		<tr>";
			if(depth == i)
			{
				menu += "		<td height='30px' style='background-image:url(" + styleURL + styleList[2] + ");'  onMouseOver=\"style.backgroundImage='url(" + styleURL + styleList[2] + ")';\"  onMouseOut=\"style.backgroundImage='url(" + styleURL + styleList[2] + ")';\" >";
				menu += "			<a href='" + LinkType +"' style='" + LinkStyle01Def2 + "' onMouseOver='" + LinkStyle01Ove + "'  onMouseOut='" + LinkStyle01Ove + "' >" + menuList[1][i][0] + "</a>";
			}else{
				menu += "		<td height='30px' style='background-image:url(" + styleURL + styleList[1] + ");'  onMouseOver=\"style.backgroundImage='url(" + styleURL + styleList[2] + ")';\"  onMouseOut=\"style.backgroundImage='url(" + styleURL + styleList[1] + ")';\" >";
				menu += "			<a href='" + LinkType +"' style='" + LinkStyle01Def1 + "' onMouseOver='" + LinkStyle01Ove + "'  onMouseOut='" + LinkStyle01Out + "' >" + menuList[1][i][0] + "</a>";
			}

			menu += "			</td>";
			menu += "		</tr>";
			
			if(menuList[3] != null && menuList[2] == i)
			{
				if(menuList[3].length > 0)
				{
					for(var j=0; j<menuList[3].length; j++)
					{
						var LinkType2 = '';
						if(menuList[3][j][1] == '1')
						{
							LinkType2 = "#' onClick=\"window.open('" + menuList[3][j][2] + "', '" + menuList[3][j][0] + "', ''); return false;\" ";
						}else{
							LinkType2 = menuList[0] + menuList[3][j][2] + "'";
						}

						menu += "<tr>";
						menu += "	<td height='25px' style='background-image:url(" + styleURL + styleList[3] + ");'>";
						menu += "		<a href='" + LinkType2 + "' style='" + LinkStyle02Def1 + "' onMouseOver='" + LinkStyle02Ove + "'  onMouseOut='" + LinkStyle02Out + "' >" + menuList[3][j][0] + "</a>";
						menu += "	</td>";
						menu += "</tr>";

						if(menuList[4] == j)
						{
							for(k=0; k<menuList[5].length; k++)
							{
								var LinkType3 = '';
								if(menuList[5][k][1] == '1')
								{
									LinkType3 = "#' onClick=\"window.open('" + menuList[5][k][2] + "', '" + menuList[5][k][0] + "', ''); return false;\" ";
								}else{
									LinkType3 = menuList[0] + menuList[5][k][2] + "'";
								}

								menu += "<tr>";
								menu += "	<td height='25px' style='background-image:url(" + styleURL + styleList[6] + ");'>";
								menu += "		<a href='" + LinkType3 + "' style='" + LinkStyle03Def1 + "' onMouseOver='" + LinkStyle03Ove + "'  onMouseOut='" + LinkStyle03Out + "'>" + menuList[5][k][0] + "</a>";
								menu += "	</td>";
								menu += "</tr>";
							}
						}
					}
					menu += "	<tr>";
					menu += "		<td height='10px' style='background-image:url(" + styleURL + styleList[3] + ");'></td>";
					menu += "	</tr>";
				}
			}
		}
	
		menu += "		</table>";
		menu += "	<tr>";
		menu += "		<td valign='top'>";
		menu += "			";
		menu += "		</td>";
		menu += "	</tr>";
		menu += "</table>";

		return menu;
	}else{
		return null;
	}
}


function onLoadPage(fileName, depth2, depth3, styleType, locationInfo)
{
	
	var xmlUrl = "http://www.cjnu.ac.kr/main/Common/xml/";

	var styleList = StyleXMLtoAraay(xmlUrl + "style.xml", styleType);
	
	var menuList = XMLtoAraay(xmlUrl + fileName, depth2, depth3);
	
	var menuhtml = CreateMenu(menuList, styleList, depth2, depth3, locationInfo);
	
	document.all.DivMenu.innerHTML = menuhtml;

	document.all.bottom.innerHTML = CreateBottom(styleList) + CreateQuickBanner();

	OnLoad();

	document.title = "충주대학교에 오신 것을 환영합니다.";
}



function CreateBottom(styleList)
{
	var styleURL = styleList[0];

	var menu = '';

	menu += "<table width='195px' border='0' cellspacing='0' cellpadding='0'>";
	menu += "	<tr>";
	menu += "		<td style='background-image:url(" + styleURL + styleList[6] + ");'>&nbsp;&nbsp;&nbsp;</td>";
	menu += "	</tr>";
	menu += "	<tr>";
	menu += "		<td style='background-image:url(" + styleURL + styleList[6] + ");'>&nbsp;&nbsp;&nbsp;</td>";
	menu += "	</tr>";
	menu += "</table>";

	menu += "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
	menu += "	<tr>";
	menu += "		<td background='/Main/Images/Common/line.png' height='15'></td>";
	menu += "	</tr>";
	menu += "	<tr>";
	menu += "		<td>";
	menu += "<table width='980' border='0' cellspacing='0' cellpadding='0'>";
	menu += "	<tr>";
	menu += "		<td align='center' class='bottom_con'><a href='http://portal.cjnu.ac.kr/' target='_blank' class='bot' onFocus='blur()'><font style='font-size:11px;'>포탈시스템</font></a><font style='font-size:11px;'>ㅣ</font><a href='http://www.cjnu.ac.kr/Main/Etc/privacy.jsp' class='bot' onFocus='blur()'><a href='http://www.cjnu.ac.kr/Main/Etc/Mobil.jsp' class='bot' onFocus='blur()'><font style='font-size:11px;'>무선랜서비스</font></a><font style='font-size:11px;'>ㅣ</font><a href='http://www.cjnu.ac.kr/Main/Etc/acrc.jsp' class='bot' onFocus='blur()'><font style='font-size:11px;'>공직청렴신문고</font></a><font style='font-size:11px;'>ㅣ</font><a href='http://www.cjnu.ac.kr/Main/Etc/Disclosure.jsp' class='bot' onFocus='blur()'><font style='font-size:11px;'>정보공개</font></a><font style='font-size:11px;'>ㅣ</font></a><a href='http://www.cjnu.ac.kr/Main/Etc/privacy.jsp' class='bot' onFocus='blur()'><font style='font-size:11px;'>개인정보보호정책</font></a><font style='font-size:11px;'>ㅣ</font><a href='http://www.cjnu.ac.kr/Main/Etc/e-mail.jsp' class='bot' onFocus='blur()'><font style='font-size:11px;'>이메일무단수집거부</font></a><font style='font-size:11px;'>ㅣ</font><a href='http://www.cjnu.ac.kr/Main/Etc/FamilySites.jsp' class='bot' onFocus='blur()'><font style='font-size:11px;'>학내주요사이트</font></a><font style='font-size:11px;'>ㅣ</font><a href='http://www.cjnu.ac.kr/Main/Etc/homepage.jsp' class='bot' onFocus='blur()'><font style='font-size:11px;'>홈페이지개선의견</font></a></td>";
	menu += "	</tr>";
	menu += "	<tr>";
	menu += "		<td>&nbsp;</td>";
	menu += "	</tr>";
	menu += "	<tr>";
	menu += "		<td>";
	menu += "			<table width='960' border='0' cellspacing='0' cellpadding='0'>";
	menu += "				<tr>";
	menu += "					<td width='30%'>&nbsp;</td>";
	menu += "					<td class='bottom_con'><font style='font-size:11px;'>충주캠퍼스 380-702 충청북도 충주시 대학로 50 TEL 043)841-5114 <br>증평캠퍼스 368-701 충청북도 증평군 증평읍 대학로 61 TEL 043)820-5114<br>서울사무소 157-840 서울시 강서구 등촌1동 645-11 한국정보화진흥원 5층 TEL 02)537-6280</font></td>";
	menu += "				</tr>";
	menu += "			</table>";
	menu += "		</td>";
	menu += "	</tr>";
	menu += "	<tr>";
	menu += "		<td align='center' class='bottom_con'> Copyright 2008 ⓒ ChungJu National University. All rights reserved. <a href='mailto:webmaster@cjnu.ac.kr' class='bot' onFocus='blur()'><font color='058AE7'>webmasterⓒcjnu.ac.kr</font></a></td>";
	menu += "	</tr>";
	menu += "</table>";
	menu += "		</td>";
	menu += "	</tr>";
	menu += "</table>";

	

	return menu;
}


function CreateQuickBanner()
{
	var menu = '';
	menu += "<div id='divQuickLink' style='position:absolute; left:905px; top:100px;'>";
	menu += "	<table width='99' border='0' cellpadding='0' cellspacing='0'>";
	menu += "		<tr>";
	menu += "        <td>";

	menu += "			<table width='99' border='0' cellspacing='0' cellpadding='0'>";
	menu += "                <tr>";
	menu += "                    <td colspan='3'><img src='/QuickBannerImg/q_top.png' width='99' height='35' /></td>";
	menu += "                </tr>";
	menu += "                <tr>";
	menu += "                    <td align='center'>";

	menu += "						<table width='100%' border='0' cellpadding='0' cellspacing='0'>";
	menu += "                            <tr><td width='1' bgcolor='#044192'><img src='/Main/Images/Common/q_null.gif' width='1'><td><td>";



	menu += "						<table width='99%' border='0' cellpadding='0' cellspacing='0'>";
	menu += "                            <tr>";
	menu += "                                <td class='quick1' ><a href='#' onclick=\"window.open('http://is.cjnu.ac.kr/','','');\"   onfocus='blur();'>종합정보시스템</a></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td><img src='/Main/Images/Common/q_line01.gif' height='1'></td>";
	menu += "                            </tr>";

	menu += "                            <tr> ";
	menu += "                                <td class='quick1' ><a href='http://www.cjnu.ac.kr/Main/Life/Haksa/month.jsp'  onfocus='blur();'>학사일정</a></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td><img src='/Main/Images/Common/q_line01.gif' height='1'></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td class='quick1' ><a href='http://www.cjnu.ac.kr/Main/Life/Haksa/cert.jsp'   onfocus='blur();'>증명서/학생증</a></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td><img src='/Main/Images/Common/q_line01.gif' height='1'></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td class='quick1' ><a href='http://www.cjnu.ac.kr/Main/Life/Fee/tuition.jsp'  onfocus='blur();'>장학정보</a></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td><img src='/Main/Images/Common/q_line01.gif' height='1'></td>";
	menu += "                            </tr>";

 	menu += "                           <tr>";
 	menu += "                               <td class='quick1' ><a href='http://www.cjnu.ac.kr/Main/Life/Campusact/study.jsp'  onfocus='blur();'>학생활동</a></td>";
 	menu += "                           </tr>";

	menu += "                            <tr>";
	menu += "                                <td><img src='/Main/Images/Common/q_line01.gif' height='1'></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td class='quick1' ><a href='#' onclick=\"window.open('http://chains.cjnu.ac.kr/','','');\"    onfocus='blur();'>중앙도서관</a></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td><img src='/Main/Images/Common/q_line01.gif' height='1'></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td class='quick1' ><a href='#' onclick=\"window.open('http://www.cjnunews.com/','','');\"   onfocus='blur();'>충주대신문</a></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td><img src='/Main/Images/Common/q_line01.gif' height='1'></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
 	menu += "                               <td class='quick1' ><a href='#' onclick=\"window.open('http://cbs.cjnu.ac.kr/','','');\"   onfocus='blur();'>충주대방송국</a></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td><img src='/Main/Images/Common/q_line01.gif' height='1'></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td class='quick1' ><a href='http://www.cjnu.ac.kr/Main/Life/Traffic/schoolbus.jsp'  onfocus='blur();'>통학정보</a></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td><img src='/Main/Images/Common/q_line01.gif' height='1'></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td class='quick1' ><a href='#' onclick=\"window.open('http://chungju.njob.net/','','');\"   onfocus='blur();'>취업정보</a></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td><img src='/Main/Images/Common/q_line01.gif' height='1'></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td class='quick1' ><a href='#' onclick=\"window.open('http://dorm.cjnu.ac.kr/','','');\"   onfocus='blur();'>생활관</a></td>";
	menu += "                            </tr>";

	menu += "                            <tr>";
	menu += "                                <td><img src='/Main/Images/Common/q_line01.gif' height='1'></td>";
	menu += "                            </tr>";

	menu += "                        </table>";


	menu += "               </td><td width='1' bgcolor='#044192'><img src='/Main/Images/Common/q_null.gif' width='1'></td> </tr>";
	menu += "           </table>";


	menu += "					</td>";
	menu += "                </tr>";
	menu += "                <tr>";
	menu += "                    <td colspan='3'><img src='/QuickBannerImg/q_bott.png' width='99' height='15' /></a>";
	menu += "                </tr>";
	menu += "           </table>";

	menu += "		 </td>";
	menu += "		</tr>";
 	menu += "		<tr>";
 	menu += "			<td align='center'><a href='#'><img src='/QuickBannerImg/buttom.gif' width='58' height='18' onclick='document.body.scrollTop;' /></a></td>";
	menu += "		</tr>";
	menu += "	</table>";
	menu += "</div>";

	return menu;
}



var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");

function CheckUIElements(){
	var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;
	
	if ( bNetscape4plus ) {
		yMenuFrom   = document["divQuickLink"].top;
		yMenuTo     = top.pageYOffset + 91;
	}
	else if ( bExplorer4plus ) {
		yMenuFrom   = parseInt (divQuickLink.style.pixelTop, 10);
		yMenuTo     = document.body.scrollTop + 140;
	}
	
	timeoutNextCheck = 500;
	
	if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
		setTimeout ("CheckUIElements()", timeoutNextCheck);
		return;
	}
	
	if ( yButtonFrom != yButtonTo ) {
		yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
		if ( yButtonTo < yButtonFrom )
			yOffset = -yOffset;
		
		if ( bNetscape4plus )
		document["divLinkButton"].top += yOffset;
		else if ( bExplorer4plus )
			divLinkButton.style.pixelTop = parseInt (divLinkButton.style.pixelTop, 10) + yOffset;
		
		timeoutNextCheck = 10;
	}
	if ( yMenuFrom != yMenuTo ) {
		yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
		if ( yMenuTo < yMenuFrom )
			yOffset = -yOffset;
		
		if ( bNetscape4plus )
		document["divQuickLink"].top += yOffset;
		else if ( bExplorer4plus )
			divQuickLink.style.pixelTop = parseInt (divQuickLink.style.pixelTop, 10) + yOffset;
		
		timeoutNextCheck = 10;
	}
	
	setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function OnLoad() {
	var y;
	if ( top.frames.length )
		if ( bNetscape4plus ) {
			document["divQuickLink"].top = top.pageYOffset + 135;
			document["divQuickLink"].visibility = "visible";
		}
	else if ( bExplorer4plus ) {
		divQuickLink.style.pixelTop = document.body.scrollTop + 135;
		divQuickLink.style.visibility = "visible";
	}
	CheckUIElements();
	return true;
}


	