﻿
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 tab_menu() {
    var $div_li = $(".tab_menu li");
    $div_li.mousemove(function() {
     
        $(this).addClass("selected")            //当前<li>元素高亮 
				   .siblings().removeClass("selected");  //去掉其它同辈<li>元素的高亮
        var index = $div_li.index(this);  // 获取当前点击的<li>元素 在 全部li元素中的索引。
        $("div.tab_box > div")   	//选取子节点。不选取子节点的话，会引起错误。如果里面还有div 
					.eq(index).show()   //显示 <li>元素对应的<div>元素
					.siblings().hide(); //隐藏其它几个同辈的<div>元素

    }).hover(function() {
        $(this).addClass("hover");
       
    }, function() {
        $(this).removeClass("hover");
 

    })
   }
   
 
