$(function(){
	//获取页面来源
	var ref = '';
	if(document.referrer.length > 0){
		ref = document.referrer;
	}
	try {
		if (ref.length == 0 && opener.location.href.length > 0) {
			ref = opener.location.href;
		}
	}catch(e){}
	$(".yuan").val(ref);

	$(".btn-off img").click(function(){
		alert(_CONF.tip);
	});
	
	//判断填写改变提交状态
	 $(".main-middle-con").delegate('.box','change keyup focus',function(){
		if($("#area").val()!==''){
			$('.btn-off').css("display","none");
			$('.btn-on').css("display","block");
		}else{
			$('.btn-off').css("display","block");
			$('.btn-on').css("display","none");
		}
	});

	//点击提交
	$(".btn-on img").click(function(){
		var val =$("#area").val();
		if(val !== ''){
			$('.btn-off').css("display","none");
			$('.btn-on').css("display","block");
		}else{
			$('.btn-off').css("display","block");
			$('.btn-on').css("display","none");
			alert(_CONF.tip);
		}
	});
	
  
});