<!--

function pop_select_Comcategories() 
{ 
var id; var str; 
str="WebSelectCategory.asp?catID=0&Path=1"; 

popupWindow = window.open(str,"_blank", 
"width=750,height=500,resizable=yes,status=no,toolbar=no,menubar=no,titlebar=no,location=no,scrollbars=yes"); 

if(popupWindow){ popupWindow.focus(); }
}
function pop_select_Comcategories1() 
{ 
var id; var str; 
str="WebSelectCategory.asp?catId=0&path=2"; 

popupWindow = window.open(str,"_blank", 
"width=750,height=500,resizable=yes,status=no,toolbar=no,menubar=no,titlebar=no,location=no,scrollbars=yes"); 

if(popupWindow){ popupWindow.focus(); }
}
function changecountry()
{
	window.document.Submit.txt_country.value=window.document.Submit.Country.value;
}

function expandIt(el) {
    var on_img="image/menu_open.gif";
    var off_img="image/menu_add.gif";
    
    
    
        whichEl = eval(el + "Child");
        imageEl = eval("CategoryForm." + el + "Image");
        if (whichEl.style.display == "none") {
            whichEl.style.display = "block";
            imageEl.src = on_img;
        }
        else {
            whichEl.style.display = "none";
            imageEl.src = off_img;
        }
    
}

function select(Id ,str,str1){
        //var selectedCategory = window.document.CategoryForm.categoryIdsStr.value;
        //var count=parseInt(window.document.CategoryForm.count.value);
        /*str2="selectcategory.aspx?catId="+Id;
        
        
        if(str!="")
        {
			str2+="&catalog="+str+"&catalogid="+str1;
        }
        alert(str2);
        
        //alert(window.location.href);
        */
    }
    
function selectcontrol(Object,str){
      /* var count1= window.document.CategoryForm.count.value;
        var count=parseInt(count1);
        var appendValue,appendID;
        if(count==0)
        {
			appendValue = str;
			appendID = Object.value;
		}
		else
		{
			appendValue = ','+str;
			appendID = ','+ Object.value;
		}
        if(Object.checked){
           count++;
            if (count>4){
	          alert("Sorry, you have chosen more than 4 categories. Please check and choose again.");
	          Object.checked=false;
	          count--;
        	}
        	else {
           		window.document.CategoryForm.categoryIdsStr.value = window.document.CategoryForm.categoryIdsStr.value +appendValue;
           		window.document.CategoryForm.categoryIds.value = window.document.CategoryForm.categoryIds.value +appendID;
            }
        }
        else {
           count--;
           window.document.CategoryForm.categoryIdsStr.value = removeSubFromString(appendValue,window.document.CategoryForm.categoryIdsStr.value);
           window.document.CategoryForm.categoryIds.value = removeSubFromString(appendID,window.document.CategoryForm.categoryIds.value);
           
        }             
        window.document.CategoryForm.count.value=count;*/
        window.document.CategoryForm.categoryIdsStr.value = str;
        window.document.CategoryForm.categoryIds.value = Object.value;
        
    }
    
    function removeSubFromString(sub,str) {
    	var ret = str;
    	var index = str.indexOf(sub);
    	if (index != -1){
    		var len = sub.length;
    		ret = str.substring(0,index) + str.substring(index + len,str.length); 
    	}
    	return ret;
    }    
function return_item()
{
	
	if(window.document.CategoryForm.path.value=="1")
	{
		window.opener.document.Submit.commonCategoryName.value =window.document.CategoryForm.categoryIdsStr.value ;
		window.opener.document.Submit.commonCategory.value = window.document.CategoryForm.categoryIds.value ;
	}
	else
	{
		window.opener.document.Submit.commonCategoryName1.value =window.document.CategoryForm.categoryIdsStr.value ;
		window.opener.document.Submit.commonCategory1.value = window.document.CategoryForm.categoryIds.value ;
	}
	self.close();
	window.opener.focus();
}    


-->



