﻿var strDataToSend;

function ListProductSubCategory(vValue)
{
   var intProductMainCategoryId = vValue;    
    if(document.getElementById('divCauseCrafts' + intProductMainCategoryId ).style.display == 'none')
    {
        document.getElementById('divCauseCrafts' + intProductMainCategoryId ).style.display  = 'block';
    }
    else
    {
        document.getElementById('divCauseCrafts' + intProductMainCategoryId ).style.display = 'none';
    }
}

function ShowTraditional()
{
    if(document.all.divTraditional.style.display == 'none')
    {
        document.all.divTraditional.style.display = 'block';
    }
    else
    {
        document.all.divTraditional.style.display = 'none';
    }
}

function DisplayProductDetails(vValue)
{
    var intProductSubCategoryId = vValue;
    
    document.getElementById('tdDisplayProductDetails').innerHTML = '';
    strDataToSend = 'ProductSubCategoryId=' + intProductSubCategoryId;
    
    loadXMLDoc('display_product_details.asp','tdDisplayProductDetails',strDataToSend);
    //alert(strDataToSend); 
    
    return;
}

function GoToPage(vProductMainCategotyId)
{
	window.location = 'product_details_list.asp?ProductMainCategoryId=' + vProductMainCategotyId ;
	//DEFAULT RETURN VALUE
	return true;
}
function LoadProductDetails(vProductSubCategoryId,vProductMainCategoryName,vProductSubCategoryName)
{
    var intProductSubCategoryId = vProductSubCategoryId;
    var strProductMainCategoryName = vProductMainCategoryName;
    var strProductSubCategoryName = vProductSubCategoryName;
    
    document.getElementById('DisplayProductMainCategory').innerHTML = 'none';
    document.getElementById('DisplayProductMainCategory').innerHTML = strProductMainCategoryName ;
    
    document.getElementById('DisplayProductSubCategory').innerHTML = 'none';
    document.getElementById('DisplayProductSubCategory').innerHTML = strProductSubCategoryName ;
    
    DisplayProductDetails(intProductSubCategoryId);    
    return;
    
}

