var ocmOrig = document.oncontextmenu var ocmNone = new Function( "return false" ) // Button Object function ObjButton(n,a,x,y,w,h,v,z,d) { this.name = n this.altName = a this.x = x this.y = y this.w = w this.h = h this.v = v this.z = z this.obj = this.name+"Object" this.alreadyActioned = false; eval(this.obj+"=this") if ( d != 'undefined' && d!=null ) this.divTag = d; else this.divTag = "div"; } function ObjButtonActionGoTo( destURL, destFrame ) { this.objLyr.actionGoTo( destURL, destFrame ); } function ObjButtonActionGoToNewWindow( destURL, name, props ) { this.objLyr.actionGoToNewWindow( destURL, name, props ); } function ObjButtonActionPlay( ) { this.objLyr.actionPlay(); } function ObjButtonActionStop( ) { this.objLyr.actionStop(); } function ObjButtonActionShow( ) { if( !this.isVisible() ) this.onShow(); } function ObjButtonActionHide( ) { if( this.isVisible() ) this.onHide(); } function ObjButtonActionLaunch( ) { this.objLyr.actionLaunch(); } function ObjButtonActionExit( ) { this.objLyr.actionExit(); } function ObjButtonActionChangeContents( ) { this.objLyr.actionChangeContents(); } function ObjButtonActionTogglePlay( ) { this.objLyr.actionTogglePlay(); } function ObjButtonActionToggleShow( ) { if(this.objLyr.isVisible()) this.actionHide(); else this.actionShow(); } {// Setup prototypes var p=ObjButton.prototype p.checkbox = false p.setImages = ObjButtonSetImages p.build = ObjButtonBuild p.init = ObjButtonInit p.activate = ObjButtonActivate p.down = ObjButtonDown p.up = ObjButtonUp p.over = ObjButtonOver p.out = ObjButtonOut p.change = ObjButtonChange p.capture = 0 p.onDown = new Function() p.onUp = new Function() p.onOver = new Function() p.onOut = new Function() p.onSelect = new Function() p.onDeselect = new Function() p.actionGoTo = ObjButtonActionGoTo p.actionGoToNewWindow = ObjButtonActionGoToNewWindow p.actionPlay = ObjButtonActionPlay p.actionStop = ObjButtonActionStop p.actionShow = ObjButtonActionShow p.actionHide = ObjButtonActionHide p.actionLaunch = ObjButtonActionLaunch p.actionExit = ObjButtonActionExit p.actionChangeContents = ObjButtonActionChangeContents p.actionTogglePlay = ObjButtonActionTogglePlay p.actionToggleShow = ObjButtonActionToggleShow p.writeLayer = ObjButtonWriteLayer p.onShow = ObjButtonOnShow p.onHide = ObjButtonOnHide p.isVisible = ObjButtonIsVisible p.onSelChg = new Function() } function ObjButtonSetImages(imgOff,imgOn,imgRoll,dir) { if (!dir) dir = '' this.imgOffSrc = imgOff?dir+imgOff:'' this.imgOnSrc = imgOn?dir+imgOn:'' this.imgRollSrc = imgRoll?dir+imgRoll:'' } function ObjButtonBuild() { this.css = buildCSS(this.name,this.x,this.y,this.w,this.h,this.v,this.z) this.div = '<' + this.divTag + ' id="'+this.name+'">\n' this.divInt = '