function dokeydown(event,obj1,str1){
if (event.keyCode == 13){
switch (str1) {
case "news":
newssearch(obj1);
break;
case "products":
productssearch(obj1);
break;
default :
break;
}
}
}
function changetypesid(str1){
document.forms[0].action='news_index.asp?TYPESID=' + str1;
donochange();
}
function changeprice(){
document.forms[0].WHICHONE.value='1';
document.forms[0].action='product_list.asp';
donochange();
}
function newssearch(obj1){
if (obj1.value!='請輸入關鍵字'){
document.forms[0].action='news_index.asp';
donochange();
}else{
alert('請輸入關鍵字');
obj1.focus();
obj1.select();
}
}
function productssearch(obj1){
if (obj1.value!='請輸入關鍵字'){
document.forms[0].WHICHONE.value='1';
document.forms[0].action='product_list.asp';
donochange();
}else{
alert('請輸入關鍵字');
obj1.focus();
obj1.select();
}
}
function donochange(){
document.forms[0].ckda.value='1';
document.forms[0].submit();
}
function changenewspage(str1){
document.forms[0].PAGE.value=str1;
donochange();
}
function closepopproduct(){
document.getElementById("xx").style.visibility='hidden';
}
function getDocWidth(){
return (document.all? getTrueBody().scrollLeft+getTrueBody().clientWidth : pageXOffset+window.innerWidth-15);
}
function getDocHeight(){
return (document.all? Math.min(getTrueBody().scrollHeight, getTrueBody().clientHeight) : Math.min(window.innerHeight));
}
function getTrueBody(){
return ( (!window.opera && document.compatMode && document.compatMode!="BackCompat") || window.opera)? document.documentElement : document.body
}
function showpopproduct(ox,str1,str2,bln){
var popupElement = document.getElementById("xx");
var offsetx=0;
var offsety=50;
var flashy = 220;
if (bln){flashy=500}
popupElement.innerHTML = '