function fn_toggleBuy(grpid, pd) {
    var inp = document.getElementById("buy_" + grpid);
    try {
        if(inp != null && pd != null) {
            inp.value = pd;
        }
    } catch (e) {}
}
	  
function fn_addToWishList_ex(p,cid,baseurl,shoplink) {
  var s = "", c = "";
  var q = document.getElementById("qty_" + p).value;
	if(q == ""){q = "1";}		
	
	
	u = "support.aspx?iSAMS=wishlist&action=edit&post=2&id=" + p + "&c=0&s=0&q=" + q ;
	if (cid > 0){
	    location.href = baseurl + u;
	} else {
	    location.href = shoplink + "&action=displaylogin&referrer=external&productcode=" + escape(u);
	}
	
}
	  
		
function fn_showDiv(id) {
    try {
        var list = document.getElementById('div_list_reviews');
        var write = document.getElementById('div_write_review');
        if(list != null && write != null) {
            if(id == "div_list_reviews") {
                list.style.display = "";
                write.style.display = "none";

            } else if (id == "div_write_review") {
                list.style.display = "none";
                write.style.display = "";
            }
        }
    } catch (e) { alert(e);}
}
		
function fn_toggle(id) {
	if ($('#' + id).is(':hidden')) {
		$('#' + id).show();
	} else {
		$('#' + id).hide();
	} 
}
		

