var ADF_cset1x = '41|41|16|200|250|32|8|10|0|3|7|0|0'; function ADF_EventObject() { this.ADFtimerArray = new Array(); this.ADFcountArray = new Array(); this.ADFeventArray = new Array(); this.ADFmovieArray = new Array(); this.ADFtimeoutArray = new Array(10,20,-1,4,-1); // this.ADFtimeoutArray[0]=10; this.ADFeventurl=''; //used for inputing vars in banner this.ADFClickurl=''; this.ADFeventurl_start=ADF_ClickEvent; this.cset = ADF_cset1x; //adscript pars this.ADFzero=(new Date().getTime()); function ADFcount(arrayID, CountAdd) { if (CountAdd!=0) this.ADFcountArray[arrayID]= isNaN(this.ADFcountArray[arrayID])?1:(this.ADFcountArray[arrayID]+CountAdd); return isNaN(this.ADFcountArray[arrayID])?0:this.ADFcountArray[arrayID]; } this.ADFcount=ADFcount; function ADFtime(arrayID, ActionType) { var TimerValue=0; var TotalTime = (new Date().getTime()) - this.ADFzero; TotalTime = TotalTime>0?TotalTime/1000:0; var TimerValue = this.ADFtimerArray[arrayID]; if (ActionType=='reset' || (isNaN(TimerValue) && ActionType=='start')) { //start timer this.ADFtimerArray[arrayID]=TotalTime; TimerValue=0; } else if (ActionType=='stamp') { //stamp time from global timer this.ADFtimerArray[arrayID]=0; TimerValue=TotalTime; } else if (ActionType=='keep') { //store time from global timer (and keep) if (isNaN(TimerValue)) { //if not already stopped TimerValue=-(TotalTime); //set to negative elapsed value (negative means stopped, value is elapsed secs) this.ADFtimerArray[arrayID]=TimerValue; } TimerValue=-TimerValue; } else if (ActionType=='stop') { if (TimerValue>=0) { //if not already stopped TimerValue=-(TotalTime-TimerValue); //set to negative elapsed value (negative means stopped, value is elapsed secs) this.ADFtimerArray[arrayID]=TimerValue; } TimerValue=-TimerValue; } else if (ActionType=='start') { if (TimerValue<0) { //only if stopped then restart by subtracting already elapsed secs from present count TimerValue=TotalTime-(-TimerValue); this.ADFtimerArray[arrayID]=TimerValue; } TimerValue=TimerValue<0?-TimerValue:TotalTime-TimerValue; } else { //ActionType=='' TimerValue=(TimerValue<0)?(-TimerValue):(TotalTime-TimerValue); } TimerValue=isNaN(TimerValue)?0:Math.round(TimerValue); //find time return (TimerValue>3600)?3600:TimerValue; // max 1 hour } this.ADFtime=ADFtime; this.ADFtime(0, 'reset'); //Set Banner Load time function ADFtimeout() { //alert('timeout1x'); //send array to adform if (this.ADFtimeoutID>0) this.ADFsend(true); //set next timeout var timeout=this.ADFtimeoutArray[this.ADFtimeoutID]; this.ADFtimeoutID=this.ADFtimeoutID+1; if (timeout>0) window.setTimeout('EventObjectID1x.ADFtimeout()', 1000*timeout); //set timeout or stop when array=-1 } this.ADFtimeout=ADFtimeout; this.ADFtimeoutID = 0; //index points to first timeout this.ADFtimeout(); //set first timeout function ADFurlgen() { var ADFurl =''; for(var i = 0; i < this.ADFeventArray.length; i++) { if (this.ADFeventArray[i].indexOf(",")>-1 && this.ADFcount(i,0)!=0) { //if (ActionType=='clean') {alert(i); ADFclean(i);} ADFurl =ADFurl+'|'+this.ADFeventArray[i]+','+this.ADFcount(i,0)+','+this.ADFtime(i); } } this.ADFclean(); return ADFurl } this.ADFurlgen=ADFurlgen; function ADFclean() { for(var i = 0; i < this.ADFcountArray.length; i++) { if (this.ADFcountArray[i]>=1) this.ADFcountArray[i]=0; } } this.ADFclean=ADFclean; var ADF_IMG1x = new Image(); function ADFsend(SendArray) { var ADFstring=this.ADFurlgen(); var ADFcache=(new Date().getTime()); //Math.floor(1000000000000*Math.random()); if (ADFstring !='') { this.ADFeventurl=(this.ADFeventurl_start+";events="+ADFstring+";"); this.ADFClickurl=";events="+ADFstring; if (SendArray) {ADF_IMG1x.src=this.ADFeventurl;} } } this.ADFsend=ADFsend; function ADFarray(eventType, eventID) { var arrayID=-1; for(var i = 0; i < this.ADFeventArray.length; i++) { if(this.ADFeventArray[i]==(eventType+','+eventID)) { arrayID=i; i=this.ADFeventArray.length;} } if (arrayID==-1) { arrayID=this.ADFeventArray.length; //next free entry in array this.ADFeventArray[arrayID]=(eventType+','+eventID); } return arrayID } this.ADFarray=ADFarray; function ADFeventID1x(procedure, eventstring) { eventstring=unescape(eventstring); var parsarray =new Array(); parsarray = eventstring.split("#|#"); if (parsarray.length!=3) return; var event=parsarray[0]; event=event.toLowerCase(); var eventID=parsarray[1]; var ADFvars=escape(parsarray[2]); var arrayID = 0; if (procedure=='ADFevent'){ if (event=='over'){ // event 3 over arrayID = this.ADFarray(4,eventID); this.ADFtime(arrayID, 'start'); //start mouse out timer arrayID = this.ADFarray(3,eventID); this.ADFcount(arrayID, 1); //count this.ADFtime(arrayID, 'keep'); //store first over time } else if (event=='out') {// event 4 out arrayID = this.ADFarray(4,eventID); //count this.ADFtime(arrayID, 'stop'); //stop mouse-over timer this.ADFcount(arrayID, 1); } else if (event=='timerstart') { // event 20 - no count logged arrayID = this.ADFarray(21,eventID); this.ADFtime(arrayID, 'stamp'); //(re)-start over timer this.ADFcount(arrayID, 1); this.ADFsend(true); } else if (event=='timerstopxxxx') { // event 20 arrayID = this.ADFarray(20,eventID); this.ADFtime(arrayID, 'stop'); //(re)-start over timer this.ADFcount(arrayID, 1); } else if (event=='movietimer') { // event 20 - no count logged arrayID = this.ADFarray(20,eventID); this.ADFcount(arrayID, 1); this.ADFsend(true); //END FIX } else if (event=='point') { // event 21 arrayID = this.ADFarray(21,eventID); this.ADFtime(arrayID, 'stamp'); //(re)-start over timer this.ADFcount(arrayID, 1); this.ADFsend(true); } else if (event=='banchg') { // event 23 arrayID = this.ADFarray(23,eventID); this.ADFtime(arrayID, 'stamp'); //(re)-start over timer this.ADFcount(arrayID, 1); } else if (event=='load') { // event 26 arrayID = this.ADFarray(26,eventID); this.ADFtime(arrayID, 'keep'); //(re)-start over timer this.ADFcount(arrayID, 1); } else if (event=='unload') { // event 27 //NOT USED - IS CONTAINED IN ADFunload FUNCTION FOR SPEED //arrayID = this.ADFarray(27,eventID); //this.ADFtime(arrayID, 'keep'); //store timer value //this.ADFcount(arrayID, 1); //this.ADFsend(true); } } } this.ADFeventID1x=ADFeventID1x function OpenWin(TargetURL, WindowName, features, PopType) { var WinPointer = window.open(TargetURL, WindowName, '_blank'); if(PopType='under') {window.focus();} //return WinPointer; } this.OpenWin = OpenWin; function ADFunload1x(){ //this.ADFeventID1x('ADFevent', 'unload#|#1#|#') this.ADFsend(true); } this.ADFunload1x = ADFunload1x; } // End of ADF_EventObject function var EventObjectID1x = new ADF_EventObject(); function FSCommandID1x(procedure, eventstring){ EventObjectID1x.ADFeventID1x(procedure, eventstring);} function ULCommandID1x(){ //EventObjectID1x.ADFeventID1x('ADFevent', 'unload#|#1#|#'); EventObjectID1x.ADFunload1x(); //setTimeout('',50); } if(typeof(document.getElementById('FlashID1x')) != "undefined" && document.getElementById('FlashID1x')!=null) { if(window.addEventListener){ // Mozilla, Netscape, Firefox //document.getElementById('FlashID1x').addEventListener("FSCommand", FSCommandID1x, false); //object.addEventListener('mouseover', testevent, false); //object.addEventListener('click', testevent, false); } else { // IE document.getElementById('FlashID1x').attachEvent("FSCommand", FSCommandID1x); //object.attachEvent('onmouseover', testevent); //object.attachEvent('onclick', testevent); } } window.onunload = ULCommandID1x;