 $(document).ready(function() {
		//modify by rock ºô­¶¸m¤¤
    $("#header").parent().attr('style','background-image:url(/ch/images/bar_top.jpg);background-repeat:repeat-x;');		   
    $("#header").parent().parent().parent().parent().attr("align","center");
    var loc = window.location.href;
    var isExp3 = false;
    if (loc.indexOf("/products/info_vendor/info_data_vendors.php") != -1){
    	isExp3 = true;	
    }
    if (!isExp3){    
    	$('#categoryTree').parent().attr('rowspan','4');
  	}
    var isExp = false; //¨Ò¥~1
    var isExp2 = false; //¨Ò¥~2 
    
       
		if ((loc.indexOf("/about/company/service.php") != -1) ||
		    (loc.indexOf("/about/company/iso.php") != -1) ||
		    (loc.indexOf("/about/company/map.php") != -1) ||  
				(loc.indexOf("/listed/alien_business/application.php") != -1) ||
				(loc.indexOf("/listed/alien_business/proposal.php") != -1)||
				(loc.indexOf("/listed/alien_business/actions.php") != -1) ||
				(loc.indexOf("/listed/alien_business/actions01.php") != -1) ||
				(loc.indexOf("/listed/IFRS/useIFRS.php") != -1) || 
				(loc.indexOf("/products/indices/tsec/taiex_3.php") != -1) ||  
				(loc.indexOf("/listed/alien_business/plan.php") != -1) ||   
				(loc.indexOf("/listed/alien_business/news.php") != -1) ||   
				(loc.indexOf("/listed/alien_business/law.php") != -1) ||    
				(loc.indexOf("/listed/alien_business/proposal_1.php") != -1) ||
				(loc.indexOf("/listed/manual.php") != -1)  ||
				(loc.indexOf("/indices/tsec/taiex_6.php") != -1) || 
				(loc.indexOf("/products/indices/ftse/ftse_index.php") != -1) ||  
				(loc.indexOf("/stock_search/stock_search.php") != -1) || 
				(loc.indexOf("/stock_search/warrant_introduce.php") != -1) || 
				(loc.indexOf("/stock_search/warrant_liquidity.php") != -1) || 
				(loc.indexOf("/stock_search/warrant_search.php") != -1) || 
				(loc.indexOf("/stock_search/genpage/genpage") != -1) || 
				(loc.indexOf("/stock_search/warrant_law.php") != -1) || 
				(loc.indexOf("/products/securities/ETF") != -1) || 
				(loc.indexOf("/trading/SBL/t13sa710.php") != -1) || 
				(loc.indexOf("/products/SBL/FAQs.php") != -1) ||
				(loc.indexOf("/about/company/contact.php") != -1) ||
				(loc.indexOf("/about/press_room/tsec_news.php") != -1) ||
				(loc.indexOf("/about/press_room/tsec_news_detail.php") != -1) ||
				(loc.indexOf("/about/press_room/tsec_event.php") != -1) ||
				(loc.indexOf("/about/press_room/event_detail.php") != -1)||
				(loc.indexOf("/listed/listed_company/new_listing.php") != -1) ||
				(loc.indexOf("/listed/listed_company/apply_listing.php") != -1) ||
				(loc.indexOf("/listed/suspend_listing.php") != -1) ||
				(loc.indexOf("/listed/governance/cg_report.php") != -1) ||
				(loc.indexOf("/listed/governance/ecg_a03.php") != -1)  ||
				(loc.indexOf("/products/broker_service/broker_service_audit.php") != -1) ||
				(loc.indexOf("/products/broker_service/broker_service_computer.php") != -1) || 
				(loc.indexOf("/products/broker_service/broker_service_clearing.php") != -1) ||  
				(loc.indexOf("/products/broker_service/broker_SBL_") != -1) || 
				(loc.indexOf("/products/broker_service/broker_SBL2_") != -1) || 
				(loc.indexOf("/products/info_vendor") != -1) || 
				(loc.indexOf("/products/publication/") != -1) || 
				(loc.indexOf("/investor/faq.php") != -1) || 
				(loc.indexOf("/investor/started/edu_comic.php") != -1) || 
				(loc.indexOf("/investor/foreign_invest/") != -1) || 
				(loc.indexOf("/trading/fund/ISIN/FMGDRK.php") != -1) || 
				(loc.indexOf("/trading/fund/TWT38U/TWT38U.php") != -1) || 
				(loc.indexOf("/trading/fund/TWT44U/TWT44U.php") != -1) || 
				(loc.indexOf("/trading/fund/TWT43U/TWT43U.php") != -1) || 
				(loc.indexOf("/trading/exchange/TWTAFU/genpage") != -1) || 
				(loc.indexOf("/trading/margin/margin_purchase.php") != -1) || 
				(loc.indexOf("/trading/exchange/TWT53U/genpage") != -1) || 
				(loc.indexOf("/trading/exchange/FMNPTK/genpage/Report") != -1) || 
				(loc.indexOf("/trading/exchange/FMSRFK/genpage/Report") != -1) ||
				(loc.indexOf("/trading/exchange/STOCK_DAY_AVG/") != -1) ||
				(loc.indexOf("/investor/faq1.php") != -1) ||
				(loc.indexOf("/vocabulary/term_search.php") != -1) ||
				(loc.indexOf("/statistics/statistics") != -1)){
    	isExp = true;	
    }
    
    if ((loc.indexOf("/vocabulary/term_search.php") != -1) || (loc.indexOf("/stock_search/warrant_files.php") != -1)){
    	isExp2 = true;	
    }
    
    jQuery.each(jQuery.browser, function(i) {
		  if(($.browser.msie && $("#footer").parent().attr("colspan") == "1") || (!$.browser.msie && $("#footer").parent().attr("colspan") == "2") || (!$.browser.msie && isExp)){
		     $("#footer").attr("style","position:absolute;margin-left:-180px;text-align:center;"); 
		  }else{
		     $("#footer").attr("style","position:absolute;text-align:center;"); 
		  }
		  
		  if (isExp2){
		  	$("#footer").attr("style","position:absolute;text-align:center;"); 	
		  }
		}); 
 
 
 });
