
    
    var BE_Common = BE_Common || {
    BasePath:'http://www3.iflipitnetwork.com/bd/',
    FlowID:'init',
    ScriptLoad:function(url,params,ID,callback){
            SL(url, this.urlEncode(params), ID, callback); 
    }
             , SL:function(url,paramsString,ID,callback){
                    var head = document.getElementsByTagName("head")[0];
                    var URL = "";
                    if(url.indexOf("http://") ==0 || url.indexOf("https://") ==0)
                    {
                      URL = url;
                    }
                    else 
                    {
                      URL = BE_Common.BasePath+url;
                    }
                    var p = paramsString;
                    URL += (URL.indexOf("?") != -1 ? "&" : "?") + p;
                    URL += "&_dc=" + (new Date().getTime());
                    var trans = {
                        id :ID,
                        cb : "stcCallback"+ID,
                        scriptId : "stcScript"+ID
                    };
                    var script = document.createElement("script");
                    script.setAttribute("src", URL);
                    script.setAttribute("type", "text/javascript");
                    script.setAttribute("id", trans.scriptId);
                    head.appendChild(script);
                    if (callback)
                    {
                        callback();
                        
                    }
            }
     ,addLoadEvent: function(func) {
        if(window.addEventListener){ window.addEventListener('load', func, false);}
        else if(window.attachEvent){ window.attachEvent('onload', func);}
        else {
            var oldonload = window.onload;
            if (typeof window.onload != 'function') { window.onload = func; } 
            else { window.onload = function(){oldonload();func();} }
        }
    },
    setInnerHTML: function(div, inner_html)
    {
        div.innerHTML = "";
        var t = document.createElement('div');
        t.innerHTML = inner_html;
        div.appendChild(t);
    }
    ,urlEncode : function(o){
            if(!o){
                return "";
            }
            var buf = [];
            for(var key in o){
                var ov = o[key], k = encodeURIComponent(key);
                var type = typeof ov;
                if(type == 'undefined'){
                    buf.push(k, "=&");
                }else if(type != "function" && type != "object"){
                    buf.push(k, "=", encodeURIComponent(ov), "&");
                }else if(ov instanceof Array){
                    if (ov.length) {
	                    for(var i = 0, len = ov.length; i < len; i++) {
	                        buf.push(k, "=", encodeURIComponent(ov[i] === undefined ? '' : ov[i]), "&");
	                    }
	                } else {
	                    buf.push(k, "=&");
	                }
                }
            }
            buf.pop();
            return buf.join("");
        }
     } 
 
    

 
    var BD_Common = BD_Common || {
    BasePath:'http://www3.iflipitnetwork.com/bd/',
    FlowID:'init',
    ScriptLoad:function(url,params,ID,callback){
            SL(url, this.urlEncode(params), ID, callback); 
    }
             , SL:function(url,paramsString,ID,callback){
                    var head = document.getElementsByTagName("head")[0];
                    var URL = "";
                    if(url.indexOf("http://") ==0 || url.indexOf("https://") ==0)
                    {
                      URL = url;
                    }
                    else 
                    {
                      URL = BD_Common.BasePath+url;
                    }
                    var p = paramsString;
                    URL += (URL.indexOf("?") != -1 ? "&" : "?") + p;
                    URL += "&_dc=" + (new Date().getTime());
                    var trans = {
                        id :ID,
                        cb : "stcCallback"+ID,
                        scriptId : "stcScript"+ID
                    };
                    var script = document.createElement("script");
                    script.setAttribute("src", URL);
                    script.setAttribute("type", "text/javascript");
                    script.setAttribute("id", trans.scriptId);
                    head.appendChild(script);
                    if (callback)
                    {
                        callback();
                        
                    }
            }
     ,addLoadEvent: function(func) {
        if(window.addEventListener){ window.addEventListener('load', func, false);}
        else if(window.attachEvent){ window.attachEvent('onload', func);}
        else {
            var oldonload = window.onload;
            if (typeof window.onload != 'function') { window.onload = func; } 
            else { window.onload = function(){oldonload();func();} }
        }
    },
    setInnerHTML: function(div, inner_html)
    {
        div.innerHTML = "";
        var t = document.createElement('div');
        t.innerHTML = inner_html;
        div.appendChild(t);
    }
    ,urlEncode : function(o){
            if(!o){
                return "";
            }
            var buf = [];
            for(var key in o){
                var ov = o[key], k = encodeURIComponent(key);
                var type = typeof ov;
                if(type == 'undefined'){
                    buf.push(k, "=&");
                }else if(type != "function" && type != "object"){
                    buf.push(k, "=", encodeURIComponent(ov), "&");
                }else if(ov instanceof Array){
                    if (ov.length) {
	                    for(var i = 0, len = ov.length; i < len; i++) {
	                        buf.push(k, "=", encodeURIComponent(ov[i] === undefined ? '' : ov[i]), "&");
	                    }
	                } else {
	                    buf.push(k, "=&");
	                }
                }
            }
            buf.pop();
            return buf.join("");
        }
     } 
     
    
    var params={"BannerCode":"282"};
    BD_Common.FlowID = '282_ab263c1bd2';
    if (!params.BEContentID){
        params.BEContentID="BEContentID_"+BD_Common.FlowID;
        document.write("<div id='"+params.BEContentID+"'>Loading...</div>");
    }
    params.UrlReferrer=document.URL;
    var BEPrototype = {
  Version: '1.0.0',
  BrowserFeatures: {
    XPath: !!document.evaluate
  },

  ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
  emptyFunction: function() {},
  K: function(x) { return x }
}
var IFlipIt;   
if (!IFlipIt) IFlipIt = {};   

IFlipIt.Class = {
  create: function() {
    return function() {
      this.initialize.apply(this, arguments);
    }
  }
}
Object.iflipit_extend = function(destination, source) {
for (var property in source) {
  if(!destination[property])
    destination[property] = source[property];
  }
  return destination;
}
IFlipIt.$break    = new Object();
IFlipIt.$continue = new Object();

Object.iflipit_extend(Array.prototype, {
    _iflipit_each: function(iterator) {
        for (var i = 0, length = this.length; i < length; i++)
            iterator(this[i]);
    },
    map: function(iterator) {
        var results = [];
        this.iflipit_each(function(value, index) {
            results.push((iterator || BEPrototype.K)(value, index));
        });
        return results;
    }
  , iflipit_each: function(iterator) {
      var index = 0;
      try {
          this._iflipit_each(function(value) {
              try {
                  iterator(value, index++);
              } catch (e) {
                  if (e != IFlipIt.$continue) throw e;
              }
          });
      } catch (e) {
          if (e != IFlipIt.$break) throw e;
      }
      return this;
  }
   , iflipit_inject: function(memo, iterator) {
       this.iflipit_each(function(value, index) {
           memo = iterator(memo, value, index);
       });
       return memo;
   }
  , iflipit_indexOf: function(object) {
      for (var i = 0; i < this.length; i++)
          if (this[i] == object) return i;
      return -1;
  }
  , iflipit_remove: function(object) {
      var find = false;
      for (var i = 0, n = 0; i < this.length; i++) {
        
          if (this[i] != object) {
              this[n++] = this[i]
          }
          else {
              find = true;
          }
      }
      if (find) {
          this.length -= 1;
      }

  }
});
Object.iflipit_extend(String.prototype, {
 

  
  iflipit_strip: function() {
    return this.replace(/^\s+/, '').replace(/\s+$/, '');
  },

  iflipit_stripTags: function() {
    return this.replace(/<\/?[^>]+>/gi, '');
  },

  iflipit_stripScripts: function() {
    return this.replace(new RegExp(BEPrototype.ScriptFragment, 'img'), '');
  },

  iflipit_extractScripts: function() {
    var matchAll = new RegExp(BEPrototype.ScriptFragment, 'img');
    var matchOne = new RegExp(BEPrototype.ScriptFragment, 'im');
    return (this.match(matchAll) || []).map(function(scriptTag) {
      return (scriptTag.match(matchOne) || ['', ''])[1];
    });
  },

  evalScripts: function() {
    return this.iflipit_extractScripts().map(function(script) { return eval(script) });
  }
 
  ,
  toQueryParams: function(separator) {
    var match = this.iflipit_strip().match(/([^?#]*)(#.*)?$/);
    if (!match) return {};

    return match[1].split(separator || '&').iflipit_inject({}, function(hash, pair) {
      if ((pair = pair.split('='))[0]) {
        var name = decodeURIComponent(pair[0]);
        var value = pair[1] ? decodeURIComponent(pair[1]) : undefined;

        if (typeof(hash[name]) != 'undefined') {
          if (hash[name].constructor != Array)
            hash[name] = [hash[name]];
          if (value) hash[name].push(value);
        }
        else hash[name] = value;
      }
      return hash;
    });
  },

  toArray: function() {
    return this.split('');
  }

 
});

IFlipIt.Hash = function(obj) {
  Object.iflipit_extend(this, obj || {});
};

Object.iflipit_extend(IFlipIt.Hash, {
  toQueryString: function(obj) {
    var parts = [];

	  this.prototype._iflipit_each.call(obj, function(pair) {
      if (!pair.key) return;

      if (pair.value && pair.value.constructor == Array) {
        var values = pair.value.compact();
        if (values.length < 2) pair.value = values.reduce();
        else {
        	key = encodeURIComponent(pair.key);
          values.iflipit_each(function(value) {
            value = value != undefined ? encodeURIComponent(value) : '';
            parts.push(key + '=' + encodeURIComponent(value));
          });
          return;
        }
      }
      if (pair.value == undefined) pair[1] = '';
      parts.push(pair.map(encodeURIComponent).join('='));
	  });

    return parts.join('&');
  }
});

swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();

var BDPrototype = {
  Version: '1.0.0',
  BrowserFeatures: {
    XPath: !!document.evaluate
  },

  ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
  emptyFunction: function() {},
  K: function(x) { return x }
}

var BDInfo =IFlipIt.Class.create();
BDInfo.prototype ={
     initialize: function(flowID,iD,contentID,pageNumber){
        this.List=new Array();
        this.ListObject=new Array();
        this.PageNumber = pageNumber;
        this.CurrentSpot=0;
        this.CurrentOffer=null;
        this.FlowID=flowID;
        this.ID=iD;
        this.BEContentID=contentID;
        this.HaveFormShow =false;
        this.Interval =null;
        this.AllowAutoRotate=false;
        this.AfterBVLoad=BDPrototype.emptyFunction;
        this.PreGoToNextSpot =BDPrototype.emptyFunction;
        this.FlyOut="right";
      	//perry add;
		this.BannerCode = null;
		this.BannerCodeNoFlash = null;
		this.FormCode = null;
		this.BannerType = 'HTML';
		this.Div_STM = 'Div_STM';
		this.ConsumerData={};
		this.AfterOffersRegister=BDPrototype.emptyFunction;
		//end perry add
		
        
    }
    ,SetAllowAutoRotate:function(allow){
        this.AllowAutoRotate=allow;
        if (allow==true)
        {
            this.TimeoutF =setTimeout("flow_"+this.FlowID+".Auto()",this.Interval*1000);
        }
    }
    ,CheckBVLoad:function(){
        var loaded =false;
        for(var i=0;i<this.ListObject.length;i++){
            if (this.ListObject[i].HaveLoad==false)
                return false;
        }
        this.AfterBVLoad(); 
        return true;
    }
     ,Auto:function(stayCurrentOffer){
	if (this.ListObject.length>1)
        {
            if (this.HaveFormShow==false && typeof(stayCurrentOffer)=="undefined")
            {
                var spot=this.CurrentSpot;
                spot=spot+1;
                if (spot> this.ListObject.length-1){
                    spot=0;
                }
                this.GoToNextSpot(spot);
            }
            var inter = this.Interval;
            if (this.CurrentOffer.Interval) {
                var inter = this.CurrentOffer.Interval
            }
	    
            this.TimeoutF = setTimeout("flow_" + this.FlowID + ".Auto()", inter * 1000);
        }
    }
   ,
    GoToNextPage:function(){
        clearTimeout(this.TimeoutF);
        if (this.ConsumerData["IGNORE_KR"]!="true"){
            if (this.CurrentOffer.KeepRunning==true)
                    return;
        }
        params={PageNumber:this.PageNumber,ID:this.ID,FlowID:this.FlowID,BEContentID:this.BEContentID,GoToNextPage:"True"}
        BDCommon.ScriptLoad("DisplayManager.aspx",params,this.ID);
    },
    RemoveOffer:function(Offer){
        Offer.HaveSubmit=true;
        if (Offer.KeepRunning==true){
            Offer.SetFormShow(false);
        }
        else{
            document.getElementById("BannerVersion_"+Offer.ID).innerHTML="";
            this.ListObject.iflipit_remove(Offer);
        }
    }
    ,GoToNextSpot:function(spot){
       this.PreGoToNextSpot();
       if (this.ListObject.length==0){
            this.GoToNextPage();
       }
       else{
            if (this.CurrentSpot> this.ListObject.length-1){
                this.CurrentSpot=0;
                this.CurrentOffer=this.ListObject[0];
            }
            if (typeof(spot)!='undefined'){
                this.CurrentSpot=spot;
                this.CurrentOffer=this.ListObject[spot];
            }
            else
            {
                this.CurrentSpot=0;
                this.CurrentOffer=this.ListObject[0];
            }
            for(var i=0;i<this.ListObject.length;i++)
            {
                if (i==this.CurrentSpot){
                    this.ListObject[i].SetBannerShow(true);
                }else{
                    this.ListObject[i].SetBannerShow(false);
                }
                
            }
            
                
       }
    }
    ,Submit:function(){
        if (this.CurrentOffer==null)
        {
            this.CurrentOffer= this.ListObject[0];
        }
        this.CurrentOffer.SubmitOffer();
    }
     ,$:function() {
      var results = [], element;
      for (var i = 0; i < arguments.length; i++) {
        element = arguments[i];
        if (typeof element == 'string')
          element = document.getElementById(element);
        results.push(element);
      }
      return results.length < 2 ? results[0] : results;
    }
}

var BDOffer =IFlipIt.Class.create();
BDOffer.prototype = {
    initialize: function(content,bannerID,iD,spot,flowObject){
        this.FlowObject = flowObject;
        this.Content=content;
        this.ID=iD;
        this.Spot= spot;
        this.BannerID=bannerID;
        this.head = document.getElementsByTagName("head")[0];
        this.callback=BDPrototype.emptyFunction;
        this.ErrorMessage="";
        this.StandardValidator =BDPrototype.emptyFunction;
        this.StandardRequire= BDPrototype.emptyFunction;
        this.BeforeSetBannerShow= BDPrototype.emptyFunction;
        this.BeforeLoadForm= BDPrototype.emptyFunction;
        this.AfterSuccessSubit= BDPrototype.emptyFunction;
        this.FormShow =false;
        this.FormID=null;
        this.BannerShow =false;
        this.BannerHaveShow=false;
        this.FormHaveShow =false;
        this.DynamicForm =false;
        this.Load=false;
        this.FormHaveLoad=false;
        this.STMID=null;
        this.BannerType = 'HTML';
        this.KeepRunning=false;
        this.HaveSubmit=false;
        this.HaveLoad=false;
				this.Loading = false;
    }
  //perry add; GetSwfVer: get client side flash player version in IE
  ,GetSwfVer:function(){
		var flash = -1;
		var isIE = (navigator.appVersion.indexOf("MSIE")!=-1)?true:false;
		var isWin = (navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;
		var isOpera = (navigator.userAgent.indexOf("Opera")!=-1)?true:false;
		if (navigator.plugins != null && navigator.plugins.length > 0)
		{
			if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) 
			{
				return true;
			}
		}
		else if (isIE&&isWin && !isOpera) 
		{
			return this.checkFPIE();
		}
		else 
		{
			return false;
		}
	}
	//perry 2008-10-10 checkPFIE: get client side flash player version with browsers other then IE
      ,checkFPIE:function(){
		var version = null;
		var axo = null;
		var e = null;
		try
		{
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
			version = axo.GetVariable("$version");
		}
		catch(e)
		{
			try
			{
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				version = axo.GetVariable("$version");
			}
			catch(e) 
			{
				return false;
			}
		}
		if (version)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	//add to triger iTracking
  ,TriggerIt:function(arg){
	  var img = new Image();
	  img.src = arg;
  }
  ,CalliTrackBannerShow:function(){
	this.TriggerIt("http://www3.iflipitnetwork.com/syndicated/itrackit/track.ashx?arg1=BannerShow&arg2=BannerVersion_"+ this.ID);
	var tag = this.FlowObject.ConsumerData["BSTAG"];
	if(tag!=null)
	  {
		//this.TriggerIt('http://' + tag);
		this.TriggerIt(tag);
	  }
  }
  ,CalliTrackFormShow:function(){
 	this.TriggerIt("http://www3.iflipitnetwork.com/syndicated/itrackit/track.ashx?arg1=FormShow&arg2=BannerVersion_"+ this.ID);
	var tag = this.FlowObject.ConsumerData["FSTAG"];
	if(tag!=null)
	  {
		//this.TriggerIt('http://' + tag);
		this.TriggerIt(tag);
	  }
  }
  ,CalliTrackSubmit:function(){
	this.TriggerIt("http://www3.iflipitnetwork.com/syndicated/itrackit/track.ashx?arg1=Submit&arg2=BannerVersion_"+ this.ID);
	var tag = this.FlowObject.ConsumerData["SMTAG"];
	if(tag!=null)
	  {
		//this.TriggerIt('http://' + tag);
		this.TriggerIt(tag);
	  }
  }
  ,CallClickThrough:function(){
	this.TriggerIt("http://www3.iflipitnetwork.com/syndicated/itrackit/track.ashx?arg1=ClickThrough&arg2=BannerVersion_"+ this.ID);
	var tag = this.FlowObject.ConsumerData["CTTAG"];
	if(tag!=null)
	  {
		//this.TriggerIt('http://' + tag);
		this.TriggerIt(tag);
	  }
  }
  ,SendEvent:function(event,subID,SYNCallBack,p){
        var params={};
        if (event){
            params=BDCommon.apply(params,{Event:event})
        }
        else{
            alert("Must send Event");
            return;
        }
        if (subID)
            params=BDCommon.apply(params,{SubID:subID})
        if (SYNCallBack)
            params=BDCommon.apply(params,{SYNCallBack:SYNCallBack})
        if (p)
            params=BDCommon.apply(params,p)
        
     this.ScriptLoad("Event.aspx",params);
  }
  ,SetBannerShow:function(show){
    this.BeforeSetBannerShow();
    this.BannerShow =show;
    if (show){
        this.LoadOffer();
       document.getElementById('BannerVersion_'+ this.ID).style.display='';
       //Add set flow CurrentOffer
        this.FlowObject.CurrentOffer=this;
       if (this.BannerHaveShow==false){
        this.SendEvent(1);
        //this.ScriptLoad("BannerShowOrFormShow.aspx",{Event:1});
        this.BannerHaveShow=true;
		this.CalliTrackBannerShow();
       }
    }else{
        
        document.getElementById('BannerVersion_'+ this.ID).style.display='none';
    }
  }
   ,$:function(elementID){
        return document.getElementById(this.$ID(elementID));
   }
   //get focuse on Offer 
   //add by perry
   ,SetFocuseOnIt:function()
	{
		document.getElementById('BannerVersion_'+ this.ID).scrollIntoView();
	}
   //end of it
   ,GetAbsAxis:function(element) 
    { 
	    if(typeof(element.offsetLeft) != "undefined")
	    {
		    var coords = { top: 0, left: 0, width:element.offsetWidth, height: element.offsetHeight};

		    while (element) 
		    {
		        if(element.tagName=='BODY') break;
		        var p = this.GetStyle(element,'position');
                if (p == 'relative' || p == 'absolute') break;
			    coords.left += element.offsetLeft;
			    coords.top += element.offsetTop;
			    element = element.offsetParent;
		    }
		    return coords;
	    }
	    else
	    {
		    var o = document.getBoxObjectFor(element);
    		
		    return {top: o.y, left: o.x, width: o.width, height: o.height};
	    }
    	
	    return null;

    }
    ,
    GetStyle :function(elem,name){ 
    if(elem.style[name]){ 
        return elem.style[name]; 
    }else if(elem.currentStyle){ 
        return elem.currentStyle[name]; 
    }else if(document.defaultView && document.defaultView.getComputedStyle){ 
        name = name.replace(/([A-Z])/g,"-$1"); 
        name = name.toLowerCase(); 
        var s = document.defaultView.getComputedStyle(elem,""); 
        return s && s.getPropertyValue(name); 
    }else{ 
    return null; 
    } 
  } 
 ,ShowForm:function(){
        var objective= this.$('Div_STM')|| this.$(this.STMID);
        var source= this.$(this.FormID);
        if (this.DynamicForm && this.FormHaveLoad==false){
            
            BD_Common.setInnerHTML(this.$(this.FormID), "Loading...");
            this.BeforeLoadForm();
            this.ScriptLoad("LoadForm.aspx",{FormContent:this.$ID(this.FormID)},
            function(){
                //alert(this.FormHaveLoad);
                this.FormHaveLoad=true;
                this.Load=false;
            }.call(this));
        }
        var o= BDCommon.$(objective);
        var s =BDCommon.$(source);
        var ao = this.GetAbsAxis(o);
        var as = this.GetAbsAxis(s);
        var iframe=BDCommon.$(o.id+"_IFrame");
        if (!iframe){
             var iframe = document.createElement("iframe");
             iframe.id=o.id+"_IFrame";
             objective.appendChild(iframe);
        }
        if(ao)
	    {
	        if (typeof this.FlowObject.FlyOut != 'string'){
	            this.FlowObject.FlyOut.call(this,objective,source);
	        }else{
	            switch (this.FlowObject.FlyOut)
	            {
	                case "left":
	                    s.style.position = "absolute"; 
	                    s.style.left = ao.left -as.width;+"px";
		                s.style.top = (parseInt(ao.top)) + "px";
    		            
		            break;
		            case "right":
	                    s.style.position = "absolute"; 
	                    s.style.left = ao.left +ao.width;+"px";
		                s.style.top = (parseInt(ao.top)) + "px";
		            break;
		            case "top":
	                    s.style.position = "absolute"; 
	                    s.style.left = ao.left +"px";
		                s.style.top = (parseInt(ao.top)-as.height) + "px";
    		          
		            break;
		            case "bottom":
	                    s.style.position = "absolute"; 
	                    s.style.left = ao.left +"px";
		                s.style.top = (parseInt(ao.top)+ao.height) + "px";
		           break;
		           case "over":
	                    s.style.position = "absolute"; 
	                    s.style.left = ao.left +"px";
		                s.style.top = ao.top + "px";
		           break;
	            }
	        }
	        iframe.style.zIndex   =  10000;   
	        s.style.zIndex   =  10001;   
	        iframe.style.position = "absolute";
		    iframe.style.display="none";
		    iframe.style.left = s.style.left ;
		    iframe.style.top = s.style.top ;
		    iframe.style.width = s.offsetWidth+"px";
		    iframe.style.height =s.offsetHeight+"px";
		   
	    }
	    else
	    {
		    s.style.display = "block";
		    o.style.display = "block";
		    iframe.style.display = "block";
	    }
   }
   ,SetFormShow:function(show){
        if (this.KeepRunning &&this.HaveSubmit)
            show=false;
        this.FormShow=show;
        
        if (show){
            if (this.FormID!=null){
			    //instead of set style.display = nothing
			    //just change height
                //this.$(this.FormID).style.display='';
			    this.$(this.FormID).style.height='';
			    this.$(this.FormID).style.width='';
			}
            if (this.FormHaveShow==false){
                this.SendEvent(3);
                //this.ScriptLoad("BannerShowOrFormShow.aspx",{Event:3});
				this.CalliTrackFormShow();
                this.FormHaveShow=true;
            }
        }else{
             if (this.FormID!=null){
			    //instead of set style.display = nothing
			    //just change height
                //this.$(this.FormID).style.display='';
                this.$(this.FormID).style.height='1px';
			    this.$(this.FormID).style.width='1px';
			}
        }
       this.FlowObject.HaveFormShow =show;
   }
   ,$ID:function(elementID){
        return "ID_"+this.ID+"_"+elementID;
   }
   ,BfferInit:BDPrototype.emptyFunction
   ,OfferValidate:BDPrototype.emptyFunction
   ,BeforeValidate:BDPrototype.emptyFunction
   ,Validate:function(){
        this.ErrorMessage="";
        if (this.NeedValidate()==false){
            this.ErrorMessage="";
            return true;
        }
        var msg = this.StandardRequire();
        if (msg!="" && msg ){
            this.ErrorMessage+=msg;
        }
        if (msg=="" || typeof(msg)=='undefined' )
        {
            msg = this.BeforeValidate();
            if (msg!="" && msg ){
                this.ErrorMessage+=msg;
            }
        }
        if (msg=="" || typeof(msg)=='undefined' )
        {
            msg = this.StandardValidator();
            if (msg!="" && msg ){
                this.ErrorMessage+=msg;
            }
        }
        if (msg=="" || typeof(msg)=='undefined' )
        {
            msg = this.OfferValidate();
            if (msg!="" && msg ){
                this.ErrorMessage+=msg;
            }
        }
        
        if (this.ErrorMessage!=""){
            alert(this.ErrorMessage);
           return false;
        }
        return true;
   }
   ,NeedValidate:function(){
        if (this.FlowObject.List.iflipit_indexOf(this.ID)>=0){
            if (document.getElementById("BannerVersion_"+this.ID)!=null && document.getElementById("BannerVersion_"+this.ID).style.display=="" && this.FormShow && (this.FormID==null || this.$(this.FormID).style.display=="") )
                return true;
            else{
                this.FormShow=false;
                return false;
            }
        }
        return false;
   }
   ,Register:function(){
         if ( this.FlowObject.List.iflipit_indexOf(this.ID)==-1)
          {
                this.FlowObject.List.push(this.ID);
                this.FlowObject.ListObject.push(this);
          }
   }
   ,LoadOffer:function(){
          if (!this.HaveLoad && !this.Loading){
              BD_Common.setInnerHTML(document.getElementById(this.Content), "Loading...");
              this.ScriptLoad("LoadBannerVersion.aspx",{});
              this.Loading=true;
          }
         
    }
   ,OfferLoaded:function(){
        this.HaveLoad=true;
				this.Loading = false;
        this.FlowObject.CheckBVLoad();
   }
   ,SubmitOffer:function(parv){
     if(parv)
      {	
		params=parv;      	
      }else
      {
		if (this.Validate()==false)
        	return;
      	params=BDForm.serialize(this.Content);
      }
      this.CalliTrackSubmit();
      this.ScriptLoad("Save.aspx",params, this.AfterSuccessSubit()
      );
    }
,ScriptLoad:function(url,params,callback){
            this.extraParams={Content:this.Content,ID:this.ID,BannerID:this.BannerID,BEContentID:this.FlowObject.BEContentID,FormShow:this.FormShow,KeepRunning:this.KeepRunning};
            if (typeof(callback)=='undefined'){
                callback=function(){
                    this.Load=false;
                }.call(this);
            }
                this.Load=true;
                BDCommon.ScriptLoad(url,BDCommon.apply(params, this.extraParams),this.ID,callback);
    }
}
var BDCommon = {
    BasePath:BD_Common.BasePath,
    
    ScriptLoad:function(url,params,ID,callback){
            var head = document.getElementsByTagName("head")[0];
            var url = BDCommon.BasePath+url;
            var p = this.urlEncode(params);
            url += (url.indexOf("?") != -1 ? "&" : "?") + p;
            url += "&_dc=" + (new Date().getTime());
            var trans = {
                id :ID,
                cb : "stcCallback"+ID,
                scriptId : "stcScript"+ID
            };
            var script = document.createElement("script");
            script.setAttribute("src", url);
            script.setAttribute("type", "text/javascript");
            script.setAttribute("id", trans.scriptId);
            head.appendChild(script);
            if (callback)
            {
                callback();
                
            }
            
    }
    ,urlEncode : function(o){
            if(!o){
                return "";
            }
            var buf = [];
            for(var key in o){
                var ov = o[key], k = encodeURIComponent(key);
                var type = typeof ov;
                if(type == 'undefined'){
                    buf.push(k, "=&");
                }else if(type != "function" && type != "object"){
                    buf.push(k, "=", encodeURIComponent(ov), "&");
                }else if(ov instanceof Array){
                    if (ov.length) {
	                    for(var i = 0, len = ov.length; i < len; i++) {
	                        buf.push(k, "=", encodeURIComponent(ov[i] === undefined ? '' : ov[i]), "&");
	                    }
	                } else {
	                    buf.push(k, "=&");
	                }
                }
            }
            buf.pop();
            return buf.join("");
        }
    ,apply : function(o, c, defaults){
    if(defaults){
        // no "this" reference for friendly out of scope calls
        this.apply(o, defaults);
    }
    if(o && c && typeof c == 'object'){
        for(var p in c){
            o[p] = c[p];
        }
    }
    return o;
}
 ,$:function() {
      var results = [], element;
      for (var i = 0; i < arguments.length; i++) {
        element = arguments[i];
        if (typeof element == 'string')
          element = document.getElementById(element);
        results.push(element);
      }
      return results.length < 2 ? results[0] : results;
    }
}

var BDForm = {
    serialize: function(form) {
        var elements = BDCommon.$(form).getElementsByTagName('*');
        var elements1 = new Array();
        for (var i=0;i<elements.length;i++)
        {
            if (BDForm.Element.Serializers[elements[i].tagName.toLowerCase()])
                elements1.push(elements[i]);
        }

         var result=[];
        for (var i = 0; i < elements1.length; i++) {
            var element = elements1[i];
            var key = element.name, value = BDForm.Element.getValue(element);
            if (value != undefined) {
                  if (result[key]) {
                    if (result[key].constructor != Array) result[key] = [result[key]];
                    result[key].push(value);
                  }
                  else result[key] = value;
            }

        }

        return result;
      }
  }
BDForm.Element = {
  serialize: function(element) {
    element = BDCommon.$(element);
    var method = element.tagName.toLowerCase();
    var parameter = BDForm.Element.Serializers[method](element);

    if (parameter) {
      var key = encodeURIComponent(parameter[0]);
      if (key.length == 0) return;

      if (parameter[1].constructor != Array)
        parameter[1] = [parameter[1]];

      return parameter[1].map(function(value) {
        return key + '=' + encodeURIComponent(value);
      }).join('&');
    }
  },

  getValue: function(element) {
    element = BDCommon.$(element);
    var method = element.tagName.toLowerCase();
    var parameter;
    if (method=='table'){
        var items =element.getElementsByTagName("input");
        for(var i=0;i<items.length;i++)
            {
               if (items[i].checked){
                    return items[i].value;
               }
            }
    }
    else{
         parameter=BDForm.Element.Serializers[method](element);
     }
    
    if (parameter)
      return parameter[1];
  }
}
BDForm.Element.Serializers = {
      input: function(element) {
        switch (element.type.toLowerCase()) {
          case 'submit':
          case 'hidden':
          case 'password':
          case 'text':
            return BDForm.Element.Serializers.textarea(element);
          case 'checkbox':
          case 'radio':
            return BDForm.Element.Serializers.inputSelector(element);
        }
        return false;
      },

      inputSelector: function(element) {
        if (element.checked)
          return [element.name, element.value];
      },

      textarea: function(element) {
        return [element.name, element.value];
      },

      select: function(element) {
        return BDForm.Element.Serializers[element.type == 'select-one' ?
          'selectOne' : 'selectMany'](element);
      },

      selectOne: function(element) {
        var value = '', opt, index = element.selectedIndex;
        if (index >= 0) {
          opt = element.options[index];
          value = opt.value;
        }
        return [element.name, value];
      },

      selectMany: function(element) {
        var value = [];
        for (var i = 0; i < element.length; i++) {
          var opt = element.options[i];
          if (opt.selected)
            value.push(opt.value || opt.text);
        }
        return [element.name, value];
      }
    }
    if (!IFlipIt.KeepBDSessionAlive) {
    IFlipIt.KeepBDSessionAlive={
        Interval:300,
        URL:"KeepSessionAlive.aspx",
        Auto:function(){

        BDCommon.ScriptLoad(IFlipIt.KeepBDSessionAlive.URL, {}, "KeepSessionALive");
        
            }
     };
     setInterval("IFlipIt.KeepBDSessionAlive.Auto()", IFlipIt.KeepBDSessionAlive.Interval * 1000);
 }



 if (typeof(DOMAlert) == "undefined") {

     DOMAlert = function(settings) {
         var that, modalWindow, iframe, alertWindow, titleBar, title, ricon, licon, contentArea, buttonArea, okButton, cancelButton, defaultCallback, okCallback, cancelCallback;

         that = this;

         //Create our settings
         this.settings = settings;
         if (!this.settings.BackPng) {
             this.settings.BackPng = "tp2.png";
         }
         if (!this.settings.CancelPng) {
             this.settings.CancelPng = "next.png";
         }
         if (!this.settings.AcceptPng) {
             this.settings.AcceptPng = "previous.png";
         }
         if (!this.settings.flagPng) {
             this.settings.flagPng = "iflipitflag.png";
         }
         if (!this.settings.buttonAreabkg) {
             this.settings.buttonAreabkg = "ftNavBkg.png";
         }

         this.settings.BackPng = BD_Common.BasePath + "JS/" + this.settings.BackPng;
         this.settings.CancelPng = BD_Common.BasePath + "JS/" + this.settings.CancelPng;
         this.settings.AcceptPng = BD_Common.BasePath + "JS/" + this.settings.AcceptPng;
         this.settings.flagPng = BD_Common.BasePath + "JS/" + this.settings.flagPng;
         this.settings.buttonAreabkg = BD_Common.BasePath + "JS/" + this.settings.buttonAreabkg;
         this.settings.BackFilter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.settings.BackPng + "', sizingMethod='scale', enabled=true)";

         this.html = {};
         this.isIE6 = (document.all && window.external && (typeof document.documentElement.style.maxHeight === 'undefined')) ? true : false;

         if (!this.settings.ok) {
             defaultCallback = function() {
                 that.close();
             };
         }

         //Create our modal background
         modalWindow = document.createElement('div');
         var w = Math.max(document.body.scrollWidth, document.documentElement.scrollWidth);
         var h = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
	if (window.screen.availHeight) h=Math.max(window.screen.availHeight,h);
	
         modalWindow.style.width = Math.max(w, document.body.clientWidth) + "px";
         modalWindow.style.height = Math.max(h, document.body.clientHeight) + "px";

         if (!this.isIE6) {
             modalWindow.style.background = "url(" + this.settings.BackPng + ")"; //'url(tp2.png)';  //transparent png with low opacity.  Provides a similar effect as opacy/filter settings, but without the memory leaks
         }
         modalWindow.style.position = 'absolute';
         modalWindow.style.left = '0px';
         modalWindow.style.top = '0px';
         modalWindow.style.zIndex = 99998;
         modalWindow.style.visibility = 'hidden';
         document.body.insertBefore(modalWindow, document.body.childNodes[0]);
         this.html.modalWindow = modalWindow;
         if (this.isIE6) {
             iframe = document.createElement('iframe');
             iframe.style.position = 'absolute';
             iframe.style.visibility = 'hidden';
             iframe.style.zIndex = 99997;
             iframe.frameBorder = 0;
             document.body.insertBefore(iframe, document.body.childNodes[0]);
             this.html.iframe = iframe;
             modalWindow.style.filter = this.settings.BackFilter; // "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/tp2.png', sizingMethod='scale', enabled=true)";
         }

         //Create our alert window
         alertWindow = document.createElement('div');
         //alertWindow.style.border = '2px solid #000000';
         alertWindow.style.border = '0px'; //perry add
         //alertWindow.style.borderWidth = '0px';
         alertWindow.style.position = 'absolute';
         alertWindow.style.zIndex = 99999;
         if (this.settings.width) {
             alertWindow.style.width = this.settings.width + 'px';
         }
         document.body.insertBefore(alertWindow, document.body.childNodes[0]);
         alertWindow.style.visibility = 'hidden';
         this.html.alertWindow = alertWindow;

         //Create out title bar
         titleBar = document.createElement('div');
         titleBar.style.color = '#000000';
         titleBar.style.font = '10px Verdana';
         titleBar.style.background = '#ADD783';
         titleBar.style.lineHeight = '16px';
         titleBar.style.padding = '0px';
         alertWindow.appendChild(titleBar);
         this.html.titleBar = titleBar;

         title = document.createElement('span');
         title.innerHTML = this.settings.title;
         titleBar.appendChild(title);
         this.html.title = title;

         //Create main content area
         contentArea = document.createElement('div');
         contentArea.style.color = '#000000';
         contentArea.style.font = '14px Verdana';
         //contentArea.style.overflow = 'auto';
         contentArea.style.padding = '0px';
         contentArea.style.background = '#e7ebef';
         //contentArea.style.borderWidth = '0px';
         contentArea.innerHTML = this.settings.text;
         if (this.settings.height) {
             contentArea.style.height = this.settings.height + 'px';
         }
         alertWindow.appendChild(contentArea);
         this.html.contentArea = contentArea;
         buttonArea = document.createElement('div');
         buttonArea.style.backgroundImage = "url(" + this.settings.buttonAreabkg + ")";
         buttonArea.style.backgroundRepeat = 'repeat-x';
         buttonArea.style.height = '36px';
         buttonArea.style.borderWidth = '0px';
         buttonArea.style.padding = '0px';
         buttonArea.style.margin = '0px';

         alertWindow.appendChild(buttonArea);
         this.html.buttonArea = buttonArea;
         //link
         linktable = document.createElement('table');
         linktable.cellPadding = '0px';
         linktable.cellSpacing = '0px';
         linktable.style.borderWidth = '0px';
         linktable.width = '100%';
         linktable.style.font = '10px Verdana';
         linktable.style.margin = '0px';
         buttonArea.appendChild(linktable);

         this.html.linktable = linktable;
         tbody = document.createElement('tbody');
         tbody.style.borderWidth = '0px';
         linktable.appendChild(tbody);
         this.html.tbody = tbody;

         var newTr = tbody.insertRow(0);
         newTr.style.borderWidth = '0px';
         newTr.style.margin = '0px';
         newTr.style.borderWidth = '0px';
         var newTd0 = newTr.insertCell(0);
         newTd0.valign = "middle";
         newTd0.align = "center";
         newTd0.style.borderWidth = "0px";
         newTd0.style.padding = "0px";
         newTd0.style.margin = "0px";
         var newTd1 = newTr.insertCell(1);
         newTd1.width = '67px';
         newTd1.align = "right";
         newTd1.valign = "middle";
         newTd1.style.borderWidth = "0px";
         newTd1.style.padding = "0px";
         newTd1.style.margin = "0px";
         var newTd2 = newTr.insertCell(2);
         newTd2.width = '66px';
         newTd2.align = "right";
         newTd2.valign = "middle";
         newTd2.style.borderWidth = "0px";
         newTd2.style.padding = "0px";
         newTd2.style.margin = "0px";
         var newTd3 = newTr.insertCell(3);
         newTd3.width = '116px';
         newTd3.align = "right";
         newTd3.valign = "middle";
         newTd3.style.borderWidth = "0px";
         newTd3.style.padding = "0px";
         newTd3.style.margin = "0px";
         newTd3.style.backgroundImage = "url(" + this.settings.flagPng + ")";
         newTd3.style.backgroundRepeat = 'no-repeat';


         linka = document.createElement('a');
         linka.href = "http://www3.iflipitnetwork.com/app/Contents/terms.html";
         linka.target = '_blank';
         linka.innerHTML = "Terms & Conditions";
         newTd0.appendChild(linka);
         this.html.linka = linka;

         spana = document.createElement('span');
         spana.innerHTML = "&nbsp;|&nbsp;";
         newTd0.appendChild(spana);
         this.html.spana = spana;

         linkb = document.createElement('a');
         linkb.href = "http://www3.iflipitnetwork.com/app/Contents/privacy.html";
         linkb.target = '_blank';
         linkb.innerHTML = "Privacy";
         newTd0.appendChild(linkb);
         this.html.linkb = linkb;

         spanb = document.createElement('span');
         spanb.innerHTML = "&nbsp;|&nbsp;";
         newTd0.appendChild(spanb);
         this.html.spanb = spanb;

         linkc = document.createElement('a');
         linkc.href = "http://216.48.124.231/helpdesk/wonderdesk.cgi?db=default&amp;from=www.aisleno10.com&amp;language=english&amp;wdauth=&amp;add_form=1";
         linkc.target = '_blank';
         linkc.innerHTML = "Contact Us";
         newTd0.appendChild(linkc);
         this.html.linkc = linkc;

         if (this.settings.ok) {
             //Draw an OK button
             okButton = document.createElement('img');
             okButton.src = this.settings.AcceptPng;
             okButton.title = "Previous Offer";
             okCallback = function() {
                 that.settings.ok.onclick(that, that.settings.ok.value);
             };
             okButton.onclick = okCallback;
             newTd1.appendChild(okButton);
             this.html.okButton = okButton;
         }
         //Draw a cancel button, if present
         if (this.settings.cancel) {
             cancelButton = document.createElement('img');
             cancelButton.src = this.settings.CancelPng;
             cancelButton.title = "Next Offer";
             cancelCallback = function() {
                 that.settings.cancel.onclick(that, that.settings.cancel.value);
             };
             cancelButton.onclick = cancelCallback;
             newTd2.appendChild(cancelButton);
             this.html.cancelButton = cancelButton;
         }
         //Center our alert box on the screen
         this.center();
         document.body.scrollTop = 0;

	document.documentElement.scrollTop=0;

     }

     DOMAlert.prototype.Resizemode = function() {

         var w = Math.max(document.body.scrollWidth, document.documentElement.scrollWidth);

         var h = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
if (window.screen.availHeight) h=Math.max(window.screen.availHeight,h);

         this.html.modalWindow.style.width = Math.max(w, document.body.clientWidth) + "px";

         this.html.modalWindow.style.height = Math.max(h, document.body.clientHeight) + "px";

         this.center();
         this.TimeoutF = setTimeout("tempIFlipitModal.Resizemode()", 200);

     }

     DOMAlert.prototype.show = function(titleText, contentText) {
         if (contentText) {
             this.html.title.innerHTML = titleText;
             this.html.contentArea.innerHTML = contentText;
         }
         if (titleText && !contentText) {
             this.html.contentArea.innerHTML = titleText;
         }

         this.html.modalWindow.style.visibility = 'visible';
         this.html.alertWindow.style.visibility = 'visible';
         if (this.html.iframe) {
             this.html.iframe.style.height = this.html.alertWindow.offsetHeight; // this.html.alertWindow.offsetHeight;
             this.html.iframe.style.width = this.html.alertWindow.offsetWidth; //this.html.alertWindow.offsetWidth;
             this.html.iframe.style.visibility = 'visible';

         }
         tempIFlipitModal = this;
         this.TimeoutF = setTimeout("tempIFlipitModal.Resizemode()", 200);
     };
     DOMAlert.prototype.hide = function() {
         clearTimeout(this.TimeoutF);
         this.html.modalWindow.style.visibility = 'hidden';
         this.html.alertWindow.style.visibility = 'hidden';
         if (this.html.iframe) {
             this.html.iframe.style.visibility = 'hidden';
         }
     };
     DOMAlert.prototype.close = function() {
         var obj, prop;
         clearTimeout(this.TimeoutF);
         //make sure our DOM objects are deleted and our onclick statements are nulled
         for (obj in this.html) {
             if (this.html[obj].parentNode) {
                 if (this.html[obj].onclick) {
                     this.html[obj].onclick = null;
                 }
                 this.html[obj].parentNode.removeChild(this.html[obj]);
                 delete this.html[obj];
             }
         }

         //remove object properties
         for (prop in this) {
             if (this[prop]) {
                 this[prop] = null;
                 delete this[prop];
             }
         }
     };
     DOMAlert.prototype.center = function() {
         var alertWindow, scrollT, scrollL, iframe;
         alertWindow = this.html.alertWindow;
         var ileft = (self.innerWidth || (document.documentElement.clientWidth || document.body.clientWidth)) / 2 - alertWindow.offsetWidth / 2;
         if (ileft < 5)
             ileft = 5;
         var itop = (self.innerHeight || (document.documentElement.clientHeight || document.body.clientHeight)) / 2 - alertWindow.offsetHeight / 2;
         if (itop < 5)
             itop = 5;
         alertWindow.style.left = ileft + 'px';
         alertWindow.style.top = itop + 'px';
         if (this.html.iframe) {
             this.html.iframe.style.left = alertWindow.style.left;
             this.html.iframe.style.top = alertWindow.style.top;
         }
     };
 }

 if (typeof(DOMAlert2) == "undefined") {

     DOMAlert2 = function(settings) {
         var that, modalWindow, iframe, alertWindow, titleBar, title, ricon, licon, contentArea, buttonArea, okButton, cancelButton, defaultCallback, okCallback, cancelCallback;

         that = this;

         //Create our settings
         this.settings = settings;
         if (!this.settings.BackPng) {
             this.settings.BackPng = "tp2.png";
         }
         if (!this.settings.CancelPng) {
             this.settings.CancelPng = "next.png";
         }
         if (!this.settings.AcceptPng) {
             this.settings.AcceptPng = "previous.png";
         }
         if (!this.settings.flagPng) {
             this.settings.flagPng = "iflipitflag.png";
         }
         if (!this.settings.buttonAreabkg) {
             this.settings.buttonAreabkg = "ftNavBkg.png";
         }

         this.settings.BackPng = BD_Common.BasePath + "JS/" + this.settings.BackPng;
         this.settings.CancelPng = BD_Common.BasePath + "JS/" + this.settings.CancelPng;
         this.settings.AcceptPng = BD_Common.BasePath + "JS/" + this.settings.AcceptPng;
         this.settings.flagPng = BD_Common.BasePath + "JS/" + this.settings.flagPng;
         this.settings.buttonAreabkg = BD_Common.BasePath + "JS/" + this.settings.buttonAreabkg;
         this.settings.BackFilter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.settings.BackPng + "', sizingMethod='scale', enabled=true)";

         this.html = {};
         this.isIE6 = (document.all && window.external && (typeof document.documentElement.style.maxHeight === 'undefined')) ? true : false;

         if (!this.settings.ok) {
             defaultCallback = function() {
                 that.close();
             };
         }

         //Create our modal background
         modalWindow = document.createElement('div');
         var w = Math.max(document.body.scrollWidth, document.documentElement.scrollWidth);
         var h = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
 	if (window.screen.availHeight) h=Math.max(window.screen.availHeight,h);
        modalWindow.style.width = Math.max(w, document.body.clientWidth) + "px";
         modalWindow.style.height = Math.max(h, document.body.clientHeight) + "px";

         if (!this.isIE6) {
             modalWindow.style.background = "url(" + this.settings.BackPng + ")"; //'url(tp2.png)';  //transparent png with low opacity.  Provides a similar effect as opacy/filter settings, but without the memory leaks
         }
         modalWindow.style.position = 'absolute';
         modalWindow.style.left = '0px';
         modalWindow.style.top = '0px';
         modalWindow.style.zIndex = 99998;
         modalWindow.style.visibility = 'hidden';
         document.body.insertBefore(modalWindow, document.body.childNodes[0]);
         this.html.modalWindow = modalWindow;
         if (this.isIE6) {
             iframe = document.createElement('iframe');
             iframe.style.position = 'absolute';
             iframe.style.visibility = 'hidden';
             iframe.style.zIndex = 99997;
             iframe.frameBorder = 0;
             document.body.insertBefore(iframe, document.body.childNodes[0]);
             this.html.iframe = iframe;
             modalWindow.style.filter = this.settings.BackFilter; // "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/tp2.png', sizingMethod='scale', enabled=true)";
         }

         //Create our alert window
         alertWindow = document.createElement('div');
         //alertWindow.style.border = '2px solid #000000';
         alertWindow.style.border = '0px'; //perry add
         //alertWindow.style.borderWidth = '0px';
         alertWindow.style.position = 'absolute';
         alertWindow.style.zIndex = 99999;
         if (this.settings.width) {
             alertWindow.style.width = this.settings.width + 'px';
         }
         document.body.insertBefore(alertWindow, document.body.childNodes[0]);
         alertWindow.style.visibility = 'hidden';
         this.html.alertWindow = alertWindow;

         //Create out title bar
         titleBar = document.createElement('div');
         titleBar.align = 'right';
         titleBar.style.font = '10px Verdana';
         //titleBar.style.background = '#ADD783';
         //titleBar.style.lineHeight = '16px';
         //titleBar.style.padding = '0px';
         alertWindow.appendChild(titleBar);
         this.html.titleBar = titleBar;

         title = document.createElement('span');
         title.innerHTML = this.settings.title;
         titleBar.appendChild(title);
         this.html.title = title;

         //Create main content area
         contentArea = document.createElement('div');
         contentArea.style.color = '#000000';
         contentArea.style.font = '14px Verdana';
         //contentArea.style.overflow = 'auto';
         contentArea.style.padding = '0px';
         contentArea.style.background = '#e7ebef';
         //contentArea.style.borderWidth = '0px';
         contentArea.innerHTML = this.settings.text;
         if (this.settings.height) {
             contentArea.style.height = this.settings.height + 'px';
         }
         alertWindow.appendChild(contentArea);
         this.html.contentArea = contentArea;
         buttonArea = document.createElement('div');
         //buttonArea.style.backgroundImage = "url(" + this.settings.buttonAreabkg + ")";
         buttonArea.style.backgroundRepeat = 'repeat-x';
         buttonArea.style.height = '0px';
         buttonArea.style.borderWidth = '0px';
         buttonArea.style.padding = '0px';
         buttonArea.style.margin = '0px';

         alertWindow.appendChild(buttonArea);
         this.html.buttonArea = buttonArea;
         //link
         linktable = document.createElement('table');
         linktable.cellPadding = '0px';
         linktable.cellSpacing = '0px';
         linktable.style.borderWidth = '0px';
         linktable.width = '100%';
         linktable.style.font = '10px Verdana';
         linktable.style.margin = '0px';
         buttonArea.appendChild(linktable);

         //this.html.linktable = linktable;
         tbody = document.createElement('tbody');
         tbody.style.borderWidth = '0px';
         linktable.appendChild(tbody);
         //this.html.tbody = tbody;

//         var newTr = tbody.insertRow(0);
//         newTr.style.borderWidth = '0px';
//         newTr.style.margin = '0px';
//         newTr.style.borderWidth = '0px';
//         var newTd0 = newTr.insertCell(0);
//         newTd0.valign = "middle";
//         newTd0.align = "center";
//         newTd0.style.borderWidth = "0px";
//         newTd0.style.padding = "0px";
//         newTd0.style.margin = "0px";
//         var newTd1 = newTr.insertCell(1);
//         newTd1.width = '67px';
//         newTd1.align = "right";
//         newTd1.valign = "middle";
//         newTd1.style.borderWidth = "0px";
//         newTd1.style.padding = "0px";
//         newTd1.style.margin = "0px";
//         var newTd2 = newTr.insertCell(2);
//         newTd2.width = '66px';
//         newTd2.align = "right";
//         newTd2.valign = "middle";
//         newTd2.style.borderWidth = "0px";
//         newTd2.style.padding = "0px";
//         newTd2.style.margin = "0px";
//         var newTd3 = newTr.insertCell(3);
//         newTd3.width = '116px';
//         newTd3.align = "right";
//         newTd3.valign = "middle";
//         newTd3.style.borderWidth = "0px";
//         newTd3.style.padding = "0px";
//         newTd3.style.margin = "0px";
//         newTd3.style.backgroundImage = "url(" + this.settings.flagPng + ")";
//         newTd3.style.backgroundRepeat = 'no-repeat';


//         linka = document.createElement('a');
//         linka.href = "http://www3.iflipitnetwork.com/app/Contents/terms.html";
//         linka.target = '_blank';
//         linka.innerHTML = "Terms & Conditions";
//         newTd0.appendChild(linka);
//         //this.html.linka = linka;

//         spana = document.createElement('span');
//         spana.innerHTML = "&nbsp;|&nbsp;";
//         newTd0.appendChild(spana);
//         //this.html.spana = spana;

//         linkb = document.createElement('a');
//         linkb.href = "http://www3.iflipitnetwork.com/app/Contents/privacy.html";
//         linkb.target = '_blank';
//         linkb.innerHTML = "Privacy";
//         newTd0.appendChild(linkb);
//         //this.html.linkb = linkb;

//         spanb = document.createElement('span');
//         spanb.innerHTML = "&nbsp;|&nbsp;";
//         newTd0.appendChild(spanb);
//         //this.html.spanb = spanb;

//         linkc = document.createElement('a');
//         linkc.href = "http://216.48.124.231/helpdesk/wonderdesk.cgi?db=default&amp;from=www.aisleno10.com&amp;language=english&amp;wdauth=&amp;add_form=1";
//         linkc.target = '_blank';
//         linkc.innerHTML = "Contact Us";
//         newTd0.appendChild(linkc);
         //this.html.linkc = linkc;

//         if (this.settings.ok) {
//             //Draw an OK button
//             okButton = document.createElement('img');
//             okButton.src = this.settings.AcceptPng;
//             okButton.title = "Previous Offer";
//             okCallback = function() {
//                 that.settings.ok.onclick(that, that.settings.ok.value);
//             };
//             okButton.onclick = okCallback;
//             newTd1.appendChild(okButton);
//             this.html.okButton = okButton;
//         }
//         //Draw a cancel button, if present
//         if (this.settings.cancel) {
//             cancelButton = document.createElement('img');
//             cancelButton.src = this.settings.CancelPng;
//             cancelButton.title = "Next Offer";
//             cancelCallback = function() {
//                 that.settings.cancel.onclick(that, that.settings.cancel.value);
//             };
//             cancelButton.onclick = cancelCallback;
//             newTd2.appendChild(cancelButton);
//             this.html.cancelButton = cancelButton;
//         }
         //Center our alert box on the screen
         this.center();
         document.body.scrollTop = 0;
	document.documentElement.scrollTop=0;

     }

     DOMAlert2.prototype.Resizemode = function() {

         var w = Math.max(document.body.scrollWidth, document.documentElement.scrollWidth);

         var h = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
	if (window.screen.availHeight) h=Math.max(window.screen.availHeight,h);

         this.html.modalWindow.style.width = Math.max(w, document.body.clientWidth) + "px";

         this.html.modalWindow.style.height = Math.max(h, document.body.clientHeight) + "px";

         this.center();
         this.TimeoutF = setTimeout("tempIFlipitModal.Resizemode()", 200);

     }

     DOMAlert2.prototype.show = function(titleText, contentText) {
         if (contentText) {
             //this.html.title.innerHTML = titleText;
             this.html.contentArea.innerHTML = contentText;
         }
         if (titleText && !contentText) {
             this.html.contentArea.innerHTML = titleText;
         }

         this.html.modalWindow.style.visibility = 'visible';
         this.html.alertWindow.style.visibility = 'visible';
         if (this.html.iframe) {
             this.html.iframe.style.height = this.html.alertWindow.offsetHeight; // this.html.alertWindow.offsetHeight;
             this.html.iframe.style.width = this.html.alertWindow.offsetWidth; //this.html.alertWindow.offsetWidth;
             this.html.iframe.style.visibility = 'visible';

         }
         tempIFlipitModal = this;
         this.TimeoutF = setTimeout("tempIFlipitModal.Resizemode()", 200);
     };
     DOMAlert2.prototype.hide = function() {
         clearTimeout(this.TimeoutF);
         this.html.modalWindow.style.visibility = 'hidden';
         this.html.alertWindow.style.visibility = 'hidden';
         if (this.html.iframe) {
             this.html.iframe.style.visibility = 'hidden';
         }
     };
     DOMAlert2.prototype.close = function() {
         var obj, prop;
         clearTimeout(this.TimeoutF);
         //make sure our DOM objects are deleted and our onclick statements are nulled
         for (obj in this.html) {
             if (this.html[obj].parentNode) {
                 if (this.html[obj].onclick) {
                     this.html[obj].onclick = null;
                 }
                 this.html[obj].parentNode.removeChild(this.html[obj]);
                 delete this.html[obj];
             }
         }

         //remove object properties
         for (prop in this) {
             if (this[prop]) {
                 this[prop] = null;
                 delete this[prop];
             }
         }
     };
     DOMAlert2.prototype.center = function() {
         var alertWindow, scrollT, scrollL, iframe;
         alertWindow = this.html.alertWindow;
         var ileft = (self.innerWidth || (document.documentElement.clientWidth || document.body.clientWidth)) / 2 - alertWindow.offsetWidth / 2;
         if (ileft < 5)
             ileft = 5;
         var itop = (self.innerHeight || (document.documentElement.clientHeight || document.body.clientHeight)) / 2 - alertWindow.offsetHeight / 2;
         if (itop < 5)
             itop = 5;
         alertWindow.style.left = ileft + 'px';
         alertWindow.style.top = itop + 'px';
         if (this.html.iframe) {
             this.html.iframe.style.left = alertWindow.style.left;
             this.html.iframe.style.top = alertWindow.style.top;
         }
     };
 }
//swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();

/*empty*/
BDBaseValidator={IsValidEmail:function(Email,ErrorMessage){var value=BDForm.Element.getValue(Email);var Reg=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;if(!Reg.test(value)){this.SetError(Email,ErrorMessage);return ErrorMessage+"\r\n";}
else{this.ClearError(Email);return"";}},CheckBirthDate:function(){return"";},CheckPhone:function(OPT1,OPT2,OPT3,ErrorMessage){var value=BDForm.Element.getValue(OPT1);var Reg=/\d{3}$/;if(!Reg.test(value)){this.SetError(OPT1,ErrorMessage);return ErrorMessage+"\r\n";}
else{this.ClearError(OPT1);}
value=BDForm.Element.getValue(OPT2);if(!Reg.test(value)){this.SetError(OPT2,ErrorMessage);return ErrorMessage+"\r\n";}
else{this.ClearError(OPT2);}
Reg=/\d{4}$/;value=BDForm.Element.getValue(OPT3);if(!Reg.test(value)){this.SetError(OPT3,ErrorMessage);return ErrorMessage+"\r\n";}
else{this.ClearError(OPT3);}
return"";},IsVaildIP:function(IP,ErrorMessage){var value=BDForm.Element.getValue(IP);var Reg=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;if(!Reg.test(value)){this.SetError(IP,ErrorMessage);return ErrorMessage+"\r\n";}
else{this.ClearError(IP);return"";}},Calculate:function(){return"";},IsVaildPhone:function(Phone,ErrorMessage){var value=BDForm.Element.getValue(Phone);var Reg=/^\d{10}$/;if(!Reg.test(value)){this.SetError(Phone,ErrorMessage);return ErrorMessage+"\r\n";}
else{this.ClearError(Phone);return"";}},IsEqual:function(ControlID,Value,ErrorMessage){var value=BDForm.Element.getValue(ControlID);if(value!=Value){this.SetError(ControlID,ErrorMessage);return ErrorMessage+"\r\n";}
else{this.ClearError(ControlID);return"";}},IsValidZip:function(Zip,ErrorMessage){var value=BDForm.Element.getValue(Zip);var Reg=/^\d{5}(-\d{4})?$/;if(!Reg.test(value)){this.SetError(Zip,ErrorMessage);return ErrorMessage+"\r\n";}
else{this.ClearError(Zip);return"";}},RegularExpressionValidator:function(ControlID,RegularExpression,ErrorMessage){return"";},InList:function(ControlID,List){return"";},AddressCheck:function(Address,City,State,Zip,response,ErrorMessage){return"";},CheckPhoneZip:function(OPT1,OPT2,Zip,response,Distance,ErrorMessage){return"";},PhoneZipCheck:function(){return"";},AccudataOPTCheck:function(){return"";},AccudataOPTCheck_RejectUnknown:function(){return"";},AccudataPhoneCheck_RejectUnknown:function(){return"";},AccudataPhoneCheck:function(){return"";},AccudataPhoneCheckPrivate:function(){return"";},DateDiff:function(){return"";},Require:function(Ctrl,ErrorMessage){var value="";value=BDForm.Element.getValue(Ctrl);if(value==""||value==null||value==undefined){this.SetError(Ctrl,ErrorMessage);return ErrorMessage+"\r\n";}else{this.ClearError(Ctrl);return"";}},SetError:function(ctrl,Msg){document.getElementById(ctrl).style.backgroundColor="yellow";},ClearError:function(ctrl){document.getElementById(ctrl).style.backgroundColor="";}}

    var url_66065350ae = BD_Common.urlEncode(params);
if(document.readyState=='complete'){BD_Common.SL("http://www3.iflipitnetwork.com/bd/DisplayManager.aspx",url_66065350ae);}
else{BD_Common.addLoadEvent(function(){BD_Common.SL("http://www3.iflipitnetwork.com/bd/DisplayManager.aspx",url_66065350ae)});}