// 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();
}
