//index.js

/**
 * 链接指向
 */
function sendUrl(url, tag) {
  document.getElementById("home").src = url;
  if (tag != '') {
    document.getElementById("home").src += '#' + tag;
  }
  modify_Headmenu(9);
}

function GetUrlParam( paramName ){
	var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ) ;
	var oMatch = oRegex.exec( window.top.location.search ) ;
	
	if ( oMatch && oMatch.length > 1 )
		return oMatch[1] ;
	else
		return '' ;
}

function autoSend() {
    var tObject = GetUrlParam('t');
    if (tObject == 'sue') {
        var hObject = GetUrlParam('h');
        if (hObject != '') {
            sendUrl('sue.jsp?h=' + hObject, '');
        } else {
            sendUrl('sue.jsp', '');
        }
    } else if (tObject == 'q') {
        sendUrl('help_list.html', '');	
    }
}

/**
 * 菜单转向
 */
function send(url, id) {
  modify_Headmenu(id);
  if (id==5 || id==10){
  	window.open(url);
  }else{
  	location.href = url;
  }
}

/**
 * 修改菜单样式
 */
function modify_Headmenu(id) {
    for(var i = 1; i <= 10; i++) {
          document.getElementById("Headmenu" + i ).className = "";
    } 
    document.getElementById("Headmenu" + id).className = "green strong";
}   