//*公共函数***********************************************************************function AddFavorite(sURL,sTitle)
function AddFavorite(sURL,sTitle)
{
	try{
		window.external.addFavorite(sURL, sTitle);
	}
	catch (e){
		try{
			window.sidebar.addPanel(sTitle, sURL, "");
		}
		catch (e){
			alert("加入收藏失败，请使用Ctrl+D进行添加");
		}
	}
}
/*
 * 设为主页
 */
function AddHome(sURL)
{
	if (window.sidebar) {
		try {
			netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
		}
		catch (e){
			alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为true"); 
		} 
		var prefs =  Components.classes["@mozilla.org/preferences-service;1"].getService( Components.interfaces.nsIPrefBranch );
		prefs.setCharPref("browser.startup.homepage",sURL);
	}else if(document.all){
		document.body.style.behavior="url(#default#homepage)";
		document.body.setHomePage(sURL);
    }
}
//分页
function page(Fname,p){
	document[Fname].page.value = p;
	document[Fname].submit();
}
function change_page(Fname){
	var el = document.getElementById("page_select");
	if(el != null){
		for(i=0;i<el.options.length;i++){
			if( el.options(i).selected ){
				var pager = el.options(i).value;
				document[Fname].page.value = pager;
				document[Fname].submit();
			}
		}
	}
}
//******************************************************************************
function nTabs(thisObj,Num){
	if(thisObj.className == "active")return;
	var tabObj = thisObj.parentNode.id;
	var tabList = document.getElementById(tabObj).getElementsByTagName("li");
	for(i=0; i <tabList.length; i++){
		if (i == Num){
			thisObj.className = "active"; 
			document.getElementById(tabObj+"_list"+i).style.display = "block";
		}else{
			tabList[i].className = ""; 
		document.getElementById(tabObj+"_list"+i).style.display = "none";
		}
	} 
}
function nTabsh(thisObj,Num){
	if(thisObj.className == "active")return;
	var tabObj = thisObj.parentNode.id;
	var tabList = document.getElementById(tabObj).getElementsByTagName("li");
	for(i=0; i <tabList.length; i++){
		if (i == Num){
		thisObj.className = "active"; 
	      document.getElementById(tabObj+"_cdetail"+i).style.display = "block";
		}else{
			tabList[i].className = ""; 
			document.getElementById(tabObj+"_cdetail"+i).style.display = "none";
		}
	} 
}
	
function ImageMovie(){
  this.width=100;
  this.height=100;
  this.textHeight=20;
  this.flashHeight=0;
  this.pics='';
  this.links='';
  this.texts='';

  this.add=function(pic,link,text){
	  if(this.pics!='')this.pics+='|';
	  this.pics+=pic;

	  if(this.links!='')this.links+='|';
	  this.links+=link;

	  if(this.texts!='')this.texts+='|';
	  this.texts+=text;
  }

  this.play = function(){
    this.flashHeight=this.height + this.textHeight;
	document.writeln('<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="'+ this.width +'" height="'+ this.flashHeight +'">');
	document.writeln('<param name="allowScriptAccess" value="sameDomain">');
	document.writeln('<param name="movie" value="flash/focus.swf">');
	document.writeln('<param name="quality" value="high">');
	document.writeln('<param name="bgcolor" value="#FFFFFF">');
	document.writeln('<param name="menu" value="false">');
	document.writeln('<param name=wmode value="Opaque">');
	document.writeln('<param name="FlashVars" value="pics='+this.pics+'&links='+this.links+'&texts='+this.texts+'&borderwidth='+this.width+'&borderheight='+this.height+'&textheight='+this.textHeight+'">');
	document.writeln('<embed src="flash/focus.swf" wmode="Opaque" FlashVars="texts='+this.texts+'&pics='+this.pics+'&links='+this.links+'&borderwidth='+this.width+'&borderheight='+this.height+'&textheight='+this.textHeight+'" menu="false" bgcolor="#FFFFFF" quality="high" width="'+ this.width +'" height="'+ this.flashHeight +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
    document.writeln('</object>');
  }
}

	
	
