var cur_check = "0";
function swap_on(val,sel){
		if (val != cur_check) {
			var pic = "check"+val;
			var pic_e =document.getElementById(pic); 
			pic_e.src = "/img/list_check2.gif";
		} else {
		 	if (sel == 1) {
						var pic = "check"+val;
			var pic_e =document.getElementById(pic); 
			pic_e.src = "/img/list_check2.gif";
			}
		}
}
function swap_off(val,sel){
	if (val != cur_check) {
		var pic = "check"+val;
		var pic_e =document.getElementById(pic); 
		pic_e.src = "/img/list_check1.gif";
	} else {
		 	if (sel == 1) {
		var pic = "check"+val;
		var pic_e =document.getElementById(pic); 
		pic_e.src = "/img/list_check1.gif";
			}
		}
}
var current = 1;
function select_text (val) {
		var el = "text"+current;
		var e=document.getElementById(el);
		e.style.display="none";
		var el1= "text"+val;
		var e1=document.getElementById(el1);
		e1.style.display="block";
		
		var el = "pic"+current;
		var e=document.getElementById(el);
		e.style.display="none";
		var el1= "pic"+val;
		var e1=document.getElementById(el1);
		e1.style.display="block";
		var i= Math.floor(Math.random()*13);
		if ( i < 1) {
		i = 1;
		}
		var img = '/img/h_bg'+i+'.jpg';
		e1.style.background='url('+img+') bottom left no-repeat';
		if (cur_check != "0") {
		swap_off(cur_check,1);
		}
		swap_on(val,1);
		cur_check = val;
		current = val;
		window.location.href="#top";
}

