﻿// JavaScript Document

//marquee(100,106,3000,"holder","shangfan");
//window.onerror = function(){return true;}

function flash(ur,w,h){
document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+w+'" height="'+h+'">');
document.write('<param name="movie" value="'+ur+'">');
document.write('<param name="quality" value="high"> ');
document.write('<param name="wmode" value="transparent"> ');
document.write('<param name="menu" value="false"> ');
document.write('<embed src="'+ur+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="'+w+'" height="'+h+'" quality="High" wmode="transparent">');
document.write('</embed>');
document.write('</object>');
}
//搜索
function searchGo()
{
var TwoClass =document.getElementById("TwoClass").value.replace(/(^\s*)|(\s*$)/g,'');
var Standards =document.getElementById("Standard").value.replace(/(^\s*)|(\s*$)/g,'');
var ProductOrigin=document.getElementById("ProductOrigin").value.replace(/(^\s*)|(\s*$)/g,'');
var KeyTitle =document.getElementById("KeyTitle").value.replace(/(^\s*)|(\s*$)/g,'');
if(KeyTitle!="" && KeyTitle!="请输入型号或名称"){
if(TwoClass=="0"&&Standards!="0"&&ProductOrigin!="0")
{

location.href="/sv_0_"+Standards+"_"+ProductOrigin+"_"+KeyTitle+"_1.html";
}
else if(Standards=="0"&&TwoClass!="0"&&ProductOrigin!="0")
{
location.href="/sv_"+TwoClass+"_0_"+ProductOrigin+"_"+KeyTitle+"_1.html";
}
else if(ProductOrigin=="0"&&Standards!="0"&&TwoClass!="0")
{
location.href="/sv_"+TwoClass+"_"+Standards+"_0_"+KeyTitle+"_1.html";
}
else if(ProductOrigin!="0"&&Standards!="0"&&TwoClass!="0")
{
location.href="/sv_"+TwoClass+"_"+Standards+"_"+ProductOrigin+"_"+KeyTitle+"_1.html";
}
else
{
location.href="/sv_0_0_0_"+KeyTitle+"_1.html";
}
}
    else{
        alert("请输入搜索内容");
    }
}


function searchOn(type)
{
var TwoClass =document.getElementById("TwoClass").value.replace(/(^\s*)|(\s*$)/g,'');
var ProductOrigin=document.getElementById("ProductOrigin").value.replace(/(^\s*)|(\s*$)/g,'');
var KeyTitle =document.getElementById("KeyTitle").value.replace(/(^\s*)|(\s*$)/g,'');
if(KeyTitle!="" && KeyTitle!="请输入型号或名称"){
if(TwoClass=="0"&&ProductOrigin!="0")
{

location.href="/s"+type+"_0_"+ProductOrigin+"_"+KeyTitle+"_1.html";
}
else if(ProductOrigin=="0"&&TwoClass!="0")
{
location.href="/s"+type+"_"+TwoClass+"_0_"+KeyTitle+"_1.html";
}
else if(ProductOrigin!="0"&&TwoClass!="0")
{
location.href="/s"+type+"_"+TwoClass+"_"+ProductOrigin+"_"+KeyTitle+"_1.html";
}
else
{
location.href="/s"+type+"_0_0_"+KeyTitle+"_1.html";
}
}
    else{
        alert("请输入搜索内容");
    }
}



function CallServer(){
var KeyTitle = document.getElementById("HKeyTitle").value;	
if(KeyTitle=="" || KeyTitle=="请输入要搜索关键字")
{
alert("请输入搜索内容");
document.getElementById("HKeyTitle").focus();
}
else
{
var strType = document.getElementById("SearchType").value;
if(strType==1)
{
location.href="/sv_0_0_0_"+KeyTitle+"_1.html";
}
else if(strType==2)
{
location.href="/sp_0_0_"+KeyTitle+"_1.html";	
}
else if(strType==3)
{
location.href="/sa_0_0_"+KeyTitle+"_1.html";	
}
else if(strType==4)
{
location.href="/sc_"+KeyTitle+"_1.html";
}
else if(strType==5)
{
location.href="/sn_"+KeyTitle+"_1.html";
}
else if(strType==6)
{
location.href="/bbs/sbbs_"+KeyTitle+"_1.html";		
}
}
}
function ShowDiv(k){	for(i=1; i<7; i++)
{if(i == k) document.getElementById("SearchDiv" + i ).className = "search_true";
else document.getElementById("SearchDiv" + i ).className = "search_false";}
document.getElementById("SearchType").value = k;
}

//查看BBS楼层
function Golc(){
var lou = document.getElementById("lou").value;	
if(lou=="")
{
alert("请输入一个存在搂层数");
document.getElementById("lou").focus();
}
else
{
location.href="#lou"+lou;	
}
}
///监视键盘回车提交

function keyDown() 
    { 
        var e=event.srcElement; 
       
        if(event.keyCode==13) 
        { 
         document.getElementById("Submit").focus();
         document.getElementById("Submit").click();
        }
    } 


