/**
 * Copyright (C) 2009-2010 LeadFormix, Inc. All Rights Reserved.
 * LeadFormix PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 * @link http://www.leadformix.com
 *
 * For further information, contact:
 * mailto:support@leadformix.com or mailto:cs@leadformix.com
 */
var LFW=LFW||{};LFW=(function(){var d=document,w=window,lfRevealTime=1000,lfTimer=null,lfToggled=false,align="left";if(typeof lfw!="undefined"){dObj=eval('('+lfw+')');var lfWebinarDate=new Date(dObj.notify.date),site="http://www.leadformix.com/",imageLink=site+"bf/uploads/lfxwidget/webinar/",theme=imageLink+dObj.theme+"/"+dObj.align+"/";if(dObj.align=="left"){var leftDiff=dObj.offset-20,rOffset=leftDiff+36,uOffset=leftDiff+114,nOffclose=leftDiff+5+"px",nOffopen=leftDiff+416+"px";if(dObj.view=="expanded"){var lfStylebMinWidth=0,lfStylebMaxWidth=-411,togglerSrc="arrow-left.png",notifyPos=nOffopen}else{var lfStylebMinWidth=-411,lfStylebMaxWidth=0,togglerSrc="arrow-rit.png",notifyPos=nOffclose}}else{var align="right",leftDiff=dObj.offset-20,rOffset=leftDiff+382,uOffset=leftDiff+304,nOffclose=leftDiff+"px",nOffopen=leftDiff+"px";if(dObj.view=="expanded"){var lfStylebMinWidth=0,lfStylebMaxWidth=-411,togglerSrc="arrow-rit.png",notifyPos=nOffopen}else{var lfStylebMinWidth=-411,lfStylebMaxWidth=0,togglerSrc="arrow-left.png",notifyPos=nOffclose}}}function lfKillSomeTime(){}function addEventListener(element,eventType,eventHandler,useCapture){var browserName=navigator.userAgent;if(element.addEventListener){element.addEventListener(eventType,eventHandler,useCapture);return true}else if(element.attachEvent){return element.attachEvent('on'+eventType,eventHandler)}element['on'+eventType]=eventHandler}function getCookie(cookieName,path,domain){var cookiePattern=new RegExp('(^|;)[ ]*'+cookieName+'=([^;]*)'+(path?'(;[ ]*expires=[^;]*)?;[ ]*path='+path.replace('/','\\/')+'':'')+(domain?';[ ]*domain='+domain+'(;|$)':'')),cookieMatch=cookiePattern.exec(d.cookie),unescapeWrapper=w.decodeURIComponent||unescape;return cookieMatch?unescapeWrapper(cookieMatch[2]):0}function clickHandler(tAlias){var buildUrl="idsite="+dObj.siteid+"&link="+encodeURIComponent(d.location.href)+"&rand="+Math.random()+"&redirect=0&title="+encodeURIComponent(d.title)+"&titleAlias="+encodeURIComponent(tAlias)+"&vt_="+encodeURIComponent(getCookie("_vt_"));var image=new Image(1,1),dest="http://vlog.leadformix.com/bf/bf.php";image.src=dest+"?"+buildUrl;image.onLoad=function(){setTimeout("lfKillSomeTime()",1000)}}function setLFMC(){try{d.getElementById('LFMC').value=getCookie("_vt_")}catch(e){}}function lfGetIEVersion(){var browser=-1;if(navigator.appName=='Microsoft Internet Explorer'){var ua=navigator.userAgent;var ieRegex=new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");if(ieRegex.exec(ua)!=null){browser=parseFloat(RegExp.$1)}}return browser}function lfGetStyle(elem,name){if(elem.style[name]){return elem.style[name]}else if(elem.currentStyle){return elem.currentStyle[name]}else if(d.defaultView&&d.defaultView.getComputedStyle){name=name.replace(/([A-Z])/g,"-$1");name=name.toLowerCase();s=d.defaultView.getComputedStyle(elem,"");return s&&s.getPropertyValue(name)}else{return null}}function lfFormatDate(dateVal){var date_names=new Array("January","February","March","April","May","June","July","August","September","October","November","December");var newDate=new Date(dateVal);var curr_date=newDate.getDate();var suf="";if(curr_date==1||curr_date==21||curr_date==31){suf="st"}else if(curr_date==2||curr_date==22){suf="nd"}else if(curr_date==3||curr_date==23){suf="rd"}else{suf="th"}var curr_month=newDate.getMonth();var curr_year=newDate.getFullYear();return(curr_date+suf+" "+date_names[curr_month]+" "+curr_year)}function lfSerializeInputs(formID){var lfAllInputs=d.getElementById(formID).getElementsByTagName('input');var lfInputsLength=lfAllInputs.length;var lfCombineStr="";for(var i=0;i<lfInputsLength;i++){if(lfAllInputs[i].getAttribute("type")=="text"||lfAllInputs[i].getAttribute("type")=="hidden"){lfInputName=lfAllInputs[i].getAttribute("name");lfInputValue=lfAllInputs[i].value;lfCombineStr+=lfInputName+'='+lfInputValue+'&'}else{lfCombineStr+=''}}return lfCombineStr}function lfDataSend(formID){var image=new Image(1,1),url="http://www.leadformix.com/bf/FormCapture.php";image.src=url+"?"+lfSerializeInputs(formID);image.onLoad=function(){setTimeout("lfKillSomeTime()",1000)}}function lfShowAppre(formID,appreID){var lfChild=d.getElementById(formID);var lfParent=d.getElementById(formID).parentNode;var lfAppre=d.getElementById(appreID);lfChild.style.display="none";lfAppre.style.display="block";lfParent.removeChild(lfChild)}function lfWebinarTicker(){var lfTodayDate=new Date();var lfWebinarTimeDiff=(lfWebinarDate.getTime()-lfTodayDate.getTime());var lfWebinarDateDiff=Math.ceil(lfWebinarTimeDiff/(1000*3600*24));if(lfWebinarDateDiff>0&&dObj.notify.nonotify=="off"){var plural=(lfWebinarDateDiff>1)?" days":" day";d.getElementById('lf_stylec_slider_webinar_time').innerHTML=lfWebinarDateDiff+plural}else if(lfWebinarDateDiff==0&&dObj.notify.nonotify=="off"){d.getElementById('lf_stylec_slider_webinar_text').innerHTML="Attend the webinar today"}else{d.getElementById('lf_stylec_slider_webinar_text').innerHTML=unescape(dObj.webinar_over.replace(/\+/g," "));d.getElementById('lf_stylec_slider_webinar_current_title').href="javascript:LFW.lfRecordedWebinar()";d.getElementById('lf_stylec_slider_webinar_current_title').innerHTML="Click here to view the recorded webinar";d.getElementById('lf_stylec_slider_webinar_current_date').innerHTML=""}}function lfCheckMail(){if(d.getElementById('lf_stylec_slider_field_mail').value=='Email for Webinar Alerts'||d.getElementById('lf_stylec_slider_field_mail').value==''){alert('Please enter your email id');d.getElementById('lf_stylec_slider_field_mail').focus();return false}if(d.getElementById('lf_stylec_slider_field_mail').value!=''){var emailPat=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;var matchArray;var emailStr=d.getElementById('lf_stylec_slider_field_mail').value;if(emailStr.length>0){matchArray=emailStr.match(emailPat);if(matchArray==null){alert("Please enter a valid emailid");d.getElementById('lf_stylec_slider_field_mail').focus();return false}}}lfDataSend('lf_stylec_slider_mail');lfShowAppre('lf_stylec_slider_mail','lf_stylec_slider_appre');return false}function lfBuildw(){var outputStr='<div style="width:auto;height:34px;position:fixed;'+dObj.align+':'+dObj.offset+'px;bottom:0;font-family:Calibri, Arial, sans-serif !important;z-index:999999"><div style="float:left;">';if(align=="left"){outputStr+='<img src="'+theme+'webinar.png" width="79" height="34" border="0" style="width:79px;height:34px;float:left" />'}else{outputStr+='<img id="lf_stylec_slider_revealer" src="'+theme+togglerSrc+'" width="30" height="34" border="0" style="float:left;cursor:pointer" />'}outputStr+='</div><div style="float:left;overflow:hidden"><div id="lf_stylec_slider_inner" style="background:url('+theme+'bg.png) repeat-x left top;width:421px;height:34px;float:left;margin-left:-413px;padding:0 0 0 14px !important"><a href="javascript:LFW.lfRecordedWebinar()" style="height:34px;float:left;text-decoration:none !important"><img src="'+theme+'recorded.png" width="57" height="34" border="0" style="float:left" /></a><img src="'+theme+'div.png" width="17" height="34" style="float:left" /><a href="javascript:LFW.lfUpcomingWebinar()" style="height:34px;float:left;text-decoration:none !important"><img src="'+theme+'upcoming.png" width="62" height="34" border="0" style="float:left" /></a><img src="'+theme+'div.png" width="17" height="34" style="float:left" /><div style="height:27px;float:left;margin:7px 0 0 0 !important"><div id="lf_stylec_slider_mail"><input type="hidden" name="LFMIdsite" value="'+dObj.siteid+'" /><input type="hidden" name="LFMC" id="LFMC" value="0" /><input type="hidden" name="_form_name_" value="lfxwebinarleadhook" /><input id="lf_stylec_slider_field_mail" name="email" type="text" value="Email for Webinar Alerts" onfocus="if(this.value==\'Email for Webinar Alerts\'){ this.value=\'\' }" onblur="if(this.value==\'\'){ this.value=\'Email for Webinar Alerts\' }" style="width:168px;height:21px;line-height:21px;background:#fff;float:left;margin:0;padding:0;border:1px solid #CCC;color:#666;font-size:11px;" /><input type="submit" value="" onclick="return LFW.lfCheck()" style="background:url('+theme+'subscribe.png) no-repeat left top;width:61px;height:23px;float:left;margin:0;padding:0;border:none;" /></div><span id="lf_stylec_slider_appre" style="width:231px;margin:3px 0 0 0 !important;display:none;text-align:center !important">Thank you for your interest.</span></div><img src="'+theme+'div.png" width="17" height="34" style="float:left" /><span style="height:34px;float:left"><img src="'+theme+'notification.gif" width="16" height="34" style="float:left;cursor:pointer" '+dObj.mode+'="LFW.lfWebinarNotification()" /></span></div></div><div style="float:left;">';if(align=="left"){outputStr+='<img id="lf_stylec_slider_revealer" src="'+theme+togglerSrc+'" width="30" height="34" border="0" style="float:left;cursor:pointer" />'}else{outputStr+='<img src="'+theme+'webinar.png" width="79" height="34" border="0" style="width:79px;height:34px;float:left" />'}outputStr+='</div></div>';outputStr+='<div id="lf_stylec_recorded_webinars_popsup" style="width:215px;height:auto;position:fixed;bottom:34px;'+dObj.align+":"+rOffset+'px;display:none;font-family:Tahoma, Geneva, sans-serif !important;font-size:11px !important;color:#333333 !important;z-index:999999;line-height:normal !important"><div style="background:url('+imageLink+'lf_stylec_recorded_webinar_popup_title.png) repeat-y left top;width:215px;height:37px;float:left;color:#FFFFFF !important;line-height:37px !important;text-align:center !important;font-size:12px !important;font-weight:bold !important">Recorded Webinars</div><div style="background:url('+imageLink+'lf_stylec_recorded_webinar_popup_bg.png) repeat-y left top;width:209px;height:auto;float:left;padding:6px 4px 0 2px !important">';var noRecorded=dObj.recorded.length;if(noRecorded>=1){var rStyle='border-bottom:solid 1px #999999';for(var r=0;r<noRecorded;r++){if((noRecorded-r)==1){rStyle='border:none'}outputStr+='<div style="width:197px;height:auto;float:left;padding:6px !important;'+rStyle+'"><div style="width:60px;height:auto;float:left"><img src="'+imageLink+dObj.recorded[r].banner+'" width="60" border="0" /></div><div style="width:131px;height:auto;float:right"><a href="'+dObj.recorded[r].imglink+'" style="width:131px;float:left;color:#006699 !important;font-weight:bold !important;text-decoration:none !important">'+unescape(dObj.recorded[r].title.replace(/\+/g," "))+'</a></div></div>'}}else{outputStr+='<div style="width:197px;height:auto;float:left;padding:6px !important;border:none">There are no recorded webinars right now</div>'}outputStr+='<div class="lf_stylec_slider_mid_viewall" style="width:197px;height:auto;float:left;padding:0 6px !important;text-align:center !important;font-size:11px !important;margin:5px 0 0 0 !important"><a href="'+dObj.allrecorded+'" style="float:right;text-decoration:none !important;color:#006699 !important">View all Webinars</a></div></div><div class="lf_stylec_slider_bottom" style="width:215px;height:18px;float:left"><img src="'+imageLink+'lf_stylec_recorded_webinar_popup_down.png" width="215" height="18" border="0" /></div><img src="'+imageLink+'lf_stylec_slider_popclose.png" width="10" height="10" border="0" style="width:10px;height:10px;position:absolute;right:13px;top:13px;cursor:pointer" onclick="LFW.lfCloseAllPop()" /><img src="'+site+'bf/uploads/lfxwidget/lf-logo.png" width="57" height="7" border="0" style="width:57px;height:7px;position:absolute;left:8px;bottom:16px;cursor:pointer" /></div>';outputStr+='<div id="lf_stylec_upcoming_webinars_popsup" style="width:215px;height:auto;position:fixed;bottom:34px;'+dObj.align+":"+uOffset+'px;display:none;font-family:Tahoma, Geneva, sans-serif !important;font-size:11px !important;color:#333333 !important;z-index:999999;line-height:normal !important"><div style="background:url('+imageLink+'lf_stylec_recorded_webinar_popup_title.png) repeat-y left top;width:215px;height:37px;float:left;color:#FFFFFF !important;line-height:37px !important;text-align:center !important;font-size:12px !important;font-weight:bold !important">Upcoming Webinars</div><div style="background:url('+imageLink+'lf_stylec_recorded_webinar_popup_bg.png) repeat-y left top;width:209px;height:auto;float:left;padding:6px 4px 0 2px !important">';var noUpcoming=dObj.upcoming.length;if(noUpcoming>=1){var uStyle='border-bottom:solid 1px #999999';for(var u=0;u<noUpcoming;u++){if((noUpcoming-u)==1){uStyle='border:none'}outputStr+='<div style="width:197px;height:auto;float:left;padding:6px !important;'+uStyle+'"><div style="width:60px;height:auto;float:left"><img src="'+imageLink+dObj.upcoming[u].banner+'" width="60" border="0" /></div><div style="width:131px;height:auto;float:right"><a href="'+dObj.upcoming[u].imglink+'" style="width:131px;float:left;color:#006699 !important;font-weight:bold !important;text-decoration:none !important">'+unescape(dObj.upcoming[u].title.replace(/\+/g," "))+'</a><span style="width:131px;float:left;color:#333333 !important;font-size:10px !important;padding:5px 0 0 0 !important;line-height:normal !important">'+lfFormatDate(dObj.upcoming[u].date)+', '+dObj.upcoming[u].time+'</span><a href="'+dObj.upcoming[u].imglink+'" class="lf_stylec_slider_mid_right_top_register" style="width:131px;float:left;color:#006699 !important;text-decoration:none !important;font-size:11px !important;margin:5px 0 0 0 !important;font-weight:bold !important">Register Now &raquo;</a></div></div>'}}else{outputStr+='<div style="width:197px;height:auto;float:left;padding:6px !important;border:none;">There are no upcoming webinars right now</div>'}outputStr+='<div class="lf_stylec_slider_mid_viewall" style="width:197px;height:auto;float:left;padding:0 6px !important;text-align:center !important;font-size:11px !important;margin:5px 0 0 0 !important">&nbsp;</div></div><div class="lf_stylec_slider_bottom" style="width:215px;height:18px;float:left"><img src="'+imageLink+'lf_stylec_recorded_webinar_popup_down.png" width="215" height="18" border="0" /></div><img src="'+imageLink+'lf_stylec_slider_popclose.png" width="10" height="10" border="0" style="width:10px;height:10px;position:absolute;right:13px;top:13px;cursor:pointer" onclick="LFW.lfCloseAllPop()" /><img src="'+site+'bf/uploads/lfxwidget/lf-logo.png" width="57" height="7" border="0" style="width:57px;height:7px;position:absolute;left:8px;bottom:16px;cursor:pointer" /></div>';outputStr+='<div id="lf_stylec_webinar_notification_popsup" style="width:215px;height:auto;position:fixed;bottom:34px;'+dObj.align+":"+notifyPos+';display:none;font-family:Tahoma, Geneva, sans-serif !important;font-size:11px !important;color:#333333 !important;z-index:999999;line-height:normal !important"><div style="background:url('+imageLink+'lf_stylec_recorded_webinar_popup_title.png) repeat-y left top;width:215px;height:37px;float:left;color:#FFFFFF !important;line-height:37px !important;text-align:center !important;font-size:12px !important;font-weight:bold !important">'+unescape(dObj.notifytitle.replace(/\+/g," "))+'</div><div style="background:url('+imageLink+'lf_stylec_recorded_webinar_popup_bg.png) repeat-y left top;width:209px;height:auto;float:left;padding:6px 4px 0 2px !important"><div id="lf_stylec_slider_webinar_description" style="width:197px;height:auto;float:left;padding:0 6px !important">';if(dObj.countdown=="on"){outputStr+='<span id="lf_stylec_slider_webinar_text" style="width:197px;float:left;color:#339900 !important;font-weight:bold !important;line-height:normal !important">Only <span id="lf_stylec_slider_webinar_time"></span> left</span>'}outputStr+='<a id="lf_stylec_slider_webinar_current_title" href="'+dObj.notify.imglink+'" style="width:197px;float:left;color:#006699 !important;padding:3px 0 0 0 !important;text-decoration:none !important">'+unescape(dObj.notify.title.replace(/\+/g," "))+'</a><span id="lf_stylec_slider_webinar_current_date" style="width:197px;float:left;color:#333333 !important;font-size:10px !important;padding:3px 0 0 0 !important;line-height:normal !important">'+lfFormatDate(dObj.notify.date)+', '+dObj.notify.time+'</span></div></div><div class="lf_stylec_slider_bottom" style="width:215px;height:18px;float:left"><img src="'+imageLink+'lf_stylec_recorded_webinar_popup_down.png" width="215" height="18" border="0" /></div><img src="'+imageLink+'lf_stylec_slider_popclose.png" width="10" height="10" border="0" style="width:10px;height:10px;position:absolute;right:13px;top:13px;cursor:pointer" onclick="LFW.lfCloseAllPop()" /></div>';try{var b=d.getElementsByTagName('body');var div_=d.createElement('div');div_.innerHTML=outputStr;b[0].appendChild(div_)}catch(e){}}function lfSliderw(){var lfRevealer=d.getElementById('lf_stylec_slider_revealer');var lfReveal=d.getElementById('lf_stylec_slider_inner');LFW.lfCloseAllPop();clearInterval(lfTimer);var lfInstanceWeight=parseInt(lfReveal.style.marginLeft);var lfInit=(new Date()).getTime();var lfWidth=(lfToggled=!lfToggled)?lfStylebMaxWidth:lfStylebMinWidth;var lfDisp=lfWidth-parseInt(lfReveal.style.marginLeft);(parseInt(lfReveal.style.marginLeft)==0)?clickHandler("WEBINARHOOKCLOSECLICK"):clickHandler("WEBINARHOOKOPENCLICK");lfTimer=setInterval(function(){var lfInstance=(new Date()).getTime()-lfInit;if(lfInstance<lfRevealTime){var lfPos=Math.floor(lfDisp*lfInstance/lfRevealTime);lfResult=lfInstanceWeight+lfPos;lfReveal.style.marginLeft=lfResult+'px'}else{lfReveal.style.marginLeft=lfWidth+'px';clearInterval(lfTimer);if(parseInt(lfReveal.style.marginLeft)==-411){(align=="left")?lfRevealer.src=theme+"arrow-rit.png":lfRevealer.src=theme+"arrow-left.png";(align=="left")?d.getElementById('lf_stylec_webinar_notification_popsup').style.left=nOffclose:d.getElementById('lf_stylec_webinar_notification_popsup').style.right=nOffclose}else{(align=="left")?lfRevealer.src=theme+"arrow-left.png":lfRevealer.src=theme+"arrow-rit.png";(align=="left")?d.getElementById('lf_stylec_webinar_notification_popsup').style.left=nOffopen:d.getElementById('lf_stylec_webinar_notification_popsup').style.right=nOffopen}}},1)}return{processw:function(){if(typeof dObj!="undefined"){if(lfGetIEVersion()>=7.0||lfGetIEVersion()==-1){lfBuildw();setLFMC();var lfRevealer1=d.getElementById('lf_stylec_slider_revealer');var lfReveal1=d.getElementById('lf_stylec_slider_inner');lfReveal1.style.marginLeft=lfStylebMinWidth+'px';lfWebinarTicker();if(dObj.autopop=="on"){setTimeout('LFW.lfWebinarNotification()',(dObj.autopoptime)*1000)}addEventListener(lfRevealer1,'click',lfSliderw)}}},lfRecordedWebinar:function(){d.getElementById("lf_stylec_upcoming_webinars_popsup").style.display="none";d.getElementById("lf_stylec_webinar_notification_popsup").style.display="none";var status=lfGetStyle(d.getElementById("lf_stylec_recorded_webinars_popsup"),"display");if(status=="none"){d.getElementById("lf_stylec_recorded_webinars_popsup").style.display="block"}else{d.getElementById("lf_stylec_recorded_webinars_popsup").style.display="none"}},lfUpcomingWebinar:function(){d.getElementById("lf_stylec_recorded_webinars_popsup").style.display="none";d.getElementById("lf_stylec_webinar_notification_popsup").style.display="none";var status=lfGetStyle(d.getElementById("lf_stylec_upcoming_webinars_popsup"),"display");if(status=="none"){d.getElementById("lf_stylec_upcoming_webinars_popsup").style.display="block"}else{d.getElementById("lf_stylec_upcoming_webinars_popsup").style.display="none"}},lfWebinarNotification:function(){d.getElementById("lf_stylec_recorded_webinars_popsup").style.display="none";d.getElementById("lf_stylec_upcoming_webinars_popsup").style.display="none";var status=lfGetStyle(d.getElementById("lf_stylec_webinar_notification_popsup"),"display");if(status=="none"){d.getElementById("lf_stylec_webinar_notification_popsup").style.display="block"}else{d.getElementById("lf_stylec_webinar_notification_popsup").style.display="none"}},lfCloseAllPop:function(){d.getElementById("lf_stylec_recorded_webinars_popsup").style.display="none";d.getElementById("lf_stylec_upcoming_webinars_popsup").style.display="none";d.getElementById("lf_stylec_webinar_notification_popsup").style.display="none"},lfCheck:function(){return lfCheckMail()}}})();LFW.processw();
