<!--
function ObjectDisplay(obj, display)
{
	if (display == true)
		obj.style.display="";
	else
		obj.style.display="none";
}
function ObjectDisplay2(objId, display)
{
	var obj = document.getElementById(objId);
	if (obj != null)
	{
	    ObjectDisplay(obj, display);
	}
}

function ObjectShowHide(obj, show)
{
	if (show == true)
		obj.style.visibility="visible";
	else
		obj.style.visibility="hidden";
}

function SwitchTable(table, tableArray)
{
	var i;
	for (i=0; i<tableArray.length; i++)
	{
		var obj = document.getElementById(tableArray[i]);
		if (obj != null)
		{
			ObjectDisplay(obj, false);
		}
		
	}
	if (i > 1)
	{
		ObjectDisplay(document.getElementById(table), true);
	}
}
function SwitchImage(img, imgArray, imgExt)
{
	var newSrc;
	var obj;
	var i;
	for (i=0; i<imgArray.length; i++)
	{
		obj = document.getElementById(imgArray[i]);
		if (obj != null)
		{
			ReplaceImgSrcStr(obj, "on." + imgExt, "off." + imgExt);

		}
	}
	if (i > 1)
	{
		ReplaceImgSrcStr(img, "off." + imgExt, "on." + imgExt);
	}
}
function ReplaceImgSrcStr(img, oldStr, newStr)
{
	src = img.src + "";
	if (src.indexOf(newStr) == -1)
	{
		img.src = src.replace(oldStr, newStr);
	}
}
function SwitchElementBgImage(objId, bgImgUrl)
{
	var obj = IdToElement(objId);
	if (obj != null)
	{
		obj.background = bgImgUrl;
		return true;
	}
	return false;
}

var switchTo = "";
function SwitchRelativeArticle(type)
{
	if (switchTo != type.toLowerCase())
	{
		switchTo = type.toLowerCase();
		var propertyTable = "propertyTable";
		var brandTable = "brandTable";
		var productTable = "productTable";
		
		var propertyTd = "PropertyTd";
		var brandTd = "BrandTd";
		var productTd = "ProductTd";
		
		var propertyShadowTd = "PropertyShadowTd";
		var brandShadowTd = "BrandShadowTd";
		var productShadowTd = "ProductShadowTd";
		
		switch (switchTo)
		{
			case "property":
			
				ObjectDisplay2(propertyTable, true);
				ObjectDisplay2(brandTable, false);
				ObjectDisplay2(productTable, false);
				
				SwitchElementBgImage(propertyShadowTd, "../../Image/01.gif");
				SwitchElementBgImage(brandShadowTd, "../../Image/02.gif");
				SwitchElementBgImage(productShadowTd, "../../Image/02.gif");
				
				SwitchElementClass(propertyTd, "active");
				SwitchElementClass(brandTd, "deactive");
				SwitchElementClass(productTd, "deactive");
		
				break;
			case "brand":
						
				ObjectDisplay2(propertyTable, false);
				ObjectDisplay2(brandTable, true);
				ObjectDisplay2(productTable, false);
				
				SwitchElementBgImage(propertyShadowTd, "../../Image/02.gif");
				SwitchElementBgImage(brandShadowTd, "../../Image/01.gif");
				SwitchElementBgImage(productShadowTd, "../../Image/02.gif");
				
				SwitchElementClass(propertyTd, "deactive");
				SwitchElementClass(brandTd, "active");
				SwitchElementClass(productTd, "deactive");
		
			break;
			case "product":
						
				ObjectDisplay2(propertyTable, false);
				ObjectDisplay2(brandTable, false);
				ObjectDisplay2(productTable, true);
				
				SwitchElementBgImage(propertyShadowTd, "../../Image/02.gif");
				SwitchElementBgImage(brandShadowTd, "../../Image/02.gif");
				SwitchElementBgImage(productShadowTd, "../../Image/01.gif");
				
				SwitchElementClass(propertyTd, "deactive");
				SwitchElementClass(brandTd, "deactive");
				SwitchElementClass(productTd, "active");
		
			break;
		}
	}
}

function SwitchArticle(index, count)
{
	for (var num1=1; num1<=count; num1++)
	{
		if ( num1 == index )
		{
			ObjectDisplay2("tbl" + num1, true);
			SwitchElementClass("tc" + num1, "active");
			SwitchElementBgImage("shadowtc" + num1, "../../Image/01.gif");		
		}
		else
		{
			ObjectDisplay2("tbl" + num1, false);
			SwitchElementClass("tc" + num1, "deactive");
			SwitchElementBgImage("shadowtc" + num1, "../../Image/02.gif");
		}
	}
}

function SwitchElementClass(objId, newClass)
{
	var obj = IdToElement(objId);
	if (obj != null)
	{
		obj.className = newClass;
		return true;
	}
	return false;
}

function IdToElement(id)
{
	return document.getElementById(id);
}
function SwitchChannel(showObjId, hideObjId)
{
/*
	StopNavigateTimer();
	activeSubNavigatge = showObjId + "";
	ObjectDisplay(document.getElementById(showObjId), true);
	ObjectDisplay(document.getElementById(hideObjId), false);
*/
}
var navigateTimer;
var activeSubNavigatge = "";
function SwitchChannelDelay(mSeconds, showObjId, hideObjId)
{
//	navigateTimer = window.setTimeout("SwitchChannel('" + showObjId + "', '" + hideObjId + "')", mSeconds);
}

function StopNavigateTimer()
{
//	clearTimeout(navigateTimer);
}

//Used for advertise system
/*
document.onreadystatechange=StartInit;
function StartInit()
{
	if (document.readyState=="complete" && typeof(LoadAdvertise)=="function")
	{
		LoadAdvertise();
	}
}
*/
function BeginLoadAdvertise()
{
	if (typeof(LoadAdvertise)=="function")
	{
		LoadAdvertise();
	}
}
function WriteAdSpan(spanId, height)
{
	if (eval("typeof(str_" + spanId + ")") != "undefined")
	{
		var style = height > 0?" style='height:" + height + "px'":"";
		document.write("<span id='" + spanId + "'" + style + "></span>");
	}
}

-->


