
/*
	"Hemi" JavaScript Framework
	Engine for Web Applications 3.1
	Composite file "hemi.comp.js" release: 3.1.1
	Copyright 2002 - 2010. All Rights Reserved.
	Author: Stephen W. Cote
	Email: sw.cote@gmail.com
	Project: http://www.whitefrost.com/Hemi/
	BSD License: http://www.whitefrost.com/Hemi.license.txt
*/
(function(){H.namespace("wires.primitive",H,{service:null,serviceImpl:
function(){var t=this;t.o={w:[]};t.p={c:0};t.getWires=function(){return this.o.w;};t.sigterm=function(){if(this.r!=5){var _p=this.o;_p.w=[];this.r=5;}};t.invoke=function(i,args,b,z,p,o,m){var h,a,d,r=0;h=t.o.w[i];if(!D.TO(args))args=[];if(D.TO(h)){a=(D.TO(h.ap)&&D.TS(h.a))?1:0;if((o||(!h.i&&(r=(a?h.ap[h.a].apply(h.ap,args):h.a.apply(window,args)))))||b){if(!m)h.i=1;if(z)return r;a=(D.TO(h.hp)&&D.TS(h.h))?1:0;if(!h.r){if(a){if(D.TF(h.hp[h.h]))h.hp[h.h].apply(h.hp,args);}else{if(D.TF(h.h))h.h.apply(window,args);}if(!m)h.r=1;if(!p)t.o.w[i]=0;return r;}}}else{alert("hemi.wires.primitive::invoke Error=Invalid wire reference with "+i);}return 0;};t.getWire=function(i){var h=t.o.w[i];if(D.TO(h)){return h;}return 0;};t.fireWire=function(i){var h=t.o.w[i];if(D.TO(h)){h.i=1;t.invoke(i,0,1);}};t.wire=function(xp,x,yp,y,ep,e,tl){if(!D.TS(tl))tl="swc.ocjw.primitive";try{if(D.TS(xp))xp=eval(xp);if(D.TS(yp))yp=eval(yp);if(D.TS(ep))ep=eval(ep);}catch(e){alert("hemi.wire.Error:"+e.toString());return 0;}var i=tl+"."+(++t.p.c);if(!xp)xp=window;if(!yp)yp=window;if(!ep)ep=window;t.o.w[i]={ap:xp,a:x,hp:yp,h:y,ep:ep,e:e,i:0,r:0};return i;};H.IM(t,"base_object","primitive_wire","3.1.1");H.registry.service.addObject(t);t.r=4;}},1);}());
/* End Hemi Framework 3.1 */
