// Flash Embeded
function embedFlash(id, url, width, height, altText, flashVars, wmode) {
	if (!flashVars) flashVars = '';
	if (!wmode) wmode = 'transparent';
	if (!altText) altText = '';

	var str = '' +
	'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0" width="' + width + '" height="' + height + '" id="' + id + '">' +
		'<param name="movie" value="' + url + '">' +
		'<param name="wmode" value="' + wmode + '">' +
		'<param name="FlashVars" value="' + flashVars + '">' +
		'<param name="scale" value="noscale">' +
		'<param name="salign" value="left">' +
		'<!--[if !IE]>-->' +
		'<object type="application/x-shockwave-flash" data="' + url + '" width="' + width + '" height="' + height + '">' +
		'<param name="wmode" value="' + wmode + '">' +
		'<param name="FlashVars" value="' + flashVars + '">' +
		'<param name="scale" value="noscale">' +
		'<param name="salign" value="left">' +
		'<!--<![endif]-->' +
		'<div class="alt-content">' + altText + '</div>' +
		'<!--[if !IE]>-->' +
	'</object>' +
	'<!--<![endif]-->' +
'</object>';
document.write(str);
}

// Tab Content
function initTabMenu(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab") thismenu = tabAnchor.item(i);
		else continue;
		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;
			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_now.gif", ".gif");
				} else {
					currentmenu.className = currentmenu.className.replace(" now", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_now.gif");
			} else {
				this.className += " now";
			}
			this.container.current = this;
			return false;
		};
		if (!thismenu.container.first) thismenu.container.first = thismenu;
	}
	if (tabContainer.first) tabContainer.first.onclick();
}

//var cMenuID = 2; 
function selTabMenu(tabContainerID) {
//alert(cMenuID)
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var thismenu = tabAnchor.item(cMenuID - 1);
	thismenu.onclick();
}
function setTabMenu(tabContainerID, tabMenuNo) {
 document.getElementById(tabContainerID).getElementsByTagName("a").item(tabMenuNo-1).onclick();
}
/*
window.onload = function() {
	initTabMenu("tab_container");
}
*/
/*
$(document).ready(function() {
	$('#sellFeeTab1').load('/wpg/CC/SG/import/fee_tab1.jsp');
	$('#sellFeeTab2').load('/wpg/CC/SG/import/fee_tab2.jsp');
	$('#sellFeeTab3').load('/wpg/CC/SG/import/fee_tab3.jsp');
	$('#sellFeeTab4').load('/wpg/CC/SG/import/fee_tab4.jsp');
	$('#dutyFeeTab1').load('/wpg/CC/SG/import/dutyFee_tab1.jsp');
	$('#dutyFeeTab2').load('/wpg/CC/SG/import/dutyFee_tab2.jsp');
	$('#dutyFeeTab3').load('/wpg/CC/SG/import/dutyFee_tab3.jsp');
	$('#guarantee_tab01').load('/wpg/CC/SG/import/guarantee_tab01.jsp');
	$('#guarantee_tab02').load('/wpg/CC/SG/import/guarantee_tab02.jsp');
	$('#guarantee_tab03').load('/wpg/CC/SG/import/guarantee_tab03.jsp');
	$('#securitiesSale_tab01').load('/wpg/CC/SG/import/securitiesSale_tab01.jsp');
	$('#securitiesSale_tab02').load('/wpg/CC/SG/import/securitiesSale_tab02.jsp');
	$('#securitiesSale_tab03').load('/wpg/CC/SG/import/securitiesSale_tab03.jsp');
	$('#otherAccountDelivery_tab01').load('/wpg/CC/SG/import/otherAccountDelivery_tab01.jsp');
	$('#otherAccountDelivery_tab02').load('/wpg/CC/SG/import/otherAccountDelivery_tab02.jsp');
	$('#bondTab1').load('/wpg/FN/BO/import/bond01.jsp');
	$('#bondTab2').load('/wpg/FN/BO/import/bond02.jsp');
	$('#bondTab3').load('/wpg/FN/BO/import/bond03.jsp');
	$('#bondTab4').load('/wpg/FN/BO/import/bond04.jsp');
*/	
/*
	$('#RPproduct_tab1').load('/wpg/FN/RP/import/RPProduct01.html');
	$('#RPproduct_tab2').load('/wpg/FN/RP/import/RPProduct02.html');

	$(".gallery td").mouseover(function() {$(this).addClass("imgon");}).mouseout(function() {	$(this).removeClass("imgon");}); 

 });
*/