﻿
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 href() {
    var randomnum = Math.random();
    var getimagecode = document.getElementById("Image1");
    getimagecode.src = "../UserFiles/yanzheng.aspx? " + randomnum;
}
//Flash 动画
function thisFlash(imgurl, http) {
    var focus_width = 980; //图片框的宽度 
    var focus_height = 250; //图片框的高度 
    var text_height = 0; //文字的高度 
    var swf_height = focus_height + text_height; //flash的高度
    var pics = imgurl; //图片文件的的地址，以“|”为分界
    var links = http; //文字连接的地址，以“|”分界，注意，这个变量是空的时候，就是没有连接哦 
    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="/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="/css/PrevNext.swf" 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 Newdaxiao() {
   
        $("span").click(function() {

            var thisEle = $("#para").css("font-size");
            var textFontSize = parseFloat(thisEle, 10);
            var unit = thisEle.slice(-2); //获取单位
            var cName = $(this).attr("class");
            if (cName == "bigger") {
                if (textFontSize <= 22) {
                    textFontSize += 2;
                }
            } else if (cName == "smaller") {
                if (textFontSize >= 12) {
                    textFontSize -= 2;
                }
            }
            $("#para").css("font-size", textFontSize + unit); 
        });
    
}

$(function(){
	    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");
		})
	 
	});
	$(function(){
	    var $div_li =$(".tab_menut li");
	    $div_li.mousemove(function(){
			$(this).addClass("selectednew")            //当前<li>元素高亮
				   .siblings().removeClass("selectednew");  //去掉其它同辈<li>元素的高亮
            var index =  $div_li.index(this);  // 获取当前点击的<li>元素 在 全部li元素中的索引。
			$("div.tab_boxt > div")   	//选取子节点。不选取子节点的话，会引起错误。如果里面还有div 
					.eq(index).show()   //显示 <li>元素对应的<div>元素
					.siblings().hide(); //隐藏其它几个同辈的<div>元素
		}).hover(function(){
			$(this).addClass("hover");
		},function(){
			$(this).removeClass("hover");
		})
		
		getnval();
	 doscroll();
	});
//合作伙伴
 
function doscroll()
{
var demo=document.getElementById("demo")
var demo1=document.getElementById("demo1")
var demo2=document.getElementById("demo2")
var Picspeed=40
demo2.innerHTML=demo1.innerHTML
function Marquee1(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee1,Picspeed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee1,Picspeed)}
}
 

//合作伙伴结束

//首页动画 
function indexflash()
{

 var s1 = new SWFObject("css/imagerotator.swf","rotator","980","310","7");
	s1.addVariable("file","css/xixi.xml");
	s1.addVariable("transition","fade");
	s1.addVariable("overstretch","false");
	s1.addVariable('shownavigation','true');
	s1.addVariable("width","980");
	s1.addVariable("height","310");
	s1.addVariable("linkfromdisplay","false"); 
	s1.write("container");
}


  function openhttp(url)
    {
   window.open(url,'');
   return false;
    }
    

function getnval(){
	    var $div_li =$(".tab_menutt li");
	    $div_li.mousemove(function(){
			$(this).addClass("selectednewt")            //当前<li>元素高亮
				   .siblings().removeClass("selectednewt");  //去掉其它同辈<li>元素的高亮
            var index =  $div_li.index(this);  // 获取当前点击的<li>元素 在 全部li元素中的索引。
			$("div.tab_boxtt > div")   	//选取子节点。不选取子节点的话，会引起错误。如果里面还有div 
					.eq(index).show()   //显示 <li>元素对应的<div>元素
					.siblings().hide(); //隐藏其它几个同辈的<div>元素
		}).hover(function(){
			$(this).addClass("hover");
		},function(){
			$(this).removeClass("hover");
		})
		 
	}
