﻿
function voidp(sp){
var objtt="<embed id='bbbb' title='dvubb' loop='-1' wmode='opaque' type='application/x-oleobject'"+
            "codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'"+
           "flename='mp' src='"+sp+"' width='320' height='280'"+
            "autoplay='TRUE'></embed>";
document.getElementById("img-shipin").innerHTML=objtt;
}


function geustbook()
{
   $("#Form1").validate({
        rules: {
            Text1: "required",
            Text2: "required",
            Text3: {
                required: true,
                minlength: 10 
            },
            Text4: {
                required: true,
                email: true
            },
            Text6: "required",
            Text7: "required"
        },
        messages: {
            Text1: "*",
            Text2: "*",
            Text3: {
                required: "*",
                minlength: "请正确输入联系电话"
            },
            Text4: {
                required: "请输入 Email",
                email: "Email 格式错误"
            },
            Text6: "*",
            Text7: "*"
        }
    });
}

function en_geustbook()
{
   $("#Form1").validate({
        rules: {
            Text1: "required",
            Text2: "required",
            Text3: {
                required: true,
                minlength: 10 
            },
            Text4: {
                required: true,
                email: true
            },
            Text6: "required",
            Text7: "required"
        },
        messages: {
            Text1: "*",
            Text2: "*",
            Text3: {
                required: "*",
                minlength: "Please enter the correct telephone"
            },
            Text4: {
                required: "Enter Email",
                email: "Email Malformed"
            },
            Text6: "*",
            Text7: "*"
        }
    });
}
//留言板验证码更换
function href() {
    var randomnum = Math.random();
    var getimagecode = document.getElementById("Image1");
    getimagecode.src = "UserFiles/yanzheng.aspx? " + randomnum;
}
//Flash 动画
function thisFlash(imgurl, http,ftext,textwidth,fwidth,fheigth) {
    var focus_width = fwidth; //图片框的宽度 
    var focus_height = fheigth; //图片框的高度
    var text_height = textwidth; //文字的高度 
    var swf_height = focus_height + text_height; //flash的高度
    var pics = imgurl; //图片文件的的地址，以“|”为分界
    var links = http; //文字连接的地址，以“|”分界，注意，这个变量是空的时候，就是没有连接哦 
    var texts =ftext; //连接文字 
    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="css/PrevNext.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="" wmode="opaque" FlashVars="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '" menu="false" bgcolor="#CCCCCC" quality="high" width="' + focus_width + '" height="' + focus_height + '" allowscriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>');

}
 





//图片移动类
function Myyidong(yds) {

    var page = 1;
    var i = 3; //每版放4个图片
    var len = $("#donghualist" + yds).find("li").length;
    var page_count = Math.ceil(len / i);

    this.yidong = function() {

        $("#goleft" + yds).click(function() {
            if (!$("#donghualist" + yds).is(":animated")) {//判断当前是否处于动画状态
                if (page > 1) {
                    $("#donghualist" + yds).animate({ left: "+=340px" }, 1000);
                    page--;
                } else {
                $("#donghualist" + yds).animate({ left: "-=" + (page_count - 1) * 340 + "px" }, 1000); page = page_count;
                } 
            }
        });

        $("#goright" + yds).click(function() {

            if (!$("#donghualist" + yds).is(":animated")) {//判断当前是否处于动画状态
                if (page_count > page) { 
                    $("#donghualist" + yds).animate({ left: "-=340px" }, 1000);
                    page++;
                } else { 
                    $("#donghualist" + yds).animate({ left: "0px" }, 1000); page = 1;
                }

            }
        });
    }
}

