function getElement(name){
	
  if (document.getElementById){
	  
  	return document.getElementById(name);
	
  }else if (document.all){
	  
  	return document.all[name];
	
  }else if (document.layers){
	  
   	return document.layers[name];
  }
}

/**
 * Inserts a link inside an HTML element with an id attribute of
 * 'pcs-noframes-msg' back to the frameset of a page if
 * the script detects that the page is not already in a frameset.
 */
function checkFrames(){
	
  var isFrame = (self != top);
  
  var msg_div = getElement('pcs-noframes-msg');
  
  if (!isFrame){
    msg_div.innerHTML = '<b>[</b> <a href="../index.html">Frameset</a> <b>]</b>';
  }
  
  return true;
  
}
