YAHOO.namespace("example.container");YAHOO.namespace("example.container");var tabViewContent=new YAHOO.widget.TabView("ms_content");var tabViewSideBar=new YAHOO.widget.TabView("ms_sidebar");var tabViewSideBar=new YAHOO.widget.TabView("ms_details");var timer=null;var showCall=function(a){YAHOO.example.container.flySendToFriendSuccessBlock.hide();YAHOO.example.container.flyEmailUsSuccessBlock.hide();YAHOO.example.container.flySmsSuccessBlock.hide();YAHOO.example.container.flyCall.show();YAHOO.example.container.flyEmailUs.hide();YAHOO.example.container.flySms.hide();YAHOO.example.container.flySendToFriend.hide();showFlash()};var showEmailUs=function(a){hideFlash();YAHOO.example.container.flySendToFriendSuccessBlock.hide();YAHOO.example.container.flyEmailUsSuccessBlock.hide();YAHOO.example.container.flySmsSuccessBlock.hide();YAHOO.example.container.flyCall.hide();YAHOO.example.container.flyEmailUs.show();YAHOO.example.container.flySms.hide();YAHOO.example.container.flySendToFriend.hide()};var showSms=function(a){hideFlash();YAHOO.example.container.flySendToFriendSuccessBlock.hide();YAHOO.example.container.flyEmailUsSuccessBlock.hide();YAHOO.example.container.flySmsSuccessBlock.hide();YAHOO.example.container.flyCall.hide();YAHOO.example.container.flyEmailUs.hide();YAHOO.example.container.flySms.show();YAHOO.example.container.flySendToFriend.hide()};var showSendToFriend=function(a){hideFlash();YAHOO.example.container.flySendToFriendSuccessBlock.hide();YAHOO.example.container.flyEmailUsSuccessBlock.hide();YAHOO.example.container.flySmsSuccessBlock.hide();YAHOO.example.container.flyCall.hide();YAHOO.example.container.flyEmailUs.hide();YAHOO.example.container.flySms.hide();YAHOO.example.container.flySendToFriend.show()};var hideAll=function(a){YAHOO.example.container.flyCall.hide();YAHOO.example.container.flyEmailUs.hide();YAHOO.example.container.flySmsSuccessBlock.hide();YAHOO.example.container.flySms.hide();YAHOO.example.container.flySendToFriend.hide();YAHOO.example.container.flyEmailUsSuccessBlock.hide();YAHOO.example.container.flySendToFriendSuccessBlock.hide();showFlash()};var hideFlash=function(){var a=document.getElementsByTagName("object");for(var b=0;b<a.length;b++){a[b].style.visibility="hidden"}};var showFlash=function(){var a=document.getElementsByTagName("object");for(var b=0;b<a.length;b++){a[b].style.visibility="visible"}};function getQueryParamValue(b){b=b.replace(/([\[\]])/g,"\\$1");var a=window.location.search.match(new RegExp("[\\?&]"+b+"=([^&#]*)"));if(a){return a[1]}}YAHOO.util.Event.onDOMReady(function(){YAHOO.example.container.flyCall=new YAHOO.widget.Overlay("ms_flyout_call",{fixedcenter:false,visible:false});YAHOO.example.container.flyEmailUs=new YAHOO.widget.Overlay("emailUsFormBlock",{fixedcenter:false,visible:false});YAHOO.example.container.flySms=new YAHOO.widget.Overlay("smsFormBlock",{fixedcenter:false,visible:false});YAHOO.example.container.flySendToFriend=new YAHOO.widget.Overlay("sendToFriendFormBlock",{fixedcenter:false,visible:false});YAHOO.example.container.flyEmailUsSuccessBlock=new YAHOO.widget.Overlay("emailUsSuccessBlock",{fixedcenter:false,visible:false});YAHOO.example.container.flySendToFriendSuccessBlock=new YAHOO.widget.Overlay("sendToFriendSuccessBlock",{fixedcenter:false,visible:false});YAHOO.example.container.flySmsSuccessBlock=new YAHOO.widget.Overlay("smsSuccessBlock",{fixedcenter:false,visible:false});YAHOO.example.container.flyCall.render();YAHOO.example.container.flyEmailUs.render();YAHOO.example.container.flySms.render();YAHOO.example.container.flySendToFriend.render();YAHOO.example.container.flyEmailUsSuccessBlock.render();YAHOO.example.container.flySendToFriendSuccessBlock.render();YAHOO.example.container.flySmsSuccessBlock.render();YAHOO.example.container.flyEmailUs.showEvent.subscribe(function(){document.getElementById("emailUsFromName").focus()});YAHOO.example.container.flySendToFriend.showEvent.subscribe(function(){document.getElementById("sendToFriendName").focus()});YAHOO.example.container.flySms.showEvent.subscribe(function(){document.getElementById("smsFromNumber").focus()});YAHOO.util.Event.addListener("ms_call","click",showCall);YAHOO.util.Event.addListener("ms_email","click",showEmailUs);YAHOO.util.Event.addListener("ms_sms","click",showSms);YAHOO.util.Event.addListener("ms_sendToFriend","click",showSendToFriend);YAHOO.util.Event.addListener("ms_hd","click",hideAll);YAHOO.util.Event.addListener("bd","click",hideAll);YAHOO.util.Event.addListener("ms_copyright","click",hideAll)});function validateSmsFromNumber(a){phoneNumber=a.replace(/\s+/g,"");if(phoneNumber.length>9&&phoneNumber.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)){return true}else{return false}}function validateSmsMessage(a){return !(a==null||a=="")}function validateSmsMessageLength(a){return a.length<=250}function validateEmail(c){if(c.length<=0){return false}var b=c.match("^(.+)@(.+)$");if(b==null){return false}if(b[1]!=null){var e=/^\"?[\w-_\.]*\"?$/;if(b[1].match(e)==null){return false}}if(b[2]!=null){var d=/^[\w-\.]*\.[A-Za-z]{2,4}$/;if(b[2].match(d)==null){var a=/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;if(b[2].match(a)==null){return false}}return true}return false};
