function showhidecontent(id,url,memberid)
{
	var divid = '#page_block_'+id+'_p';
	var hid = '#divhidden'+id;
	var hval = $(hid).val();
	var Iid = 'addpal'+id;
	if(hval =='hide')
	{
		$(divid).show("slow");
		$(hid).val('show');
		document.getElementById(Iid).title="Hide Gadget";
		document.getElementById(Iid).src =url+'images/myimages/active_pal.jpg';
		$.post(url+"content.php", { memberid: memberid,divid: id,action: 'show'}, 
		 function(data){
			// alert(data);
            //$("#loadName").html(data).slideDown("slow"); 
        });
	}else{
		$(divid).hide("slow");
		$(hid).val('hide');
		document.getElementById(Iid).title="Show Gadget";
		document.getElementById(Iid).src =url+'images/myimages/add_pal.jpg';
		$.post(url+"content.php", { memberid: memberid,divid: id,action: 'hide'}, 
		 function(data){
			 //alert(data);
            //$("#loadName").html(data).slideDown("slow"); 
        });
	}
}
$(document).ready(function(){
	$.post("content.php", {action: 'check'}, 
		 function(data){
			 var ids = data.split('|');
			 var j=1;
			 var count = ids.length;
			 for(var i=0;i<parseInt(count);i++){
				 if(i !=0)
				 {
					 $('#divhidden'+ids[j]).val('hide');
					 $('#page_block_'+ids[j]+'_p').hide("slow");
					 if(document.getElementById('addpal'+ids[j]) != null){
					 	document.getElementById('addpal'+ids[j]).title="Show Gadget";
					 	document.getElementById('addpal'+ids[j]).src ='images/myimages/add_pal.jpg';
					 }
					 j++;
					 
				 }
			 }
        });					   
});	

$(document).ready(function(){
	$.post("content.php", {action: 'checktogle'}, 
		 function(data){
		 var ids = data.split('|');
			 var j=1;
			 var count = ids.length;
			 for(var i=0;i<parseInt(count);i++){
				 if(i !=0)
				 {
					 $('#divhid_'+ids[j]).val('hide');
					 $('#boxContent_'+ids[j]).hide("slow");
					 j++;
				 }
			 }
	 
        });
	
	$.post("mshipcontent.php", {action: 'checktogle'}, 
		 function(data){
	 		$("#mshipContents").html(data);
        });		
});	



$(document).ready(function(){
						   
$("#cls_ctrl").toggle(
function () {
$(".ico_holder").show("slow");
$(".strl_tx").html("Hide All Gadgets");
$(".strl_tx").removeClass("ad_sh_icc");
$(".strl_tx").addClass("ad_hd_icc");
},
function () {
$(".ico_holder").hide("slow");
$(".strl_tx").html("See All Gadgets");
$(".strl_tx").addClass("ad_sh_icc");
$(".strl_tx").removeClass("ad_hd_icc");
});

$(".img_cls_shd").mouseover(function(){
$(this).addClass("img_cls_bg");
});

$(".img_cls_shd").mouseout(function(){
$(this).removeClass("img_cls_bg");
});


/*SHOW MEMBERSHIP UPGRADE OPTION*/

$("#cls_mship").toggle(
function () {
$(".mship_holder").show("slow");
$(".strl_mship").html("Upgrade Membership");
$(".mship_contents").hide("slow");
$(".strl_mship").removeClass("ad_sh_icc");
$(".strl_mship").addClass("ad_hd_icc");

},
function () {
$(".mship_holder").hide("slow");
$(".mship_contents").show("slow");
$(".strl_mship").html("Upgrade Membership");
$(".strl_mship").addClass("ad_sh_icc");
$(".strl_mship").removeClass("ad_hd_icc");
});

$(".img_cls_shd").mouseover(function(){
$(this).addClass("img_cls_bg");
});

$(".img_cls_shd").mouseout(function(){
$(this).removeClass("img_cls_bg");
});

});

