function stoperror(){
return true;
}
window.onerror=stoperror;

function userlogin()
{
	document.getElementById("div_userLogin").innerHTML = user.getLoginStr("4").value;
}
function top_submit()
{
	var url = "";
	switch(form_TopSearch.sel_topschtype.value)
	{
		case "0":
			document.getElementById("spn_toptype").innerHTML = "<font color=red>请选择分类</font>";
			form_TopSearch.sel_topschtype.focus();
			return false;
			break;
		case "1":
			url = "/Stadium/list.aspx";
			form_TopSearch.condition.value = form_TopSearch.txt_topschkey.value;
			break;
		case "2":
			url = "/Course/CourseList.aspx";
			form_TopSearch.txt_search.value = form_TopSearch.txt_topschkey.value;
			break;
		case "3":
			url = "/Coach/Coachlist.aspx";
			form_TopSearch.txt_search.value = form_TopSearch.txt_topschkey.value;
			break;
		case "4":
			url = "/action/Actionlists.aspx";
			form_TopSearch.txt_search.value = form_TopSearch.txt_topschkey.value;
			break;
		default:
			break;
	}
    form_TopSearch.action = url;
	form_TopSearch.submit();
	return true;
}
function doTxtFocus(obj)
{
    obj.className="index_searchn";
    if(obj.value ==defalltTextValue )
        obj.value="";

    if(obj.onkeypress == null)
    {
        obj.onkeypress = function()
        {
            var k=event.keyCode;
            if(k==13)
            {
                return top_submit();
            }
        }
    }
}
function doOnblur(obj)
{
	if(obj.value=="" || obj.value==defalltTextValue)
	{
		obj.value=defalltTextValue;
		obj.className="index_searchn2";
	}
	else{
		obj.className="index_searchn";
	}
}
function loaddefault()
{
	document.getElementById("servicelink").innerHTML = user.getServicelink().value;
	var curAddress=document.location;
	var linkArray = document.getElementById("Newlinks").getElementsByTagName("a");
	for(var i=0;i<linkArray.length ;i++)
	{
		if(linkArray[i].href == curAddress )
		{
			linkArray[i].parentNode .id ="menu3";
		}
	}
}


//document.createStyleSheet("javascript:'body{.STYLE1 {color: #01528d;'");
//document.createStyleSheet("javascript:'body{.STYLE1 {color: #01528d;}}'");


//<link rel="shortcut icon" href="favicon.ico" type="/ image/x-icon" />
//<link rel="stylesheet" rev="stylesheet" href="/css/css.css" type="text/css" media="screen"charset="utf-8" />
var  linkimport= document.createElement("link");
linkimport.rel="stylesheet";
linkimport.rev="stylesheet";
linkimport.href="/css/index-import.css";
linkimport.type="text/css";
linkimport.media="screen";
linkimport.charset="utf-8";
document.getElementsByTagName('HEAD').item(0).appendChild(linkimport);
//document.body.appendChild(linkimport);

var strtop="";
strtop+= "<div class=\"nav_head2\">";
strtop+= "<h1><img src=\"http://www.76dongdong.com/images/head/logo1.gif\" alt=\"快乐运动的传播者\"  usemap='#logomap'/><map name='logomap' id='logomap'><area shape='rect' coords='0,0,180,52' href='http://www.76dongdong.com' /><area shape='rect' coords='180,0,291,52' href='http://www.stargym.com.cn' /></map></h1>";
strtop+= "<span id=\"div_userLogin\">  <div class=\"clear_both\"></div></span>";
strtop+= "</div>";
strtop+= "<!--------- Menu op -------->";
strtop+= "<div id=\"menu2\">";
strtop+= "<ul id=\"Newlinks\">";
strtop+= "<li id=\"menu4\"><a  href=\"/index.htm\">首 页</a></li>";
strtop+= "<li id=\"menu4\"><a  href=\"/news/htm/index.htm\">健身课堂</a></li>";
strtop+= "<li id=\"menu4\"><a  href=\"/action/ActionIndex.aspx\">活 动</a></li>";
strtop+= "<li id=\"menu4\"><a  href=\"/Salon/index.htm\">社 团</a></li>";
strtop+= "<li id=\"menu4\"><a  href=\"/Course/index.aspx\">课 程</a></li>";
strtop+= "<li id=\"menu4\"><a  href=\"/Coach/index.aspx\">教 练</a></li>";
strtop+= "<li id=\"menu4\"><a  href=\"/Stadium/index.aspx\" class=\"tt\">场 馆</a></li>";
strtop+= "<li id=\"menu4\"><a  href=\"http://blog.76dongdong.com/\">博 客</a></li>";
strtop+= "<li id=\"menu4\"><a  href=\"http://bbs.76dongdong.com/\">论坛</a></li>";
strtop+= "</ul>";
strtop+= "<table width=\"488\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"search_tn\">";
strtop+= "<form id=\"form_TopSearch\" name=\"form_TopSearch\"  method=\"post\" target=\"_self\">";
strtop+= "<td width=\"87\" style=\"color:#01528d; font-size:14px;\"><span id=\"spn_toptype\">请选择分类：</span></td>";
strtop+= "<td width=\"85\">";
strtop+= "<select name=\"sel_topschtype\" id=\"Select1\">";
strtop+= "<option value=\"0\" selected>请选择</option>";
strtop+= "<option value=\"1\">场馆</option>";
strtop+= "<option value=\"2\">课程</option>";
strtop+= "<option value=\"3\">教练</option>";
strtop+= "<option value=\"4\">活动</option>";
strtop+= "</select>";
strtop+= "</td>";
strtop+= "<td width=\"258\">";
strtop+= "<label>";
strtop+= "<input name=\"txt_topschkey\" id=\"txt_topschkey\" onblur=\"doOnblur(this)\"  onfocus=\"doTxtFocus(this)\" type=\"text\" value=\"请输入你想搜索的关键字\" class=\"index_searchn2\" >";
strtop+= "<input type=\"hidden\" name=\"condition\">";
strtop+= "<input type=\"hidden\" name=\"txt_search\">";
strtop+= "<input type=\"hidden\" name=\"h3\">";
strtop+= "</label>";
strtop+= "</td>";
strtop+= "<td width=\"58\" class=\"index_shou\"><img src=\"/images/head/ico.gif\" alt=\"search\" onclick=\"return top_submit();\" /></td>";
strtop+= "</form>";
strtop+= "</table>";
strtop+= "<h3 class=\"index_link\" id=\"servicelink\"></h3>";
strtop+= "</div>";

var defalltTextValue = "请输入你想搜索的关键字";
document.write(strtop);
userlogin();
loaddefault();
document.title = "齐乐动动网--" + document.title
form_TopSearch.sel_topschtype.value = '0';
form_TopSearch.txt_topschkey.value = '' ;