	function addBookmark(title) {
	 var url=parent.location.href;
	 if (window.sidebar) { 
			window.sidebar.addPanel(title, url,""); 
	 } else if( document.all ) {
	 window.external.AddFavorite( url, title);
	 } else if( window.opera && window.print ) {
	 return true;
	 }
}
function setHomePage(){
	var url=location.href;
  document.body.style.behavior='url(#default#homepage)';
  document.body.setHomePage(url);
}

var chnlid=1;
function initUrl()	{
var url=location.href;
url=url.toLowerCase();
if(url.indexOf("/index.php")>-1)
{
	chnlid=1;
}else if(url.indexOf("/about/show.php?id=101")>-1 || url.indexOf("about/show.php?id=70")>-1 || url.indexOf("about/show.php?id=71")>-1 || url.indexOf("about/show.php?id=72")>-1 || url.indexOf("about/show.php?id=73")>-1 || url.indexOf("about/show.php?id=88")>-1)
{
					chnlid=2;
	}
				else if(url.indexOf("news")>-1)
				{
					chnlid=3;
				}
				else if(url.indexOf("/product/product.php?class1=90")>-1)
				{
					chnlid=4;
				}
				else if(url.indexOf("price")>-1)
				{
					chnlid=5;
				}
				else if(url.indexOf("/product/product.php?class1=95")>-1)
				{
					chnlid=6;
				}
				else if(url.indexOf("service")>-1)
				{
					chnlid=7;
				}
				else if(url.indexOf("/my.php?action=order")>-1)
				{
					chnlid=8;
				}
				else if(url.indexOf("/about/show.php?id=75")>-1)
				{
					chnlid=9;
				}
			}
initUrl();

function showsearcw()
{
	var c=document.getElementById("seardvti").getElementsByTagName("li");
	var d=document.getElementById("seardvnr").getElementsByTagName("span");
	for(var i=0;i<c.length;i++){xssj(i);}
	function xssj(i){c[i].onclick=function(){for(var x=0;x<c.length;x++){c[x].className="";d[x].className="";}c[i].className="show";d[i].className="show";}}
}

function gtw(){
var d=document.getElementById("seardvnr").getElementsByTagName("span");
d[1].className="show";
d[2].className="show";
d[3].className="show";
d[4].className="show";
}


function senfe(o,a,b,c,d){
 var t=document.getElementById(o).getElementsByTagName("tr");
 for(var i=0;i<t.length;i++){
  t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?a:b;
  t[i].onclick=function(){
   if(this.x!="1"){
    this.x="1";//本来打算直接用背景色判断，FF获取到的背景是RGB值，不好判断
    this.style.backgroundColor=d;
   }else{
    this.x="0";
    this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
   }
  }
  t[i].onmouseover=function(){
   if(this.x!="1")this.style.backgroundColor=c;
  }
  t[i].onmouseout=function(){
   if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
  }
 }
}

function isEmpty(){
if(document.getElementById("c_searchword").value == ''){
alert('搜索关键字不能为空！');
document.getElementById("c_searchword").focus();
return false;
}
}

function e_isEmpty(){
if(document.getElementById("c_searchword").value == ''){
alert('Please enter the keywords!');
document.getElementById("c_searchword").focus();
return false;
}
}
function ck(){
	var fos=document.form2;
	if(fos.username.value==""){
		alert("请输入用户名!");
	fos.username.focus();
		return false;
	}
	if(fos.pass.value==""){
		alert("请输入密码！");
		fos.pass.focus();
		return false;
	}
return true;
}

function e_ck(){
	var fos=document.form2;
	if(fos.username.value==""){
		alert("Please enter the username!");
	fos.username.focus();
		return false;
	}
	if(fos.pass.value==""){
		alert("Please enter the password！");
		fos.pass.focus();
		return false;
	}
return true;
}
