/**
 * @author samdeng
 */

function feature_list(title,thread_id,color){
	document.write('<div style="font-size:0.9em;">Feature</div><div class="sidebar_title"><a href="http://www.kenlu.net/forum/showthread.php?t='+thread_id+'">'+title+'</a></div><div style="border-left:3px solid '+color+';padding-left:2px;width:235px;height:300px;overflow:hidden;padding-bottom:20px;margin-bottom:20px;background-position:center;background-image:url(\'http://www.kenlu.net/forum/KLM/cover/upload/resize_'+thread_id+'.jpg\');"   class="tofubit smallfont" onmouseover="this.className=\'tofubit_over smallfont\';" onmouseout="this.className=\'tofubit smallfont\';" onclick="window.location.href=\'http://www.kenlu.net/forum/showthread.php?t='+thread_id+'\'"></div>')	
}

function banner_list(title,subtitle,title_link,img,random,content){
	document.write('<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>');	document.write('<a href="'+title_link+'"><div class="sidebar_title">'+subtitle+'</div><div style="width:250px;height:auto;overflow:hidden;padding-bottom:20px;margin-bottom:20px;"   class=\'tofubit\' onmouseover="this.className=\'tofubit_over\';" onmouseout="this.className=\'tofubit\';" onclick="window.location.href=\''+title_link+'\'">'); 	document.write('<img src="'+img+'" border=0>');	document.write('<span class="smallfont" >'+content+'</span>');	document.write('</div></a></td></tr></table>');
}

function title_list(title,content){
	document.write('<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>');	
	document.write('<div style="font-size:0.9em;">'+title+'</div><div style="width:250px;height:auto;overflow:hidden;margin-bottom:20px;" class=\'tofubit_over\' >'); 	
	document.write('<span class="smallfont" >'+content+'</span>');	
	document.write('</div></td></tr></table>');
}

function select_print(mode){
	var select_title = new Array();
	var select_link = new Array();
	var select_content = new Array();
	var select_img = new Array();
	var i=0;
		/*select_title[i] ="NIKEiD Studio --- 台北 TPE6453 POP-UP 現身！！細節導覽～";
		select_link[i] ="http://www.kenlu.net/forum/showthread.php?t=41068";
		select_content[i] ="NIKE於1998年首次創立NIKEiD.com網站，提供美國地區消費者客製化製鞋服務，直至2003年NIKEiD才拓展至歐盟國家。2005年10月NIKE於美國奧勒岡州NIKE總部設立首家NIKEiD.STUDIO，在專屬空間特別安排專業的設計顧問，針對消費者需求，做面對面的諮詢與建議，提供其全方位的體驗與服務。這次台北東區的TPE6453概念展場引進了完整的服務與設備，搭配今年點名的熱門MAX款式，讓台灣的朋友就近享受客製球鞋的樂趣！";
		select_img[i] ="http://www.kenlu.net/forum/KLM/cover/upload/resize_41068.jpg";
	i++;*/
		select_title[i] ="adidas Originals Five-Two 3 --- 夏季首波主打 五二三經典解碼";
		select_link[i] ="http://www.kenlu.net/select/five-two-3/";
		select_content[i] ="身為紮根於運動領域的品牌，60年間adidas Originals用不計其數的明星商品，將運動精神由場上帶至街頭生活，成為時尚與流行文化的經典象徵。2009秋冬延續歡慶adidas經典三條線60週年的主題，adidas Originals ”FIVE-TWO 3” 以3條線標誌 x 5雙經典鞋款 & 2 件經典外套為概念，重新翻玩adidas引以為傲的Superstar、Stan Smith、Samba、Nizza與Forum鞋型。";
		select_img[i] ="http://www.kenlu.net/feature/adidas_523_history/img_banner_1.jpg";
	i++;
		select_title[i] ="adidas Originals Five-Two 3 --- 夏季首波主打 五二三經典解碼";
		select_link[i] ="http://www.kenlu.net/select/five-two-3/";
		select_content[i] ="身為紮根於運動領域的品牌，60年間adidas Originals用不計其數的明星商品，將運動精神由場上帶至街頭生活，成為時尚與流行文化的經典象徵。2009秋冬延續歡慶adidas經典三條線60週年的主題，adidas Originals ”FIVE-TWO 3” 以3條線標誌 x 5雙經典鞋款 & 2 件經典外套為概念，重新翻玩adidas引以為傲的Superstar、Stan Smith、Samba、Nizza與Forum鞋型。";
		select_img[i] ="http://www.kenlu.net/feature/adidas_523_history/img_banner_2.jpg";
	i++;
		select_title[i] ="adidas Originals Five-Two 3 --- 夏季首波主打 五二三經典解碼";
		select_link[i] ="http://www.kenlu.net/select/five-two-3/";
		select_content[i] ="身為紮根於運動領域的品牌，60年間adidas Originals用不計其數的明星商品，將運動精神由場上帶至街頭生活，成為時尚與流行文化的經典象徵。2009秋冬延續歡慶adidas經典三條線60週年的主題，adidas Originals ”FIVE-TWO 3” 以3條線標誌 x 5雙經典鞋款 & 2 件經典外套為概念，重新翻玩adidas引以為傲的Superstar、Stan Smith、Samba、Nizza與Forum鞋型。";
		select_img[i] ="http://www.kenlu.net/feature/adidas_523_history/img_banner_3.jpg";
	i++;
		select_title[i] ="adidas Originals Five-Two 3 --- 夏季首波主打 五二三經典解碼";
		select_link[i] ="http://www.kenlu.net/select/five-two-3/";
		select_content[i] ="身為紮根於運動領域的品牌，60年間adidas Originals用不計其數的明星商品，將運動精神由場上帶至街頭生活，成為時尚與流行文化的經典象徵。2009秋冬延續歡慶adidas經典三條線60週年的主題，adidas Originals ”FIVE-TWO 3” 以3條線標誌 x 5雙經典鞋款 & 2 件經典外套為概念，重新翻玩adidas引以為傲的Superstar、Stan Smith、Samba、Nizza與Forum鞋型。";
		select_img[i] ="http://www.kenlu.net/feature/adidas_523_history/img_banner_4.jpg";
	i++;
		select_title[i] ="adidas Originals Five-Two 3 --- 夏季首波主打 五二三經典解碼";
		select_link[i] ="http://www.kenlu.net/select/five-two-3/";
		select_content[i] ="身為紮根於運動領域的品牌，60年間adidas Originals用不計其數的明星商品，將運動精神由場上帶至街頭生活，成為時尚與流行文化的經典象徵。2009秋冬延續歡慶adidas經典三條線60週年的主題，adidas Originals ”FIVE-TWO 3” 以3條線標誌 x 5雙經典鞋款 & 2 件經典外套為概念，重新翻玩adidas引以為傲的Superstar、Stan Smith、Samba、Nizza與Forum鞋型。";
		select_img[i] ="http://www.kenlu.net/feature/adidas_523_history/img_banner_5.jpg";
	
	switch(mode){
		case "nike" :
			select_index = 0;
		break
		case "adidas" :
			select_index = 1;
		break
		default :
			select_index = Math.floor(Math.random()*i);
	}
	title = select_title[select_index];
	link = select_link[select_index];
	content = select_content[select_index];
	img = select_img[select_index];
	
	document.write('<div style="padding-left:6px;"><table cellpadding=0 cellspacing=0 border=0 width=100% style="border-bottom:1px solid #383838;"><tr><td valign="bottom" style="font-size:14px;color:#ffffff;">SELECT</td><td valign="bottom" align="right"><a href="'+link+'">'+title+'</a></td></tr></table><div class="tofubit" onmouseover="this.className=\'tofubit_over\';" onmouseout="this.className=\'tofubit\';" onclick="window.location.href=\''+link+'\';" style="margin-bottom:26px;width:616px;height:auto;"><table width=100% cellpadding=0 cellspacing=0 border=0><tr><td class="smallfont" style="line-height:1.6em;padding-right:15px;">'+content+'</td><td style="width:300px;background-image:url(\''+img+'\');background-position:center;"></td></tr></table></div></div>');
	
}

function feature_adidas(){
	
			title = 'NIKE AW77';subtitle='運動潮人變身大作戰';title_link='http://media.moulin-orange.com/nike/AW77II/?mtag=kenlu03';
			content = '';
			swfsrc = "http://www.kenlu.net/forum/KLM/banner/images/20091208_nike_aw77_250x300.swf";
			counter = "/counter/250x200/nike/200901006_nike_mtag";
			img = "<embed src=\""+swfsrc+"\" quality=\"high\" bgcolor=\"#000000\" width=\"250\" height=\"300\" name=\""+counter+"\" align=\"middle\"  allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" onclick=\"pageTracker._trackPageview(\'"+counter+"/click\');\"  onload=\"javascript:pageTracker._trackPageview(\'"+counter+"/show\');\" />";
			
	document.write('<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>');	
	document.write('<div style="font-size:0.9em;">'+title+'</div><a href="'+title_link+'"><div class="sidebar_title">'+subtitle+'</div></a><div style="width:250px;height:auto;overflow:hidden;padding-bottom:20px;margin-bottom:20px;"   class=\'tofubit\' onmouseover="this.className=\'tofubit_over\';" onmouseout="this.className=\'tofubit\';" noclick="window.location.href=\''+title_link+'\'">'); 	
	document.write(img);	
	document.write('<span class="smallfont" >'+content+'</span>');	
	document.write('</div></td></tr></table>');

}

function feature_nike(){
	random = Math.floor(Math.random()*2);
	random = 1;
	switch(random){
		case 1:
			title = 'NIKE Summer League';subtitle='';title_link='http://media.moulin-orange.com/nike/NSL/?mtag=kenlu01';
			content = '<div style="background: #000; -webkit-border-radius: 5px; padding:5px;width:180px;margin:6px auto 0px auto;text-align:center;"><a href="http://event.keedan.com/track/nike-summer-league-snap/" target="_blank"><span style="color:#fff;">NSL 全民SNG 圖片分享區</span></a></div>';
			content = content + '<div style="background: #000; -webkit-border-radius: 5px; padding:5px;width:180px;margin:6px auto 0px auto;text-align:center;"><a href="http://select.kenlu.net/nike-summer-league" target="_blank"><span style="color:#fff;">Nike Summer League 相關文章</span></a></div>';
			swfsrc = "http://www.kenlu.net/forum/KLM/banner/images/20100528_nike_nsl_250x220.swf";
			counter = "/counter/250x200/nike/20100528_nike_nsl_250x220";
			img = "<embed src=\""+swfsrc+"\" quality=\"high\" bgcolor=\"#000000\" width=\"250\" height=\"220\" name=\""+counter+"\" align=\"middle\"  allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" onclick=\"pageTracker._trackPageview(\'"+counter+"/click\');\"  onload=\"javascript:pageTracker._trackPageview(\'"+counter+"/show\');\" />";
		break;
		default:	
		break;
	}
	document.write('<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>');	
	document.write('<div class="sidebar_title">'+title+'</div><a href="'+title_link+'"><div class="sidebar_title">'+subtitle+'</div></a><div style="width:250px;height:auto;overflow:hidden;padding-bottom:20px;margin-bottom:20px;"   class=\'tofubit\' onmouseover="this.className=\'tofubit_over\';" onmouseout="this.className=\'tofubit\';" noclick="window.location.href=\''+title_link+'\'">'); 	
	document.write(img);	
	document.write('<span class="smallfont" >'+content+'</span>');	
	document.write('</div></td></tr></table>');
}

function feature_puma(){
	title='PUMA';subtitle='PUMA Tekkies Brites';title_link='http://www.kenlu.net/forum/SELECT-2010-PUMA-XX-2010-05_50465.html';
	img='http://kenlu.net/forum/KLM/thumb.php?src=cover/upload/resize_50465.jpg&w=250&h=120&zc=1&q=90';
	content = '洋溢著豐富色彩的非洲風格是許多文化的根源，也持續影響著流行時尚的走向，今年在南非舉辦的世界盃足球盛事更集中了全世界的目光；PUMA為了向這塊人類起源的非洲大陸致敬，以象徵這塊大陸七百萬年歷史的數字”7″為代表，推出一系列繽紛亮眼的新品上市。';

	banner_list(title,subtitle,title_link,img,random,content);
}

function feature_print(mode){
	//setup FEATURE
	var i = 0;
	var j = 0;
	
	feature_number = i;	
		
//	google_head = '<div style="padding-left:2px;width:165px;height:auto;overflow:hidden;padding-bottom:0px;margin-bottom:0px;padding-right:70px;"  id="160x600" class=\'tofubit smallfont\' onmouseover="this.className=\'tofubit_over smallfont\';" onmouseout="this.className=\'tofubit smallfont\';" >';	
	google_head = '<div style="padding-left:0px;width:250px;height:auto;overflow:hidden;padding-bottom:0px;margin-bottom:0px;"  id="160x600" class=\'tofubit smallfont\' onmouseover="this.className=\'tofubit_over smallfont\';" onmouseout="this.className=\'tofubit smallfont\';" >';	
	banner_head = '<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="margin-bottom:20px;"><tr><td align=center;>' + google_head;
	banner_foot = '</div></td></tr><tr><td style="font-size:8pt; text-align:right;"><a href="http://www.kenlu.net/forum/sendmessage.php?langid=3">contact us</a></td></tr></table>';
	
	//social pages
/*	document.write ('<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="margin-bottom:20px;"><tr><td><div style="font-size:0.9em;">Follow <a href="http://www.facebook.com/pages/KENLUnet/121580768976">KENLU.net</a></div></td></tr><tr><td>'+google_head);
	document.write( '<a href="http://feeds2.feedburner.com/Kenlu-Headline"> <img border=0 src="http://www.kenlu.net/forum/images/misc/icon_rss_45.gif"></a>');
	document.write( '<a href="http://www.flickr.com/groups/kenlu/"> <img border=0 src="http://www.kenlu.net/forum/images/misc/icon_flickr_45.gif"></a>');
	document.write( '<a href="http://www.facebook.com/pages/KENLUnet/121580768976?ref=nf"> <img border=0 src="http://www.kenlu.net/forum/images/misc/icon_fb_45.gif"></a>');
	document.write( '<a href="http://www.twitter.com/KENLU_net/"> <img border=0 src="http://www.kenlu.net/forum/images/misc/icon_twitter_45.gif"></a>');
	document.write( '<a href="http://www.plurk.com/KENLU_net"> <img border=0 src="http://www.kenlu.net/forum/images/misc/icon_plurk_45.gif"></a>');
	document.write( '</div></td></tr></table>');
*/	
	//random features
	random = Math.floor(Math.random()*3);
	random = 5;
	feature_nike();
	feature_puma();
/*	title_link='http://www.kenlu.net/forum/showthread.php?t=50497';
	content = '<div class="fblike"><a class="fbshare" name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php" share_url="';
	content = content + title_link;
	content = content + '">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>';
	content = content + '<iframe src="http://www.facebook.com/plugins/like.php?href=';
	content = content + title_link;
	content = content + '&amp;layout=button_count&amp;show_faces=false&amp;width=70"';
	content = content + '  scrolling="no" frameborder="0"  allowTransparency="true"></iframe>';					
	content = content + '</div>	<style> .fblike iframe{width:80px;height:20px;margin:0 5px 0 0;}';
	content = content + '.fblike a.fbshare{width:100px;height:20px;margin:0 5px 0 0;}</style>';
	document.write(content);
	*/
/*	switch(random){
		case 0: //feature_adidas();feature_puma();feature_nike();
				feature_puma();feature_nike();
		break;
		case 5: feature_puma();
		break;
		default: feature_nike();feature_puma();
		break;
	}*/

			
	//banner KENLU	
	westmill = '<a href="http://www.kenlu.net/go/160x600/WESTMILL-CLASSICAL-CANVAS/2009/07/42607.html" target="_blank"><img src="http://www.kenlu.net/forum/KLM/banner/images/20090728_westmill_160x600.jpg" border=0></a>';
	dada_160x600 = '<a href="http://www.kenlu.net/go/DADA/SPINNER-3-home-t/2009/10/45107.html" target="_blank"><img src="http://www.kenlu.net/forum/KLM/banner/images/20091009_dada_spinner_160x600.jpg" border=0></a>';
	dada_250x200 = '<object width="250" height="200"><param name="movie" value="http://www.youtube.com/v/H9Qkrhtkj-0&hl=en&fs=1&color1=0x3a3a3a&color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/H9Qkrhtkj-0&hl=en&fs=1&color1=0x3a3a3a&color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="250" height="200"></embed></object>';
	google_120x250 = '<script type="text/javascript">google_ad_client = "pub-7230423703369335";google_ad_slot = "4303977204";google_ad_width = 120;google_ad_height = 250;</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';
	google_120x600 = '<script type="text/javascript">google_ad_client = "pub-7230423703369335";google_ad_slot = "0899220857";google_ad_width = 120;google_ad_height = 600;</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';
	google_160x600 = '<script type="text/javascript">google_ad_client = "pub-7230423703369335";google_ad_slot = "7015876948";google_ad_width = 160;google_ad_height = 600;</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';
	google_160x600_2='<script type="text/javascript">google_ad_client = "pub-7230423703369335";google_ad_slot = "2527404797";google_ad_width = 160;google_ad_height = 600;</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';
	google_200x200 = '<script type="text/javascript">google_ad_client = "pub-7230423703369335";google_ad_slot = "1514702035";google_ad_width = 200;google_ad_height = 200;</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';

//				google_160x600 = '<div style="width:160px;height:600px;margin:0 0 0 auto;overflow:hidden;" class="transOFF"	onmouseover="this.className=\'transON\';" 	onmouseout="this.className=\'transOFF\';"><iframe src="http://www.kenlu.net/php/import_blog_160.phtml" name="headline" width="100%" height="100%" frameborder="0" allowtransparency="true" scrolling="no"></iframe></div> ';		
				google_160x600 = '<div style="width:250px;height:600px;margin:0;overflow:hidden;background:#fff;" class="transON"	onmouseover="this.className=\'transON\';" 	onmouseout="this.className=\'transON\';"><iframe src="http://www.facebook.com/plugins/likebox.php?id=121580768976&amp;width=250&amp;connections=10&amp;stream=true&amp;header=false&amp;height=600" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:250px; height:600px;" allowTransparency="true"></iframe></div> ';		
				google_160x600_2 = '<div style="width:250px;height:600px;margin:0;overflow:hidden;" class="transOFF"	onmouseover="this.className=\'transON\';" 	onmouseout="this.className=\'transOFF\';"><iframe src="http://www.facebook.com/plugins/recommendations.php?site=recent.keedan.com&amp;width=250&amp;height=600&amp;header=false&amp;colorscheme=dark&amp;font=arial&amp;border_color=%231b1b1b" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:250px; height:600px"></iframe></div> ';
				google_160x600_3 = '<div style="width:250px;height:600px;margin:0;overflow:hidden;" class="transOFF"	onmouseover="this.className=\'transON\';" 	onmouseout="this.className=\'transOFF\';"><iframe src="http://www.facebook.com/plugins/recommendations.php?site=event.keedan.com&amp;width=250&amp;height=600&amp;header=false&amp;colorscheme=dark&amp;font=arial&amp;border_color=%231b1b1b" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:250px; height:600px"></iframe></div> ';		
//				google_160x600_3='<div style="width:250px;height:600px;margin:0;overflow:hidden;" class="transOFF"	onmouseover="this.className=\'transON\';" 	onmouseout="this.className=\'transOFF\';"><script type="text/javascript">var sitebro_tracker_atc={u:\'http://www.sitebro.com.tw/zh1b721494/\',w:\'MjE0OTQ=\',bt:\'#005389\',bg:\'#FFFFFF\',cf:\'#ffffff\',ca:\'#005389\',bh:\'#f2f2f2\',cp:\'\',l:12,s:2,lang:\'zh_TW\'};</script><script type="text/javascript" src="http://track.sitebro.com.tw/js/widget_track2/tracker_atc.js"></script></div><style><!-- ol.viewlist{font-size:0.9em;} --></style>';
				google_160x600_4 = '<div style="width:250px;height:600px;margin:0;overflow:hidden;" class="transOFF"	onmouseover="this.className=\'transON\';" 	onmouseout="this.className=\'transOFF\';"><iframe src="http://www.facebook.com/plugins/recommendations.php?site=style.keedan.com&amp;width=250&amp;height=600&amp;header=false&amp;colorscheme=dark&amp;font=arial&amp;border_color=%231b1b1b" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:250px; height:600px"></iframe></div> ';					
				google_160x600_5 = '<div style="width:250px;height:600px;margin:0;overflow:hidden;" class="transOFF"	onmouseover="this.className=\'transON\';" 	onmouseout="this.className=\'transOFF\';"><iframe src="http://www.facebook.com/plugins/recommendations.php?site=guide.keedan.com&amp;width=250&amp;height=600&amp;header=false&amp;colorscheme=dark&amp;font=arial&amp;border_color=%231b1b1b" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:250px; height:600px"></iframe></div> ';					
				google_120x600 = google_160x600;

				
random = Math.floor(Math.random()*8);	
document.write(banner_head);
random=1;
switch(random)
	{
		case 1 : 
			document.write(google_160x600);
			break;
		case 2 :
			document.write(google_160x600_2);			
			break;				
		case 3 :
			document.write(google_160x600_3);			
			break;				
		case 4 :
			document.write(google_160x600_5);			
			break;				
		case 5 :
			document.write(google_160x600_4);		
			break;
		default : 
			document.write(google_160x600);
			break;
	}
	
document.write(banner_foot);					

				
				
	/*random = Math.floor(Math.random()*15);	
	switch(random)
	{
		default : 
				if(Math.floor(Math.random()*2)){
					document.write(banner_head);document.write(westmill);document.write(banner_foot);
				}else{
					document.write(banner_head);document.write(dada_250x200);document.write(banner_foot);
				}
				break;
		case 1 : 
		case 3 :
		case 4 :
				document.write(banner_head);document.write(google_120x600);document.write(banner_foot);				
				break;
		case 5 :
		case 6 :  
				document.write(banner_head);document.write(google_160x600);document.write(banner_foot);				
				break;
		case 7 :
		case 8 :
			 	document.write(banner_head);document.write(fund_120x600);document.write(banner_foot); 	
				break;
		case 9 :
		case 10 :  
				document.write(banner_head);document.write(fund_120x600_2);document.write(banner_foot);
				break;
	}
	 document.write(banner_head + google_120x600 + banner_foot);
		if(mode=="banner"){
				random = Math.floor(Math.random()*2);	
				switch(random)
				{
					case 1 : 
						 document.write(banner_head + google_160x600_2 + banner_foot);
						break;
					default :
						 document.write(banner_head + google_120x250 + banner_foot);
						break;	
				}
		}
*/
	
	}

