// Global variables declaration area
		
var xmlhttp='';
var result ='';
var client_productID ='';
var shipping_text='';
var arrProductFeatures='';
var timer;


		
// managing tab data while moving from one tab to another	
function showData(id)
{
	//alert(id);
	if (id =='PURCHASE')
	{
	  	clearTimeout(timer);
	  	document.getElementById('divfaq').style.display = 'none';
	  	document.getElementById('divwarningpoints').style.display = 'none';
  	  	document.getElementById('divvideoDescription').style.display = 'none';
   	  	document.getElementById('divspecsDescription').style.display = 'none';
   	  	document.getElementById('divlongDescription').style.display = 'none';
   	  	document.getElementById('divphoto').style.display = 'none';
   	  	document.getElementById('divrelatedProduct').style.display = 'none';
   	  	document.getElementById('divShoppingCart').style.display = 'block';
   	  	
   	  	document.getElementById(id).className= 'prodlink_ul';
   	    if(document.getElementById('MAIN') != null)
	   			document.getElementById('MAIN').className= 'prodlink';
	   	if(document.getElementById('PHOTOS') != null)
	   			document.getElementById('PHOTOS').className= 'prodlink';
	   	if(document.getElementById('TECHSPECS') != null)
	   			document.getElementById('TECHSPECS').className= 'prodlink';
	   	if(document.getElementById('VIDEOS') != null)
	   			document.getElementById('VIDEOS').className= 'prodlink';
	   	if(document.getElementById('ACCESSORIES') != null)
	   			document.getElementById('ACCESSORIES').className= 'prodlink';	
	   	if(document.getElementById('FAQ') != null)
	   			document.getElementById('FAQ').className= 'prodlink';
	   	if(document.getElementById('WARNINGPOINTS') != null)
	   			document.getElementById('WARNINGPOINTS').className= 'prodlink';
	}
  	else if(id == 'PHOTOS')
    {
    	clearTimeout(timer);
    	document.getElementById('divfaq').style.display = 'none';
    	document.getElementById('divwarningpoints').style.display = 'none';
  	  	document.getElementById('divvideoDescription').style.display = 'none';
   	  	document.getElementById('divspecsDescription').style.display = 'none';
   	  	document.getElementById('divlongDescription').style.display = 'none';
   	  	document.getElementById('divrelatedProduct').style.display = 'none';
   	  	document.getElementById('divShoppingCart').style.display = 'none';
   	  	document.getElementById('divphoto').style.display = 'block';
   	  	
   	  	document.getElementById(id).className= 'prodlink_ul';
   	    if(document.getElementById('MAIN') != null)
	   			document.getElementById('MAIN').className= 'prodlink';
	   	if(document.getElementById('PURCHASE') != null)
	   			document.getElementById('PURCHASE').className= 'prodlink';
	   	if(document.getElementById('TECHSPECS') != null)
	   			document.getElementById('TECHSPECS').className= 'prodlink';
	   	if(document.getElementById('VIDEOS') != null)
	   			document.getElementById('VIDEOS').className= 'prodlink';
	   	if(document.getElementById('ACCESSORIES') != null)
	   			document.getElementById('ACCESSORIES').className= 'prodlink';	
	   	if(document.getElementById('FAQ') != null)
	   			document.getElementById('FAQ').className= 'prodlink';
	    if(document.getElementById('WARNINGPOINTS') != null)
	   			document.getElementById('WARNINGPOINTS').className= 'prodlink';
	}
	else if (id == 'MAIN')
	{
   	  	clearTimeout(timer);
   	  	document.getElementById('divfaq').style.display = 'none';
   	  	document.getElementById('divwarningpoints').style.display = 'none';
   	  	document.getElementById('divphoto').style.display = 'none';
   	  	document.getElementById('divvideoDescription').style.display = 'none';
   	  	document.getElementById('divspecsDescription').style.display = 'none';
   	  	document.getElementById('divrelatedProduct').style.display = 'none';
   	  	document.getElementById('divShoppingCart').style.display = 'none';
   	  	document.getElementById('divlongDescription').style.display = 'block';
   	  	
   	  	document.getElementById(id).className= 'prodlink_ul';
   	    if(document.getElementById('PURCHASE') != null)
	   			document.getElementById('PURCHASE').className= 'prodlink';
	   	if(document.getElementById('PHOTOS') != null)
	   			document.getElementById('PHOTOS').className= 'prodlink';
	   	if(document.getElementById('TECHSPECS') != null)
	   			document.getElementById('TECHSPECS').className= 'prodlink';
	   	if(document.getElementById('VIDEOS') != null)
	   			document.getElementById('VIDEOS').className= 'prodlink';
	   	if(document.getElementById('ACCESSORIES') != null)
	   			document.getElementById('ACCESSORIES').className= 'prodlink';
	   	if(document.getElementById('FAQ') != null)
	   			document.getElementById('FAQ').className= 'prodlink';
	   	if(document.getElementById('WARNINGPOINTS') != null)
	   			document.getElementById('WARNINGPOINTS').className= 'prodlink';
	}
	else if (id == 'TECHSPECS')
	{
   	    clearTimeout(timer);
   	    document.getElementById('divfaq').style.display = 'none';
   	    document.getElementById('divwarningpoints').style.display = 'none';
   	   	document.getElementById('divphoto').style.display = 'none';
   	  	document.getElementById('divvideoDescription').style.display = 'none';
   	  	document.getElementById('divrelatedProduct').style.display = 'none';
   	  	document.getElementById('divShoppingCart').style.display = 'none';
   	  	document.getElementById('divlongDescription').style.display = 'none';
   	  	document.getElementById('divspecsDescription').style.display = 'block';
   	  	
   	  	document.getElementById(id).className= 'prodlink_ul';
   	    if(document.getElementById('MAIN') != null)
	   			document.getElementById('MAIN').className= 'prodlink';
	   	if(document.getElementById('PURCHASE') != null)
	   			document.getElementById('PURCHASE').className= 'prodlink';
	   	if(document.getElementById('PHOTOS') != null)
	   			document.getElementById('PHOTOS').className= 'prodlink';
	   	if(document.getElementById('VIDEOS') != null)
	   			document.getElementById('VIDEOS').className= 'prodlink';
	   	if(document.getElementById('ACCESSORIES') != null)
	   			document.getElementById('ACCESSORIES').className= 'prodlink';
	   	if(document.getElementById('FAQ') != null)
	   			document.getElementById('FAQ').className= 'prodlink';
	   	if(document.getElementById('WARNINGPOINTS') != null)
	   			document.getElementById('WARNINGPOINTS').className= 'prodlink';
	}
	else if(id == 'VIDEOS')
	{
   	    clearTimeout(timer);
   	    document.getElementById('divfaq').style.display = 'none';
   	    document.getElementById('divwarningpoints').style.display = 'none';
   	    document.getElementById('divphoto').style.display = 'none';
   	  	document.getElementById('divspecsDescription').style.display = 'none';
   	  	document.getElementById('divlongDescription').style.display = 'none';
   	  	document.getElementById('divrelatedProduct').style.display = 'none';
   	  	document.getElementById('divShoppingCart').style.display = 'none';
		document.getElementById('divvideoDescription').style.display = 'block';	   
		
		document.getElementById(id).className= 'prodlink_ul';
   	    if(document.getElementById('MAIN') != null)
	   			document.getElementById('MAIN').className= 'prodlink';
	   	if(document.getElementById('PURCHASE') != null)
	   			document.getElementById('PURCHASE').className= 'prodlink';
	   	if(document.getElementById('PHOTOS') != null)
	   			document.getElementById('PHOTOS').className= 'prodlink';
	   	if(document.getElementById('TECHSPECS') != null)
	   			document.getElementById('TECHSPECS').className= 'prodlink';
	   	if(document.getElementById('ACCESSORIES') != null)
	   			document.getElementById('ACCESSORIES').className= 'prodlink'; 
	   	if(document.getElementById('FAQ') != null)
	   			document.getElementById('FAQ').className= 'prodlink';
	   	if(document.getElementById('WARNINGPOINTS') != null)
	   			document.getElementById('WARNINGPOINTS').className= 'prodlink';	
	    
	}
	else if(id == 'ACCESSORIES')
	{
		clearTimeout(timer);
		document.getElementById('divfaq').style.display = 'none';
		document.getElementById('divwarningpoints').style.display = 'none';
		document.getElementById('divphoto').style.display = 'none';
   	    document.getElementById('divvideoDescription').style.display = 'none';
   	  	document.getElementById('divspecsDescription').style.display = 'none';
   	  	document.getElementById('divlongDescription').style.display = 'none';
   	  	document.getElementById('divShoppingCart').style.display = 'none';
   	  	document.getElementById('divrelatedProduct').style.display = 'block';
   	  	
   	  	document.getElementById(id).className= 'prodlink_ul';
   	    if(document.getElementById('MAIN') != null)
	   			document.getElementById('MAIN').className= 'prodlink';
	   	if(document.getElementById('PURCHASE') != null)
	   			document.getElementById('PURCHASE').className= 'prodlink';
	   	if(document.getElementById('PHOTOS') != null)
	   			document.getElementById('PHOTOS').className= 'prodlink';
	   	if(document.getElementById('TECHSPECS') != null)
	   			document.getElementById('TECHSPECS').className= 'prodlink';
	   	if(document.getElementById('VIDEOS') != null)
	   			document.getElementById('VIDEOS').className= 'prodlink'; 
	   	if(document.getElementById('FAQ') != null)
	   			document.getElementById('FAQ').className= 'prodlink';
	   	if(document.getElementById('WARNINGPOINTS') != null)
	   			document.getElementById('WARNINGPOINTS').className= 'prodlink';
	} else if(id == 'FAQ')
	{
		clearTimeout(timer);
		document.getElementById('divrelatedProduct').style.display = 'none';
		document.getElementById('divwarningpoints').style.display = 'none'; 
		document.getElementById('divphoto').style.display = 'none';
   	    document.getElementById('divvideoDescription').style.display = 'none';
   	  	document.getElementById('divspecsDescription').style.display = 'none';
   	  	document.getElementById('divlongDescription').style.display = 'none';
   	  	document.getElementById('divShoppingCart').style.display = 'none';
   	  	document.getElementById('divfaq').style.display = 'block';
   	  	
   	  	document.getElementById(id).className= 'prodlink_ul';
   	    if(document.getElementById('MAIN') != null)
	   			document.getElementById('MAIN').className= 'prodlink';
	   	if(document.getElementById('PURCHASE') != null)
	   			document.getElementById('PURCHASE').className= 'prodlink';
	   	if(document.getElementById('PHOTOS') != null)
	   			document.getElementById('PHOTOS').className= 'prodlink';
	   	if(document.getElementById('TECHSPECS') != null)
	   			document.getElementById('TECHSPECS').className= 'prodlink';
	   	if(document.getElementById('VIDEOS') != null)
	   			document.getElementById('VIDEOS').className= 'prodlink'; 
	   	if(document.getElementById('ACCESSORIES') != null)
	   			document.getElementById('ACCESSORIES').className= 'prodlink';
	   	if(document.getElementById('WARNINGPOINTS') != null)
	   			document.getElementById('WARNINGPOINTS').className= 'prodlink';
	}
	else if(id == 'WARNINGPOINTS')
	{
		clearTimeout(timer);
		document.getElementById('divfaq').style.display = 'none';
		document.getElementById('divrelatedProduct').style.display = 'none'; 
		document.getElementById('divphoto').style.display = 'none';
   	    document.getElementById('divvideoDescription').style.display = 'none';
   	  	document.getElementById('divspecsDescription').style.display = 'none';
   	  	document.getElementById('divlongDescription').style.display = 'none';
   	  	document.getElementById('divShoppingCart').style.display = 'none';
   	  	document.getElementById('divwarningpoints').style.display = 'block';
   	  	
   	  	document.getElementById(id).className= 'prodlink_ul';
   	    if(document.getElementById('MAIN') != null)
	   			document.getElementById('MAIN').className= 'prodlink';
	   	if(document.getElementById('PURCHASE') != null)
	   			document.getElementById('PURCHASE').className= 'prodlink';
	   	if(document.getElementById('PHOTOS') != null)
	   			document.getElementById('PHOTOS').className= 'prodlink';
	   	if(document.getElementById('TECHSPECS') != null)
	   			document.getElementById('TECHSPECS').className= 'prodlink';
	   	if(document.getElementById('VIDEOS') != null)
	   			document.getElementById('VIDEOS').className= 'prodlink'; 
	   	if(document.getElementById('ACCESSORIES') != null)
	   			document.getElementById('ACCESSORIES').className= 'prodlink';
	   	if(document.getElementById('FAQ') != null)
	   			document.getElementById('FAQ').className= 'prodlink';
	}
}
function onmouseoverChangeClassProductlink(id){
	document.getElementById(id).className= 'prodlink_ul';
	
}
function onmouseoutChangeClassProductlink(id){
	document.getElementById(id).className= 'prodlink';
	
}
//function addToCartProductDetailCheckBox(i){
// 
// 
// var totalPrice = document.getElementById('hndTotalPrice').value;
// var countAddProduct = document.getElementById('hndCountAddProduct').value;
// 
//  if(document.getElementById('chkRelatedProduct'+i).checked == true){	
//    var productPrice = document.getElementById('hndPrice'+i).value;
//    totalPrice = parseInt(totalPrice) + parseInt(productPrice);
//    countAddProduct = parseInt(countAddProduct) + 1;
//   } else {
//    var productPrice = document.getElementById('hndPrice'+i).value;
//    totalPrice = parseInt(totalPrice) - parseInt(productPrice);
//    countAddProduct = parseInt(countAddProduct) - 1;
//   }
// 
// document.getElementById('hndTotalPrice').value = totalPrice;
// document.getElementById('txtTotalPrice').value = document.getElementById('hndDollar').value + totalPrice;
// document.getElementById('hndCountAddProduct').value = countAddProduct;
// document.getElementById('divTotalAddProductCheckBox').innerHTML = countAddProduct;
//
//}

//function addToCartProductDetail(){
// 
// var totalCountAccessories=document.getElementById('hndCountAccessories').value;
// var totalPrice = 0;
// var totalAddProduct = 0;
// var productDetail = '';
//	 for(i=0; i < totalCountAccessories; i++){
//	  if(document.getElementById('chkRelatedProduct'+i).checked == true){	
//	    var productPrice = document.getElementById('hndPrice'+i).value;
//	    totalPrice = parseInt(totalPrice) + parseInt(productPrice);
//	    totalAddProduct = totalAddProduct + 1;
//	    if(productDetail == ''){
//	      productDetail = document.getElementById('chkRelatedProduct'+i).value;
//	    } else {
//	      productDetail = productDetail + "," + document.getElementById('chkRelatedProduct'+i).value;	
//	    }  
//	   }
//	 }
//	 
//	 document.getElementById('divTotalAddProduct').innerHTML = "Total Added Product : " + totalAddProduct;
//	 document.getElementById('txtTotalPrice').value = document.getElementById('hndDollar').value + totalPrice;
//	 document.getElementById('hndProductDetail').value = productDetail;
// 	/* Ajax call to add product in add to cart */
//	var randomNumber=Math.random();
//	var quantity = totalAddProduct;
//	if(document.getElementById("hdnproductCount").value!=null){
//		var productCount = document.getElementById("hdnproductCount").value;
//		document.getElementById("productCount").innerHTML = parseInt(productCount) + parseInt(quantity);
//		document.getElementById("hdnproductCount").value = parseInt(productCount) + parseInt(quantity);
//	}
//	//document.getElementById("tdTextQuantityError").innerHTML = "";
//	if(quantity==null || quantity=="" ){
//		document.getElementById('spanTotalAddProduct').style.display = 'block';
//		document.getElementById('divTotalAddProduct').innerHTML = totalAddProduct;
//		return false;
//	}
//	if(isNaN(quantity))
//	{
//	    document.getElementById('spanTotalAddProduct').style.display = 'block';
//		document.getElementById('divTotalAddProduct').innerHTML = totalAddProduct;
//		return false;
//	}
//	var url = urlAppender + "/addtocartmultiple.action?productDetail="+productDetail+"&RNO="+randomNumber;
//	
//	try
//		{
//		//Firefox, Opera 8.0+, Safari
//		xmlHttp=new XMLHttpRequest();
//		}
//	catch (e)
//		{		
//		//Internate Explorer
//		try
//		  {
//		  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
//		  }
//		catch (e)
//			{
//			try
//		 	{
//			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
//		 	}
//			catch (e)
//			{
//			alert("Your browser does not support AJAX!");
//			return false;
//			}
//	  	}
//	}
//	xmlHttp.onreadystatechange=function()
//	{
//  		if(xmlHttp.readyState==4){
//			if (xmlHttp.status ==200){
//				//var skuDesc = document.getElementById("skuNametd"+productSKU).innerHTML;
//				//document.getElementById(productSKU+"ID").innerHTML = quantity+" "+skuDesc+document.getElementById("messageofcarthidden").value+"<br>"+checkoutlink;
//				document.getElementById('spanTotalAddProduct').style.display = 'block';
//				document.getElementById('divTotalAddProduct').innerHTML = totalAddProduct;
//				shoppingPopupFlag = true;
//			}
//		}	
//	}
//	xmlHttp.open("POST",url,true);
//	xmlHttp.send(null);
//	
//
//}


	  

