/* # floating_frame.js Version 0.4 # Copyright (c) 2002 Luca Borrione write@tiscali-no.spam.it # Created 03 July 2002 Last Modified 11 December 2002 # _________________ # COPYRIGHT NOTICE: # Copyright (c) 2002 Luca Borrione All Rights Reserved. # Permission granted to use and modify free of charge this script so long as this # copyright notice above is maintained, modifications are documented, # and credit is given for any use of the script. # By using this code you agree to indemnify Luca Borrione from any liability that # might arise from its use. # Selling the code contained in this script without prior written consent is # expressly forbidden. # Obtain permission before redistributing this script over the Internet or # in any other medium. # In all cases copyright and header must remain intact. # # ____________ # SCRIPT CODE: */ function FloatWin( Id ) { this.id = Id; this.left = null; this.top = null; this.location = null; this.scrollbar = null; this.resizable = null; this.toolbar = null; this.personalbar = null; this.menubar = null; this.statusbar = false; this.locationbar = false; this.width = 100; this.height = 100; this.open = win_open; this.focus = win_focus; this.center = win_center; this.window = null; this.timer = null; } function win_center() { /* var width = window.screen.width; var height = window.screen.width; */ this.left = (window.screen.width - this.width) / 2; this.top = (window.screen.height - this.height) / 2; } function win_focus() { this.window.focus(); } function win_open( SameWin ) { if( this.timer ){ clearTimeout(this.timer); this.timer=null; } var location = this.location; var id = (this.id) ? this.id : ""; var properties = ''+ 'width='+ this.width +','+ 'height='+ this.height +','; if( this.left ){ properties += 'left='+ this.left +','; } if( this.top ){ properties += 'top='+ this.top +','; } var toolbar = (this.toolbar) ? "yes" : "no"; properties += 'toolbar='+ toolbar +','; var personalbar = (this.personalbar) ? "yes" : "no"; properties += 'directories='+ personalbar +','; var menubar = (this.menubar) ? "yes" : "no"; properties += 'menubar='+ menubar +','; var scrollbar = (this.scrollbar) ? "yes" : "no"; properties += 'scrollbars='+ scrollbar +','; var resizable = (this.resizable) ? "yes" : "no"; properties += 'resizable='+ resizable +','; properties += 'status='+((this.statusbar)?'yes':'no')+','; properties += 'location='+((this.locationbar)?'yes':'no')+','; if( SameWin ) { if( this.window && !this.window.closed ) { this.window.close(); this.timer = setTimeout( this.id+".open(true);", 1000 ); return; } } // alert(properties); this.window = window.open( this.location, id, properties ); } function openFloat( Loc, Width, Height, Id, Prop ) { var id = (Id) ? Id : "float" + Math.round (Math.random() * 1000); var win = new FloatWin( id ); with( win ) { if (Prop && Prop.constructor == Array) for (var i=0; i