function extractBlockquoteCitations() { 
 var quotes = document.getElementsByTagName('blockquote'); 
 for (var i = 0; i < quotes.length; i++) { 
   var cite = quotes[i].getAttribute('cite'); 
   var title = quotes[i].getAttribute('title');
   var stclass = quotes[i].getAttribute('class');
   var stclassIE = quotes[i].getAttribute('className');
  	 if (stclass == 'printedsource' || stclassIE == 'printedsource' ) {
   	 var cite = document.createElement('cite'); 
     cite.setAttribute('title', title);
     cite.setAttribute('class', 'printed_title');
     cite.setAttribute('className', 'printed_title');
     cite.appendChild(document.createTextNode(title)); 
     var p = document.createElement('p'); 
     p.className = 'blockquoteprintedsource'; 
     p.appendChild(document.createTextNode('Quated from: '));
     p.appendChild(cite); 
     quotes[i].appendChild(p);
   } 
        else if (stclass == 'trans_online' || stclassIE == 'trans_online') { 
   	 var a = document.createElement('a'); 
     a.setAttribute('href', cite); 
     a.setAttribute('title', title);
     a.setAttribute('class', 'trans_net_source');
     a.setAttribute('className', 'trans_net_source');
     a.appendChild(document.createTextNode(title)); 
     var p = document.createElement('p'); 
     p.className = 'blockquotesource'; 
     p.appendChild(document.createTextNode('Translated from: '));
     p.appendChild(a); 
     quotes[i].appendChild(p); 
   } 
    else if (cite != '' && title != '' && stclass != 'trans_printed') { 
   	 var a = document.createElement('a'); 
     a.setAttribute('href', cite); 
     a.setAttribute('title', title);
     a.setAttribute('class', 'net_source');
     a.setAttribute('className', 'net_source');
     a.appendChild(document.createTextNode(title)); 
     var p = document.createElement('p'); 
     p.className = 'blockquotesource'; 
     p.appendChild(document.createTextNode('Quated from: '));
     p.appendChild(a); 
     quotes[i].appendChild(p); 
   } 

	else if  (stclass == 'trans_printed' || stclassIE == 'trans_printed') {
   	 var cite = document.createElement('cite'); 
     cite.setAttribute('title', title);
     cite.setAttribute('class', 'printed_title');
     cite.setAttribute('className', 'printed_title');
     cite.appendChild(document.createTextNode(title)); 
     var p = document.createElement('p'); 
     p.className = 'blockquoteprintedsource'; 
     p.appendChild(document.createTextNode('Translated from: '));
     p.appendChild(cite); 
     quotes[i].appendChild(p);
     } 
	
	

 } 
} 





function addEvent(obj, evType, fn){ 
 if (obj.addEventListener){ 
   obj.addEventListener(evType, fn, true); 
   return true; 
 } else if (obj.attachEvent){ 
   var r = obj.attachEvent("on"+evType, fn); 
   return r; 
 } else { 
   return false; 
 } 
} 
addEvent(window, 'load', extractBlockquoteCitations);
