
YAHOO.namespace('Media.Dtk.ArticleTools');YAHOO.Media.Dtk.ArticleTools.Email=new function(){var emailRegEx=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum))$/;function trim(txt){return txt.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1");}
function isValidEmail(s){s=trim(s);if(s&&!emailRegEx.test(s)){return false;}
return true;}
return{isValidEmail:isValidEmail,checkEmails:function(idTo,idFrom){var isOk=true;var emails=trim(YAHOO.util.Dom.get(idTo).value.replace(/;/g,","));if(emails===""){isOk=false;}else{emails=emails.split(",");for(var i=0;i<emails.length;i++){if(!isValidEmail(emails[i])){isOk=false;break;}}}
if(!isOk){YAHOO.util.Dom.get('dtk-err-to').innerHTML="There is a problem with one or more email addresses entered";}else{YAHOO.util.Dom.get('dtk-err-to').innerHTML="";}
var from=trim(YAHOO.util.Dom.get(idFrom).value)
if((from==="")||!isValidEmail(from)){YAHOO.util.Dom.get('dtk-err-from').innerHTML="There is a problem with the email address entered";isOk=false;}else{YAHOO.util.Dom.get('dtk-err-from').innerHTML="";}
return isOk;},addressBook:function(){document.domain="yahoo.com";var myPropertyName="yfood";var addURL="http://mix200.address.yahoo.com/?A=e&VPC=kiosk&yprop="+myPropertyName;addRemote=window.open(addURL,"AddressBook","width=480,height=480,resizable=yes,scrollbars=yes,toolbar=no,status=0");if(addRemote!=null){if(addRemote.opener==null){addRemote.opener=self;}}
addRemote.focus();return addRemote;}}}();YAHOO.Media.Dtk.ArticleTools.IM=new function(){var imMsg="Check out this story on Yahoo!:";var msgr_installed;var msgr_version="";var msgr_platform="";function init(imMsgAlt){if(imMsgAlt)imMsg=imMsgAlt;var w,v;if(document.all){v=document.all.not_Ymsgr;}else{v=document.getElementById("not_Ymsgr");}
if(v){w=document.getElementById("Ymsgr");if(w&&w.offsetHeight){msgr_installed=1;msgr_version="5";msgr_platform="w32";}else{msgr_installed=1;}}else{msgr_installed=1;msgr_version="5";msgr_platform="w32";}
if(navigator.mimeTypes&&navigator.mimeTypes.length){for(var i=0;i<navigator.mimeTypes.length;i++){if(navigator.mimeTypes[i].suffixes.indexOf("yps")>-1){msgr_installed=1;msgr_version="";msgr_platform="";break;}}}}
init();return{init:init,hasMsgr:function(){var a=document.cookie;var b=a.split("; ");for(var c=0;c<b.length;c++){var d=b[c].indexOf("=");var e=b[c].substring(0,d);var f=b[c].substring(d+1);if(e=="C"){alert(f);var g=f.split("& ");for(h=0;h<g.length;h++){var i=g[h].indexOf("=");var j=g[h].substring(0,i);var k=g[h].substring(i+1);if(j=="mg"&&k=="1")
return true;}}}
return false;},setIntroMsg:function(s){if(s)imMsg=s;},imStory:function(hdline,lnk){if(msgr_installed){location.href="ymsgr:im?msg="+imMsg+"+"+hdline+"+"+lnk;}else{if(confirm("You do not appear to have Yahoo! Messenger installed. Would you like to install it now?")){location.href="http://messenger.yahoo.com";}}
return false;}}}();YAHOO.Media.Dtk.ArticleTools.Print=new function(){var sRootNodeId="";var sTextClass="dtk-art-text";var sTextClassTag="div";var sImageClass="dtk-art-image";var sImageClassTag="div";var sAdClass="dtk-art-ad";var sAdClassTag="div";var sCommentClass="dtk-art-comment";var sCommentClassTag="div";var sHideClass="dtk-art-print-hide";var sTextCtrlId="dtk-print-text";var sImageCtrlId="dtk-print-images";var sAdCtrlId="dtk-print-ads";var sCommentCtrlId="dtk-print-comments";var sSendPrinterCtrlId="dtk-print-send";var aTextNodes;var aImageNodes;var aAdNodes;var aCommentNodes;function togglePrint(arNodes,bVisible){if(bVisible){YAHOO.util.Dom.removeClass(arNodes,sHideClass);}else{YAHOO.util.Dom.addClass(arNodes,sHideClass);}}
function onToggleText(e,o){if(aTextNodes){togglePrint(aTextNodes,o.checked);}}
function onToggleImages(e,o){if(aImageNodes){togglePrint(aImageNodes,o.checked);}}
function onToggleAds(e,o){if(aAdNodes){togglePrint(aAdNodes,o.checked);}}
function onToggleComments(e,o){if(aCommentNodes){togglePrint(aCommentNodes,o.checked);}}
function onSendPrinter(e,o){window.focus();window.print();}
function addListeners(){var ctrl=YAHOO.util.Dom.get(sTextCtrlId);if(ctrl){YAHOO.util.Event.addListener(ctrl,'click',onToggleText,ctrl,true);}
ctrl=YAHOO.util.Dom.get(sImageCtrlId);if(ctrl){YAHOO.util.Event.addListener(ctrl,'click',onToggleImages,ctrl,true);}
ctrl=YAHOO.util.Dom.get(sAdCtrlId);if(ctrl){YAHOO.util.Event.addListener(ctrl,'click',onToggleAds,ctrl,true);}
ctrl=YAHOO.util.Dom.get(sCommentCtrlId);if(ctrl){YAHOO.util.Event.addListener(ctrl,'click',onToggleComments,ctrl,true);}
ctrl=YAHOO.util.Dom.get(sSendPrinterCtrlId);if(ctrl){YAHOO.util.Event.addListener(ctrl,'click',onSendPrinter,ctrl,true);}}
return{init:function(oArgs){aTextNodes=YAHOO.util.Dom.getElementsByClassName(sTextClass,sTextClassTag);aImageNodes=YAHOO.util.Dom.getElementsByClassName(sImageClass,sImageClassTag);aAdNodes=YAHOO.util.Dom.getElementsByClassName(sAdClass,sAdClassTag);aCommentNodes=YAHOO.util.Dom.getElementsByClassName(sCommentClass,sCommentClassTag);if(oArgs){sRootNodeId=oArgs.rootNode||sRootNodeId;sTextClass=oArgs.textClass||sTextClass;sTextClassTag=oArgs.textClassTag||sTextClassTag;sImageClass=oArgs.imageClass||sImageClass;sImageClassTag=oArgs.imageClassTag||sImageClassTag;sAdClass=oArgs.adClass||sAdClass;sAdClassTag=oArgs.adClassTag||sAdClassTag;sCommentClass=oArgs.commentClass||sCommentClass;sCommentClassTag=oArgs.commentClassTag||sCommentClassTag;sHideClass=oArgs.hideClass||sHideClass;sTextCtrlId=oArgs.hideTextCtrl||sTextCtrlId;sImageCtrlId=oArgs.hideImageCtrl||sImageCtrlId;sAdCtrlId=oArgs.hideAdCtrl||sAdCtrlId;sCommentCtrlId=oArgs.hideCommentCtrl||sCommentCtrlId;sSendPrinterCtrlId=oArgs.sendPrinterCtrl||sSendPrinterCtrlId;aTextNodes=oArgs.aTextNodes||aTextNodes;aImageNodes=oArgs.aImageNodes||aImageNodes;aAdNodes=oArgs.aAdNodes||aAdNodes;aCommentNodes=oArgs.aCommentNodes||aCommentNodes;}
addListeners();}}}();