// categories menu start
if (navigator.appName=="Microsoft Internet Explorer" || 1) {
	function fmainnav() {
		var getItem = document.getElementById("mainnav").getElementsByTagName("div");
		for (var i=0; i<getItem.length; i++) {
			getItem[i].onmouseover=function() { 
				if(    this.className=="level"){
					this.className="levelIe";
				}
			}
			getItem[i].onmouseout=function() { 
				if(    this.className=="levelIe"){
					this.className="level";
				}
			}
		}
	}
	// window.onload=fmainnav;
}
// categories menu end

var contact_array = Array();
contact_array.length = 2;
contact_array["Sofia"] = Array("support003@yotang.com", "yotang.support");
contact_array["Daisy"] = Array("support005@yotang.com", "yotang.support5");

// contact start
function get_contact_html(str_name, str_email, str_skype)
{
	var str_online_help = document.getElementById("online_help_tpl").innerHTML;
	str_online_help = str_online_help.replace(/<!--/ig, "");
	str_online_help = str_online_help.replace(/-->/ig, "");
	str_online_help = str_online_help.replace(/\$name\$/ig, str_name);
	str_online_help = str_online_help.replace(/\$email\$/ig, str_email);
	str_online_help = str_online_help.replace(/\$skype\$/ig, str_skype);
	return str_online_help;
}

function init_contact()
{
	var contact_html = "";
	for (var name in contact_array)
	{
		contact_html += get_contact_html(name, contact_array[name][0], contact_array[name][1]);	
	}
	document.getElementById("online_help").innerHTML = contact_html;
}

function show_contact(show_index)
{
	var index = 0;
	for (var name in contact_array)
	{
		if (index == show_index)
		{
			document.getElementById("live_" + name).style.display = "inline";
		}
		else
		{
			document.getElementById("live_" + name).style.display = "none";
		}
		index++;
	}
}
var g_contact_index = -1;
function update_contact()
{
	if (g_contact_index == -1)
	{
		init_contact();
		g_contact_index = 0;
	}
	else
	{
		g_contact_index++;
	}
	
	if (g_contact_index >= contact_array.length)
	{
		g_contact_index = 0;
	}
	show_contact(g_contact_index);
}
setInterval(update_contact, 10 * 1000);
// contact end
