var lasthighlight=0;
var previousinfotab="infotab1"

function ChartStyle(id, newClass) {
	if(lasthighlight != 0) {
		identity=document.getElementById(lasthighlight);
		identity.className='NormalChart';
	}
	identity=document.getElementById(id);
	identity.className=newClass;
	lasthighlight=id;
}

function expandcontentinfo(cid){
document.getElementById(previousinfotab).style.display="none"
document.getElementById(cid).style.display="block"
previousinfotab=cid
}

function VisibleTab(SelectedTab){
	if(SelectedTab == 'PriceChart'){
		//display selected tab
		expandcontentinfo('infotab3');
		//change tab style
		TabStyle('PriceChartTab','TabOn');
		TabStyle('ProductOptionsTab','TabOff');
		TabStyle('SpecsTab','TabOff');
		TabStyle('ProductColorTab','TabOff');
	}
	if(SelectedTab == 'ProductColor'){
		//display selected tab
		expandcontentinfo('infotab1');
		//change tab style
		TabStyle('ProductColorTab','TabOn');
		TabStyle('ProductOptionsTab','TabOff');
		TabStyle('SpecsTab','TabOff');
		TabStyle('PriceChartTab','TabOff');
	}
	if(SelectedTab == 'ProductOptions'){
		//display selected tab
		expandcontentinfo('infotab2');
		//change tab style
		TabStyle('ProductOptionsTab','TabOn');
		TabStyle('ProductColorTab','TabOff');
		TabStyle('SpecsTab','TabOff');
		TabStyle('PriceChartTab','TabOff');
	}
	if(SelectedTab == 'Specifications'){
		//display selected tab
		expandcontentinfo('infotab4');
		//change tab style
		TabStyle('SpecsTab','TabOn');
		TabStyle('ProductOptionsTab','TabOff');
		TabStyle('ProductColorTab','TabOff');
		TabStyle('PriceChartTab','TabOff');
	}
}
function TabStyle(id, newClass) {
	identity=document.getElementById(id);
	identity.className=newClass;
}

function colorinfo(productId, colorId)
{
	var pageURL = "/color_popup.php?productid=" + productId + "&colorid=" + colorId;
	var pageOptions = "toolbar=no,menubar=no,status=no,location=no,height=460,width=580,scrollbars=yes,resizable=yes,top=0,left=0";

	swatchwindow = window.open(pageURL, "ColorInformation", pageOptions);
	swatchwindow.focus();
}

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
