// JavaScript Document
/*  Copyright ? QIHAN Technology Co., Ltd. 2002-2011. All rights reserved  */


function clearHeadSearch(){
name = document.getElementById("word").value

	if(name.toLowerCase() == "search" ){

		document.getElementById("word").value="";
	}
	}
	
function NeatDialog(sHTML, sTitle, bCancel)
{
window.neatDialog = null;
this.elt = null;
if (document.createElement && document.getElementById)
{
    var dg = document.createElement("div");
    dg.className = "neat-dialog";
    if (sTitle)
      sHTML = '<div class="neat-dialog-title">'+sTitle+
              ((bCancel)?
                '<img src="x.gif" alt="Cancel" class="nd-cancel" />':'')+
                '</div>\n' + sHTML;
    dg.innerHTML = sHTML;

    var dbg = document.createElement("div");
    dbg.id = "nd-bdg";
    dbg.className = "neat-dialog-bg";

    var dgc = document.createElement("div");
    dgc.className = "neat-dialog-cont";
    dgc.appendChild(dbg);
    dgc.appendChild(dg);

    //adjust positioning if body has a margin
    if (document.body.offsetLeft > 0)
      dgc.style.marginLeft = document.body.offsetLeft + "px";

    document.body.appendChild(dgc);
    if (bCancel) document.getElementById("nd-cancel").onclick = function()
    {
      window.neatDialog.close();
    };
    this.elt = dgc;
    window.neatDialog = this;
}
}
NeatDialog.prototype.close = function()
{
if (this.elt)
{
    this.elt.style.display = "none";
    this.elt.parentNode.removeChild(this.elt);
}
window.neatDialog = null;
}
function openDialog()
{

var sHTML = '<table width="590" border="0" style="background-position:top; background-repeat:no-repeat;'+
'background-image:url(http://www.qihan.cn/l-bg.gif);margin:0 auto;"><tr ><td>'+
'<div align="left" style="width:390px; float:left; PADDING-RIGHT: 3px;PADDING-LEFT: 10px; FONT-WEIGHT:'+
'bold; FONT-SIZE: 18px;PADDING-BOTTOM: 3px;COLOR: #990000;PADDING-TOP: 11px; FONT-FAMILY: arial, tahoma, ""'+
'>Select a Location/Language</div></td><td>'+
'<div align="right" style="padding-top:6px" ><img id="lang-img"  onclick="window.neatDialog.close()"'+
'src="http://www.qihan.cn/close_ico.gif" width="16" height="16" onmousemove="document.getElementById(\'lang-img\').src=\'http://www.qihan.cn/close_ico1.gif\'" '+
'onmouseout="document.getElementById(\'lang-img\').src=\'http://www.qihan.cn/close_ico.gif\'"/>&nbsp;&nbsp;&nbsp;</div></td></tr><tr><td colspan="2">'+
'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+
'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="590" height="330">'+
          '<param name="movie" value="http://www.qihan.cn/language.swf">'+
          '<param name="quality" value="high">'+
          '<embed style="LEFT: 0px;TOP: 0px" align="right"    src="http://www.qihan.cn/language.swf" quality="high"'+
		  'pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"'+
		  'width="590" height="330"></embed></object></td></tr></table>';
    new NeatDialog(sHTML, "", false);

}


//л


function nTabs(thisObj,Num){     
if(thisObj.className == "active")return;     
var tabObj = thisObj.parentNode.id;     
var tabList = document.getElementById(tabObj).getElementsByTagName("li");     
for(i=0; i <tabList.length; i++)     
{     
  if (i == Num)     
  {     
   thisObj.className = "active";      
      document.getElementById(tabObj+"_Content"+i).style.display = "block";     
  }else{     
   tabList[i].className = "normal";      
   document.getElementById(tabObj+"_Content"+i).style.display = "none";     
  }     
}      
}     

//
  function jq(id) {
        return document.getElementById(id);
        }

function showMenu (baseID, divID) {
    baseID = jq(baseID);
    divID  = jq(divID);
    if (showMenu.timer) clearTimeout(showMenu.timer);
  hideCur();
    //divID.style.display = 'block';   
	showMenu.timer = setTimeout(function () {divID.style.display = 'block';}, 600);
  showMenu.cur = divID;

    if (! divID.isCreate) {
        divID.isCreate = true;
        //divID.timer = 0;
        divID.onmouseover = function () {
            if (showMenu.timer) clearTimeout(showMenu.timer);
      hideCur();
            divID.style.display = 'block';

        };

        function hide () {
		if (showMenu.timer) clearTimeout(showMenu.timer); // ӵ
            showMenu.timer = setTimeout(function () {divID.style.display = 'none';}, 300);
      
        }

        divID.onmouseout = hide;
        baseID.onmouseout = hide;
    }
  function hideCur () {
    showMenu.cur && (showMenu.cur.style.display = 'none');
  }
}

