
var skype_injection_path='chrome://skype_ff_toolbar_win/content/';var skype_tool=null;var SkypeActiveCallButtonPart=0;function SkypeSetCallButtonPart(obj)
{if(obj.getAttribute('id')=='__skype_highlight_id_left')
{SkypeActiveCallButtonPart=0;}
else if(obj.getAttribute('id')=='__skype_highlight_id_right')
{SkypeActiveCallButtonPart=1;}}
function SkypeSetCallButton(obj,hl,isInternational,isFax)
{var cb_part_l=null;var cb_part_ml=null;var cb_part_mr=null;var cb_part_r=null;if(obj.getAttribute('rtl')=='false')
{cb_part_l=obj.firstChild.firstChild;cb_part_ml=obj.firstChild.lastChild;cb_part_mr=obj.lastChild.firstChild;cb_part_r=obj.lastChild.lastChild;cb_flag=obj.firstChild.lastChild.firstChild;if(cb_flag&&cb_flag.isSameNode(obj.firstChild.firstChild.firstChild)==true)
cb_flag=null;}
else
{cb_part_l=obj.lastChild.lastChild;cb_part_ml=obj.lastChild.firstChild;cb_part_mr=obj.firstChild.lastChild;cb_part_r=obj.firstChild.firstChild;cb_flag=obj.lastChild.firstChild.lastChild;if(cb_flag&&cb_flag.isSameNode(obj.lastChild.lastChild.lastChild)==true)
cb_flag=null;}
if(hl==1)
{cb_part_l.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_mouseover_l.gif')";if(cb_part_l.isSameNode(cb_part_ml)!=true)
cb_part_ml.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_mouseover_m.gif')";cb_part_mr.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_mouseover_m.gif')";if(isInternational=="0")
{if(SkypeActiveCallButtonPart==0)
{cb_part_r.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_mouseonflag_r"+(isFax?"_fax":"")+".gif')";if(cb_flag)
{cb_flag.style.top='1px';cb_flag.style.left='1px';cb_flag.style.padding='1px 0px 0px 1px';}}
else
{cb_part_r.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_mouseover_r"+(isFax?"_fax":"")+".gif')";if(cb_flag)
{cb_flag.style.top='0px';cb_flag.style.left='0px';cb_flag.style.padding='0px 1px 1px 0px';cb_flag.style.margin='0px 0px 2px 0px;';}}}
else
{cb_part_r.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_mouseover_r"+(isFax?"_fax":"")+".gif')";if(cb_flag)
{cb_flag.style.top='0px';cb_flag.style.left='0px';cb_flag.style.padding='0px 1px 1px 0px';cb_flag.style.margin='0px 0px 2px 0px;';}}}
else
{cb_part_l.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_normal_l.gif')";if(cb_part_l.isSameNode(cb_part_ml)!=true)
cb_part_ml.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_normal_m.gif')";cb_part_mr.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_normal_m.gif')";cb_part_r.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_normal_r"+(isFax?"_fax":"")+".gif')";if(cb_flag)
{cb_flag.style.top='0px';cb_flag.left='0px';cb_flag.style.padding='0px 1px 1px 0px';cb_flag.style.margin='0px 0px 2px 0px;';}}}
var skype_cb_l='';var skype_cb_m='';var skype_cb_r='';function SkypeSetCallButtonPressed(obj,pr,isInternational,isFax)
{var cb_part_l=null;var cb_part_ml=null;var cb_part_mr=null;var cb_part_r=null;if(obj.getAttribute('rtl')=='false')
{cb_part_l=obj.firstChild.firstChild;cb_part_ml=obj.firstChild.lastChild;cb_part_mr=obj.lastChild.firstChild;cb_part_r=obj.lastChild.lastChild;cb_flag=obj.firstChild.lastChild.firstChild;if(cb_flag&&cb_flag.isSameNode(obj.firstChild.firstChild.firstChild)==true)
cb_flag=null;}
else
{cb_part_l=obj.lastChild.lastChild;cb_part_ml=obj.lastChild.firstChild;cb_part_mr=obj.firstChild.lastChild;cb_part_r=obj.firstChild.firstChild;cb_flag=obj.lastChild.firstChild.lastChild;if(cb_flag&&cb_flag.isSameNode(obj.lastChild.lastChild.lastChild)==true)
cb_flag=null;}
if(pr==1)
{skype_cb_l=cb_part_l.style.backgroundImage;skype_cb_m=cb_part_mr.style.backgroundImage;skype_cb_r=cb_part_r.style.backgroundImage;if(isInternational=="0")
{if(SkypeActiveCallButtonPart==0)
{cb_part_l.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_down_l.gif')";if(cb_part_l.isSameNode(cb_part_ml)!=true)
cb_part_ml.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";}
else
{cb_part_l.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_down_l.gif')";if(cb_part_l.isSameNode(cb_part_ml)!=true)
cb_part_ml.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";cb_part_mr.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";cb_part_r.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif')";}}
else
{cb_part_l.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_down_l.gif')";if(cb_part_l.isSameNode(cb_part_ml)!=true)
cb_part_ml.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";cb_part_mr.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";cb_part_r.style.backgroundImage="url('chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif')";}}
else
{cb_part_l.style.backgroundImage=skype_cb_l;if(cb_part_l.isSameNode(cb_part_ml)!=true)
cb_part_ml.style.backgroundImage=skype_cb_m;cb_part_mr.style.backgroundImage=skype_cb_m;cb_part_r.style.backgroundImage=skype_cb_r;}}
function SkypeToolBarInit(tb)
{skype_tool=tb;}
function doRunCMDSkype(event,link,id,name)
{if(skype_tool)
{if(link=='chdial')
{var obj=event.originalTarget;if(!obj)
obj=event;SkypeFlagColor='rgb(184, 203, 255)';skype_tool.chprefix(id,document,obj,screenY);}
else if(link=='copy')
skype_tool.copy_num(id,document);else if(link=='sms')
skype_tool.sms(id);else if(link=='add')
skype_tool.add(id,name);else
skype_tool.call(id);}}
function runCMDSkype(link)
{HideSkypeFull();doRunCMDSkype(null,link,skype_curid,skype_cur_name);}
function HideSkypeFull()
{document.getElementById('skype_dc').style.visibility="hidden";}
function ShowSkype(event,title)
{DoShowSkype(event.pageX,event.pageY+20,title);}
function DoShowSkype(cX,cY,title)
{var menu=document.getElementById('skype_dc');menu.firstChild.nodeValue=title;menu.style.visibility="visible";menu.style.left=cX+'px';menu.style.top=cY+'px';}
var SkypeFlagColor='rgb(184, 203, 255)';function doSkypeFlag(obj,brd)
{SkypeFlagColor=brd;}
var skype_curid=0,skype_active=false,skype_showseed=0,skype_ctm=0,skype_cur_name='';var skype_curbutton=null;function SkypeCheckCallButton(obj)
{var res=false;if(skype_curbutton&&skype_curbutton.isSameNode(obj)==true)
res=true;skype_curbutton=obj;return res;}
function HideSkypeMenu()
{if(!skype_active)
HideSkypeMenuFull();else
setTimeout("HideSkypeMenu()",1000);}
function HideSkypeMenu2(event)
{skype_showseed=0;if(!skype_active)
HideSkypeMenuFull();else
{skype_active=false;setTimeout("HideSkypeMenu()",1000);}}
function HideSkypeMenuFull()
{}
function CheckSkype()
{skype_active=true;}
function ShowSkypeMenu(event,call_msg,id,callto,isMobile,name,x,y)
{try{}catch(e){}}
function DoShowSkypeMenu(call_msg,seed,callto,pcx,pcy,isMobile,name)
{try{}catch(e){}}
function SkypeSetBgColor(obj,color)
{try{obj.lastChild.style.backgroundColor=color;}catch(e){}}
function SkypeGetBounds(element)
{try{var left=element.left;var top=element.top;while(!(element.tagName.toLowerCase()=='span'&&element.getAttribute('id')=='__skype_highlight_id'))
{element=element.parentNode;}
left=element.offsetLeft;top=element.offsetTop;for(var parent=element.offsetParent;parent;parent=parent.offsetParent)
{left+=parent.offsetLeft;top+=parent.offsetTop;if(parent.tagName.toLowerCase()=='div')
{left-=parent.scrollLeft;top-=parent.scrollTop;}}
return{left:left,top:top,width:element.offsetWidth,height:element.offsetHeight};}catch(e){}}
function SkypeGetDivScroll(element)
{try{var left=0;var top=0;while(!(element.tagName.toLowerCase()=='span'&&element.getAttribute('id')=='__skype_highlight_id'))
{element=element.parentNode;}
for(var parent=element.offsetParent;parent;parent=parent.offsetParent)
{if(parent.tagName.toLowerCase()=='div')
{left-=parent.scrollLeft;top-=parent.scrollTop;}}
return{left:left,top:top};}catch(e){}}
