var oldSelect; //记录当前选中的tab
$(document).ready(function(){	
	if(login.type() == login.def._PERSON){
		display("person");
	}else if(login.type() == login.def._ORG){
		display("org");
	}else{
		display();
	}
	oldSelect = $("#pTab span.pcurrent");
	$("#MdiscountPro").show();
	
			
})

function mshowContent(data,obj){ 
	if(data == 1){
		$("#pTab span.pcurrent").removeClass("pcurrent");
		$(obj).addClass("pcurrent");
		$("#MdiscountPro").show();
		$("#MnewsPro").hide();
		$("#MhotPro").hide();
		oldSelect = $("#pTab span.pcurrent");}
	if(data == 2){
		$("#pTab span.pcurrent").removeClass("pcurrent");
		$(obj).addClass("pcurrent");
		$("#MdiscountPro").hide()
		$("#MnewsPro").hide();
		$("#MhotPro").show();
		oldSelect = $("#pTab span.pcurrent");
	}
	else if(data == 3){
		$("#pTab span.pcurrent").removeClass("pcurrent");
		$(obj).addClass("pcurrent");
		$("#MdiscountPro").hide()
		$("#MnewsPro").show();
		$("#MhotPro").hide();
		oldSelect = $("#pTab span.pcurrent");
	}
}


var old; 
$(document).ready(function(){	
	if(login.type() == login.def._PERSON){
		display("person");
	}else if(login.type() == login.def._ORG){
		display("org");
	}else{
		display();
	}
	old = $("#pTable span.pcurrent");
	$("#Mdiscount").show();
})

function showContent(data,obj){ 
	if(data == 1){
		$("#pTable span.pcurrent").removeClass("pcurrent");
		$(obj).addClass("pcurrent");
		$("#Mdiscount").show();
		$("#Mnews").hide();
		$("#Mhot").hide();
		old = $("#pTable span.pcurrent");}
	if(data == 2){
		$("#pTable span.pcurrent").removeClass("pcurrent");
		$(obj).addClass("pcurrent");
		$("#Mdiscount").hide()
		$("#Mnews").hide();
		$("#Mhot").show();
		old = $("#pTable span.pcurrent");
	}
	else if(data == 3){
		$("#pTable span.pcurrent").removeClass("pcurrent");
		$(obj).addClass("pcurrent");
		$("#Mdiscount").hide()
		$("#Mnews").show();
		$("#Mhot").hide();
		old = $("#pTable span.pcurrent");
	}
}


var oldSelectProd; 
$(document).ready(function(){	
	if(login.type() == login.def._PERSON){
		display("person");
	}else if(login.type() == login.def._ORG){
		display("org");
	}else{
		display();
	}
	oldSelectProd = $("#pTables span.pcurrent");
	$("#Mdiscount").show();
})

function showProContent(data,obj){ 
	if(data == 1){
		$("#pTables span.pcurrent").removeClass("pcurrent");
		$(obj).addClass("pcurrent");
		$("#MdiscountProduct").show();
		$("#MnewsProduct").hide();
		$("#MhotProduct").hide();
		oldSelectProd = $("#pTables span.pcurrent");}
	if(data == 2){
		$("#pTables span.pcurrent").removeClass("pcurrent");
		$(obj).addClass("pcurrent");
		$("#MdiscountProduct").hide()
		$("#MnewsProduct").hide();
		$("#MhotProduct").show();
		oldSelectProd = $("#pTables span.pcurrent");
	}
	else if(data == 3){
		$("#pTables span.pcurrent").removeClass("pcurrent");
		$(obj).addClass("pcurrent");
		$("#MdiscountProduct").hide()
		$("#MnewsProduct").show();
		$("#MhotProduct").hide();
		oldSelectProd = $("#pTables span.pcurrent");
	}
}
