﻿function menu(id)
{
var str=document.getElementById('menu').getElementsByTagName('li').length;
if(id>str || id<0)
{
document.getElementById('menu').getElementsByTagName('li')[0].className='link';
}
else
{
document.getElementById('menu').getElementsByTagName('li')[id].className='link';
}
}
function checksearch()
{
if(trim(document.searchform.kw.value)=='' || document.searchform.kw.value=='Products Keyword')
{
alert('Please Input The Products Keyword');
document.searchform.kw.focus();
return false;
}
document.searchform.getElementById('submit').disabled="disabled";
document.searchform.action='/search.html';
}
function onkw()
{
if(document.searchform.kw.value=='Products Keyword')
{
document.searchform.kw.value='';
}
}
function PutWare(strID){
		Shopwin=window.open("/shopping.asp?action=add&spid=" + strID+ "&PtCount=1&mnid=14735",'WareList','width=580,height=250,scrollbars=yes,resizable=yes');
		Shopwin.focus();
	}
function trim(str){
	        var sStr = new String(str);
	        sStr = sStr.replace(/(^\s*)|(\s*$)/,"");
	        return sStr;
        }