function shareDialog(link,title,offset){dialogClearclosewin();if($("#shareDialog").length){$("#shareDialog").remove();}else{var divstr=shareDialogCode(link,title);var numlinks=$(divstr).find(".sharelink").length;var sheight=(numlinks*16)+((numlinks+2)*8)-2;var dheight=$(document).height();var pheight=$("#share_button").height();var ppos=$("#share_button").position();var top=(ppos.top+pheight)-offset;var left=ppos.left;if(mobile){left=left-window.pageXOffset;top=top-window.pageYOffset;}
if(top+sheight>dheight){top=(ppos.top-sheight)-offset;}
$(divstr).appendTo("body");$("#shareDialog").css({"top":top,"left":left});}}
function shareDialogCode(link,title){var escTitle=title.replace(/'/g,"\\'");var escTitle = escTitle.replace(/"/g,'&quot;');var str='<div id="shareDialog" class="dialog" onmouseout="dialogOnmouseout(this.id)" onmouseover="dialogClearclosewin();">'+'<div class="inner">'+'<div class="sharelink"><a href="javascript:emailFriendDialog(\'emailFriendForm\',\''+escTitle+'\');"><img src="/images/share_icons/email.gif">&nbsp;<span>email</span></a></div>'+
shareOption("delicious","delicious.gif","http://www.delicious.com/save?url=%link%&title=%title%",link,title)+
shareOption("digg","digg.gif","http://digg.com/submit?url=%link%&title=%title%",link,title)+
shareOption("linkedin","linkedin.gif","http://www.linkedin.com/cws/share?url=%link%",link,title)+
shareOption("facebook","facebook.gif","http://www.facebook.com/sharer.php?u=%link%&t=%title%",link,title)+
shareOption("reddit","reddit.gif","http://reddit.com/submit?url=%link%&title=%title%",link,title)+
shareOption("stumbleupon","stumble.png","http://www.stumbleupon.com/submit?url=%link%&title=%title%",link,title)+
shareOption("myspace","myspace.gif","http://www.myspace.com/Modules/PostTo/Pages/?t=%title%&c=&u=%link%&l=2",link,title)+
shareOption("windows live","windowslive.gif","https://favorites.live.com/quickadd.aspx?mkt=en-us&url=%link%&title=%title%&top=0",link,title)+'</div></div>';return str;}
function shareOption(name,icon,linkcode,link,title){linkcode=linkcode.replace('%link%',encodeURIComponent(link));linkcode=linkcode.replace('%title%',encodeURIComponent(title));return'<div class="sharelink"><a href="'+linkcode+'" target="_blank" onclick="return ntptLinkTag(this,\'ah=Add%20to%20'+encodeURIComponent(name)+'\');">'+'<img src="/images/share_icons/'+icon+'" >&nbsp;<span>'+name+'</span></a></div>';}
function writeShares(divid){var linkLoc=location.href;var homeLoc=location.host;var shareURL=encodeURIComponent(linkLoc);var parentURL=encodeURIComponent(homeLoc);var pgtitle=document.title;var trimTitle=pgtitle.substr(0,pgtitle.indexOf('|')-1);var shareTitle=trimTitle.replace(/'/g,"\\'");var shareTitle = shareTitle.replace(/"/g,'&quot;');var encTitle=encodeURIComponent(trimTitle);var code='<div class="shareicon" style="width:90px;"><a class="big_button_share" href="javascript:shareDialog(\''+
linkLoc+'\',\''+shareTitle+'\',-0.5);"><img id="share_button" src="/images/share_icons/share.gif" width="53" height="20" alt="Share"></a></div>';code+='<iframe src="http://www.facebook.com/plugins/like.php?href='+
shareURL+'&layout=button_count&show_faces=false&width=100&action=like&font=arial&layout=button_count" class="shareicon" frameborder="0" scrolling="No" style="width:90px;"></iframe>';code+='<iframe src="https://plusone.google.com/_/+1/fastbutton?url='+
shareURL+'&size=medium&count=true&annotation=&hl=en-US&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fwidget%2F__features__%2Frt%3Dj%2Fver%3Dp6j4nkywAaY.en_US.%2Fsv%3D1%2Fam%3D!xVi4pEKcg86Ivi6-JA%2Fd%3D1%2F#id=I1_1323982001817&parent='+'http%3A%2F%2F'+parentURL+'&rpctoken=718294169&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe" class="shareicon" frameborder="0" scrolling="No" style="width:90px;"></iframe>';code+='<iframe src="http://platform.twitter.com/widgets/tweet_button.html#_=1323982001640&_version=2&count=horizontal&counturl='+
shareURL+'&enableNewSizing=false&id=twitter-widget-0&lang=en&original_referer='+
shareURL+'&size=m&text='+encTitle+'&url='+shareURL+'%20%23Tellabs" class="shareicon" frameborder="0" scrolling="No" style="width:95px;"></iframe>';$("#"+divid).html(code);}
function subscribeDialog(divid){var content='';content='<form id="blogsubscribe" action="javascript:submitSubscribeDialog(this,\''+divid+'\')" method="post" onsubmit="return validateSubscribeDialog(this)">';content+='<p>Full Name:<br>';content+='<input class="subscribe" name="fullname" type="text" maxlength="50" style="margin-bottom:6px;"><br>';content+='Email:<br>';content+='<input class="subscribe" name="emailto" type="email" maxlength="50" style="margin-bottom:10px;"></p>';content+='<div style="text-align:right;padding-right:3px;"><input type="image" value="send" src="/blog/images/submit_small.gif"></div>';content+='</form>';$("#"+divid).html(content);}
function validateSubscribeDialog(form){if(form.fullname.value.length==0){alert('Please enter your name');form.fullname.focus();return false;}
if(!validEmail(form.emailto.value)){alert('Please enter a valid email address for yourself');form.emailto.focus();return false;}
return true;}
function submitSubscribeDialog(form,divid){$(document).ready(function(){$.AjaxCFC({url:"/blog/blogajax.cfc",method:"addSubscriber",data:{"fullname":$("[name=fullname]").val(),"email":$("[name=emailto]").val()},unnamedargs:false,serialization:"json",useDefaultErrorHandler:false,success:function(obj){var str='<strong>Thank you!</strong><p>A message has been sent to your Email to confirm your subscription.</p>';$("#"+divid).html(str);$("#"+divid).show(1000);},error:function(){alert("We're sorry, there was a problem with your request.");},failure:function(){alert('Error connecting to server');}});});}
function validateCommentForm(form,captcha){if(form.name.value.length==0){alert('Please enter your name');form.name.focus();return false;}
if(!validEmail(form.email.value)){alert('Please enter a valid email address for yourself');form.email.focus();return false;}
if(form.comments.value.length==0){alert('Please enter your comment');form.comments.focus();return false;}
if(captcha=='yes'){if(form.captchaText.value.length==0){alert('Please enter the captcha text');form.captchaText.focus();return false;}else{var test='';test=captchaTest(form.captchaHash.value,form.captchaText.value);if(test=='NO'){alert('The captcha text you have entered is incorrect');form.captchaText.focus();return false;}}}
return true;}
function captchaTest(chash,ctext){var result='';$.AjaxCFC({url:"/blog/blogajax.cfc",method:"captchaVal",data:{"captchaHash":chash,"captchaText":ctext},async:false,unnamedargs:false,serialization:"json",useDefaultErrorHandler:false,success:function(obj){result=obj.data.response;return result;},error:function(){alert("We're sorry, there was a problem with your request.");},failure:function(){alert('Error connecting to server');}});return result;}
function submitCommentForm(form,divid){$(document).ready(function(){if($("input[name=website]").val()=='http://'){$("input[name=website]").val('')}
$.AjaxCFC({url:"/blog/blogajax.cfc",method:"addComment",data:{"entryid":$("[name=entryid]").val(),"name":$("[name=name]").val(),"email":$("[name=email]").val(),"website":$("[name=website]").val(),"comments":$("[name=comments]").val(),"subscribe":$("input[name=subscribe]:checked").val(),"rememberme":$("input[name=rememberme]:checked").val()},unnamedargs:false,serialization:"json",useDefaultErrorHandler:false,success:function(obj){var str='<div id="heading_comment_on"></div><div id="comment_on_fields"><strong>Thank you for submitting your comment. Your comment will be published upon approval by the moderator.</strong></div>';$("#"+divid).html(str);$("#"+divid).show(1000);},error:function(){alert("We're sorry, there was a problem with your request.");},failure:function(){alert('Error connecting to server');}});});}
function showFeed(url,id){dialogClearclosewin();if($("#feedDialog").length){$("#feedDialog").remove();}else{var feed=url;var divstr='';divstr='<div id="feedDialog" onmouseout="dialogOnmouseout(this.id)" onmouseover="dialogClearclosewin();">';divstr+='<a href="'+feed+'"><img src="/images/rss_icons/addxml.gif"></a><br>';divstr+='<a href="http://fusion.google.com/add?feedurl='+feed+'" target="_blank"><img src="/images/rss_icons/add2google.gif"></a><br>';divstr+='<a href="http://www.bloglines.com/sub/'+feed+'" target="_blank"><img src="/images/rss_icons/add2bloglines.gif"></a><br>';divstr+='<a href="http://www.netvibes.com/subscribe.php?url='+feed+'" target="_blank"><img src="/images/rss_icons/add2netvibes.gif"></a><br>';divstr+='<a href="http://add.my.yahoo.com/rss?url='+feed+'" target="_blank"><img src="/images/rss_icons/add2myyahoo.gif"></a>';divstr+='</div>';var pheight=$("#"+id).height();var pwidth=$("#"+id).width();var ppos=$("#"+id).position();var width=95;var height=123;var top=ppos.top+pheight;var left=ppos.left-(width-pwidth+2);if(mobile){left=left-window.pageXOffset;top=top-window.pageYOffset;}
var cssObj={"width":width,"height":height,"top":top,"left":left}
$(divstr).appendTo("body");$("#feedDialog").css(cssObj);}}
function showCalFeed(id){dialogClearclosewin();if($("#feedDialog").length){$("#feedDialog").remove();}else{var divstr='';divstr='<div id="feedDialog" onmouseout="dialogOnmouseout(this.id)" onmouseover="dialogClearclosewin();">';divstr+='<a href="http://www.tellabs.com/news/feeds/events.xml"><img src="/images/rss_icons/addxml.gif"></a><br>';divstr+='<a href="webcal://www.tellabs.com/news/feeds/events.ics"><img src="/images/rss_icons/add2calendar.gif"></a>';divstr+='</div>';var pheight=$("#"+id).height();var pwidth=$("#"+id).width();var ppos=$("#"+id).position();var width=95;var height=51;var top=ppos.top+pheight;var left=ppos.left-(width-pwidth+5);if(mobile){left=left-window.pageXOffset;top=top-window.pageYOffset;}
var cssObj={"width":width,"height":height,"top":top,"left":left}
$(divstr).appendTo("body");$("#feedDialog").css(cssObj);}}
function validEmail(s){var i=1;var sLength=s.length;while((i<sLength)&&(s.charAt(i)!="@")){i++}
if((i>=sLength)||(s.charAt(i)!="@"))return false;else i+=2;while((i<sLength)&&(s.charAt(i)!=".")){i++}
if((i>=sLength-1)||(s.charAt(i)!="."))return false;else{return true;}}
function emailFriendDialog(divid,title){$(document).ready(function(){$.AjaxCFC({url:"/common/public.cfc",method:"emailFriendDialog",data:{"divid":divid,"title":title},unnamedargs:false,serialization:"json",useDefaultErrorHandler:false,success:function(obj){var width=0,height=0,left=0,top=0;width=$(window).width();height=$(window).height();vscroll=$(window).scrollTop();left=(width/2)-(226/2);top=vscroll+((height/2)-(435/2));$(obj).appendTo("body");$("#"+divid).css({"top":top,"left":left});},error:function(){alert("We're sorry, there was a problem with your request.");}});});}
function closeEmailFriendDialog(divid){$("#"+divid).remove();}
function validateEmailFriendDialog(form){if(form.fromname.value.length==0){alert('Please enter your name');form.fromname.focus();return false;}
if(!validEmail(form.fromemail.value)){alert('Please enter a valid email address for yourself');form.fromemail.focus();return false;}
if(form.toname.value.length==0){alert('Please enter your friend\'s name');form.toname.focus();return false;}
if(!validEmail(form.toemail.value)){alert('Please enter a valid email address for your friend');form.toemail.focus();return false;}
return true;}
function submitEmailFriendDialog(){$(document).ready(function(){var ccme=$("input[name=ccMe]").is(":checked")?1:0;$.AjaxCFC({url:"/common/public.cfc",method:"emailFriend",data:{"fromname":$("[name=fromname]").val(),"fromemail":$("[name=fromemail]").val(),"toname":$("[name=toname]").val(),"toemail":$("[name=toemail]").val(),"message":$("[name=message]").val(),"ccme":ccme,"title":$("[name=title]").val()},unnamedargs:false,serialization:"json",useDefaultErrorHandler:false,success:function(obj){var str='<h3>email sent!</h3><p>Your email has been sent to:<br><strong>'+obj.data.toemail+'</strong>.</p>';$('#email-sent').html(str);$('#email-sent').show(1000);},error:function(){alert("We're sorry, there was a problem with your request.");},failure:function(){alert('Error connecting to server');}});});}
function iCalCreate(divid,calid){$(document).ready(function(){$.AjaxCFC({url:"/common/public.cfc",method:"iCalCreate",data:{"event_id":calid},unnamedargs:false,serialization:"json",useDefaultErrorHandler:false,success:function(obj){result=obj.data.response;$("#"+divid).attr('src',result);},error:function(){alert("We're sorry, there was a problem with your request.");}});});}
