﻿//
//name: tools
//copyright: zhang
//date: 2011-7-1

function GetSear() {
    var valueStr = document.getElementById("seaValue").value;
    if (valueStr == "") {/// <reference path="searchPro.js" />

        alert("搜索条件不能为空！");
        return false;
    }
    window.open("product.aspx?seaValue=" + encodeURI(valueStr));
}
 
function writeAboutLun() {
   
 
             var focus_width = 275;
             var focus_height = 215;
             var text_height = 0;
             var swf_height = focus_height; //+text_height
             pics = 'images/about1.jpg|images/about2.jpg|images/about3.jpg|images/about1.jpg';
             var links = 'index.aspx|index.aspx|index.aspx|index.aspx'
             var texts = ''
             document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + focus_width + '" height="' + swf_height + '">');
             document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">');
             document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
             document.write('<param name="FlashVars" value="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '">')
             document.write('<embed src="images/focus.swf" wmode="opaque" FlashVars="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '" menu="false" bgcolor="#ffffff" quality="high" width="' + focus_width + '" height="' + swf_height + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
             document.write('</object>');
         
}

///  url:flash地址，width:flash宽度，height: flash高度
function writeFlash(url, width, height) {
    document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" ");
    document.write(" width=" + width + " height=" + height + "> ");
    document.write(" <param name=\"movie\" value=" + url + " /> ");
    document.write(" <param name=\"quality\" value=\"high\" /> ");
    document.write(" <param name=\"wmode\" value=\"transparent\" /> ");
    document.write(" <embed src=" + url + " quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=" + width + " height=" + height + "></embed> ");
    document.write(" </object>");
}

//    输出日期+时间+星期
function writeDate() {
    today = new Date();
    var d = new initArray(
     "星期日",
     "星期一",
     "星期二",
     "星期三",
     "星期四",
     "星期五",
     "星期六");
    //document.write(today.getYear()+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日   ");
    document.write(
     "",
     today.getYear(), "年",
     today.getMonth() + 1, "月",
     today.getDate(), "日   ",
     d[today.getDay() + 1],
     "");
}
function initArray() {
    this.length = initArray.arguments.length;
    for (var i = 0; i < this.length; i++)
        this[i + 1] = initArray.arguments[i]
}

