var default_height=400;
var licenses_obj = {
	_163:{id:163,name:'排三',height:450,type:3},
	_164:{id:164,name:'排五',height:450,type:3},
	_165:{id:165,name:'七星彩',height:450,type:3},
	_184:{id:184,name:'22选5',height:450,type:3},
	_185:{id:185,name:'29选7',height:450,type:3},
	_166:{id:166,name:'双色球',height:450,type:3},
	_186:{id:186,name:'7乐彩',height:400,type:3},
	_167:{id:167,name:'福彩3D',height:470,type:3},
	_203:{id:203,name:'15选5',height:400,type:3},
	_207:{id:207,name:'东方6+1',height:565,type:3},
	_208:{id:208,name:'深圳风采',height:565,type:3},
	_209:{id:209,name:'天天彩选4',height:565,type:3},
	
	_190:{id:190,name:'重庆时时彩',height:730,type:4},
	_189:{id:189,name:'时时乐',height:750,type:4},
	_210:{id:210,name:'11运夺金',height:750,type:4},
	_206:{id:206,name:'江西时时彩',height:750,type:4},
	
	
	
	_188:{id:188,name:'大乐透',height:465,type:3},
	_183:{id:183,name:'新足彩',height:500,type:2},
	_172:{id:172,name:'胜负彩',height:500,type:2}
}

function $(id){
	return document.getElementById(id);
}
var init_license = 'license_1';
function u_change(type,obj){
	if(obj.id==init_license)
		return;
	$(init_license).className='table2_4';
	obj.className='table2_3';
	init_license = obj.id;

	var ifrmObj = $('lottery_ifrm');
	if(ifrmObj!=null){
		var url = licenses_obj['_'+type].type+'_0_index.jsp';
		var pay_url = rootPath+"jsp/lotteyGames/"+url+"?gameid="+type;
		if(licenses_obj['_'+type].type==4){
				pay_url = rootPath+"jsp/hFredGameManager/"+type+"_index.jsp?license_type_id="+type;
		}
		var licensID = type;
		var height = default_height>0?default_height:licenses_obj['_'+type].height;
		
		ifrmObj.style.height=height;
		//ifrmObj.src=pay_url;
		ifrmObj.setAttribute('src',pay_url);
	}
}

function u_change2(type,obj){
	if(obj.id==init_license)
		return;
	$(init_license).className='';
	obj.className='active';
	init_license = obj.id;

	var ifrmObj = $('lottery_ifrm');
	if(ifrmObj!=null){
		var url = licenses_obj['_'+type].type+'_0_index.jsp';
		var pay_url = rootPath+"jsp/lotteyGames/"+url+"?gameid="+type;
		if(licenses_obj['_'+type].type==4){
				pay_url = rootPath+"jsp/hFredGameManager/"+type+"_index.jsp?license_type_id="+type;
		}
		var licensID = type;
		var height = default_height>0?default_height:licenses_obj['_'+type].height;
		
		ifrmObj.style.height=height;
		//ifrmObj.src=pay_url;
		ifrmObj.setAttribute('src',pay_url);
	}
}

function u_change3(type,obj){
	if(obj.id==init_license)
		return;
	$(init_license).className='table2';
	obj.className='table1';
	
	init_license = obj.id;

	var ifrmObj = $('lottery_ifrm');
	if(ifrmObj!=null){
		var url = licenses_obj['_'+type].type+'_0_index.jsp';
		var pay_url = rootPath+"jsp/lotteyGames/"+url+"?gameid="+type;
		if(licenses_obj['_'+type].type==4){
				pay_url = rootPath+"jsp/hFredGameManager/"+type+"_index.jsp?license_type_id="+type;
		}
		var licensID = type;
		var height = default_height>0?default_height:licenses_obj['_'+type].height;
		
		ifrmObj.style.height=height;
		ifrmObj.setAttribute('src',pay_url);
	}
}