﻿var tempHtml;
var tempStr1;
var tempStr2;
if (section == null)	var section = 0;
if (level1 == null)	var level1 = "";
if (level2 == null)	var level2 = "";
if (level3 == null)	var level3 = "";
if (selectArray == null)	var selectArray = null;
var id1 = null;
var id2 = null;
var id3 = null;
var d = document;

function init()
{
	setBtnOver();
}

function genNav() {
	var flashvars = {};
	flashvars.section = section;
	flashvars.path = path;
	flashvars.FLAGpath = flag;
	flashvars.default_lang = lang;
	var params = {};
	params.wmode = "transparent";
	var attributes = {};
	attributes.id = "loadAll";
	
	if (section == 1) 
	{
		swfobject.embedSWF("/images/swf/loadAll.swf", "myAlternativeContent", "926", "460", "9.0.0", false, flashvars, attributes);
	} 
	else if (section == 7) 
	{
		swfobject.embedSWF("/images/swf/loadAll_inner.swf", "myAlternativeContent", "926", "460", "9.0.0", false, flashvars, attributes);
	}
	else 
	{
		swfobject.embedSWF("/images/swf/top_menu.swf", "myAlternativeContent", "926", "460", "9.0.0", false, flashvars, params, attributes);
	}
	
}

function genNav_uncut() {
	var flashvars = {};
	flashvars.section = section;
	flashvars.path = path;
	flashvars.FLAGpath = flag;
	flashvars.default_lang = lang;
	var params = {};
	params.wmode = "transparent";
	var attributes = {};
	attributes.id = "loadAll";
	
	if (section == 1) 
	{
		swfobject.embedSWF("/images/swf/loadAll_uncut.swf", "myAlternativeContent", "926", "460", "9.0.0", false, flashvars, attributes);
	} 
	else if (section == 7) 
	{
		swfobject.embedSWF("/images/swf/loadAll_inner.swf", "myAlternativeContent", "926", "460", "9.0.0", false, flashvars, attributes);
	}
	else 
	{
		swfobject.embedSWF("/images/swf/top_menu.swf", "myAlternativeContent", "926", "460", "9.0.0", false, flashvars, params, attributes);
	}
	
}

function setBtnOver()
{
	var img = d.getElementsByTagName('img');
	
	for (var i=0; i<img.length; i++)
	{
		if (img[i].className != 'btnOver')	continue;
		if (img[i].src.indexOf('_over') >= 0)	img[i].clicked = true;
		
		img[i].onmouseover = function()
		{
			if (this.clicked)	return;
			var ext = this.src.substring(this.src.length-4, this.src.length);
			
			this.src = this.src.replace(ext, '_over' + ext);
		}
		
		img[i].onmouseout = function()
		{
			if (this.clicked)	return;
			var ext = this.src.substring(this.src.length-4, this.src.length);
			
			this.src = this.src.replace('_over' + ext, ext);
		}
	}
}