$(document).ready(function(){
	$(".text_input").click(
		function(){
			$(this).attr("class","text_input_hover");
		}
	);
	$(".text_input").blur(
		function(){
			$(this).attr("class","text_input");
		}
	);
});

function fleshVerify(){
	var timenow = new Date().getTime();
	$('#verifyImg')[0].src= '__URL__/verify/'+timenow;
}

//获取浏览器内容区的宽度与高度
function getSize() {
	if(typeof(window.innerWidth)=='number'){																				//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){										//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
}

function getoption(url,id,id2){
	$.get(url,function(data){
		$("#"+id).html(data);
		if(id2){
			$('#'+id2).focus();
		}
	});
}

function search_submit(form){
	var url = "";
	var input = $("#"+form+" .text");
	var exple = '/'+$(input).eq(0).attr('name');
	$.each(input,function(i,n){
		if($(n).attr('type')=='radio'){
			if($(n).attr('value')&&$(n).attr('checked')){
				url += '/'+$(n).attr('name')+"/"+$(n).attr('value');
			}
		}else{
			if($(n).attr('value')){
				url += '/'+$(n).attr('name')+"/"+$(n).attr('value');
			}
		}
	});
	action = $("#"+form).attr('action');
	num = action.indexOf(exple);
	if(num>1){
		action = action.substring(0,num);
	}
	document.location.href= action+url; 
}

function showtype(value,id){
	if(value<1){
		$("."+id).css("display","none");
	}else{
		$("."+id).css("display","block");
	}
}
