var Class = {
  create: function() {
    return function() { 
      this.initialize.apply(this, arguments);
    }
  }
}

var SystemObject = Class.create();

SystemObject.prototype = {

	initialize: function(){
		// Browser flags
	   this.isNav4	= (document.layers)?true:false;
	   this.isNav6	= (document.getElementById)?true:false;
	   this.isIE	= (document.all)?true:false;
	},

	getObject: function(id){
		if(this.isNav6) return document.getElementById(id);
		return eval('document.'+((this.isNav4)? 'layers':'all')+'.'+id);
	},
	
	getFrame: function(){
		if(this.isNav6) return window.opener;
		return parent;
	}	
};

var sysobj = new SystemObject();
