var ie5=document.all&&!window.opera;var ns6=document.getElementById;
function sObj(src,dst,x,y){if(!document.all&&!document.getElementById)return;hObj();clrObjTimer();var xy=gXY(src);obj=document.getElementById(dst);obj.style.top=(xy[1]+y)+'px';obj.style.left=(xy[0]+x)+'px';sFltr(obj);}
function hObj(){if(window.obj)obj.style.visibility='hidden';}
function gXY(o){var x=y=0;if(o.offsetParent){x=o.offsetLeft;y=o.offsetTop;while(o=o.offsetParent){x+=o.offsetLeft;y+=o.offsetTop;}}return [x,y];}
function sFltr(o){if(o.filters && o.filters.length>0)o.filters[0].Apply();o.style.visibility='visible';if(o.filters && o.filters.length>0)o.filters[0].Play();}
function hObjDyn(e){if(ie5&&!obj.contains(e.toElement))hObj();else if(ns6&&e.currentTarget!=e.relatedTarget&&!IsContainNS6(e.currentTarget,e.relatedTarget))hObj();}
function setObjTimer(){objTimer=setTimeout("hObj()",500);}
function clrObjTimer(){if(window.objTimer)clearTimeout(objTimer);}
function IsContainNS6(a,b){while(b.parentNode)if((b=b.parentNode)==a)return true;return false;}
if(ie5||ns6)document.onclick=hObj;

function favBar(obj,x,y){if(!document.getElementById)return;var o=document.getElementById(obj);if(o)o.innerHTML='<img alt="." width="387" height="26" src="assets/images/i_toolz_1.gif" usemap="#tlzMap" /><a href="#" onmouseover="sObj(this,\'favs\','+x+','+y+')" onmouseout="setObjTimer()"><img alt="Add to Favorites/Bookmark" width="126" height="26" src="assets/images/i_toolz_2.gif" /></a>';}
function favIE(){if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {window.external.AddFavorite(location.href, document.title );}}
function favUrl(base,url,title){base=base.replace('{url}',url);return base.replace('{title}',title);}
function favImg(imgName){return 'background-image:url(assets/images/f_'+imgName+'.gif)';}
function favLink(url,style,title){return '<li><a target="_blank" href="'+url+'" style="'+style+'">'+title+'</a></li>';}
function favInit(obj){var arrFav=["http://del.icio.us/post?url={url}&title={title}","http://digg.com/submit?phase=2&url={url}&title={title}","http://furl.net/storeIt.jsp?u={url}&t={title}","http://www.netscape.com/submit/?U={url}&T={title}","http://myweb2.search.yahoo.com/myresults/bookmarklet?u={url}&t={title}","http://www.stumbleupon.com/submit?url={url}&title={title}","http://www.google.com/bookmarks/mark?op=edit&bkmk={url}&title={title}","http://www.technorati.com/faves?add={url}","http://blinklist.com/index.php?Action=Blink/addblink.php&Url={url}&Title={title}","http://www.newsvine.com/_wine/save?u={url}&h={title}","http://ma.gnolia.com/bookmarklet/add?url={url}&title={title}","http://reddit.com/submit?url={url}&title={title}","https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url={url}&title={title}&top=1","http://tailrank.com/share/?link_href={url}&title={title}"];
	var arrObj=['delicious', 'digg','furl','netscape','myweb','stumbleupon','bmarks','technorati','blinklist','newsvine','magnolia','reddit','live','tailrank'];
	var arrTtl=['del.icio.us','Digg','Furl','Netscape','Yahoo! My Web','StumbleUpon','Google Bookmarks','Technorati','BlinkList','Newsvine','ma.gnolia','reddit','Windows Live','Tailrank'];
	var ttl=document.getElementById("ttl").innerHTML.replace(/ /gi,'%20').replace(/\?/gi,'');
	var url=location.href.replace(/:/g,'%3A').replace(/\//g,'%2F');
	var html=favMap();
	html+='<div id="favs" class="mnu" onmouseover="clrObjTimer()" onmouseout="hObjDyn(event)"><ul><li><a href="javascript:favIE();" style="'+favImg('ie')+'">Internet Explorer</a></li>';
	for(var i=0;i<arrFav.length;i++)html+= favLink(favUrl(arrFav[i],url,ttl),favImg(arrObj[i]),arrTtl[i]);
	html+='</ul></div>';
	if(!document.getElementById)return;var o=document.getElementById(obj);if(o)o.innerHTML=html;
}
function favMap(){
	var t='<map name="tlzMap">';
	t+='<area alt="Manage Font Size" href="javascript:fontSize();" shape="rect" coords="8, 0, 109, 25">';
	t+='<area alt="Send This Page To A Friend" href=\'javascript:oWin("/de/tell-a-friend.php?u='+location.href+'",450,300)\' shape="rect" coords="146, 0, 225, 25">';
	t+='<area alt="Printer Friendly" href="javascript:print();" shape="rect" coords="271, 0, 369, 25">';
	t+='</map>';
	return t;
}
function fontSize(){var fSize='1em',otxt=document.getElementById("txt");if(otxt){switch(otxt.style.fontSize){case '0.8em':fSize='1em';break;case '1em':fSize='1.2em';break;case '1.2em':fSize='1.4em';break;case '1.4em':fSize='1.6em';break;case '1.6em':fSize='0.8em';break;default:fSize='1em';};otxt.style.fontSize=fSize;}}
function oWin(url,w,h){open(url,"","width="+w+",height="+h+",directories=1,scrollbars=1,status=1,resizable=1");}