﻿// JavaScript Document
function insertFlash(Flash,Width,Height){
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
	document.write("codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" ");
	document.write("width=\"" + Width + "\" height=\"" + Height + "\">");
	document.write("<param name=\"movie\" value=\"" + Flash + "\">");
	document.write("<param name=\"quality\" value=\"high\">");
	document.write("<param name=\"wmode\" value=\"transparent\">");
	document.write("<embed src=\"" + Flash + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ");
	document.write("type=\"application/x-shockwave-flash\" width=\"" + Width + "\" height=\"" + Height + "\"></embed>");
	document.write("</object>");
}
function showSubmenu(n){
var mtop;
var mleft;
var menuObj;
mtop = document.getElementById('c'+n).offsetTop;
mleft = document.getElementById('c'+n).offsetLeft;
menuObj = document.getElementById('m'+n);
for(i=1;i<=7;i++ ){
	document.getElementById('m'+i).style.display='none';
}
menuObj.style.display = '';
menuObj.className ='sshow';
menuObj.style.top = mtop+40+"px";
menuObj.style.left = mleft+300+"px";
}
function hide(n){
document.getElementById('m'+n).style.display='none'; //隐藏层
}


$(document).ready( function(){
		$("#homeabout span").hover( 
		function(){
			$(this).prevAll("span").removeClass("hover");
			$(this).nextAll("span").removeClass("hover");
			$(this).addClass("hover");
			var indexi=$(this).index();				
			$("#homeaboutd span").each(function(index)
			{
				if(index==indexi)
				{
					$(this).removeClass("hide");
				}else
				{
					$(this).addClass("hide");
				}				
			});
		},
		function()
		{
			
		}
		);
	});

$(function() {
   $('.sczz').infowuxiMarquee();
   $('.culimg').infowuxiMarquee({direction : "top"});
   $('.prod-cpyy').infowuxiMarquee();
  
  
   
   $(".pliTab tr").hover(
	function(){								
		$(this).css("background","#ffebad");
	},
	function(){	
		$(this).css("background","#fff");							
	});   

	$(".proType .add").click(function(){
		if($(this).attr("show")=="1")
		{
			$(this).parent().children(".sub1").attr("show","0");	
			$(this).parent().children(".sub1").addClass("add");
			$(this).parent().children(".sub1").removeClass("sub1");			
			$(this).attr("show","0")
			$(this).removeClass("sub1");
			$(this).addClass("add");
			$(this).parent().children(".sub").hide();
		}
		 else
		{
			$(this).parent().children(".sub1").attr("show","0");
			$(this).parent().children(".sub1").addClass("add");
			$(this).parent().children(".sub1").removeClass("sub1");				
			$(this).attr("show","1")
			$(this).removeClass("add");
			$(this).addClass("sub1");
			$(this).parent().children(".sub").hide();
			$(this).nextAll("[rel='"+$(this).attr("rel")+"']").show();	
		}
	});
	
	
});

var tempi=0;
function showsay()
{
	if (tempi !=0) 
	{
		$('.guestTab').hide();
		tempi=0;
	}
	else 
	{
		$('.guestTab').show();
		tempi=1;
	}
}

function golocation()
{
	
	location.href="searchproducts.asp?s0="+$("#select0 option:selected").val()+"&s1="+$("#select1 option:selected").val()+"&s2="+$("#select2 option:selected").val()+"&key="+encodeURI($("#keyname").val());
}

function golocation1()
{
	location.href="searchnews.asp?s1="+$("#select1 option:selected").val()+"&key="+encodeURI($("#keyname").val());
}

function openNewWin(winUrl,winName,winWidth,winHeight){
	window.open(winUrl,winName,"width="+winWidth+",height="+winHeight+",scrollbars=yes,toolbar=no, status=no, menubar=no, resizable=no")
}


