p = 'images/t';
po = p + 'm';		
function cTN(){
	for (var i=0; i <= (py.length-3); i=i+3) {
		im = new Image();
		im.src = p + '_' + py[i];
		im.onmouseover = function(){mover(this);}
		im.onmouseout = function(){mout(this);}
		im.data = py[i+1];
		im.onclick = function(){imgSwap(this.data);}
		im.title = py[i+2];
		im.style.marginRight = "1px";
		document.getElementById('tnh').appendChild(im);
	}
	pli();
}
function pli(){
	for (var i=0; i <= (py.length-3); i=i+3) {
		im = new Image();
		im.src = po + '_' + py[i];
		im.style.display = 'none';
		document.getElementById('tnh').appendChild(im);
	}
}
function mover(o){
	ph = o.src;
	i = ph.indexOf(p);
	m = ph.substr(0,i)+p+"m"+ph.substr(i+8,ph.length);
	o.src = m;
}
function mout(o){
	ph = o.src;
	i = ph.indexOf(p);
	m = ph.substr(0,i)+p+ph.substr(i+9,ph.length);
	o.src = m;
}
function imgSwap(id){
	//if (document.getElementById("pic_c")){
	//	s = "pic_click.html?" + "img=" + document.getElementById(id+'_URL').innerHTML;
	//	document.getElementById('pic_c').src = s;
	//}
	document.getElementById('imgText').innerHTML = "";
	setTimeout("intFr('"+id+"')",100);
}
function intFr(id){
	document.getElementById('imgDisplay').src = document.getElementById(id+'_URL').innerHTML;
	document.getElementById('imgText').innerHTML = document.getElementById(id+'_TXT').innerHTML;
}		
