﻿document.write('<script type="text/javascript" src="/js/jquery.js"></script>');

function SureDo(src,q){
	var ret;
	ret=confirm(q);
	if(ret!=false)window.location=src;
}

//加入收藏
function AddBookmark(title,url){
	if (window.sidebar){ 
		window.sidebar.addPanel(title, url,""); 
	}
	else if(document.all){
		window.external.AddFavorite(url, title);
	}
	else if(window.opera&&window.print){
		return true;
	}
}

//设为首页
function SetHome(obj,url){
	try{
		obj.style.behavior='url(#default#homepage)';obj.setHomePage(url);
	}
	catch(e){
		if(window.netscape){
			try{
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
			}
			catch(e){
				suredo("help.html#sethome","当浏览器无法设置首页，是否查看帮助信息？");
			}
			var prefs=Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
			prefs.setCharPref('browser.startup.homepage',url);
		}
	}
}

//切换
function ShowLayer(s1,s2,s3,s4){
	document.getElementById("lay1_"+s1).style.display="block";
	document.getElementById("lay1_"+s2).style.display="none";
	document.getElementById("lay1_"+s3).style.display="none";
	document.getElementById("lay1_"+s4).style.display="none";
}

function formSubmit(obj){
	obj=$(obj);
	if (event.keyCode==13){
		obj.click();
	}
}

function showVideo(v){
	$(".video .show").html("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='240' height='180'><param name='movie' value='flvPlayer.swf?vcastr_file="+ v +"&IsAutoPlay=1&BarColor=0xFF6600&GlowColor=0xFF6600&LogoUrl=/rios.png' /><param name='quality' value='high' /><param name='allowFullScreen' value='true' /><embed src='flvPlayer.swf?vcastr_file="+ v +"&IsAutoPlay=1&BarColor=0xFF6600&GlowColor=0xFF6600&LogoUrl=/rios.png' allowfullscreen='true' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='240' height='180'></embed></object>");
}

/*
功能：根据标题切换内容，需要jQuery库。
参数说明：
	d ：鼠标事件，常用事情 click、mouseover；
	t ：标题DOM对象；
	c ：内容DOM对象；
	s ：当前选中标题样式表名，如没有值用""表示；
	b ：内容背景图片，序列用*替换，例如：img*.jpg，则表示：img1.jpg,img2.jpg,img3.jpg...，如没有值用""表示；
*/
function tab(d,t,c,s,b){
	var ot = new Array();
	var oc = new Array();
	$(t).each(function(i){
		ot[i]=$(t).eq(i);
		oc[i]=$(c).eq(i);
		oc[i].hide();
		oc[0].show();
		if (s){ot[0].addClass(s);}
		if (b){oc[0].css("background-image","url("+ b.replace("*",1) +")");}
		ot[i].bind(d,function(){
			if (s){$(t).removeClass(s);ot[i].addClass(s);}
			$(c).hide();
			oc[i].show();
			if (b){oc[i].css("background-image","url("+ b.replace("*",i+1) +")");}
		});
	});
}

