﻿function ById(id) {return document.getElementById(id);}
//新闻、报告内页右侧随机推广广告
function webExtend(){
	document.write("<style type=\"text/css\">");
	document.write(".researchAd{ height:162px; text-align:center; }");
	document.write(".researchAd img{ border:1px #3c7faf solid; height:160px; width:286px}");
	document.write("</style>");
	document.write("<div class='researchAd' id='adPic'></div>");

	var ad=new Array();
	
	ad.push("<a href='http://simu.howbuy.com/yhzcg.htm' target='_blank'><img src='/images/advimg/randomAd20100527.gif' alt='' border='0' /></a>");
	ad.push("<a href='http://simu.howbuy.com/hot/P00241.htm' target='_blank'><img src='/images/advimg/ny20100825.jpg' alt='' border='0' /></a>");
	ad.push("<a href='http://simu.howbuy.com/xfctot/xfc2h.html' target='_blank'><img src='/images/advimg/randomAd2010081101.jpg' alt='' border='0' /></a>");
		ad.push("<a href='http://www.howbuy.com/subject/mrzx/' target='_blank'><img src='/images/advimg/ny2010081901.jpg' alt='' border='0' /></a>");
		ad.push("<a href='http://www.howbuy.com/subject/mrzx/' target='_blank'><img src='/images/advimg/ny2010081901.jpg' alt='' border='0' /></a>");
		ad.push("<a href='http://www.howbuy.com/subject/mrzx/' target='_blank'><img src='/images/advimg/ny2010081901.jpg' alt='' border='0' /></a>");
		ad.push("<a href='http://www.howbuy.com/subject/mrzx/' target='_blank'><img src='/images/advimg/ny2010081901.jpg' alt='' border='0' /></a>");
	if(window.top.location.href.indexOf("simu.howbuy")<0){
		ad.push("<img src='/images/advimg/randomAd8.gif' alt='' border='0' />");
		ad.push("<a href='http://www.howbuy.com/fundcollege/knowallindex.htm' target='_blank'><img src='/images/advimg/randomAd11.gif' alt='' border='0' /></a>")
		ad.push("<a href='http://blog.howbuy.com' target='_blank'><img src='/images/advimg/randomAd12.gif' alt='' border='0' /></a>");
		ad.push("<a href='http://www.howbuy.com/vcpe/club.html' target='_blank'><img src='/images/advimg/randomAd20100608.jpg' alt='' border='0' /></a>");
		//ad.push("<a href='/poster/jjdt/' target='_blank'><img src='/images/advimg/randomAd20100715.jpg' alt='' border='0' /></a>");
		ad.push("<a href='/subject/jjjlsb/' target='_blank'><img src='/images/advimg/randomAd20100716.jpg' alt='' border='0' /></a>");	
		ad.push("<a href='/anjia/' target='_blank'><img src='/images/advimg/ny2010090201.jpg' alt='' border='0' /></a>");	
	}
	
	var n=Math.floor(Math.random()*(ad.length));
	ById('adPic').innerHTML=ad[n];
}

function webExtend1(){	
	document.write("<div class='researchAd' id='adPic1' style='margin-top:10px;'></div>");

	var ad=new Array();
	ad.push("<a href='http://www.howbuy.com/subject/manager/' target='_blank'><img src='/images/advimg/randomAd14.gif' alt='' border='0' /></a>");
	var n=Math.floor(Math.random()*(ad.length));
	ById('adPic1').innerHTML=ad[n];
}

function webExtend2(){
	if(window.location.href.indexOf("simu.howbuy")>=0){		
		document.write("<div class='clear'></div><div style='border:1px solid #b6c8d4;clear:both; margin-top:5px;'><a href='http://simu.howbuy.com/yhzcg.htm' target='_blank'><img src='/images/advimg/webExtend2_20100527.jpg' border='0' /></a></div>");
	}else{
		document.write("<div class='clear'></div><div style='border:1px solid #b6c8d4;'><a href='http://www.howbuy.com/subject/mrzx/' target='_blank'><img src='/images/advimg/tl20100819.jpg' border='0' /></a></div>");		
	}
}

function webExtend20(){//私募股权频道右侧广告
	if(window.top.location.href.indexOf("/interview/")>=0){//私募股权频道走访报告内页右侧广告
		document.write("<div style='border:1px solid #ddd; margin-bottom:5px;'><a href='http://www.howbuy.com/vcpe/club.html' target='_blank'><img src='/images/advimg/randomAd20100608.jpg' width='286' height='160' border='0' /></a></div>");
	}else{
	var ad=new Array();
	
	//ad.push("<div style='border:1px solid #ddd; margin-bottom:5px;'><a href='/subject/sf/' target='_blank'><img src='/images/advimg/randomAdvcpe20100713.jpg' width='278' height='160' border='0' /></a></div>");
	ad.push("<div style='border:1px solid #ddd; margin-bottom:5px;'><a href='http://www.howbuy.com/vcpe/club.html' target='_blank'><img src='/images/advimg/randomAd20100613.jpg' width='278' height='160' border='0' /></a></div>");
		document.write("");
		
	var n=Math.floor(Math.random()*(ad.length));	
	document.write(ad[n]);
	}
}

function webExtend3(){//通栏广告
	if(window.location.href.indexOf("vcpe")>=0){//vcpe首页通栏广告
		document.write("<div class='clear'></div><div><a href='http://www.howbuy.com/vcpe/club.html' target='_blank'><img style='border:1px solid #b6c8d4; clear:both;' src='/images/advimg/webExtend2010060801.jpg' border='0' /></a></div>");
	}else{//首页下方通栏广告
		document.write("<div class='clear'></div><div><a href='http://www.forbeschina.com/event/lcs/EntryForm.php' target='_blank'><img style='border:1px solid #b6c8d4; clear:both; margin-top:5px;' src='/images/advimg/tl20100830.jpg' border='0' /></a></div>");
	}
}

function webExtend4(){//关于好买首页
	document.write("<div style='border:1px solid #ddd; margin-bottom:5px;'><img src='/images/advimg/aboutadv.jpg' border='0' /></div>");
}

function webExtend5(){
	document.write("<div class='clear'></div><div style='border:1px solid #b6c8d4; clear:both; margin-top:5px;'><a href='http://simu.howbuy.com/case/cases13.html' target='_blank'><img src='/images/advimg/webExtend520100602.jpg' border='0' /></a></div>");
}
function webExtend6(){//公募首页
	document.write("<div class='clear'></div><div><a href='http://www.howbuy.com/subject/manager/' target='_blank'><img src='/images/advimg/phbbanner12.gif' border='0' style='border:1px solid #b6c8d4; clear:both; margin-top:5px;' /></a></div>");
}

function webExtend7(){//公募基金经理大全
	 //webExtend6();	 
	var ad=new Array();	
	ad.push("<div class='clear'></div><div style='border:1px solid #b6c8d4; clear:both; margin-top:5px;'><a href='http://www.howbuy.com/subject/manager/' target='_blank'><img src='/images/advimg/phbbanner12.gif' border='0' /></a></div>");
	ad.push("<div class='clear'></div><div style='border:1px solid #b6c8d4; clear:both; margin-top:5px;'><a href='/subject/jjjlsb/' target='_blank'><img src='/images/advimg/jjjl20100716.jpg' border='0' /></a></div>");
		
	var n=Math.floor(Math.random()*(ad.length));	
	document.write(ad[n]);
}

function WebExtend10(){//私募基金公司大全
	document.write("<div style='border:1px solid #b6c8d4; clear:both; margin-top:10px;'><a href='http://simu.howbuy.com/yhzcg.htm' target='_blank'><img src='/images/advimg/webExtend10_20100630.jpg' border='0' /></a></div>");
}

function WebExtend11(){//私募新闻列表右侧广告
	document.write("<div style='border:1px #3c7faf solid;'><a href='f='http://www.howbuy.com/subject/mrzx/' target='_blank'><img src='/images/advimg/ny2010081901.jpg' width='283' alt='' border='0' /></a></div>");
}

function webExtend12(){
	if(window.location.href.indexOf("mboard.htm")>=0){
		document.write("<div style='border:1px solid #b6c8d4;'><a href='http://simu.howbuy.com/xfctot/xfc2h.html' target='_blank'><img src='/images/advimg/tl20100812.jpg' border='0' /></a></div>");		
	}else if(window.location.href.indexOf("/tot/")>=0){		
		document.write("<div style='border:1px solid #b6c8d4; margin-bottom:5px;margin-top:5px;'><a href='http://simu.howbuy.com/xfctot/xfc2h.html' target='_blank'><img src='/images/advimg/tl20100812.jpg' border='0' /></a></div>");
	}else {
		document.write("<div style='border:1px solid #b6c8d4;'><a href='http://www.howbuy.com/subject/mrzx/' target='_blank'><img src='/images/advimg/tl20100819.jpg' border='0' /></a></div>");
	}

		
}

//安家推广
function anjiaExtend(){
	document.write("<style type=\"text/css\">");
	document.write(".researchAd{ text-align:center; }");
	document.write(".researchAd img{ border:1px #3c7faf solid;}");
	document.write("</style>");
	if(window.location.href.indexOf("knowalldetail")>=0){
		document.write("<div class='researchAd' id='adPic'><a href='/anjia/' target='_blank'><img src='/images/advimg/jjxy2010090202.jpg' alt='' border='0' /></a></div>");
	}else{
		document.write("<div class='researchAd' id='adPic'><a href='/anjia/' target='_blank'><img src='/images/advimg/jjxy2010090201.jpg' alt='' border='0' /></a></div>");
	}		
}

function pofExtend(){
	document.writeln("<script type=\"text\/javascript\" src=\"http:\/\/www.howbuy.com\/js\/dyniframesize.js\"><\/script>");
	if(window.location.pathname=="/pof/companylist.htm"){
		document.writeln("<iframe style='margin-left:5px!important;margin-left:0px;' id='pofExtend1' onload=\"dyniframesize('pofExtend1');\" src=\"/common/pofExtend.html\" width=\"100%\" frameborder=\"0\" scrolling=\"no\"></iframe>");
	}
}
function yddExtend(){	
	document.writeln("<a href=\"http:\/\/www.howbuy.com\/zhlc\/index.html\" target='_blank'><img style='margin:5px 0px;border:1px #3c7faf solid;' src=\"\/images\/ydd_long.jpg\" border=\"0\" \/><\/a>")
}

function vcpeExtend(){	
	document.writeln("<a href=\"http://www.howbuy.com/vcpe/club.html\" target='_blank'><img style='margin-top:5px;border:1px #b6c8d4 solid;' src=\"/images/advimg/webExtend2010060801.jpg\" border=\"0\" \/><\/a>")
}
function hotPofExtend(){
	if(window.location.href.indexOf("/P")>=0){
	document.writeln("<a href=\"http://simu.howbuy.com/yhzcg.htm\" target='_blank'><img style='margin-bottom:7px;border:1px #3c7faf solid; width:948px; height:60px;' src=\"/images/advimg/webExtend2_20100527.jpg\" border=\"0\" \/><\/a>");	
	}else{
		document.writeln("<a href=\"http://simu.howbuy.com/case/cases13.html\" target='_blank'><img style='margin-bottom:7px;border:1px #3c7faf solid; width:948px; height:60px;' src=\"/images/advimg/webExtend520100602.jpg\" border=\"0\" \/><\/a>");	
	}

}


function pofIndexExtend(){	
	document.writeln("<a href=\"http:\/\/simu.howbuy.com\/hotproduct.html\" target='_blank'><img src=\"..\/images\/hotPofExtend.gif\" height='100' width='698' style='border:1px #b6c8d4 solid;' border=\"0\" \/><\/a>")
}

/*function managerExtend(){
	document.writeln("<div style='margin:0px 0px;border:1px solid #ddd;'> <a href=\"http://www.howbuy.com/subject/manager/\" target='_blank'><img src=\"/images/advimg/phbbanner12.gif\" border=\"0\" \/><\/a><\/div>")
}
*/
//福布斯推广
function forbesExtend(){
	//return; 
	if(window.top.location.href.indexOf("company")>=0){
		document.write("<a href='http://www.howbuy.com/about/media/10000303,21373387.html' target='_blank'><img style='border:1px #3c7faf solid;' src='/images/advimg/fbs2010083001.jpg' alt='' border='0' /></a>");
	}else if(window.top.location.href.indexOf("/report/")>=0||window.top.location.pathname.indexOf("interview")>0){
		document.write("<div style='margin-top:24px;'><a href='http://www.howbuy.com/about/media/10000303,21373387.html' target='_blank'><img style='border:1px #3c7faf solid;' src='/images/advimg/fbs2010083002.jpg' alt='' border='0' /></a></div>");
	}else{
		document.write("<div style='border:1px #3c7faf solid;'><a href='http://www.howbuy.com/about/media/10000303,20782274.html' target='_blank'><img  src='/images/advimg/fbs20100501.jpg' alt='' border='0' width='286' /></a></div>");
	}
}

function setShowColumn(){
	if(window.top.location.pathname=="/pof/companylist.htm"||window.top.location.pathname=="/companylist.htm"){//基金管理人
		ById('sm').className='sm';
		document.body.style.width="260px";
	}else if(window.top.location.pathname=="/pof/report.htm"||window.top.location.pathname=="/pof/news.htm"||window.top.location.pathname=="/report.htm"||window.top.location.pathname=="/news.htm"){//报告页
		ById('sm').className='dis1';
		ById('grade').className='undis';
		ById('report').className='undis';
		ById('forumTopic').className='undis';			
	}else if(window.top.location.pathname.indexOf("interview")>0){
		ById('sm').className='dis1';
		ById('video').style.marginTop='0px';
		return;
	}else{//产品页 //
		ById('sm').className='dis';
	}
}

function index30Extend(){
	document.writeln("<div style='margin:0px 5px;text-align:center;'> <a href=\"\" target='_blank'><img src=\"images\/30.jpg\" alt=\"\" title=\"\" border=\"0\" \/><\/a><\/div>")
}

function ajExtend(){
	document.writeln("<div style='margin:0px 0px;'> <a href=\"/anjia/dfzqcomm.htm\" target='_blank'><img src=\"/images/advimg/ajExtend20100609.jpg\" style='border:1px solid #ddd;' border=\"0\" \/><\/a><\/div>")
}

function ajindexExtend(){
	//document.writeln("<div style='margin:0px 0px;border:1px solid #ddd;'> <a href=\"/anjia/htsec.html\" target='_blank'><img src=\"../images/advimg/ajbanner2010060901.jpg\" border=\"0\" \/><\/a><\/div>")
	imgUrl.push("/images/advimg/ajbanner2010060901.jpg");
	imgLink.push("http://www.howbuy.com/anjia/dfzqcomm.htm");
	imgTitle.push("");	
	imgUrl.push("/images/advimg/ajbanner2010060902.jpg");
	imgLink.push("");
	imgTitle.push("");	
	
	
	sumImg=imgUrl.length;
	bannercom();
	document.write(''
	+'<style type="text\/css">\n'
	+'	.banner {width:613px;height:120px;padding:0px;border:1px solid #b6c8d4;position:relative;overflow:hidden;}\n'
	+'<\/style>\n'
	+'\n'
	+'');
}

function ppWebExtend(index){
	if(index=="0"){//费率页面
		document.writeln("<div style='margin-bottom:15px;'> <a href=\"/anjia/\" target='_blank'><img src=\"/images/advimg/fundny2010090203.jpg\" border=\"0\" style='border:1px solid #ccc;' \/></a><\/div>");
	}else if(index=="1"){//基金概况、网友评论
		document.writeln("<div style='margin-bottom:15px;'><img src=\"/images/advimg/fundny2010090201.jpg\" border=\"0\" style='border:1px solid #ccc;' \/><\/div>")	;
	}else if(index=="2"){//净值收益
		document.writeln("<div style='margin-bottom:15px;'> <a href=\"/anjia/\" target='_blank'><img src=\"/images/advimg/fundny2010090202.jpg\" border=\"0\" style='border:1px solid #ccc;' \/></a><\/div>");
	}else if(index=="3"){//基金评级
		document.writeln("<div style='margin-bottom:15px;'><img src=\"/images/advimg/pp3.gif\" border=\"0\" style='border:1px solid #ccc;' \/><\/div>");
	}else if(index=="4"){//网友评论
		document.writeln("<div style='margin-bottom:15px;'> <a href=\"http://www.howbuy.com/member/cardindex.htm\" target='_blank'><img src=\"/images/advimg/fundny2010090204.jpg\" border=\"0\" style='border:1px solid #ccc;' \/></a><\/div>");
	}
}


//私募首页banner
// JavaScript Document---------------
// www.howbuy.com					//
// leo lee edit by 2009.2.13		//
// leo.li@howbuy.com				//
//////////////////////////////////////
/*banner*/ 
var isStart=true;
var nn=0,tt,picAlpha=100;
var aryTransition = [4,5,6,7,8,9,12,21,22];
var imgUrl=new Array();
var imgLink=new Array();
var imgTitle=new Array();
var sumImg;

//网站首页banner

function bannercom(){
	
	document.write(''
	+'<style type="text\/css">\n'
	+'	.banner {width:513px;height:120px;padding:0px;border:1px solid #b6c8d4;position:relative;overflow:hidden;}\n'
	+'	.banner .control1 {width:515px;height:20px;z-index:1;position:absolute;left:0px;bottom:3px;background-image: none;\tbackground-color:#fff;filter:alpha(opacity=40);-moz-opacity:0.4;opacity: 0.4;}\n'
	+'	.banner .control {height:15px;padding:0px;z-index:2;position:absolute;left:0px;\tbottom:3px;text-align:right;}\n'
	+'	.banner .control div {background:#fff;text-align:center;line-height:15px;width:15px;height:15px;margin-left:3px;\tborder:1px #999 solid;float:left;cursor:pointer;font-weight:bold;}\n'
	+'	.banner .control span {float:right;\tmargin-right:5px;}\n'
	+'	.banner .control span img {cursor:pointer; }\n'
	+'	.banner .control .choose {background:#d80012;color:#fff;border:#999 1px solid;}\n'
	+'<\/style>\n'
	+'<div class=\"banner\">\n'
	+'	<div class=\"control\" id=\"control\"><\/div>\n'
	+'	<img onclick=\"goToUrl()\" onmouseover=\"pause();\" onmouseout=\"comeback();\" style=\"FILTER: revealTrans(duration=2,transition=20); cursor:pointer;\" border=\'0\' name=\"bannerPic\" id=\"bannerPic\" \/>\n'
	+'<\/div>\n'
	+'\n'
	+'');

	ById("bannerPic").src=imgUrl[0];
	if(sumImg==1) return;
	establishControl(sumImg,2);
	changeArea();
	window.setInterval('changeArea()',8000);
}

function indexBanner(){	
	status="www.howbuy.com  您身边专业的基金投资顾问";
	//return;
			
/*	imgUrl.push("/images/advimg/banner2010081101.jpg");
	imgLink.push("http://simu.howbuy.com/xfctot/xfc2h.html");
	imgTitle.push("");*/
	imgUrl.push("/images/advimg/banner20100825.jpg");
	imgLink.push("http://simu.howbuy.com/hot/P00241.htm");
	imgTitle.push("");
	imgUrl.push("/images/advimg/banner20100819.jpg");
	imgLink.push("http://www.howbuy.com/subject/mrzx/");
	imgTitle.push("");
//	imgUrl.push("images/advimg/banner2010072901.jpg");
//	imgLink.push("/subject/2010jjejb/");
//	imgTitle.push("");	
	imgUrl.push("images/advimg/ajExtend20100609.jpg");
	imgLink.push("/anjia/");
	imgTitle.push("");
	imgUrl.push("images/advimg/banner20100817.jpg");
	imgLink.push("/about/media/10000303,21915311.html");
	imgTitle.push("");
/*	imgUrl.push("images/advimg/banner2010081601.jpg");
	imgLink.push("/poster/qihuoluntan/");
	imgTitle.push("");*/
	
	sumImg=imgUrl.length;
   bannercom();
	
}

function fundBanner(){	
	//return;
//	imgUrl.push("/images/advimg/fundBanner20100716.jpg");
//	imgLink.push("/subject/jjjlsb/");
//	imgTitle.push("");
//	imgUrl.push("/images/advimg/fundbanner2010080301.jpg");
//	imgLink.push("/poster/jjdt/");
//	imgTitle.push("");
	imgUrl.push("/images/advimg/fundbanner20100800401.jpg");
	imgLink.push("/anjia/");
	imgTitle.push("");
	imgUrl.push("/images/advimg/fundbanner2010080302.jpg");
	imgLink.push("http://www.howbuy.com/login/login.htm");
	imgTitle.push("");
	 
	imgUrl.push("/images/advimg/fundBanner_bjrcb.gif");
	imgLink.push("http://www.bjrcb.com/");
	imgTitle.push("");
	
	sumImg=imgUrl.length;
   
	document.write(''
	+'<style type="text\/css">\n'
	+'	.banner {width:278px;height:170px;padding:0px;border:1px solid #b6c8d4;position:relative;overflow:hidden;}\n'
	+'	.banner .control1 {width:200px;height:30px;z-index:1;position:absolute;left:0px;bottom:5px;background-image: none;\tbackground-color:#fff;filter:alpha(opacity=40);-moz-opacity:0.4;opacity: 0.4;}\n'
	+'	.banner .control {height:21px;padding:0px;z-index:2;position:absolute;left:0px;\tbottom:5px;text-align:right;}\n'
	+'	.banner .control div {background:#fff;text-align:center;line-height:15px;width:15px;height:15px;margin:3px 3px;\tborder:1px #999 solid;float:right;cursor:pointer;font-weight:bold;}\n'
	+'	.banner .control span {float:left;\tmargin-right:5px;}\n'
	+'	.banner .control span img {cursor:pointer; }\n'
	+'	.banner .control .choose {background:#d80012;color:#fff;border:#999 1px solid;}\n'
	+'<\/style>\n'
	+'<div class=\"banner\">\n'
	+'	<div class=\"control\" id=\"control\"><\/div>\n'
	+'	<img onclick=\"goToUrl()\" onmouseover=\"pause();\" onmouseout=\"comeback();\" style=\"FILTER: revealTrans(duration=2,transition=20); cursor:pointer;width:278px;height:180px;\" border=\'0\' name=\"bannerPic\" id=\"bannerPic\" \/>\n'
	+'<\/div>\n'
	+'\n'
	+'');

	ById("bannerPic").src=imgUrl[0];
	if(sumImg==1) return;
	establishControl(sumImg,1);
	changeArea();
	window.setInterval('changeArea()',8000);
}

function vcpeBanner(){	
	//return;
	imgUrl.push("/images/advimg/vcpe4.jpg");
	imgLink.push("http://www.howbuy.com/vcpe/club.html");
	imgTitle.push("");
//	imgUrl.push("/images/advimg/vcpe20100713.jpg");
//	imgLink.push("/subject/sf/");
//	imgTitle.push("");
	
	sumImg=imgUrl.length;
   
	document.write(''
	+'<style type="text\/css">\n'
	+'	.banner {width:378px;height:78px;padding:0px;border:1px solid #b6c8d4;position:relative;overflow:hidden;}\n'
	+'	.banner .control1 {width:308px;height:30px;z-index:1;position:absolute;left:0px;bottom:5px;background-image: none;\tbackground-color:#fff;filter:alpha(opacity=40);-moz-opacity:0.4;opacity: 0.4;}\n'
	+'	.banner .control {height:21px;padding:0px;z-index:2;position:absolute;left:0px;\tbottom:5px;text-align:right;}\n'
	+'	.banner .control div {background:#fff;text-align:center;line-height:15px;width:15px;height:15px;margin:3px 3px;\tborder:1px #999 solid;float:left;cursor:pointer;font-weight:bold;}\n'
	+'	.banner .control span {float:right;\tmargin-right:5px;}\n'
	+'	.banner .control span img {cursor:pointer; }\n'
	+'	.banner .control .choose {background:#d80012;color:#fff;border:#999 1px solid;}\n'
	+'<\/style>\n'
	+'<div class=\"banner\">\n'
	+'	<div class=\"control\" id=\"control\"><\/div>\n'
	+'	<img onclick=\"goToUrl()\" onmouseover=\"pause();\" onmouseout=\"comeback();\" style=\"FILTER: revealTrans(duration=2,transition=20); cursor:pointer;\" border=\'0\' name=\"bannerPic\" id=\"bannerPic\" \/>\n'
	+'<\/div>\n'
	+'\n'
	+'');

	ById("bannerPic").src=imgUrl[0];
	if(sumImg==1) return;
	establishControl(sumImg,2);
	changeArea();
	window.setInterval('changeArea()',8000);
}
//私募基金banner
function pofBanner(){
	
	imgUrl.push("/images/advimg/smbanner20100819.jpg");
	imgLink.push("http://www.howbuy.com/subject/mrzx/");
	imgTitle.push("");
	imgUrl.push("/images/advimg/pofBanner2010081101.jpg");
	imgLink.push("http://simu.howbuy.com/xfctot/xfc2h.html");
	imgTitle.push("");
	imgUrl.push("images/advimg/smbanner20100825.jpg");
	imgLink.push("http://simu.howbuy.com/hot/P00241.htm");
	imgTitle.push("");
  // imgUrl.push("http://www.howbuy.com/images/advimg/pofBanner20100601.jpg");
  // imgUrl.push("/images/advimg/pofBanner2010061701.jpg");
  // imgLink.push("http://www.howbuy.com/poster/jdpx.html");
  // imgTitle.push("");  
   
   sumImg=imgUrl.length;
   
	document.write(''
	+'<style type=\"text\/css\">\n'
	+'.banner {width:243px;height: 172px;padding:0px;position:relative;overflow:hidden;}\n'
	+'.banner .control {width:400px;height:15px;padding:0px;z-index:2;position:absolute;right:0px;bottom:5px;text-align:right;}\n'
	+'.banner .control div {background:#fff;text-align:center;line-height:15px;width:15px;height:15px;margin:0px 3px;border:1px #999 solid;float:right;cursor:pointer;font-weight:bold;filter:alpha(opacity=70);	-moz-opacity:0.7;opacity: 0.7;}\n'
	+'.banner .control span {float:right;margin-right:5px;}\n'
	+'.banner .control span img { cursor:pointer; }\n'
	+'.banner .control .choose {background:#d80012;color:#fff;border:#000 1px solid;}\n'
	+'</style>\n'
	+'<div class="banner">\n'
	+'	<div class="control" id="control"><\/div>\n'
	+'	<img onclick="javascript:goToUrl()" onmouseover="pause();" onmouseout="comeback();" style="FILTER: revealTrans(duration=2,transition=20); cursor:pointer;width:243px;height: 170px;" border="0" name="bannerPic" id="bannerPic" />\n'
	+'<\/div>\n'
	+'\n'
	+'');
	
	ById("bannerPic").src=imgUrl[0];
	if(sumImg==1) return;	
	//establishControl(sumImg);
	
	for(j=1;j<=sumImg;j++){
		if (j==1){
			ById('control').innerHTML+="\n\t<div" + " id=no" + j + " onmouseover='setFocus1(" + j + ");pause();' class='choose'>" + j + "</div>\n";
		}else{
			ById('control').innerHTML="\t<div" + " id=no" + j + " onmouseover='setFocus1(" + j + ");pause();'>" + j + "</div>\n"+ById('control').innerHTML;
		}	
	}
	changeArea();
	window.setInterval('changeArea()',5000);
}

//一对多banner
function yddBanner(){	
   imgUrl.push("../images/banner_ydd_gf.jpg");
   imgLink.push("http://www.howbuy.com/zhlc/company/80000248.html");
   imgTitle.push("广发基金一对多再发新品—广发主题投资2号火热发行");
   imgUrl.push("/images/banner_ydd_fbs.jpg");
   imgLink.push("http://www.howbuy.com/about/media/10000303,20022786.html");
   imgTitle.push("");
   imgUrl.push("../images/banner_ydd_all.jpg");
   imgLink.push("");
   imgTitle.push("");
   
   sumImg=imgUrl.length;
   
	document.write(''
	+'<style type=\"text\/css\">\n'
	+'.banner {width:658px;height: 63px;padding:0px;border:1px solid #b6c8d4;position:relative;overflow:hidden;}\n'
	+'.banner .control {width:700px;height:15px;padding:0px;z-index:2;position:absolute;right:0px;bottom:5px;text-align:right;}\n'
	+'.banner .control div {background:#fff;text-align:center;line-height:15px;width:15px;height:15px;margin:0px 3px;border:1px #999 solid;float:right;cursor:pointer;font-weight:bold;filter:alpha(opacity=70);	-moz-opacity:0.7;opacity: 0.7;}\n'
	+'.banner .control span {float:right;margin-right:5px;}\n'
	+'.banner .control span img { cursor:pointer; }\n'
	+'.banner .control .choose {background:#d80012;color:#fff;border:#000 1px solid;}\n'
	+'</style>\n'
	+'<div class="banner">\n'
	+'	<div class="control" id="control"><\/div>\n'
	+'	<img onclick="javascript:goToUrl()" onmouseover="pause();" onmouseout="comeback();" style="FILTER: revealTrans(duration=2,transition=20); cursor:pointer;" border="0" name="bannerPic" id="bannerPic" />\n'
	+'<\/div>\n'
	+'\n'
	+'');
	
	ById("bannerPic").src=imgUrl[0];
	if(sumImg==1) return;
	establishControl(sumImg);
	changeArea();
	window.setInterval('changeArea()',5000);
}
   
//账簿推广
function zhangboExtend(){	
	if(window.location.pathname.indexOf("/board/")>=0){		
/*	   imgUrl.push("/images/advimg/phbbanner12.gif");
	   imgLink.push("http://www.howbuy.com/subject/manager/");
	   imgTitle.push("");	*/
	   imgUrl.push("/images/advimg/phbbanner12.gif");
	   imgLink.push("http://www.howbuy.com/subject/manager/");
	   imgTitle.push("");	
	   imgUrl.push("/images/advimg/phbbanner11.gif");
	   imgLink.push("/register/register.htm");
	   imgTitle.push("");	
	}else{
	   imgUrl.push("/images/advimg/tl2010090201.jpg");
	   imgLink.push("http://www.howbuy.com/member/cardindex.htm");
	   imgTitle.push("");
	   imgUrl.push("/images/myFundExtend.gif");
	   imgLink.push("http://www.howbuy.com/myfund/index.htm");
	   imgTitle.push("基金账簿 —— 新增基金分析报告功能！");
//	   imgUrl.push("/images/advimg/phbbanner2.gif");
//	   imgLink.push("http://www.howbuy.com/poster/2010/");
//	   imgTitle.push("");
//	   imgUrl.push("/images/advimg/bstbanner20100715.jpg");
//	   imgLink.push("/poster/jjdt/");
//	   imgTitle.push("");
	}
   sumImg=imgUrl.length;
   
	document.write(''
	+'<style type=\"text\/css\">\n'
	+'.banner {width:948px;height: 60px;padding:0px;border:1px solid #b6c8d4;position:relative;overflow:hidden;margin-top:5px;}\n'
	+'.banner .control {width:700px;height:15px;padding:0px;z-index:2;position:absolute;right:0px;bottom:5px;text-align:right;}\n'
	+'.banner .control div {background:#fff;text-align:center;line-height:15px;width:15px;height:15px;margin:0px 3px;border:1px #999 solid;float:right;cursor:pointer;font-weight:bold;filter:alpha(opacity=70);	-moz-opacity:0.7;opacity: 0.7;}\n'
	+'.banner .control span {float:right;margin-right:5px;}\n'
	+'.banner .control span img { cursor:pointer; }\n'
	+'.banner .control .choose {background:#d80012;color:#fff;border:#000 1px solid;}\n'
	+'</style>\n'
	+'<div class="banner">\n'
	+'	<div class="control" id="control"><\/div>\n'
	+'	<img width="948" onclick="javascript:goToUrl()" onmouseover="pause();" onmouseout="comeback();" style="FILTER: revealTrans(duration=2,transition=20); cursor:pointer;" border="0" name="bannerPic" id="bannerPic" />\n'
	+'<\/div>\n'
	+'\n'
	+'');
	
	ById("bannerPic").src=imgUrl[0];
	if(sumImg==1) return;
	establishControl(sumImg);
	ById("control").style.visibility="hidden";
	changeArea();
	window.setInterval('changeArea()',5000);
}

function forumBanner(){	
	//return;	 
	imgUrl.push("/images/advimg/forumBanner20100716.jpg");
	imgLink.push("http://www.howbuy.com/forum/posts/list/199468.page");
	imgTitle.push("");
	imgUrl.push("/images/advimg/forumBanner20100707.jpg");
	imgLink.push("http://www.howbuy.com/forum/posts/list/199018.page");
	imgTitle.push("");
	imgUrl.push("/images/advimg/forumBanner20100601101.jpg");
	imgLink.push("http://www.howbuy.com/forum/posts/list/196619.page");
	imgTitle.push("");
	imgUrl.push("/images/advimg/forumBanner20100601102.jpg");
	imgLink.push("http://www.howbuy.com/forum/posts/list/196223.page");
	imgTitle.push("");
//	imgUrl.push("/images/advimg/forumBanner15.jpg");
//	imgLink.push("http://www.howbuy.com/subject/manager/");
//	imgTitle.push("");
	
	sumImg=imgUrl.length;
   
	document.write(''
	+'<style type="text\/css">\n'
	+'	.banner {width:242px;height:206px;padding:0px;border:1px solid #b6c8d4;position:relative;overflow:hidden;}\n'
	+'	.banner .control1 {width:242px;height:30px;z-index:1;position:absolute;left:0px;bottom:5px;background-image: none;\tbackground-color:#fff;filter:alpha(opacity=40);-moz-opacity:0.4;opacity: 0.4;}\n'
	+'	.banner .control {width:242px;height:21px;padding:0px;z-index:2;position:absolute;left:0px;\tbottom:5px;text-align:right;}\n'
	+'	.banner .control div {background:#fff;text-align:center;line-height:15px;width:15px;height:15px;margin:3px 3px;\tborder:1px #999 solid;float:right;cursor:pointer;font-weight:bold;}\n'
	+'	.banner .control span {float:right;\tmargin-right:5px;}\n'
	+'	.banner .control span img {cursor:pointer; }\n'
	+'	.banner .control .choose {background:#d80012;color:#fff;border:#999 1px solid;}\n'
	+'<\/style>\n'
	+'<div class=\"banner\">\n'
	+'	<div class=\"control\" id=\"control\"><\/div>\n'
	+'	<img onclick=\"goToUrl()\" onmouseover=\"pause();\" onmouseout=\"comeback();\" style=\"FILTER: revealTrans(duration=2,transition=20); cursor:pointer;\" border=\'0\' name=\"bannerPic\" id=\"bannerPic\" \/>\n'
	+'<\/div>\n'
	+'\n'
	+'');

	ById("bannerPic").src=imgUrl[0];
	if(sumImg==1) return;
	establishControl(sumImg,1);
	changeArea();
	window.setInterval('changeArea()',8000);
}
 
function fundAnjia(){		
//	   imgUrl.push("/images/advimg/fund_ad9.jpg");
//	   imgLink.push("/anjia/");
//	   imgTitle.push("");
	   imgUrl.push("/images/advimg/fundny20100902.jpg");
	   imgLink.push("/anjia/");
	   imgTitle.push("");	
/*	   imgUrl.push("/images/advimg/fund_ad6.gif");
	   imgLink.push("http://www.howbuy.com/login/login.htm");
	   imgTitle.push("");*/				
/*	   imgUrl.push("/images/advimg/fund_ad1.gif");
	   imgLink.push("/anjia/");
	   imgTitle.push("");
	   imgUrl.push("/images/advimg/fund_ad2.gif");
	   imgLink.push("/anjia/");
	   imgTitle.push("");
	   imgUrl.push("/images/advimg/fund_ad3.gif");
	   imgLink.push("/anjia/");
	   imgTitle.push("");*/
   sumImg=imgUrl.length;
   
	document.write(''
	+'<style type=\"text\/css\">\n'
	+'.banner {width:251px;height: 150px;padding:0px;position:relative;overflow:hidden;}\n'
	+'.banner .control {width:251px;height:15px;padding:0px;z-index:2;position:absolute;right:0px;bottom:5px;text-align:right;}\n'
	+'.banner .control div {background:#fff;text-align:center;line-height:15px;width:15px;height:15px;margin:0px 3px;border:1px #999 solid;float:right;cursor:pointer;font-weight:bold;filter:alpha(opacity=70);	-moz-opacity:0.7;opacity: 0.7;}\n'
	+'.banner .control span {float:right;margin-right:5px;}\n'
	+'.banner .control span img { cursor:pointer; }\n'
	+'.banner .control .choose {background:#d80012;color:#fff;border:#000 1px solid;}\n'
	+'</style>\n'
	+'<div class="banner">\n'
	+'	<div class="control" id="control"><\/div>\n'
	+'	<img onclick="javascript:goToUrl()" onmouseover="pause();" onmouseout="comeback();" style="FILTER: revealTrans(duration=2,transition=20); cursor:pointer;" border="0" name="bannerPic" id="bannerPic" />\n'
	+'<\/div>\n'
	+'');
	
	ById("bannerPic").src=imgUrl[0];
	if(sumImg==1) return;
	establishControl(sumImg);
	ById("control").style.visibility="hidden";
	changeArea();
	window.setInterval('changeArea()',8000);
}

function establishControl(sumImg,kind){
	if(!kind){kind=1;}//1:右；2：左
	for(j=1;j<=sumImg;j++){
		if (j==1){
			// ById('control').innerHTML="<span>\n\t<img alt='向后' onclick='backwards();' src='images/bu_back.gif' border=0>\n\t<img id='pau' title='单击暂停' onclick='play(this);' src='images/pause.gif' border=0>\n\t<img alt='向前' onclick='ahead();' src='images/bu_next.gif' border=0></span>"
			ById('control').innerHTML+="\n\t<div" + " id=no" + j + " onmouseover='setFocus(" + j + ");pause();' class='choose'>" + j + "</div>\n";
		}else{
			if(kind==1){
				ById('control').innerHTML="\t<div" + " id=no" + j + " onmouseover='setFocus(" + j + ");pause();'>" + j + "</div>\n"+ById('control').innerHTML;
			}else{
				ById('control').innerHTML+="\t<div" + " id=no" + j + " onmouseover='setFocus(" + j + ");pause();'>" + j + "</div>\n";
			}
		}	
	}	
}

//播放 暂停
function play(imgObj){
	if(imgObj.src.indexOf("images/play.gif")>0){   //绝对路径
	//if(imgObj.title== "单击播放"){
		imgObj.src ="images/pause.gif";
		imgObj.title = "单击暂停"
		isStart = true;
		changeArea();
	}else{
		imgObj.src ="images/play.gif";
		imgObj.title = "单击播放"
		isStart = false;
	}
}

//暂停
function pause(){
	isStart = false;
	showStatusMsg();
	return;
}

//继续
function comeback(){
	isStart = true;
	status="www.howbuy.com  您身边专业的基金投资顾问";
	return;
}

//向后
function backwards(){
	nn--;
	if(nn < 1) nn=sumImg; 
	setFocus(nn);
}

//向前
function ahead(){
	nn++;
	if(nn > sumImg) nn=1;
	setFocus(nn);
}

//点击直接跳转
function setFocus(n){
	if(tt) clearTimeout(tt);
	//alert(sumImg);
	for(i=1;i<=sumImg;i++){
		ById('no'+i).className="unchoose";
	}		 
	ById('no'+n).className="choose";
	(document.all)?(setTransition()):(hidePic());
	document.images.bannerPic.src=imgUrl[n-1];
	document.images.bannerPic.title=imgTitle[n-1];		
	if(document.all){bannerPic.filters.revealTrans.play();}	
	nn=n;
}

function setFocus1(n){
	if(tt) clearTimeout(tt);
	//alert(sumImg);
	for(i=1;i<=sumImg;i++){
		ById('no'+i).className="unchoose";
	}		 
	ById('no'+n).className="choose";
	document.images.bannerPic.src=imgUrl[n-1];
	document.images.bannerPic.title=imgTitle[n-1];	
	nn=n;
}

//IE下过渡效果
function setTransition(){
	  var idx = Math.floor(Math.random()*aryTransition.length);
      bannerPic.filters.revealTrans.Transition=aryTransition[idx];
	  //bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
      bannerPic.filters.revealTrans.apply();
}

//FF下淡出BANNER
function hidePic (){
	if(picAlpha>0){
		ById('bannerPic').style.filter = "Alpha(Opacity="+picAlpha+")"; 
		ById('bannerPic').style.opacity = picAlpha/100; 
		picAlpha-=20; 
		var hidePicTime=setTimeout(hidePic,50);
	}else{
		clearTimeout(hidePicTime);
		showPic();
	}
}

//FF下淡入BANNER
function showPic (){
	if(picAlpha<=100){
		ById('bannerPic').style.filter = "Alpha(Opacity="+picAlpha+")"; 
		ById('bannerPic').style.opacity = picAlpha/100; 
		picAlpha+=20; 
		var showPicTime=setTimeout(showPic,50);
	}else{
		clearTimeout(showPicTime);
	}
}

//自动切换BANNER
function changeArea(){
	if (sumImg==1) return;
	if(isStart==true){
		nn++;
		if(nn>sumImg) nn=1;		
		setFocus(nn);
	}else{
		return;
	}

}

//跳转到BANNER指定URL
function goToUrl(){
	if(sumImg=="1"){		
  		jumpUrl=imgLink[0];	
	}else{
  		jumpUrl=imgLink[nn-1];		
	}
   jumpTarget='_blank';
   if (jumpUrl != ''){
     // if (jumpTarget != '')window.open("http://www.howbuy.com"+jumpUrl,jumpTarget);
      if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
      else location.href=jumpUrl;
   }
}

//设置状态栏URL信息
function showStatusMsg() { 
   window.status=imgLink[nn-1];
   document.returnValue = true;
}

//视频首页广告 begin
var videoPicLink=new Array();
var videoTitleLink=new Array();
var videoPic=new Array();
var videoTitle=new Array();
var videoSubTitle=new Array();
var videoLength;
var currslid=0;
var slidint;
var setSubTime=["5000","5000","5000","5000","5000"];//设置五个标题的显示时间，1000毫秒=1秒
var set_SubTime;
var bigImg;

function videoBanner() {
	ById('picbox').innerHTML="<a href='"+videoTitleLink[0]+"' id='mediaPicLink' target='_blank'><img border='0' scr='"+videoPic[0]+"' id='mediaPic' onmouseover='picFocus()' onmouseout='playit();' height='237' width='260' /></a>";
	videoLength=videoTitle.length;
	for(j=0;j<=videoLength-1;j++) {
		if(j==0) {
			ById('titleArea').innerHTML="<div class='titleSubArea_choose' id=video_"+j+" onmouseover=setfoc("+j+"); onmouseout='playit();'><div class='divBorder'><div class='title'><a href='"+videoTitleLink[j]+"'>"+videoTitle[j]+"</a></div><div class='subTitle'>"+videoSubTitle[j]+"</div></div></div>";
		}else {
			ById('titleArea').innerHTML=ById('titleArea').innerHTML+"<div style='margin-top:5px;' class='titleSubArea' id=video_"+j+" onmouseover=setfoc("+j+"); onmouseout='playit();'><div class='divBorder'><div class='title'><a href='"+videoTitleLink[j]+"'>"+videoTitle[j]+"</a></div><div class='subTitle'>"+videoSubTitle[j]+"</div></div></div>";
		}
	}
	bigImg=ById("mediaPic")
		
	if(videoLength==5){
			ById('titleArea').className='case1';	
	}else if(videoLength==4){
			ById('titleArea').className='case2';	
	}else if(videoLength==3){
			ById('titleArea').className='case3';	
	}
	//setfoc(videoLength-videoLength);
	setfoc(0);
	playit();
}

function setfoc(num) {
	currslid=num;
	for(i=0;i<videoLength;i++) {
		if(i==num) {
			var focusDiv=ById('video_'+i);
			focusDiv.className="titleSubArea_choose";
			bigImg.setAttribute("src",videoPic[i]);
			ById("mediaPicLink").setAttribute("href",videoTitleLink[num]);
		}else {
			ById('video_'+i).className="titleSubArea";
		}
	}
	stopit();
}

function picFocus() {
	setfoc(currslid);
}

function picLostFocus() {
	playit();
}

function playnext() {
	if(currslid==videoLength-1) {
		currslid=0;
	}else {
		currslid++;
	};
	setfoc(currslid);
	playit();
}

function playit() {		
		switch(currslid) {
			case 0:set_SubTime=setSubTime[0];
			break;
			case 1:set_SubTime=setSubTime[1];
			break;
			case 2:set_SubTime=setSubTime[2];
			break;
			case 3:set_SubTime=setSubTime[3];
			break;
			case 4:set_SubTime=setSubTime[4];
			break;
		}
		slidint=setTimeout(playnext,set_SubTime);
}

function stopit() {
	clearTimeout(slidint);
}
//视频首页广告 end