<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<div style="text-align:center;"><img src="images/Noviceguide_2.gif" alt="第一步" align="middle" /></div>
<div class="NoviceguideHead_content3">
	<fieldset style="border:1px #CCCCCC solid;padding: 0px 10px;-moz-border-radius:8px;">
		<legend style="color:#333333;">您选择的网站类型</legend>
		<div style="background:#e2f0fd; border:1px #aedcfe solid; padding:10px; margin:5px 5px 10px 5px;">
			<div style=" padding:10px 20px  0px 20px">
				网站类型：<span id="template-category"></span>
			</div>
			<div style=" padding:10px 20px;">
				模版种类：<span id="template-title"></span>
			</div>
			<div id="template-description" style=" padding:10px 20px; color:#247f00; border:1px #aedcfe solid; background:#FFFFFF;">
				
			</div>
		</div>
	</fieldset>
</div>
<div class="NoviceguideFooter">
	<input type="submit" name="Submit" value="重新选择" class="next goback" />
	<input type="submit" name="Submit" value="下一步" class="next gonext" />
	<div style="clear:both; height:1px; overflow:hidden"></div>
</div>


<script src="js/jquery/jquery.cookie.js"></script>
<script>
	$(document).ready(function(){
		
		$(".goback").click(function(){
			$(this).attr("disabled",'disabled').addClass("dis").removeClass("next");
			$(".gonext").attr("disabled",'disabled').addClass("dis").removeClass("next");
			
			init_next(2);
		});
		
		$(".gonext").click(function(){
			$(".goback").attr("disabled",'disabled').addClass("dis").removeClass("next");
			$(this).attr("disabled",'disabled').addClass("dis").removeClass("next");
		
			init_next(4);
		});
		
		var cookie_template = $.cookie('init_template_id');
		if(cookie_template){
			$.ajax({
				async:false,
				cache:false,
				//contentType:'json' ,
				data:{id:cookie_template},
				url:'./index.php?r=Init.getTemplateById',
				type:'get',
				success:function(data){
					
					data = eval('('+data+')');
					if(cookie_template != data.id)
					{
						alert('当前选择的模板没有数据！');
						init_next(2);
					}else{
						$("#template-description").html(data.description);
						$("#template-category").html(''+data.cate_name+'');
						$("#template-title").html(''+data.title+'');
						
						$("#wbb").attr('src',data.demo_url);
					}
				}
			});
		}else{
			alert('还没有选择模板，请先选择模板！');
			init_next(2);
		}
	});
</script>