
var CurrentProductSection = 'Features';
var DealerObjImage;
var CurrentProduct='';
var ListID = '';
var ListIsAlt=false;

function setProductSection(section){
	CurrentProductSection = section;
}

function ShowProductSection(section){
	GetObject('ProductFeaturesSection').style.display='none';
	GetObject('ProductSpecificationsSection').style.display='none';
	GetObject('ProductWhere2BuySection').style.display='none';
	GetObject('ProductMoreInfoSection').style.display='none';
	rollOut('features');
	rollOut('specifications');
	rollOut('moreinfo');
	rollOut('where2buy');
	GetObject('Product'+section+'Section').style.display='inline';
	setProductSection(section);
	rollIn(section.toLowerCase());
}

function menurollOut(imgName,layer){
	if (CurrentProductSection.toLowerCase()!=imgName){
		if (document.images && (flag == true)){
			if ((document.layers)&&(typeof(layer)!='undefined')){
				GetObject(layer).document[imgName].src = eval(imgName + "off.src");
			}
		    else{
				document[imgName].src = eval(imgName + "off.src");
	    	}
		}
	}
}

function ProductPrint(ProductID){
	popit('ProductPrint.aspx?ProductID='+ProductID,'ProductPrint',600,500,'yes','toolbar=yes,menubar=yes');
}

function OpenProductMediumImage(ImagePath){
	popit('Image.aspx?Path='+ImagePath,'ProductMediumImage',200,130,'no');
}

function OpenLargeProductImage(ImagePath){
	popit(ImagePath,'ProductLargeImage',500,290,'no');
}

function SelectURL(obj){
	var selecteditem = obj.options[obj.selectedIndex].value;
	obj.selectedIndex=0;
	if (selecteditem.length!=0)	document.location.href=selecteditem;
}

function ToggleDisplay(listobj,isAlt,objID){
	var obj;
	var objImg;

	if ((ListID.length>0)&&(ListID!=objID)){
		obj = GetObject("DEALER"+ListID+"DETAIL");
		objImg = GetObject(ListID+"TWIST");
		obj.style.display='none';
		objImg.src = twistoff.src;
		ListDisplayOut(obj,ListIsAlt,objID);
	}
	
	obj = GetObject("DEALER"+objID+"DETAIL");
	objImg = GetObject(objID+"TWIST");
	//alert(obj.style.display);
	if (obj.style.display=='none'){
		obj.style.display='inline';
		DealerObjImage = new Image();
		if (CurrentProduct!=''){
			DealerObjImage.src = "DealerView.aspx?DealerID="+objID+"&ProductID="+CurrentProduct;
		}
		else{
			DealerObjImage.src = "DealerView.aspx?DealerID="+objID;
		}
		
		objImg.src = twiston.src;
		ListID = objID;
		ListIsAlt=isAlt;
	}
	else{
		obj.style.display='none';
		objImg.src = twistoff.src;
		ListID = '';
	}
}



function ListDisplayOver(obj,isAlt,ID){
	obj.className='StoreLocatorItemHover'
}

function ListDisplayOut(obj,isAlt,ID){
	if (ListID!=ID){
		if (isAlt)obj.className='StoreLocatorItemAlt';
		else obj.className='StoreLocatorItem';
	}
}