function displayPlatform(allPlatform,partial,settings,advertisingmode){
	var includeInmobi = false;
	if (settings === '' || advertisingmode==='OwnMedia') {
		partial.hide();
		allPlatform.show();
	}else{
		partial.show();
		allPlatform.hide();
		if(advertisingmode==null||advertisingmode==''){
			advertisingmode=$('input[name=advertisingMode]:checked').val();
		}
		//var advertisingmode=$('input[name=advertisingMode]:checked').val(),
		var html = '<div>当前已选平台、位置、频道：</div><table border="0" cellspacing="0" cellpadding="0" class="selected-day-parting"><tbody>';
		var config = {};
		if(advertisingmode==='Mobile'){
			config = {
				'Amx':{
					'name':'谷歌移动'
				},
				'Tanx':{
					'name':'淘宝'
				},
				'Sohu':{
					'name':'搜狐',
					'1':'首屏',
					'255':'非首屏',
					'0':'未知'
				},
				'Smaato':{
					'name':'smaato',
					'1':'首屏',
					'255':'非首屏',
					'0':'未知'
				},
				'Inmobi':{
					'name':'inmobi',
					'1':'首屏',
					'255':'非首屏',
					'0':'未知'
				},
				'Mogo':{
					'name':'芒果'
				},
				'Youku':{
					'name':'优酷'
				},'youku':{
					'name':'优酷网',
					'd':'电视剧',
					'e':'体育',
					'f':'音乐',
					'g':'游戏',
					'h':'动漫',
					'j':'搞笑',
					'b':'原创'
				},
				'tudou':{
					'name':'土豆网',
					'1':'娱乐',
					'15':'体育',
					'14':'音乐',
					'10':'游戏',
					'26':'汽车'
				},
				'Sina':{
					'name':'新浪'
				},
				'Xunlei':{
					name:'迅雷'
						},
				'Tencent':{
					name:'腾讯'
						},
				'BaoFeng':{
					name:'暴风'
						},
				'Iqiyi':{
					name:'爱奇艺'
						}
			};
		}
		else {	
			config = {
				'Tanx':{
					'name':'淘宝',
					'1': '首屏',
					'2': '二屏',
					'3': '三屏',
					'4': '四屏',
					'5': '五屏',
					'255': '六屏及以外',
					'0': '未知'
				},
				'Sina':{
					'name':'新浪',
					'1':'首屏',
					'255':'非首屏',
					'0':'未知'
				},
				'Adx':{
					'name':'谷歌',
					'1':'首屏',
					'255':'非首屏',
					'0':'未知'
				},
				'Tencent':{
					'name':'腾讯'
				},
				'Baidu':{
					'name':'百度',
					'1':'首屏',
					'2':'第二屏',
					'0':'未知'					
				},
				'Youku':{
					'name':'优酷',
					'1':'娱乐(土豆)','10':'游戏(土豆)','100':'分享(土豆)','104':'城市(土豆)','12':'商品(土豆)','14':'音乐(土豆)',
					'15':'体育(土豆)','21':'科技(土豆)','22':'电影(土豆)','23':'其他(土豆)','24':'财富(土豆)','25':'成长(土豆)',
					'26':'汽车(土豆)','27':'女性(土豆)','28':'纪录片(土豆)','29':'热点(土豆)','3':'乐活(土豆)','30':'电视剧(土豆)',
					'31':'综艺(土豆)','32':'风尚(土豆)','33':'健康(土豆)','34':'美容(土豆)','35':'土豆站外(土豆)','5':'搞笑(土豆)',
					'9':'动画(土豆)','99':'原创(土豆)','a':'资讯(优酷)','b':'原创(优酷)','c':'电影(优酷)','c1':'电视青春人群(优酷)',
					'c10':'综艺持重人群(优酷)','c2':'电视白领人群(优酷)','c3':'电视精英人群(优酷)','c4':'电视伊人人群(优酷)',
					'c5':'电视持重人群(优酷)','c6':'综艺青春人群(优酷)','c7':'综艺白领人群(优酷)','c8':'综艺精英人群(优酷)',
					'c9':'综艺伊人人群(优酷)','chyi':'创意视频(优酷)','d':'电视剧(优酷)',
					'e':'体育(优酷)','f':'音乐(优酷)','g':'游戏(优酷)','h':'动漫(优酷)','i':'女性(优酷)','j':'搞笑(优酷)','k':'自拍(优酷)',
					'key':'全频道关键字(优酷)','l':'广告(优酷)','m':'生活(优酷)','n':'汽车','o':'科技','p':'无分(优酷)',
					'pker':'拍客(优酷)','q':'时尚(优酷)','r':'母婴(优酷)','s':'旅游(优酷)','t':'教育(优酷)','u':'娱乐(优酷)','v':'综艺(优酷)',
					'w':'纪录片(优酷)','wdyg':'微电影(优酷)','wgju':'网剧(优酷)','wi':'iPad(优酷)','z':'其他(优酷)','zpai':'自拍(优酷)',
					'zw':'站外(优酷)','zzhi':'自制栏目(优酷)' 
				},
				'Miaozhen':{
					'name':'秒针'
				},
				'Allyes':{
					'name':'好耶',
					'1':'首屏',
					'255':'非首屏',
					'0':'未知'
				},
				'BaoFeng':{
					'name':'暴风'
				},
				'Iqiyi':{
					'name':'爱奇艺'
				},
				'Optimus':{
					'name':'Optimus'
				},
				'Stats':{
					'name':'第三方统计'
				},
				'Shanda':{
					'name':'酷六'
				},
				'Xunlei':{
					'name':'迅雷'
				},
				'Sohu':{
					'name':'搜狐',
					'1':'首屏',
					'255':'非首屏',
					'0':'未知'
				}
			};
		}
		if(settings.substring(0,1)==";"){
			settings = settings.substring(1);
		}
		if(settings.substring(settings.length-1)==";"){
			settings = settings.substring(0,settings.length-1);
		}
		if(settings!=""){
			for (var i=0; i < settings.split(';').length; i++) {
				var ex = settings.split(';')[i].split('=');
				if(ex[0].indexOf('.')>-1){
					ex[0] = ex[0].substring(0,ex[0].indexOf('.'));
				}
				html += '<tr id="'+ex[0]+'label"><td width="40"><strong>'+config[ex[0]].name+'</strong></td><td >';
				if ('Inmobi' == ex[0]) {
					includeInmobi = true;
				}
				if (ex[1]) {
					var pos = ex[1].split(','),arr = [];
					for (var j=0,size=pos.length>10?10:pos.length;j < size; j++) {
						arr.push(config[ex[0]][pos[j]]);
					};
					if(pos.length>10){
						html += arr.join('、').substring(0,arr.join('、').length-1)+'…';
					}else{
						html += arr.join('、');
					}
				}
				html += '</td></tr>';
			};		
		}
		html += '</tbody></table>';
		partial[0].innerHTML = html;
	}
	if (includeInmobi) {
		if($('.osTypes > span') && $('.osTypes > span')[1]){			
			$('.osTypes > span')[1].innerHTML='<b>inmobi不支持操作系统版本设置</b>';
		}
		//inmobi不支持移动设备设置
		//移动设备未设定时，默认为全部投放
		if($('.mobileSets > span') && $('.mobileSets > span')[1]){			
			$('.mobileSets > span')[1].innerHTML='<b>inmobi不支持移动设备设置</b>';
		}
		//inmobi不支持网络类型
		//移动网络未设定时，默认为全部投放
		if($('.mobileNetworks > span') && $('.mobileNetworks > span')[1]){			
			$('.mobileNetworks > span')[1].innerHTML='<b>inmobi不支持网络类型</b>';
		}
	} else {
		if($('.osTypes > span') && $('.osTypes > span')[1]){			
			$('.osTypes > span')[1].innerHTML='操作系统未设定时，默认为全部投放';
		}
		if($('.mobileSets > span') && $('.mobileSets > span')[1]){			
			$('.mobileSets > span')[1].innerHTML='移动设备未设定时，默认为全部投放';
		}
		if($('.mobileNetworks > span') && $('.mobileNetworks > span')[1]){			
			$('.mobileNetworks > span')[1].innerHTML='移动网络未设定时，默认为全部投放';
		}
	}
}

function displayOsform(allOsform, partial, settings) {
    if(settings == '') {
        allOsform.show();
        partial.hide();
        return;
    }

    allOsform.hide();
    partial.show();
    //var advertisingmode=$('input[name=advertisingMode]:checked').val();
    if(settings) {
	   var html = '<div>当前已选系统：</div><table border="0" cellspacing="0" cellpadding="0" class="selected-day-parting"><tbody><tr><td>';
	    html += $(settings.split(',')).map(function(i, item) {
	         return item;
	     }).toArray().join(' , ');
    	html += '</td></tr>';
	    html += '</tbody></table>';
    } else {
	    html = '<div>当前已选系统：</div><table border="0" cellspacing="0" cellpadding="0" class="selected-day-parting"><tbody><tr><td>';
        html += $(settings.split(',')).map(function(i, item) {
            return item[0];
        }).toArray().join(' , ');
	    html += '</td></tr></tbody></table>';
    }
	partial[0].innerHTML = html;    
}

function displayVisitorRetarget(allRetarget, partial, settings) {
    if(settings == null || settings == '' 
    	|| (typeof(settings.checkBoxVal)=='undefined' 
    		&& typeof(settings.rtProduct)=='undefined' 
    		&& typeof(settings.rtSite)=='undefined')) {
    	allRetarget.show();
    	partial.hide();
       return;
    }
    allRetarget.hide();
    partial.show();
    var pconfig={'BbAa':'BbAa','BAba':'BAba',
    		'Related':'相关商品','SameHot':'同品热销',
    		'SameDiscount':'同品最大折扣','SameViews':'同品最多访问','CollaborateFilter':'协同过滤'};
    //分类访客:10=旅鞋,8=西装,7=衬衫,6=dd; 转化目标:139=新用户注册,89=转化统计,12=test4,11=test3,10=test2,7=test1
    var html = '<div>当前已选访客找回：</div><table border="0" cellspacing="0" cellpadding="0" class="selected-day-parting"><tbody>';
    if(typeof(settings.cycle)!='undefined' && settings.cycle!=''){
    	 html += '<tr><td width="60"><strong>访客周期</strong></td><td>'+settings.cycle+'天</td></tr>';
    }
    if(typeof(settings.checkBoxVal)!='undefined' && settings.checkBoxVal!='') {
    	var checkSettings = settings.checkBoxVal;
	    for (var i=0; i < checkSettings.split(';').length; i++) {
	    	var ex = checkSettings.split(';')[i].split(':');
	    	html += '<tr><td width="60"><strong>'+ex[0]+'</strong></td><td >';

	    	if (ex[1]) {
	    		var pos = ex[1].split(','),arr = [];
	    		for (var j=0; j < pos.length; j++) {
	    			arr.push(pos[j].split('=')[1]);
	    		};
	    		html += arr.join('、');
	    	}
	    	html += '</td></tr>';
	    };	    
    } 
   if(typeof(settings.rtProduct)!='undefined'){
	   html += '<tr><td width="60"><strong>单品访客</strong></td></tr>';
	   if(settings.carousel!=''){
		   html+='<tr><td width="80"><strong>商品轮播方式</strong></td><td>'+pconfig[settings.carousel]+'</td></tr>';
		}
	   if(settings.supplement!=''){
		   html+='<tr><td width="80"><strong>补充商品分类</strong></td><td>'+pconfig[settings.supplement]+'</td></tr>';
	   }
    }
   if(typeof(settings.rtSite)!='undefined'){
	   html += '<tr><td width="60"><strong>全站访客</strong></td></tr>';
    }
   html += '</tbody></table>';
   partial[0].innerHTML = html;    
}

function displayVisitorExclude(allExclude, partial, settings){
	if(settings == null || settings == ''){
		allExclude.show();
		partial.hide();
		return;
	}
	allExclude.hide();
	partial.show();
    var html = '<div>当前已选访客排除：</div><table border="0" cellspacing="0" cellpadding="0" class="selected-day-parting"><tbody>';
    for (var i=0; i < settings.split(';').length; i++) {
    	var ex = settings.split(';')[i].split(':');
    	html += '<tr><td width="80"><strong>'+ex[0]+'</strong></td><td >';
    	if (ex[1]) {
    		var pos = ex[1].split(','),arr = [];
    		for (var j=0; j < pos.length; j++) {
    			arr.push(pos[j].split('=')[1]);
    		};
    		html += arr.join('、');
    	}
    	html += '</td></tr>';
    };
    html += '</tbody></table>';
    partial[0].innerHTML = html;    
}

function displayClickCookie(allEle, selectedEle, settings){
	if(settings == null || settings == ''){
		allEle.show();
		selectedEle.hide();
		return;
	}
	allEle.hide();
	selectedEle.show();
    var html = '<div>当前已选点击找回类型：</div><table border="0" cellspacing="0" cellpadding="0" class="selected-day-parting"><tbody>';
    html += $(settings.split(',')).map(function(i, item) {
        return item.split('=')[1];
    }).toArray().join('、');
	html += '</td></tr></tbody></table>';
	selectedEle[0].innerHTML = html; 
}

function displayAppCategory(allAppEle, selectedEle, settings){
	if(settings == '') {
		allAppEle.show();
		selectedEle.hide();
       return;
    }
	allAppEle.hide();
	selectedEle.show();
	var html = '<div>当前已选App类型：</div><table border="0" cellspacing="0" cellpadding="0" class="selected-day-parting"><tbody><tr><td>';
    html += $(settings.split(',')).map(function(i, item) {
         return item.split('=')[1];
     }).toArray().join('、');
	 html += '</td></tr></tbody></table>';
	 selectedEle[0].innerHTML = html;
}

function displayPlatformOnly(allPlatform,partial,platforms,advertisingmode){
	var settings='';
	if (platforms!='') {
		//var advertisingmode=$('input[name=advertisingMode]:checked').val();
		var platformAdLocation={};
		if(advertisingmode==='Mobile'){
			platformAdLocation={
				'Amx':'Amx=',
				'Tanx':'Tanx=',
				'Sohu':'Sohu=1,255,0',
				'Smaato':'Smaato=1,255,0',
				'Inmobi':'Inmobi=1,255,0',
				'Youku':'Youku=',
				'Mogo':'Mogo='
			};	
		}
		else {
			platformAdLocation={
				'Tanx':'Tanx=1,2,3,4,5,255,0',
				'Sina':'Sina=1,255,0',
				'Adx':'Adx=1,255,0',
				'Tencent':'Tencent=',
				'Baidu':'Baidu=1,2,0',
				'Youku':'Youku=',
				'Miaozhen':'Miaozhen=',
				'BaoFeng':'BaoFeng=',
				'Allyes':'Allyes=1,255,0',
				'Iqiyi':'Iqiyi=',
				'Shanda':'Shanda=',
				'Xunlei':'Xunlei=',
				'Sohu':'Sohu=1,255,0'
			};
		}		
		var platformArr=platforms.split(',');
		var len=platformArr.length;
		for (var j=0; j < len; j++) {
			settings+=platformAdLocation[platformArr[j]];
			if(j<len-1){settings+=';';}
		}
	}
	displayPlatform(allPlatform,partial,settings,advertisingmode);	
}

function displayBrowser(allBrowser, browserSelect, selected){
	if(selected == '') {
		allBrowser.show();
		browserSelect.hide();
       return;
    }
	allBrowser.hide();
	browserSelect.show();
	var html = '<div>当前已选浏览器：</div><table border="0" cellspacing="0" cellpadding="0" class="selected-day-parting"><tbody><tr><td>';
    html += $(selected.split(',')).map(function(i, item) {
         return item;
     }).toArray().join(' , ');
	 html += '</td></tr></tbody></table>';
	 browserSelect[0].innerHTML = html;
}

function displayAudienceClassify(allEle, selectedEle, selected){
	if(selected == null || selected == '') {
		allEle.show();
		selectedEle.hide();
       return;
    }
	allEle.hide();
	selectedEle.show();
	var html = '<div>当前已选人群分类：</div><table border="0" cellspacing="0" cellpadding="0" class="selected-day-parting"><tbody><tr><td>';
    html += $(selected.split(',')).map(function(i, item) {
         return item.split('=')[1];
     }).toArray().join('、');
	 html += '</td></tr></tbody></table>';
	 selectedEle[0].innerHTML = html;
}

