ASNMTAP
view release on metacpan or search on metacpan
applications/htmlroot/overlib.js view on Meta::CPAN
//\/////
//\ overLIB 4.21 - You may not remove or change this notice.
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
//\
//\ Contributors are listed on the homepage.
//\ This file might be old, always check for the latest version at:
//\ http://www.bosrup.com/web/overlib/
//\
//\ Please read the license agreement (available through the link above)
//\ before using overLIB. Direct any licensing questions to erik@bosrup.com.
//\
//\ Do not sell this as your own work or remove this copyright notice.
//\ For full details on copying or changing this script please read the
//\ license agreement at the link above. Please give credit on sites that
//\ use overLIB and submit changes of the script so other people can use
//\ them as well.
// $Revision: 1.119 $ $Date: 2005/07/02 23:41:44 $
//\/////
//\mini
////////
// PRE-INIT
// Ignore these lines, configuration is below.
////////
var olLoaded = 0;var pmStart = 10000000; var pmUpper = 10001000; var pmCount = pmStart+1; var pmt=''; var pms = new Array(); var olInfo = new Info('4.21', 1);
var FREPLACE = 0; var FBEFORE = 1; var FAFTER = 2; var FALTERNATE = 3; var FCHAIN=4;
var olHideForm=0; // parameter for hiding SELECT and ActiveX elements in IE5.5+
var olHautoFlag = 0; // flags for over-riding VAUTO and HAUTO if corresponding
var olVautoFlag = 0; // positioning commands are used on the command line
var hookPts = new Array(), postParse = new Array(), cmdLine = new Array(), runTime = new Array();
// for plugins
registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy...
////////
// DEFAULT CONFIGURATION
// Settings you want everywhere are set here. All of this can also be
// changed on your html page or through an overLIB call.
////////
if (typeof ol_fgcolor=='undefined') var ol_fgcolor="#CCCCFF";
if (typeof ol_bgcolor=='undefined') var ol_bgcolor="#333399";
if (typeof ol_textcolor=='undefined') var ol_textcolor="#000000";
if (typeof ol_capcolor=='undefined') var ol_capcolor="#FFFFFF";
if (typeof ol_closecolor=='undefined') var ol_closecolor="#9999FF";
if (typeof ol_textfont=='undefined') var ol_textfont="Verdana,Arial,Helvetica";
if (typeof ol_captionfont=='undefined') var ol_captionfont="Verdana,Arial,Helvetica";
if (typeof ol_closefont=='undefined') var ol_closefont="Verdana,Arial,Helvetica";
if (typeof ol_textsize=='undefined') var ol_textsize="1";
if (typeof ol_captionsize=='undefined') var ol_captionsize="1";
if (typeof ol_closesize=='undefined') var ol_closesize="1";
if (typeof ol_width=='undefined') var ol_width="200";
if (typeof ol_border=='undefined') var ol_border="1";
if (typeof ol_cellpad=='undefined') var ol_cellpad=2;
if (typeof ol_offsetx=='undefined') var ol_offsetx=10;
if (typeof ol_offsety=='undefined') var ol_offsety=10;
if (typeof ol_text=='undefined') var ol_text="Default Text";
if (typeof ol_cap=='undefined') var ol_cap="";
if (typeof ol_sticky=='undefined') var ol_sticky=0;
if (typeof ol_background=='undefined') var ol_background="";
if (typeof ol_close=='undefined') var ol_close="Close";
if (typeof ol_hpos=='undefined') var ol_hpos=RIGHT;
if (typeof ol_status=='undefined') var ol_status="";
if (typeof ol_autostatus=='undefined') var ol_autostatus=0;
if (typeof ol_height=='undefined') var ol_height=-1;
if (typeof ol_snapx=='undefined') var ol_snapx=0;
if (typeof ol_snapy=='undefined') var ol_snapy=0;
if (typeof ol_fixx=='undefined') var ol_fixx=-1;
if (typeof ol_fixy=='undefined') var ol_fixy=-1;
if (typeof ol_relx=='undefined') var ol_relx=null;
if (typeof ol_rely=='undefined') var ol_rely=null;
if (typeof ol_fgbackground=='undefined') var ol_fgbackground="";
if (typeof ol_bgbackground=='undefined') var ol_bgbackground="";
if (typeof ol_padxl=='undefined') var ol_padxl=1;
if (typeof ol_padxr=='undefined') var ol_padxr=1;
if (typeof ol_padyt=='undefined') var ol_padyt=1;
if (typeof ol_padyb=='undefined') var ol_padyb=1;
if (typeof ol_fullhtml=='undefined') var ol_fullhtml=0;
if (typeof ol_vpos=='undefined') var ol_vpos=BELOW;
if (typeof ol_aboveheight=='undefined') var ol_aboveheight=0;
if (typeof ol_capicon=='undefined') var ol_capicon="";
if (typeof ol_frame=='undefined') var ol_frame=self;
if (typeof ol_timeout=='undefined') var ol_timeout=0;
if (typeof ol_function=='undefined') var ol_function=null;
if (typeof ol_delay=='undefined') var ol_delay=0;
if (typeof ol_hauto=='undefined') var ol_hauto=0;
if (typeof ol_vauto=='undefined') var ol_vauto=0;
if (typeof ol_closeclick=='undefined') var ol_closeclick=0;
if (typeof ol_wrap=='undefined') var ol_wrap=0;
if (typeof ol_followmouse=='undefined') var ol_followmouse=1;
applications/htmlroot/overlib.js view on Meta::CPAN
if (o3_hpos == LEFT) {
placeX = placeX - (o3_snapx+snapping);
} else {
// CENTER and RIGHT
placeX = placeX+(o3_snapx - snapping);
}
if (placeX < winoffset) placeX = winoffset;
}
}
return placeX;
}
// was originally in the placeLayer() routine; separated out for future ease
function verticalPlacement(browserHeight,verticalScrollAmount) {
var placeY, iheight=browserHeight, scrolloffset=verticalScrollAmount;
var parsedHeight=(o3_aboveheight ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight));
if (o3_fixy > -1 || o3_rely != null) {
// Fixed position
placeY=(o3_rely != null ? (o3_rely < 0 ? scrolloffset+o3_rely+iheight - parsedHeight : scrolloffset+o3_rely) : o3_fixy);
} else {
// If VAUTO, decide what to use.
if (o3_vauto == 1) {
if ((o3_y - scrolloffset) > (iheight / 2) && o3_vpos == BELOW && (o3_y + parsedHeight + o3_offsety - (scrolloffset + iheight) > 0)) {
o3_vpos = ABOVE;
} else if (o3_vpos == ABOVE && (o3_y - (parsedHeight + o3_offsety) - scrolloffset < 0)) {
o3_vpos = BELOW;
}
}
// From mouse
if (o3_vpos == ABOVE) {
if (o3_aboveheight == 0) o3_aboveheight = parsedHeight;
placeY = o3_y - (o3_aboveheight+o3_offsety);
if (placeY < scrolloffset) placeY = scrolloffset;
} else {
// BELOW
placeY = o3_y+o3_offsety;
}
// Snapping!
if (o3_snapy > 1) {
var snapping = placeY % o3_snapy;
if (o3_aboveheight > 0 && o3_vpos == ABOVE) {
placeY = placeY - (o3_snapy+snapping);
} else {
placeY = placeY+(o3_snapy - snapping);
}
if (placeY < scrolloffset) placeY = scrolloffset;
}
}
return placeY;
}
// checks positioning flags
function checkPositionFlags() {
if (olHautoFlag) olHautoFlag = o3_hauto=0;
if (olVautoFlag) olVautoFlag = o3_vauto=0;
return true;
}
// get Browser window width
function windowWidth() {
var w;
if (o3_frame.innerWidth) w=o3_frame.innerWidth;
else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientWidth=='number'")&&eval('o3_frame.'+docRoot+'.clientWidth'))
w=eval('o3_frame.'+docRoot+'.clientWidth');
return w;
}
// create the div container for popup content if it doesn't exist
function createDivContainer(id,frm,zValue) {
id = (id || 'overDiv'), frm = (frm || o3_frame), zValue = (zValue || 1000);
var objRef, divContainer = layerReference(id);
if (divContainer == null) {
if (olNs4) {
divContainer = frm.document.layers[id] = new Layer(window.innerWidth, frm);
objRef = divContainer;
} else {
var body = (olIe4 ? frm.document.all.tags('BODY')[0] : frm.document.getElementsByTagName("BODY")[0]);
if (olIe4&&!document.getElementById) {
body.insertAdjacentHTML("beforeEnd",'<div id="'+id+'"></div>');
divContainer=layerReference(id);
} else {
divContainer = frm.document.createElement("DIV");
divContainer.id = id;
body.appendChild(divContainer);
}
objRef = divContainer.style;
}
objRef.position = 'absolute';
objRef.visibility = 'hidden';
objRef.zIndex = zValue;
if (olIe4&&!olOp) objRef.left = objRef.top = '0px';
else objRef.left = objRef.top = -10000 + (!olNs4 ? 'px' : 0);
}
return divContainer;
}
// get reference to a layer with ID=id
function layerReference(id) {
return (olNs4 ? o3_frame.document.layers[id] : (document.all ? o3_frame.document.all[id] : o3_frame.document.getElementById(id)));
}
////////
// UTILITY FUNCTIONS
////////
// Checks if something is a function.
function isFunction(fnRef) {
var rtn = true;
if (typeof fnRef == 'object') {
( run in 0.581 second using v1.01-cache-2.11-cpan-39bf76dae61 )