
/**** ITEM DATA TABS FUNCTIONS ****/
function itemDataTabsnew(){
	var wrapper = document.getElementById("itemDataTabs");
	if(wrapper){
		tabs = wrapper.getElementsByTagName("DIV");
		for(i=0;i<tabs.length;i++){
			var s = tabs[i].id;
			var subs = s.substring(0,3)
			if(subs == "tab"){
				//******* SET INITIAL STYLE FOR DEFAULT TAB *********
				if(tabs[i].id == activeItemDataTab){
					if(tabs[i].id == "tabComplete"){
						tabs[i].className = "itemTabLinkPinkOnnew";
					}else{
						tabs[i].className = "itemTabLinkOnnew";
					}
				}else{
					tabs[i].className = "itemTabLinkOffnew";
				}
				if(tabs[i].id != "tabBlank"){
					//******* MOUSEOVER EVENT ********//
					tabs[i].onmouseover=function(){
						if(this.id == "tabComplete"){
							this.className = "itemTabLinkPinkOnnew";
						}else{
							this.className = "itemTabLinkOnnew";
						}
					}
					//******* MOUSEOUT EVENT ********//
					tabs[i].onmouseout=function(){
						if(activeItemDataTab != this.id){
							this.className = "itemTabLinkOffnew";
						}
					}
					//******* ONCLICK EVENT ********//
					tabs[i].onclick=function(){
						activeItemDataTab = this.id;
						//** RESET CONTENT DIVS AND TAB IMGS
						resetItemDataTabsnew();
						//** SET ON CLASSNAME
						if(this.id == "tabComplete"){
							this.className = "itemTabLinkPinkOnnew";
						}else if(this.id == "tabDetails"){
							wrapper.className = "tabItemDetailsOnnew";
							this.className = "itemTabLinkOnnew";
						}else if(this.id == "tabSpecs"){
							wrapper.className = "tabSpecsOn";
							this.className = "itemTabLinkOnnew";
						}else if(this.id == "tabAccessories"){
							wrapper.className = "tabAccessoriesOn";
							this.className = "itemTabLinkOnnew";	
						}else if(this.id == "tabReviews"){
							wrapper.className = "tabReviewsOn";
							this.className = "itemTabLinkOnnew";
						}else if(this.id == "tabDownloads"){
							wrapper.className = "tabDownloadsOn";
							this.className = "itemTabLinkOnnew";	
						}else if(this.id == "tabImages"){
							wrapper.className = "tabImagesOn";
							this.className = "itemTabLinkOnnew";
						}else{
							this.className = "itemTabLinkOnnew";
						}
						
						//** SET ON CONTENT
						var elem = this.id;
						document.getElementById(elem + "Content").style.display = "block";
					}
				if(tabs[i].id != activeItemDataTab){
					document.getElementById(tabs[i].id + "Content").style.display = "none";
				}
				}
			}
		}
	}
}
function resetItemDataTabsnew(){
	var itemDataTabs = document.getElementById("itemDataTabs");
	var tabs = itemDataTabs.getElementsByTagName("DIV");
	for(i=0;i<tabs.length;i++){
		var s = tabs[i].id;
		var subs = s.substring(0,3)
		if(subs == "tab"){
			tabs[i].className = "itemTabLinkOffnew";
			if(tabs[i].id != "tabBlank"){
				document.getElementById(s + "Content").style.display = "none";
			}
		}
	}
}



function itemDataTabsimage(){
	var wrapper = document.getElementById("itemDataTabsimage");
	if(wrapper){
		tabs = wrapper.getElementsByTagName("DIV");
		for(i=0;i<tabs.length;i++){
			var s = tabs[i].id;
			var subs = s.substring(0,3)
			if(subs == "tab"){
				//******* SET INITIAL STYLE FOR DEFAULT TAB *********
				if(tabs[i].id == activeItemDataTab){
					if(tabs[i].id == "tabComplete"){
						tabs[i].className = "itemTabLinkPinkOn";
					}else{
						tabs[i].className = "itemTabLinkOn";
					}
				}else{
					tabs[i].className = "itemTabLinkOff";
				}
				if(tabs[i].id != "tabBlank"){
					//******* MOUSEOVER EVENT ********//
					tabs[i].onmouseover=function(){
						if(this.id == "tabComplete"){
							this.className = "itemTabLinkPinkOn";
						}else{
							this.className = "itemTabLinkOn";
						}
					}
					//******* MOUSEOUT EVENT ********//
					tabs[i].onmouseout=function(){
						if(activeItemDataTab != this.id){
							this.className = "itemTabLinkOff";
						}
					}
					//******* ONCLICK EVENT ********//
					tabs[i].onclick=function(){
						activeItemDataTab = this.id;
						//** RESET CONTENT DIVS AND TAB IMGS
						resetItemDataTabsimage();
						//** SET ON CLASSNAME
						if(this.id == "tabComplete"){
							this.className = "itemTabLinkPinkOn";
						}else if(this.id == "tabImage"){
							wrapper.className = "tabItemImageOn";
							this.className = "itemTabLinkOn";
						}else if(this.id == "tabVideo"){
							wrapper.className = "tabVideoOn";
							this.className = "itemTabLinkOn";
						}else{
							this.className = "itemTabLinkOn";
						}
						
						//** SET ON CONTENT
						var elem = this.id;
						document.getElementById(elem + "Content").style.display = "block";
					}
				if(tabs[i].id != activeItemDataTab){
					document.getElementById(tabs[i].id + "Content").style.display = "none";
				}
				}
			}
		}
	}
}
function resetItemDataTabsimage(){
	var itemDataTabs = document.getElementById("itemDataTabsimage");
	var tabs = itemDataTabs.getElementsByTagName("DIV");
	for(i=0;i<tabs.length;i++){
		var s = tabs[i].id;
		var subs = s.substring(0,3)
		if(subs == "tab"){
			tabs[i].className = "itemTabLinkOff";
			if(tabs[i].id != "tabBlank"){
				document.getElementById(s + "Content").style.display = "none";
			}
		}
	}
}



/**** ITEM DATA TABS FUNCTIONS FOR QUICK SHOP ****/
function itemDataTabsQsnew(){
	var wrapper = document.getElementById("qsitemDataTabs");
	if(wrapper){
		tabs = wrapper.getElementsByTagName("DIV");
		for(i=0;i<tabs.length;i++){
			var s = tabs[i].id;
			var subs = s.substring(0,5)
			if(subs == "qstab"){
				//******* SET INITIAL STYLE FOR DEFAULT TAB *********
				if(tabs[i].id == activeItemDataTab){
					if(tabs[i].id == "qstabComplete"){
						tabs[i].className = "qsitemTabLinkPinkOn";
					}else{
						tabs[i].className = "qsitemTabLinkOn";
					}
				}else{
					tabs[i].className = "qsitemTabLinkOff";
				}
				if(tabs[i].id != "qstabBlank"){
					//******* MOUSEOVER EVENT ********//
					tabs[i].onmouseover=function(){
						if(this.id == "qstabComplete"){
							this.className = "qsitemTabLinkPinkOn";
						}else{
							this.className = "qsitemTabLinkOn";
						}
					}
					//******* MOUSEOUT EVENT ********//
					tabs[i].onmouseout=function(){
						if(activeItemDataTab != this.id){
							this.className = "qsitemTabLinkOff";
						}
					}
					//******* ONCLICK EVENT ********//
					tabs[i].onclick=function(){
						activeItemDataTab = this.id;
						//** RESET CONTENT DIVS AND TAB IMGS
						resetItemDataTabsQsnew();
						//** SET ON CLASSNAME
						if(this.id == "qstabComplete"){
							this.className = "qsitemTabLinkPinkOn";
						}else{
							this.className = "qsitemTabLinkOn";
						}
						//** SET ON CONTENT
						var elem = this.id;
						document.getElementById(elem + "Content").style.display = "block";
					}
				if(tabs[i].id != activeItemDataTab){
					document.getElementById(tabs[i].id + "Content").style.display = "none";
				}
				}
			}
		}
	}
}
function resetItemDataTabsQsnew(){
	var itemDataTabs = document.getElementById("qsitemDataTabs");
	var tabs = itemDataTabs.getElementsByTagName("DIV");
	for(i=0;i<tabs.length;i++){
		var s = tabs[i].id;
		var subs = s.substring(0,5)
		if(subs == "qstab"){
			tabs[i].className = "qsitemTabLinkOff";
			if(tabs[i].id != "qstabBlank"){
				document.getElementById(s + "Content").style.display = "none";
			}
		}
	}
}
