//中

function chig(){
	var s=document.getElementsByTagName('a');
	for(var i=0; i<s.length ; i++){
		if(s[i].className=='img'){
			 addEvent(s[i], 'click',function(){
					document.getElementById('img').src=this.href;
					return false;
				} );
		}
	}
}

function addEvent( obj, type, fn ) {
  if ( obj.attachEvent ) {
    obj['e'+type+fn] = fn;
    obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
    obj.attachEvent( 'on'+type, obj[type+fn] );
  } else
    obj.addEventListener( type, fn, false );
}
