 
function doClick_submit()
{
var keyword = document.getElementsByName('keyword')[0].value;
var newwin = window.open('');
doClick_submit.url = 'http://www.google.com/search?q=';
doClick_submit.url= doClick_submit.url + keyword;
doClick_submit.url= doClick_submit.url + '&ie=gb2312&oe=gb2312&hl=zh-cn&domains=www.htc999.com&sitesearch=www.htc999.com';
newwin.location.href = doClick_submit.url;
}

 
function showObj(name,num,m) {
for(i=1;i<=m;i++) {
document.getElementById(name+i).style.display="none";
document.getElementById(name+"nav"+i).className="normal";
}
document.getElementById(name+num).style.display="block";
document.getElementById(name+"nav"+num).className="on";

}

//输入框状态
function inputAutoClear(ipt)
{
	ipt.onfocus=function()
	{if(this.value==this.defaultValue){this.value='';}};
	ipt.onblur=function()
	{if(this.value==''){this.value=this.defaultValue;}};
	ipt.onfocus();
}
//提示层setTimeout("document.all.tishi.style.visibility = 'hidden'","50000");

function G(id){
       return document.getElementById(id);
     };
     
    function GC(t){
       return document.createElement(t);
    };
    
    String.prototype.trim = function(){
              return this.replace(/(^\s*)|(\s*$)/g, '');
    };
    
    function isIE(){
          return (document.all && window.ActiveXObject && !window.opera) ? true : false;
    }
    
    function getBodySize(){
           var bodySize = [];
        with(document.documentElement) {
         bodySize[0] = (scrollWidth>clientWidth)?scrollWidth:clientWidth;
         bodySize[1] = (scrollHeight>clientHeight)?scrollHeight:clientHeight;
        }
           return bodySize;
    }

//显示隐藏层
function put_layer(no) 
{
	 if ( !!no ) 
	 { 
	 	obj = document.getElementById("put_layer" + no);
	 	if ( obj.style.display != "none" ) {
		    obj.style.display = "none"; 
		}
		else {
		   obj.style.display = "block";
		}
	  } 
} 



  function popCoverDiv(){
   if (G("cover_div")) {
    G("cover_div").style.display = '';
   } else {
    var coverDiv = GC('div');
    document.body.appendChild(coverDiv);
    coverDiv.id = 'cover_div';
    
    with(coverDiv.style) {
     position = 'absolute';
     background = '#000000';
     left = '0px';
     top = '0px';
     var bodySize = getBodySize();
     width = bodySize[0] + 'px'
     height = bodySize[1] + 'px';
     zIndex = 98;
     if (isIE()) {
      filter = "Alpha(Opacity=80)";
     } else {
      opacity = 0.8;
     }
    }
   }
}
 
// Smooth Scroll Back to Top
var scrollToTop = function(){ $('a[@href=#top]').click(function(){ backToTop(); return false;} ) };
function backToTop() {
    var x1 = x2 = x3 = 0;
    var y1 = y2 = y3 = 0;

    if (document.documentElement) {
        x1 = document.documentElement.scrollLeft || 0;
        y1 = document.documentElement.scrollTop || 0;
    }

    if (document.body) {
        x2 = document.body.scrollLeft || 0;
        y2 = document.body.scrollTop || 0;
    }

    x3 = window.scrollX || 0;
    y3 = window.scrollY || 0;

    var x = Math.max(x1, Math.max(x2, x3));
    var y = Math.max(y1, Math.max(y2, y3));

    window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));

    if (x > 0 || y > 0) {
        window.setTimeout("backToTop()", 30);
    }
}

//网页报错
function openwinx(url,name,w,h)
{ 
window.open(url,name,"top=100,left=400,width=" + w + ",height=" + h + ",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no")
}
//显示隐藏分页层
function ss_layer(no) 
{
	 if ( !!no ) 
	 { 
	 	obj = document.getElementById("ss_layer" + no);
		obj2 = document.getElementById("sss" + no);
	 	if ( obj.style.display != "none" ) {
		obj2.className='feny';
		    obj.style.display = "none";
			
		}
		else {
		 obj2.className='fenyon'; 
		   obj.style.display = "block";
		}
	  } 
}

// 显示/隐藏工具导航层
function onClickDiv(DivId)
{
  if(document.all[DivId].style.display=='none')
   { document.all[DivId].style.display=''; }
   else
   { document.all[DivId].style.display='none'; }
   return 0;
}

//屏蔽错误JS
function ResumeError() { 
return true; 
} 
window.onerror = ResumeError;

