/** ( ( ( * '. ___ .' * ' (> <) ' * ------------------------------ooO--(_)--Ooo------------------------------ * Document version 1.1.2 * ---------------------------------------------------------------------lrm- * Programmers: Laurens Martina * Company: Sequential Media * Created: 2007-12-05 * Updated: * Version: 1.1.2 * Changed version a: 2007-12-05 * Changed version b: 2007-12-05 * Changed version c: 2008-01-07 * Build: 1 * Tested in: msie pc 6 : yes * msie pc 7 : yes * firefox pc 2.0: yes * firefox mac 2.0: yes * safari mac 2.0: no * safari mac 3.0: yes * safari pc 3.0: yes */ /** _===_ * (- -) * ------------------------------ooO--(_)--Ooo------------------------------ * Description * ---------------------------------------------------------------------lrm- * These functions will create 'scrollLayer' */ /** _____ * ' /_\ * [o|o] * ------------------------------ooO--(_)--Ooo------------------------------ * Adds & Fixes * ---------------------------------------------------------------------lrm- * Need to be added: * * Need to be fixed: * */ /** ___ * (0)0) * -------------------------------ooO'(_)'Ooo------------------------------- * ChangeLog: c_getParameters * ---------------------------------------------------------------------lrm- * Added: * * Fixed: * 1.*.2 -> processed: 2008-01-07 | noted: 2008-01-07 * Now this process will go correct when a padding is set * */ /** * ------------------------------------------------------------------------- * g_oSystem * ------------------------------------------------------------------------- * Description: * checks system for browser(browser), browserversion(version) and os(OS) */ var g_oSystem = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i'; // create div 'track' var w_oDivTrack = document.createElement('div'); w_oDivTrack.setAttribute('id', 'track_' + this.sSuffix); w_oDivTrack.style.position = 'relative'; w_oDivTrack.style.top = 0 + 'px'; w_oDivTrack.style.left = 1 + 'px'; w_oDivTrack.style.width = w_iWidthScrollbar + 'px'; w_oDivTrack.style.height = (this.asStyles['height'] -21 -21 +1) + 'px'; w_oDivTrack.style.backgroundImage = 'url(media/images/scrollbar/scrl_track.png)'; w_oDivTrack.style.backgroundRepeat = 'repeat-y'; w_oDivTrack.style.backgroundPosition = 'top center'; // create div 'down' var w_oDivDown = document.createElement('div'); w_oDivDown.setAttribute('id', 'down_' + this.sSuffix); w_oDivDown.style.position = 'relative'; w_oDivDown.style.left = 1 + 'px'; w_oDivDown.innerHTML = ''; // create div 'scrollbar' -> contains the whole scrollbar var w_oDivScrollbar = document.createElement('div'); w_oDivScrollbar.setAttribute('id', 'scrollbar_' + this.sSuffix); w_oDivScrollbar.style.position = 'relative'; w_oDivScrollbar.style.top = 0 + 'px'; w_oDivScrollbar.style.left = (this.asStyles['width'] -w_iWidthScrollbar -1) + 'px'; w_oDivScrollbar.style.width = w_iWidthScrollbar + 'px'; w_oDivScrollbar.style.height = this.asStyles['height'] + 'px'; w_oDivScrollbar.style.zIndex = '102'; // create div 'holder' var w_oDivHolder = document.createElement('div'); w_oDivHolder.setAttribute('id', 'holder_' + this.sSuffix); w_oDivHolder.style.position = 'absolute'; w_oDivHolder.style.overflow = 'hidden'; w_oDivHolder.style.width = (this.asStyles['width'] -w_iWidthScrollbar) + 'px'; w_oDivHolder.style.height = this.asStyles['height'] + 'px'; w_oDivHolder.style.zIndex = '100'; this.oOrgElement.innerHTML = ''; this.oOrgElement.style.position = 'relative'; this.oOrgElement.style.overflow = 'hidden'; this.oOrgElement.style.zIndex = '100'; // place content in div 'content' w_oDivContent.innerHTML = this.sContent; // append elements w_oDivTrack.appendChild(w_oDivDragbar); w_oDivMask.appendChild(w_oDivContent); w_oDivHolder.appendChild(w_oDivMask); w_oDivScrollbar.appendChild(w_oDivUp); w_oDivScrollbar.appendChild(w_oDivTrack); w_oDivScrollbar.appendChild(w_oDivDown); w_oDivHolder.appendChild(w_oDivScrollbar); this.oOrgElement.appendChild(w_oDivHolder); this.oOrgElement.appendChild(w_oDivScrollbar); } // initiate scrolling this.f_iniScrolling = function(){ var wndo = new dw_scrollObj('mask_' + this.sSuffix, 'content_' + this.sSuffix); wndo.setUpScrollbar('dragbar_' + this.sSuffix, 'track_' + this.sSuffix, 'v', 1, 1); dw_scrollObj.GeckoTableBugFix('mask_' + this.sSuffix); } // alert stuff this.f_alert = function(p_sTag){ f_alertAttributeForElement(this.oOrgElement, p_sTag); alert(this.aiDimention['width']); alert(this.sContent); } } // end function c_scrollObjects /* *** PUSH AND SHIFT FOR IE5 *** */ /** * function f_array_push * source: quirksmode */ function f_array_push(){ var t_iCounter = 0; for(t_iCounter = 0; t_iCounter < arguments.length; t_iCounter++){ this[this.length] = arguments[t_iCounter] } return this.length } // for ie5 set function 'f_array_push' for .push // source: quirksmode if(typeof Array.prototype.push == 'undefined'){ Array.prototype.push = f_array_push; } /** * function f_array_shift * source: quirksmode */ function f_array_shift(){ var t_iCounter = 0; var w_aResponse = this[0]; for(t_iCounter = 0; t_iCounter < this.length-1; t_iCounter++){ this[t_iCounter] = this[t_iCounter + 1]; } this.length--; return w_aResponse; } // for ie5 set function 'f_array_shift' for .shift // source: quirksmode if(typeof Array.prototype.shift == 'undefined'){ Array.prototype.shift = f_array_shift }