Logo of RobustHost, developer of high quality webmaster tools.
Home About Us Contact Us Support Download Products
DynAds Pro Professional rotation and tracking software
DynAds Pro
Main Page
Features
Demo & Test
Documents
F.A.Q.
 
Order Online
 
Other Products
DynAds
 
Testimonials
 

Sample Testimonial
Hi Ali, It took me some time to understand this but now it is working. I haven't tried the daily rotation -- just want to test it on some basic pages -- but I see great potential for this script -- I think it is going to be really, really, great -- great job, great price, great customer service. The only thing that might have helped me better would have been actual screenshots of some sample entries -- it would help those of us who are a little more visual -- and too anxious to read. Any way -- Thanks again.
P. E. Crandlemire, ContractorsOfMaine.com More...

Affiliates

Display Ad Group (DAG) Class

DAG class is a class for displaying and manipulating an AdGrp object. DAG class includes a single AdGrp object and provides many display and manipulation methods and properties for the ad group. When the DAG object is loaded to the browser from DynAds server, the internal AdGrp object is created and initialized automatically.

DAG Class: Class for displaying and manipulating a group of ads.
DAG.GetAdsFromCookie Method: Load the ads of this DAG from the cookie set by DynAds server previously.
DAG.ReceiveAdCookie Method: Calls GetAdsFromCookie method until the cookie is retrieved.
DAG.ReqAdCookie Method: Request an Ad through cookie for on the fly ad retrieval from the DynAds server
DAG.WriteCCElem Method: Creates the IMG element for ad cookie requests.
DAG.WriteContainer Method: Write the container of the ads to the document.
DAG.Object Method: Get the container object of this DAG.
DAG.PutContent Method: Put the given content to this Display Group's container.
DAG.GetSelAd Method: Retrieves the html content of the specified ad in the ad group.
DAG.PutAd Method: Display an Ad in this Display Group's container.
DAG.PutAdPer Method: Periodically call PutAd method.
DAG.RefreshVisual Method: Update the visual properties of the container.
DAG.LeftPosition Method: Calculates the left position of the container of the DAG object.
DAG.TopPosition Method: Calculates the top position of the container of the DAG object.
DAG.RefreshPosition Method: Refreshe the position (left and top points) of the container.
DAG.RefreshPositionPer Method: Periodically refresh the position.
DAG.StopTimer Method: Stop the timer of a periodic event.
AG.AdBoxRefPoint Method: Determines the reference point on the ad container box.
DAG.WindAnchorPoint Method: Determines the anchor point to align the ad box.
DAG.ScrollCompensate Method: Determines scrolling compensation parameters.
DAG.ChangeAnchorPoint Method: Changes the anchor point and box reference point without changing the position of the ad box.

DAG.isDAG Property: isDAG property is always true for a DAG object.
DAG.name Property: Name of the display ad group.
DAG.ag Property: Underlying AdGrp object.
DAG.put_obj Property: Container Object of this dag.
DAG.put_period Property: Period of the periodic content put (PutAdPer method).
DAG.put_mode Property: The ad selection method.
DAG.put_head Property: put_head is prepended to the content of selected ad in PutAd method.
DAG.put_foot Property: put_head is appended to the content of selected ad in PutAd method.
DAG.put_lasti Property: Contains the index of the last put ad by the methods PutAd and PutAdPer.
DAG.timer Property: Timer IDs are set by periodic events, and used to stop that event later
DAG.left Property: Left position of the container.
DAG.top Property: Top position of the container.
DAG.width Property: Width of the container.
DAG.height Property: Height of the container.
DAG.visible Property: Hide or show the container.
DAG.sxr Property: sxr property is scrolling compensation parameter in horizontal direction.
DAG.syr Property: syr property is scrolling compensation parameter in vertical direction.
DAG.mxr Property: mxr property is mouse pointer alignment parameter in horizontal direction.
DAG.myr Property: myr property is mouse pointer alignment parameter in vertical direction.
DAG.wxr Property: wxr property is window width alignment parameter in horizontal direction.
DAG.wyr Property: wyr property is window height alignment parameter in vertical direction.
DAG.axr Property: axr property is container width alignment parameter in horizontal direction.
DAG.ayr Property: ayr property is container height alignment parameter in vertical direction.
DAG.xoff Property: xoff property is a horizontal position adjustment value.
DAG.yoff Property: yoff property is a vertical position adjustment value.
DAG.pos_period Property: pos_period is the period of position refreshments and used by RefreshPositionPer method.
DAG.pos_pause_refresh Property: If set to true, pos_pause_refresh pauses the refreshing of the position of the container.
DAG.cc_task Property: A string to be evaluated after each successful ad received through cookies.

DAG Class
Definition: Class for displaying and manipulating a group of ads.
Syntax: new DAG(name, ag) ;
Arguments: name: A unique name for this ad group.
ag: AdGrp object. If given, internal ad group will be a copy of ag. Otherwise, an empty AdGrp object is created.
Returns: A new DAG object.
Remarks: The properties of DAG class can be accessed freely.
The preferred name is the display position name for this particular ad group. If the DAG object is loaded from the DynAds server, then its name property is set properly to the display position name by the server. This convention provides a seamless integration among methods of DAG class.
Example:
// Create a new DAG object
var myDAG = new DAG("Position1") ;

DAG.GetAdsFromCookie Method
Definition: Load the ads of this DAG from the cookie set by DynAds server previously.
Syntax: function DAG.GetAdsFromCookie (name, append) ;
Arguments: name: Name to access the cookie. If name is not given, name property of the object is used. Cookies related with this name are name+"Len" and name+"Ad"+i, where i is the index of the ad.
append: If append is true, new retrieved ads are appended to the existing ads of the group. Otherwise old ads are cleared and a new ad group is created with the new ads from cookie.
Returns: Returns true if the named cookie is found and retrieved. Otherwise, it returns false.
Remarks: You must know the base name of the ad cookies in order to retrieve it. DynAds delivery engine uses the display position name for the base name of the cookies. If the named cookie retrieved, then the cookie is deleted so that sub sequent calls to this method for the same named cookie, returns false.
Example:
myDAG.GetAdsFromCookie(null, true) ;

DAG.ReceiveAdCookie Method
Definition: Calls GetAdsFromCookie method until the cookie is received, for on the fly ad retrieval from the DynAds server.
Syntax: function DAG.ReceiveAdCookie(cname, append, vname, cnt) ;
Arguments: cname: Name to access the cookie. If cname is not given, name property of the DAG object is used.
append: If append is true, new retrieved ads are appended to the existing ads of the group. Otherwise old ads are cleared and a new ad group is created with the new ads from cookie.
vname: The name of the DAG object variable. If not given, a guess is done as "dag" + the name property of the object.
cnt: Timeout count. After cnt/4 seconds, if cookie is still not retrieved, the function is aborted.
Returns: None.
Remarks: Call this function after you request an ad cookie from the server. The function calls GetAdsFromCookie periodically with a period of 0.25 seconds. If a cookie is received before the timeout, then it is read into the DAG object and cleared from the list of cookies. In addition, cc_received property is set to true and the content of cc_task property is evaluated.
If a cookie is not retrieved and the time out is expired, then the function aborts.
Example:
// Receive cookie for DispPos1 into object myDAG with time out of 100/4=25 seconds
// Then display the retrieved ad after receiving
MyDAG.cc_task = "MyDag.PutAd(0)" ; 
myDAG.ReceiveAdCookie ("DispPos1", null, "myDAG", 100) ;

DAG.ReqAdCookie Method
Definition: Request an Ad through cookie for on the fly ad retrieval from the DynAds server
Syntax: function DAG.ReqAdCookie(urlqstr) ;
Arguments: urlqstr: Url and Query string for the DynAds delivery engine. This url can be the value of SRC attribute of IMG tag generated by DynAds admin panel HTML generator for ads through cookie option. Or form the query string manually. Refer to DynAds delivery engine manual for more information.
Returns: Returns true, if request is performed successfully.
Remarks: If the IMG element for cookie request was not created before either by WriteCCElem method or by direct HTML instantiation, this method attempts to create it on the fly. The ID of the IMG element is expected to be "cimg"+name (remember, the name property of the DAG object is expected to be the display position name).
After a request is made to the server, cc_received property is set to false.
ReceiveAdCookie method can be called after this function to receive the requested ads.
Example:
// Receive cookie for DispPos1 into object myDAG with time out of 100/4=25 seconds
myDAG = new DAG(DispPos1) ;
var url="http://YourDomain/YourPath/ad.pl?pos=DispPos1&dsp=dim&agn=AdGrp1&sel=rnd"
myDAG.ReqAdCookie(url)
myDAG.ReceiveAdCookie (null, false, "myDAG", 100) ;

DAG.WriteCCElem Method
Definition: Creates the IMG element for ad cookie requests.
Syntax: function DAG.WriteCCElem() ;
Arguments: None.
Returns: None.
Remarks: This method creates the IMG element for cookie requests. The ID of the IMG element is "cimg"+name (remember, the name property of the DAG object is expected to be the display position name). The element is created by a document.write call, so only call this method at page load time. This method is more widely supported by the browsers. On the other hand, if the IMG is to be created after the page load, then do not call this method. Instead, a call to ReqAdCookie method will automatically create the IMG element with a less supported method.
Example:
// Receive cookie for DispPos1 into object myDAG with time out of 100/4=25 seconds
myDAG = new DAG(DispPos1) ;
myDAG.WriteCCElem() ;
var url="http://YourDomain/YourPath/ad.pl?pos=DispPos1&dsp=dim&agn=AdGrp1&sel=rnd"
myDAG.ReqAdCookie(url)
myDAG.ReceiveAdCookie (null, false, "myDAG", 100) ;

DAG.WriteContainer Method
Definition: Writes the container of the ads to the document.
Syntax: function DAG.WriteContainer (cont) ;
Arguments: cont: Initial content of the container. If not given, an empty content is written.
Returns: None.
Remarks:

This function is equivalent to the html tags below

<layer name="layNamePropertyOfDAGObject">
<DIV ID="divNamePropertyOfDAGObject" >
cont
</div></layer>

In addition, put_obj property is initialized by the object of layer/div containers.

WriteContainer method must be called during initial loading of the document, since it writes the containers using document.write().

If another container already on the browser is going to be used, then do not use this function. Instead, initialize the property put_obj with the object of desired container.

Example:
myDAG.WriteContainer("<P>This is the initial content</p>") ;

DAG.Object Method
Definition: Gets the container object of this DAG.
Syntax: function DAG.Object () ;
Arguments: None.
Returns: The container object of DAG.
Remarks: If put_obj property is defined, returns that value. Otherwise, attempts to obtain the container object by calling getObjByID("div"+this.name, "lay"+this.name).
Example:
myDAG.Object().style.border = "thin solid" ;

DAG.PutContent Method
Definition: Puts the given content to this Display Group's container.
Syntax: function DAG.PutContent(cont) ;
Arguments: cont: html content to put.
Returns: None.
Remarks: None.
Example:
myDAG.PutContent("<H1>Hello</h1><P>How are you doing?</p>") ;
...
myDAG.PutContent(myDAG.ag.ads[2].RedHtml()) ;

DAG.GetSelAd Method
Definition: Retrieves the html content of the specified ad in the ad group.
Syntax: function DAG.GetSelAd(adi, oh) ;
Arguments: adi: Index of the ad in the ad group array.
oh: If true, original html of the selected ad is displayed. Otherwise, the re-directed html content is displayed.
Returns: The html of the specified ad prepended by put_head and appended by put_foot.
Remarks: The value of put_head property is always concatenated to the beginning of the content of the selected ad. The value of put_foot property is always appended to the end of the content of the selected ad.
Example:
// Get the redirected content of the second ad in the list appended by a BR tag.
myDAG.put_head = "" ;
myDAG.put_foot = "<BR>" ;
myDag.GetSelAd(1) ;

DAG.PutAd Method
Definition: Displays an Ad in this Display Group's container.
Syntax: function DAG.PutAd(adi, oh) ;
Arguments: adi: If defined, it must be an index to the elements of this.ag.ads. Otherwise, put_mode property is used to detect how to select an ad.
oh: If true, original html of the selected ad is displayed. Otherwise, the re-directed html content is displayed.
Returns: None.
Remarks:

If adi is defined, it must be an integer pointing to an ad in the array this.ag.ads[]. That ad is selected and displayed.

If adi is not defined, then the value of put_mode property is used to select an ad from the underlying ad group.

put_modeAction
DAG_PUT_MODE_FSEQAds are selected sequentially in forward direction (increasing index). If end of list is achieved, the sequence starts from the beginning.
DAG_PUT_MODE_BSEQAds are selected sequentially in backward direction (decreasing index). If the beginning of list is achieved, the sequence starts from the end.
DAG_PUT_MODE_WRANDThe ad to display is selected weighted randomly.
DAG_PUT_MODE_URANDThe ad to display is selected uniform randomly.
DAG_PUT_MODE_ALLAll of the ads in the group are appended starting from index 0 to the end.

The property put_lasti contains the index of the last put ad (except for DAG_PUT_MODE_ALL).

The value of put_head property is always concatenated to the beginning of the content of the selected ads. The value of put_foot property is always appended to the end of the content of the selected ads.

Example:
// Display the second ad in the list
myDag.PutAd(1) ;
// Display the original content of a randomly selected ad
myDag.put_mode = DAG_PUT_MODE_WRAND ;
myDag.PutAd(null, true) ;
// Display all of the ads in the list, separate them by a horizontal ruler
myDag.put_mode = DAG_PUT_MODE_ALL ;
myDag.put_foot = "<HR>" ;
myDag.PutAd() ;

DAG.PutAdPer Method
Definition: Periodically call PutAd method.
Syntax: function DAG.PutAdPer(varname, adi, oh) ;
Arguments: varname: Name of the DAG object in string form.
adi, oh: Parameters of PutAd method to call.
Returns: None.
Remarks: The period is determined by put_period property. If put_period property is 0 or negative, PutAd is called only once.
varname argument must be stringified name of the DAG object.
timer[0] property stores the timer handler to pass to StopTimer method later.
Example:
// Periodically display the ads in forward sequence starting from the ad with index 0.
// Refresh at every 20 seconds
myDag.put_mode = DAG_PUT_MODE_FSEQ ;
myDag.put_lasti = -1 ;
myDag.put_period = 20000 ;
myDag.PutAdPer("myDag") ;

DAG.RefreshVisual Method
Definition: Updates the visual properties of the container.
Syntax: function DAG.RefreshVisual() ;
Arguments: None.
Returns: None.
Remarks: Set the position, left, top, width, height, and visible properties to the container.
Example:
myDag.Object().style.position = "absolute" ; 
myDag.left = 100 ; // 100 pixels from left
myDag.top = 10 ; // 10 pixels from up
myDag.width = 400 ; // 400 pixels in width
myDag.height = "auto" ; // automatic height
myDag.visible = true ; // Make it visible
myDag.RefreshVisual() ; // Apply the settings 

DAG.LeftPosition Method
Definition: Calculates the left position (the distance between left of the window and the left of the container) of the container of the DAG object. The returned result is meaningful if the this.Object().style.position is set to "absolute".
Syntax: function DAG.LeftPosition() ;
Arguments: None.
Returns: The left position in pixels.
Remarks: This function does NOT return the actual position of the container but the position the container will go to, after the next RefreshPosition method call. The left position is calculated as:

docXScroll() * sxr + windWidth() * wxr + MouseX * mxr - widthOfBox * axr + xoff ;

sxr property: is the scrolling compensation parameter. When set to 0, no compensation takes place. When set to 1, full scrolling compensation is done.

wxr property: is horizontal window anchor parameter. When set to 0, container goes to the left. When set to 1, container goes to right.

mxr property: is horizontal mouse pointer anchor parameter. When set to 0, no mouse anchor is used. When set to 1, the container is aligned to the mouse pointer.

axr property: is the ad container alignment parameter to the anchor point. When set to 0, left point of the container is aligned. When set to 1, right edge of container is aligned.

xoff property: is the horizontal anchor offset.

See the methods DAG.AdBoxRefPoint, DAG.WindAnchorPoint, DAG.ScrollCompensate, and DAG.ChangeAnchorPoint for more information on the parameters and a better interface to define position of the container.

Example:
myDag.Object().style.position = "absolute" ; 
myDag.width = 400 ; // 400 pixels in width
myDag.height = "auto" ; // Let height be determined by the browser
myDag.visible = true ; // Make it visible
myDag.RefreshVisual() ; // Apply the settings 
// Container will go to the center of the window horizontally 
// no matter the scrolling is.
myDag.sxr = 1   ; 
myDag.wxr = 0.5 ; 
myDag.mxr = 0   ; 
myDag.xoff = 0  ; 
myDag.axr = 0.5 ; 
document.write("The Left position of the container will be " + 
               myDag.LeftPosition()) ;

DAG.TopPosition Method
Definition: Calculates the top position (the distance between the top of the window and the top of the container) of the container of the DAG object. The returned result is meaningful if the this.Object().style.position is set to "absolute".
Syntax: function DAG.TopPosition() ;
Arguments: None.
Returns: The top position in pixels.
Remarks: This function does NOT return the actual position of the container but the position the container will go to, after the next RefreshPosition method call. The top position is calculated as:

docYScroll() * syr + windHeight() * wyr + MouseY * myr - heightOfBox * ayr + yoff ;

syr property: is the scrolling compensation parameter. When set to 0, no compensation takes place. When set to 1, full scrolling compensation is done.

wyr property: is vertical window anchor parameter. When set to 0, container goes to the top. When set to 1, container goes to the bottom of window.

myr property: is vertical mouse pointer anchor parameter. When set to 0, no mouse anchor is used. When set to 1, the container is aligned to the mouse pointer.

ayr property: is the ad container alignment parameter to the anchor point. When set to 0, top point of the container is aligned. When set to 1, the bottom edge of the container is aligned.

yoff property: is the vertical anchor offset.

See the methods DAG.AdBoxRefPoint, DAG.WindAnchorPoint, DAG.ScrollCompensate, and DAG.ChangeAnchorPoint for more information on the parameters and a better interface to define position of the container.

Example:
myDag.Object().style.position = "absolute" ; 
myDag.width = 400 ; // 400 pixels in width
myDag.height = "auto" ; // Let height be determined by the browser
myDag.visible = true ; // Make it visible
myDag.RefreshVisual() ; // Apply the settings 
// Container will go to the center of the window vertically 
// no matter the scrolling is.
myDag.syr = 1   ; 
myDag.wyr = 0.5 ; 
myDag.myr = 0  ; 
myDag.yoff = 0  ; 
myDag.ayr = 0.5 ; 
document.write("The Top position of the container will be " + 
               myDag.TopPosition()) ;

DAG.RefreshPosition Method
Definition: Refreshes the position (left and top points) of the container.
Syntax: function DAG.RefreshPosition() ;
Arguments: None.
Returns: None.
Remarks:

The left and the top of the ad box are calculated by calling the methods, LeftPosition and TopPosition.

If pos_pause_refresh property is set to true, position refreshing is paused.

See the methods DAG.AdBoxRefPoint, DAG.WindAnchorPoint, DAG.ScrollCompensate, and DAG.ChangeAnchorPoint for more information on the parameters and a better interface to define position of the container.

Example:
myDag.Object().style.position = "absolute" ;
myDag.width = 400 ; // 400 pixels in width
myDag.height = "auto" ; // Let browser determine the height of the box
myDag.visible = true ; // Make it visible
myDag.RefreshVisual() ; // Apply the settings 
// Move container to the upper left corner with scrolling compensation.
myDag.sxr = 1  ; myDag.syr = 1 ;
myDag.wxr = 0  ; myDag.wyr = 0 ;
myDag.mxr = 0  ; myDag.myr = 0 ;
myDag.axr = 0  ; myDag.ayr = 0 ;
myDag.xoff = 0 ; myDag.yoff = 0 ;
myDag.RefreshPosition() ;
...
// User friendly interface: The container follows the mouse, 
// and the mouse pointer is on the center of the container.
myDag.AdBoxRefPoint(DAG_POS_CENTER, DAG_POS_CENTER) ;
myDag.WindAnchorPoint(null, DAG_POS_MOUSE, null,  null, DAG_POS_MOUSE, null) ;
myDag.ScrollCompensate(DAG_POS_NOSCROLL, DAG_POS_NOSCROLL) ;
myDag.RefreshPosition() ;
...
// User friendly interface:
// Move container to the bottom right corner.
myDag.AdBoxRefPoint(DAG_POS_RIGHT, DAG_POS_BOTTOM) ;
myDag.WindAnchorPoint(DAG_POS_RIGHT, null, null,  DAG_POS_BOTTOM, null, null) ;
myDag.ScrollCompensate(DAG_POS_NOSCROLL, DAG_POS_NOSCROLL) ;
myDag.RefreshPosition() ;

DAG.RefreshPositionPer Method
Definition: Periodically refreshes the position by calling RefreshPosition method.
Syntax: function DAG.RefreshPositionPer (varname) ;
Arguments: varname: The name of the variable of the particular DAG object. If not given, a guess is made as "dag"+name property.
Returns: None.
Remarks: The period is determined by pos_period property. If pos_period property is 0 or negative, RefreshPosition is called only once.
varname argument must be stringified name of the DAG object.
timer[1] property stores the timer handler to pass to StopTimer method later.
Example:
myDag.Object().style.position = "absolute" ; 
myDag.width = 400 ; // 400 pixels in width
myDag.height = 300 ; // 300 pixels in height
myDag.visible = true ; // Make it visible
myDag.RefreshVisual() ; // Apply the settings 

// Container goes to bottom center of the screen no matter the scrolling is.
myDag.AdBoxRefPoint(DAG_POS_CENTER, DAG_POS_BOTTOM) ;
myDag.WindAnchorPoint(DAG_POS_CENTER, null, null,  DAG_POS_BOTTOM, null, null) ;
myDag.ScrollCompensate(DAG_POS_NOSCROLL, DAG_POS_NOSCROLL) ;
myDag.pos_per = 100 ; // Refresh the position 10 times in 1 second.
myDag.RefreshPositionPer("myDag") ;

DAG.StopTimer Method
Definition: Stop the timer of a periodic event
Syntax: function DAG.StopTimer (timerno) ;
Arguments: timerno: The index to the timer property. Currently 0 to cancel PutContentPer method, and 1 to cancel RefreshPositionPer method.
Returns: None.
Remarks: None.
Example:
...
myDag.RefreshPositionPer("myDag") ;
...
myDag.StopTimer(1) ;

DAG.AdBoxRefPoint Method
Definition: Determines the reference point on the ad container box.
Syntax: function DAG.AdBoxRefPoint (xr, yr) ;
Arguments: xr: The horizontal alignment ratio. If not null, axr property is set to xr.
yr: The vertical alignment ratio. If not null, ayr property is set to yr.
Returns: None.
Remarks:

This method determines the alignment reference point on the ad container box. The defined reference point will be aligned to the anchor point on the window. For example, if you define the up-left corner of the box as the reference point, and the center of the window as the anchor point, then the up-left corner of the box is going to be aligned to the center of the window after a RefreshPosition method call.

You can use the predefined values for xr and yr
xr (yr) abbreviationvalueMeaning
DAG_POS_LEFT
DAG_POS_TOP
0 Align to the left (top) edge of the box
DAG_POS_QUART0.25 Align to quarter distance (of the width) right from the left edge
Align to quarter distance (of the height) bottom from the top edge
DAG_POS_CENTER0.5Align to the center of the box
DAG_POS_3QUART0.75 Align to quarter distance (of the width) left from the right edge
Align to quarter distance (of the height) up from the bottom edge
DAG_POS_RIGHT
DAG_POS_BOTTOM
1 Align to the right (bottom) edge of the box

Note that the alignment reference point is defined with respect to the width and height of the box. Thus xr and yr are ratios rather than distance in pixels. If you want to define the alignment point on the box in terms of absolute distances, then assign to the xoff and yoff parameters of the object. For example, if you want a reference point 10 pixels horizontally and 50 pixels vertically off the up-left corner, then xoff -= 10 and yoff -= 50 will do that.

Example:
// Set the reference point to the center of the box horizontally and
// the bottom of the box vertically.
myDag.AdBoxRefPoint(DAG_POS_CENTER, DAG_POS_BOTTOM) ;
// Set the reference point some offset left-up from left-top corner.
myDag.AdBoxRefPoint(-0.01, -0.01) ;

DAG.WindAnchorPoint Method
Definition: Determines the anchor point to align the ad box.
Syntax: function DAG.WindAnchorPoint (wxr, mxr, xoff, wyr, myr, yoff) ;
Arguments: wxr: The horizontal window width ratio. If not null, wxr property is set to wxr.
mxr: The horizontal mouse position ratio. If not null, mxr property is set to mxr.
xoff: The horizontal anchor offset. If not null, xoff property is set to xoff.
wyr: The vertical window height ratio. If not null, wyr property is set to wyr.
myr: The vertical mouse position ratio. If not null, myr property is set to myr.
yoff: The vertical anchor offset. If not null, yoff property is set to yoff.
Returns: None.
Remarks:

This method defines an anchor point on the window to which the reference point of the ad box will be aligned. The anchor point can be defined in terms of the window dimensions, the mouse pointer position and absolute distances in pixels.

wxr (wyr) ratio defines the anchor point in terms of window width (height). You can use the predefined values for wxr and wyr
wxr (wyr) abbreviationvalueMeaning
DAG_POS_LEFT
DAG_POS_TOP
0 Anchor to the left (top) edge of the window
DAG_POS_QUART0.25 Anchor to the quarter distance (of the width) right from the left edge of window.
Anchor to the quarter distance (of the height) bottom from the top edge of the window.
DAG_POS_CENTER0.5Anchor to the the center of the window
DAG_POS_3QUART0.75 Anchor to the quarter distance (of the width) left from the right edge of the window.
Anchor to the quarter distance (of the height) up from the bottom edge of the window.
DAG_POS_RIGHT
DAG_POS_BOTTOM
1 Anchor to the the right (bottom) edge of the window.

mxr (myr) ratio defines the anchor point in terms of mouse pointer horizontal (vertical) position. You can use the predefined values for mxr and myr
mxr (myr) abbreviationvalueMeaning
DAG_POS_NOMOUSE0 No mouse position is used for anchor point calculation
DAG_POS_MOUSE1 The position of the mouse pointer is added to the window anchor point.

xoff (yoff) value defines the offset from the window plus mouse anchor position.

Note that 3 values are added up to find the final anchor point.

Example:
// Anchor point on the upper left corner of the window
myDag.WindAnchorPoint(DAG_POS_LEFT, DAG_POS_NOMOUSE, 0,
                      DAG_POS_TOP, DAG_POS_NOMOUSE, 0) ;

// Change anchor point to 10 pixels right and 30 pixels top off the current position
myDag.WindAnchorPoint(null, null, 10, null, null, -30) ;

// Set the anchor point as the mouse pointer: 
myDag.WindAnchorPoint(DAG_POS_LEFT, DAG_POS_MOUSE, 0,
                      DAG_POS_TOP, DAG_POS_MOUSE, 0) ;

// Horizontally follow the mouse, vertically stick near to bottom 
myDag.WindAnchorPoint(DAG_POS_LEFT, DAG_POS_MOUSE, 0,
                      DAG_POS_3QUART, DAG_POS_NOMOUSE, 0) ;

DAG.ScrollCompensate Method
Definition: Determines scrolling compensation parameters.
Syntax: function DAG.ScrollCompensate (xr, yr) ;
Arguments: xr: The horizontal scroll compensation ratio. If not null, sxr property is set to xr.
yr: The vertical scroll compensation ratio. If not null, syr property is set to yr.
Returns: None.
Remarks:

The xr (yr) is zero, then no horizontal (vertical) scrolling compensation is done. The ad box scrolls with the document. If xr is one, full scroll compensation is done. The ad box will keep its position with respect to the anchor point.

You can use the predefined values for xr and yr
xr (yr) abbreviationvalueMeaning
DAG_POS_SCROLL0 No scroll compensation
DAG_POS_NOSCROLL1 Full scroll compensation

Example:
// No scroll horizontally or vertically 
myDag.ScrollCompensate(DAG_POS_NOSCROLL, DAG_POS_NOSCROLL) ;

// Enable  vertical scrolling
myDag.ScrollCompensate(null, DAG_POS_SCROLL) ;

// Sroll slower than than the document horizontally and 
// faster than the document vertically
myDag.ScrollCompensate(0.5, -0.5) ;

DAG.ChangeAnchorPoint Method
Definition: Changes the anchor point and box reference point without changing the position of the ad box
Syntax: function DAG.ChangeAnchorPoint (wxr, mxr, xoff, axr, wyr, myr, yoff, ayr) ;
Arguments: wxr: The horizontal window width ratio. If not null, wxr property is set to wxr.
mxr: The horizontal mouse position ratio. If not null, mxr property is set to mxr.
xoff: The horizontal anchor offset. If not null, xoff property is set to xoff.
axr: The horizontal alignment ratio. If not null, axr property is set to axr.
wyr: The vertical window height ratio. If not null, wyr property is set to wyr.
myr: The vertical mouse position ratio. If not null, myr property is set to myr.
yoff: The vertical anchor offset. If not null, yoff property is set to yoff.
ayr: The vertical alignment ratio. If not null, ayr property is set to ayr.
Returns: None.
Remarks:

This method changes the anchor point and the reference point of the box without changing the current position of the ad box. This is done by adjusting the parameters xoff and yoff accordingly. For example, when you want to implement a drag and drop operation, you change the anchor point from window to mouse but you do not want the user to experience any annoying box movements.

Example:
// Change anchor point to center of the window and 
// reference to the upper left corner of the box
myDag.ChangeAnchorPoint(DAG_POS_CENTER, DAG_POS_NOMOUSE, 0, DAG_POS_LEFT,
                        DAG_POS_CENTER, DAG_POS_NOMOUSE, 0, DAG_POS_TOP) ;
// Enable or Disable Drag and Drop on the ad box function DAG_DDStatus (enable, varname) {
DAG.DDStatus Method
Definition: Enable or Disable Drag and Drop on the ad box.
Syntax: function DAG.DDStatus(enable, varname) ;
Arguments: enable: If true, enables drag and drop operation on the ad box. Otherwise, disables the drag and drop operation.
varname: The name of the variable of the DAG object. If not given a guess is made as "dag"+name property.
Returns: None.
Remarks: If you want to enable drag and drop, do not forget to call RefreshPositionPer with a sufficiently small period to make ad box follow the mouse or bind the RefreshPosition method to the document.onmousemove event through pre-installed GEH class object gehMMove.
Example:
// Enable drag and drop
myDag.DDStatus(true, "myDAG") ;
// Refresh the position sufficiently fast
myDag.pos_per = 50 ; // Refresh the position 20 times in 1 second.
myDag.RefreshPositionPer("myDag") ;
// Or better bind it to the mouse move event
gehMMove.NewHandler ("myDag.RefreshPosition();") ;

DAG.isDAG Property
Definition: Check if this object is a DAG object. isDAG property is always true for a DAG object.

DAG.name Property
Definition:

Name of the display ad group. If you set this property to the name of the display position, and the name of the DAG object variable is "dag"+name, then you do not have to supply a varname argument to some methods (such as RefreshPositionPer method). If the DAG object is loaded to the browser from the DynAds delivery engine, then the name of the variable and the name property of the object is set with respect to these guidelines.

The name property can be assigned during the object creation time or explicitly after the object is created.

The name property is used to generate names for the container elements, cookie communication IMG elements and guessing the name of the variable for some functions.
The name of the container will be "div"+name or "lay"+name.
The name of the cookie IMG element will be "cimg"+name.
The name of the variable is guessed as "dag"+name

Example:
// If display position name is "MainPage468x60" then 
// the name property is assigned while creating the class object
dagMainPage468x60 = new DAG("MainPage468x60") ;
// Equivalently
dagMainPage468x60 = new DAG() ;
dagMainPage468x60.name = "MainPage468x60" ;


DAG.ag Property
Definition: Underlying AdGrp object.

DAG.put_obj Property
Definition: Container Object of this dag.

DAG.put_period Property
Definition: Period of the periodic content put (PutAdPer method). When set to 0, no periodic event takes place.

DAG.put_mode Property
Definition:

The ad selection method.

put_modeAction
DAG_PUT_MODE_FSEQAds are selected sequentially in forward direction (increasing index). If end of list is achieved, the sequence starts from the beginning.
DAG_PUT_MODE_BSEQAds are selected sequentially in backward direction (decreasing index). If the beginning of list is achieved, the sequence starts from the end.
DAG_PUT_MODE_WRANDThe ad to display is selected weighted randomly.
DAG_PUT_MODE_URANDThe ad to display is selected uniform randomly.
DAG_PUT_MODE_ALLAll of the ads in the group are appended starting from index 0 to the end.

DAG.put_head Property
Definition: The content of selected ad is appended to the content of put_head, in PutAd method.

DAG.put_foot Property
Definition: put_head is appended to the content of selected ad in PutAd method.

DAG.put_lasti Property
Definition: Contains the index of the last put ad by the methods PutAd and PutAdPer.

DAG.timer Property
Definition: Timer IDs are set by periodic events, and used to stop that event later
0: PutAdPer, 1: RefreshPositionPer

DAG.left Property
Definition: Left position of the container.

DAG.top Property
Definition: Top position of the container.

DAG.width Property
Definition: Width of the container. This value can be set to "auto" or other non-pixel measures of style sheets before calling RefreshVisual method.

DAG.height Property
Definition: Height of the container. This value can be set to "auto" or other non-pixel measures of style sheets before calling RefreshVisual method.

DAG.visible Property
Definition: Hide or show the document. If set to true, then container is visible. If set to false, the container is invisible.

DAG.sxr Property
Definition: sxr property is scrolling compensation parameter in horizontal direction. When set to 0, no compensation takes place. When set to 1, full scrolling compensation is done. docXScroll()*sxr is added to the left property.

DAG.syr Property
Definition: syr property is scrolling compensation parameter in vertical direction. When set to 0, no compensation takes place. When set to 1, full scrolling compensation is done. docYScroll()*syr is added to the top property.

DAG.mxr Property
Definition: mxr property is mouse pointer alignment parameter in horizontal direction. MouseX*mxr is added to the left property.

DAG.myr Property
Definition: myr property is mouse pointer alignment parameter in vertical direction. MouseY*myr is added to the top property.

DAG.wxr Property
Definition: wxr property is window width alignment parameter in horizontal direction. windWidth*wxr is added to the left property.

DAG.wyr Property
Definition: wyr property is window height alignment parameter in vertical direction. windHeight*wyr is added to the top property.

DAG.axr Property
Definition: axr property is container width alignment parameter in horizontal direction. width*axr is subtracted from the left property. That is, axr=0 means left alignment and axr=1 means right alignment.

DAG.ayr Property
Definition: ayr property is container height alignment parameter in vertical direction. height*ayr is subtracted from the top property. That is, ayr=0 means top alignment and ayr=1 means bottom alignment.

DAG.xoff Property
Definition: xoff property is a horizontal position adjustment value. xoff is added to the left property.

DAG.yoff Property
Definition: yoff property is a vertical position adjustment value. yoff is added to the top property.

DAG.pos_period Property
Definition: pos_period is the period of position refreshments and used by RefreshPositionPer method.

DAG.pos_pause_refresh Property
Definition: If set to true, pos_pause_refresh pauses the refreshing of the position of the container.

DAG.cc_task Property
Definition: A string to be evaluated after each successful ad received through cookies by ReceiveAdCookie method.


Copyright © 2003, RobustHost.com. All Rights Reserved.