function Interface(){this.implement=Interface_Implement;return this;}
function Interface_Implement(ifaceRef){var tmpObj=new ifaceRef();var objName=(this.constructor+'').substr(('function ').length,(this.constructor+'').indexOf('(')-'function '.length);for(var prop in tmpObj){var typeCheck=false;var isFunc=false;eval('isFunc    = (typeof(tmpObj.'+prop+') == "function");');eval('typeCheck = (typeof(this.'+prop+')   == typeof(tmpObj.'+prop+'));');if(prop!='implement'&&!typeCheck){if(isFunc)throw new Error(objName+'.'+prop+"() not implemented!");else throw new Error(objName+'.'+prop+" is either a wrong type or missing.");}}}
if(typeof(BaseObject)=='function')BaseObject.prototype.implement=Interface_Implement;

