
var IE6; // IE <=7 ... annoying "div above form" problem....
// IE6: JS=5.6
// IE7: JS=5.7
/*@cc_on
   @if (@_jscript_version < 5.7)
      IE6=1;
   @end
@*/

var tt=new Array();
tt['pix_filter_private']=new Object;
tt['pix_filter_private'].tip='<b>Private:</b><br>Only show private (=not public) pictures.<br>This means you will only see *your own* private pictures and the private pictures of otha users who have put your name on their friendslist with the special *bossomBuddy* status....';
tt['pix_filter_private'].corner='lt';
tt['pix_filter_private'].width=300;
tt['pix_filter_private'].diff_x=0;
tt['pix_filter_private'].diff_y=0;
tt['pix_filter_private'].width=300;

tt['pix_filter_rated']=new Object;
tt['pix_filter_rated'].tip='<b>Rated:</b><br>Only show pictures that have been *rated* (between 1 (=notsogood) and 5 (=bestest)) by the uploader..';
tt['pix_filter_rated'].corner='lb';
tt['pix_filter_rated'].width=300;
tt['pix_filter_rated'].diff_x=0;
tt['pix_filter_rated'].diff_y=0;
tt['pix_filter_rated'].width=300;

tt['pix_filter_manipulated']=new Object;
tt['pix_filter_manipulated'].tip='<b>Manipulated:</b><br>Only show pictures that have been *physically* manipulated in some way after or during development. (&quot;pyhsically&quot; because we are not fond of photoshop manipulations around here)<br>These manipulations are not only the &quot;classic&quot; <i>SX-70 manipulations</i>, but also include all kinds of effects achieved by cutting, glueing, colouring,  creating collages...';
tt['pix_filter_manipulated'].corner='lb';
tt['pix_filter_manipulated'].width=300;
tt['pix_filter_manipulated'].diff_x=0;
tt['pix_filter_manipulated'].diff_y=0;
tt['pix_filter_manipulated'].width=300;

tt['pix_filter_scrawled']=new Object;
tt['pix_filter_scrawled'].tip='<b>Scrawled:</b><br>Only show pictures that have been scrawled or scribbled onto...<br>';
tt['pix_filter_scrawled'].corner='lb';
tt['pix_filter_scrawled'].width=200;
tt['pix_filter_scrawled'].diff_x=0;
tt['pix_filter_scrawled'].diff_y=0;
tt['pix_filter_scrawled'].width=200;

tt['pix_filter_commented']=new Object;
tt['pix_filter_commented'].tip='<b>Commented:</b><br>Only show pictures that have been commented by otha users.<br>(..or by the uploader himself if the respective person is fond of soliloquy..)<br>';
tt['pix_filter_commented'].corner='lt';
tt['pix_filter_commented'].width=250;
tt['pix_filter_commented'].diff_x=0;
tt['pix_filter_commented'].diff_y=0;
tt['pix_filter_commented'].width=250;

tt['pix_filter_me']=new Object;
tt['pix_filter_me'].tip='<b>Me:</b><br>Only show pictures that feature the person who uploaded the image (typically selfportraits)..';
tt['pix_filter_me'].corner='lt';
tt['pix_filter_me'].width=200;
tt['pix_filter_me'].diff_x=0;
tt['pix_filter_me'].diff_y=0;
tt['pix_filter_me'].width=200;

tt['pix_filter_filmexpired']=new Object;
tt['pix_filter_filmexpired'].tip='<b>expired:</b><br>Only show pictures shot on *expired* film.<br><br><span class=\'tt_txts\'><i>(ok, I admit this tooltip was only added for the sake of completeness ~lol~)</i></span>';
tt['pix_filter_filmexpired'].corner='lb';
tt['pix_filter_filmexpired'].width=260;
tt['pix_filter_filmexpired'].diff_x=0;
tt['pix_filter_filmexpired'].diff_y=0;
tt['pix_filter_filmexpired'].width=260;

tt['pix_info_rating']=new Object;
tt['pix_info_rating'].tip='Rating of this picture<br>(5=best, 1=notsogood)<br><br>click this link to only see &quot;rated&quot; pictures (sorted by rating)..<br>';
tt['pix_info_rating'].corner='lt';
tt['pix_info_rating'].width=200;
tt['pix_info_rating'].diff_x=0;
tt['pix_info_rating'].diff_y=0;
tt['pix_info_rating'].width=200;

tt['pix_info_views']=new Object;
tt['pix_info_views'].tip='*Total* number of times this pictures has been viewed by otha people (registered members of this site as well as &quot;visitors&quot;)<br>In contrast to the number in brackets (if present), *this* number increases with multiple views of this picture by the same person...';
tt['pix_info_views'].corner='rb';
tt['pix_info_views'].width=260;
tt['pix_info_views'].diff_x=0;
tt['pix_info_views'].diff_y=0;
tt['pix_info_views'].width=260;

tt['pix_info_distinctviews']=new Object;
tt['pix_info_distinctviews'].tip='Number of &quot;distinct&quot; views, which means how many different otha users have seen this picture till now.<br><br>In contrast to the total views left to this, *this* number does NOT increase with multiple views of this picture by the same person...';
tt['pix_info_distinctviews'].corner='rb';
tt['pix_info_distinctviews'].width=260;
tt['pix_info_distinctviews'].diff_x=0;
tt['pix_info_distinctviews'].diff_y=0;
tt['pix_info_distinctviews'].width=260;

tt['pix_info_viewsgeneral']=new Object;
tt['pix_info_viewsgeneral'].tip='please move your mouse over the numbers on the right to see what they mean..';
tt['pix_info_viewsgeneral'].corner='rb';
tt['pix_info_viewsgeneral'].width=140;
tt['pix_info_viewsgeneral'].diff_x=-20;
tt['pix_info_viewsgeneral'].diff_y=0;
tt['pix_info_viewsgeneral'].width=140;

tt['pix_info_numfavs']=new Object;
tt['pix_info_numfavs'].tip='how many people have added this picture to their &quot;pola-vorites&quot; collection.<br><br>click the link to see *who* faved this picture..';
tt['pix_info_numfavs'].corner='rb';
tt['pix_info_numfavs'].width=180;
tt['pix_info_numfavs'].diff_x=0;
tt['pix_info_numfavs'].diff_y=0;
tt['pix_info_numfavs'].width=180;

tt['pix_info_numvotes']=new Object;
tt['pix_info_numvotes'].tip='How many people have voted for this picture to become &quot;ShotOfTheDay&quot; - the award which is bestowed daily at 1:23 AM CET.<br>The winning picture is presented on the cover page (click on &quot;POLANOID&quot; in the topnaviagtion frame) of polanoid.net for 24 hours and the winner receives a 10 euro coupon for POLAPREMIUM.com (todays #1 source for finest polaroid material)<br><br>if you are a registered user and logged in, you can cast your vote by clicking the vote link below the image..<br><br><br><br><i>* Winning picture is not the one with the most votes, but the picture with the highest votes per viewers ratio.<br>The idea is to make the selection more &quot;fair&quot; and also make the winning chances of a picture independent of the &quot;popularity&quot; of the pictures author.</i>';
tt['pix_info_numvotes'].corner='rb';
tt['pix_info_numvotes'].width=400;
tt['pix_info_numvotes'].diff_x=0;
tt['pix_info_numvotes'].diff_y=0;
tt['pix_info_numvotes'].width=400;

tt['pix_filter_tags_fulltext']=new Object;
tt['pix_filter_tags_fulltext'].tip='here you can toggle between <b>&quot;Tags search&quot;</b> and <b>&quot;Fulltextsearch&quot;</b>.<br><br><b>Tags</b> will only show pictures that have been tagged with the respective searchword.<br><b>Fulltext</b> will also show pictures that contain the <i>searchstring</i> as part of their title, description or &quot;tip&quot;.<br>(You can add a space character before or after the search<i>string</i> to only search for the exact <i>word</i>)<br><br>(the currently active option is the one displayed in bold..)';
tt['pix_filter_tags_fulltext'].corner='lt';
tt['pix_filter_tags_fulltext'].width=400;
tt['pix_filter_tags_fulltext'].diff_x=-36;
tt['pix_filter_tags_fulltext'].diff_y=0;
tt['pix_filter_tags_fulltext'].width=400;

tt['pix_filter_shotlocation']=new Object;
tt['pix_filter_shotlocation'].tip='<b>Shotlocation:</b><br>Only show pictures that have been taken in a certain country/city.<br>The initially visible dropdown contains all countries where pictures have been taken.<br>You can either start your query after choosing a country - or you can wait a few seconds for a second dropdpown to appear below, which will display all cities in the selected country where pictures have been taken..<br><br><span class=\'tt_txts\'><i>ps: there is no Abahachi in Afghanistan.<br>I just added this one to see how serious  the folx around here take the whole picture tagging job ;)</i></span>';
tt['pix_filter_shotlocation'].corner='lt';
tt['pix_filter_shotlocation'].width=400;
tt['pix_filter_shotlocation'].diff_x=0;
tt['pix_filter_shotlocation'].diff_y=0;
tt['pix_filter_shotlocation'].width=400;

tt['pix_filter_projects']=new Object;
tt['pix_filter_projects'].tip='<b>Projects:</b><br>a-b-s-o-l-u-t-e-l-y nobody has any clue what this dropdown and the two phrases it contains, should mean.<br>~zorrrrry~<br><br>if anybody has any kindof idea, pleae send an email to <i>lazysloth@polanoid.net</i>..<br>';
tt['pix_filter_projects'].corner='lt';
tt['pix_filter_projects'].width=300;
tt['pix_filter_projects'].diff_x=0;
tt['pix_filter_projects'].diff_y=0;
tt['pix_filter_projects'].width=300;

tt['pix_filter_totalpixnum']=new Object;
tt['pix_filter_totalpixnum'].tip='<b>Total number</b> of uploaded (and suxxesfully unlocked) pictures.<br>This number will always be higher than the result of your query, because it also includes all &quot;private&quot; pictures (the ones that only the user who uploaded them and his *bossomBuddy* friends can see)';
tt['pix_filter_totalpixnum'].corner='lt';
tt['pix_filter_totalpixnum'].width=300;
tt['pix_filter_totalpixnum'].diff_x=0;
tt['pix_filter_totalpixnum'].diff_y=0;
tt['pix_filter_totalpixnum'].width=300;

tt['pix_filter_filteredpixnum']=new Object;
tt['pix_filter_filteredpixnum'].tip='Number of pictures that fit your current filter query - or all &quot;public&quot; pictures if you didn\'t apply any filters.<br>';
tt['pix_filter_filteredpixnum'].corner='lt';
tt['pix_filter_filteredpixnum'].width=220;
tt['pix_filter_filteredpixnum'].diff_x=0;
tt['pix_filter_filteredpixnum'].diff_y=0;
tt['pix_filter_filteredpixnum'].width=220;

tt['pix_filter_moreless']=new Object;
tt['pix_filter_moreless'].tip='Show/Hide the complete filters control panel..<br>';
tt['pix_filter_moreless'].corner='lt';
tt['pix_filter_moreless'].width=160;
tt['pix_filter_moreless'].diff_x=0;
tt['pix_filter_moreless'].diff_y=0;
tt['pix_filter_moreless'].width=160;

tt['pix_filter_shotdate']=new Object;
tt['pix_filter_shotdate'].tip='Only show pictures <b>taken</b> on the date selected in the corresponding dropdown(s)..<br>';
tt['pix_filter_shotdate'].corner='lb';
tt['pix_filter_shotdate'].width=200;
tt['pix_filter_shotdate'].diff_x=0;
tt['pix_filter_shotdate'].diff_y=0;
tt['pix_filter_shotdate'].width=200;

tt['pix_filter_uploaddate']=new Object;
tt['pix_filter_uploaddate'].tip='Only show pictures <b>uploaded</b> on the date selected in the corresponding dropdown(s)..<br>';
tt['pix_filter_uploaddate'].corner='lb';
tt['pix_filter_uploaddate'].width=200;
tt['pix_filter_uploaddate'].diff_x=0;
tt['pix_filter_uploaddate'].diff_y=0;
tt['pix_filter_uploaddate'].width=200;

tt['pix_single_shotby']=new Object;
tt['pix_single_shotby'].tip='Click to see all pictures uploaded by this user..<br>';
tt['pix_single_shotby'].corner='lt';
tt['pix_single_shotby'].width=160;
tt['pix_single_shotby'].diff_x=0;
tt['pix_single_shotby'].diff_y=0;
tt['pix_single_shotby'].width=160;

tt['pix_single_returntofullpool']=new Object;
tt['pix_single_returntofullpool'].tip='Click to see this picture in context of the whole picpool (all users\' pictures).<br><br>(=Extend the scope of all filters and filterlinks on this page)';
tt['pix_single_returntofullpool'].corner='lt';
tt['pix_single_returntofullpool'].width=240;
tt['pix_single_returntofullpool'].diff_x=0;
tt['pix_single_returntofullpool'].diff_y=0;
tt['pix_single_returntofullpool'].width=240;

tt['pix_single_myfriendspix']=new Object;
tt['pix_single_myfriendspix'].tip='You are currently viewing the latest uploads of the folx on your friendslist..';
tt['pix_single_myfriendspix'].corner='lt';
tt['pix_single_myfriendspix'].width=260;
tt['pix_single_myfriendspix'].diff_x=0;
tt['pix_single_myfriendspix'].diff_y=0;
tt['pix_single_myfriendspix'].width=260;

tt['people_filter_totalfolxnum']=new Object;
tt['people_filter_totalfolxnum'].tip='<b>Total number</b> of registered polanoid.net members.<br>(does also include members who have not uploaded pictures (yet).)';
tt['people_filter_totalfolxnum'].corner='lt';
tt['people_filter_totalfolxnum'].width=320;
tt['people_filter_totalfolxnum'].diff_x=0;
tt['people_filter_totalfolxnum'].diff_y=0;
tt['people_filter_totalfolxnum'].width=320;

tt['people_filter_filteredfolxnum']=new Object;
tt['people_filter_filteredfolxnum'].tip='Number of polanoid.net members that fit your current filter query - or if you didn\'t specify any filters -  *all* members who have at least one &quot;public&quot; picture online.<br>';
tt['people_filter_filteredfolxnum'].corner='lt';
tt['people_filter_filteredfolxnum'].width=220;
tt['people_filter_filteredfolxnum'].diff_x=0;
tt['people_filter_filteredfolxnum'].diff_y=0;
tt['people_filter_filteredfolxnum'].width=220;

tt['people_filter_nickname']=new Object;
tt['people_filter_nickname'].tip='Search/filter by polanoid.net username.<br><br><b>Please note:</b> Since this site is about pictures, only members who have at least one &quot;public&quot; picture in their account are displayed in the searchresults.<br><br>(You can still go to the &quot;profile&quot; of one of the &quot;stealth&quot; members, by typing: <i>http://people.polanoid.net/UsernameOfStealthMember</i> into your browser\'s address bar)<br>';
tt['people_filter_nickname'].corner='lt';
tt['people_filter_nickname'].width=420;
tt['people_filter_nickname'].diff_x=0;
tt['people_filter_nickname'].diff_y=0;
tt['people_filter_nickname'].width=420;

tt['people_filter_location']=new Object;
tt['people_filter_location'].tip='Filter/search members by Location:<br>The inititally visible dropdown contains all countries where polanoid.net members are located so far.<br>You can either start your query after choosing a country - or you can wait a few seconds for a second dropdpown to appear below, which will display all cities in the selected country that are inhabitated by polanoideros..<br>';
tt['people_filter_location'].corner='lt';
tt['people_filter_location'].width=400;
tt['people_filter_location'].diff_x=0;
tt['people_filter_location'].diff_y=0;
tt['people_filter_location'].width=400;

tt['people_filter_sex']=new Object;
tt['people_filter_sex'].tip='Filter/search members by Sex<br><br><b>Please note:</b> The values in the dropdown do NOT denote the <i>sexual orientation</i>, but rather the <i>gender</i> of the polanoid.net members..<br>';
tt['people_filter_sex'].corner='lt';
tt['people_filter_sex'].width=260;
tt['people_filter_sex'].diff_x=0;
tt['people_filter_sex'].diff_y=0;
tt['people_filter_sex'].width=260;

tt['people_filter_resultorder']=new Object;
tt['people_filter_resultorder'].tip='Determine the order in which your search/query results are displayed.<br><br><table class=\'tt_txt\'><tr><td ><i>&quot;upload sedulity&quot;</i></td><td> = number of pictures uploaded by the user</td></tr><tr><td><i>&quot;polanoidic recognition&quot;</i></td><td> = number of &quot;picture views&quot; (=how many times have the pictures of this user been viewed by other users)</td></tr><tr><td><i>&quot;polanoidic hospitality&quot;</i></td><td> = number of &quot;profile visits&quot; (=how many times has the profile page of this user been visited by other users)</td></tr><tr><td><i>&quot;polanoidic attentiveness&quot;</i></td><td> = number of comments written by this user</td></tr><tr><td><i>&quot;polanoidic loquacity&quot;</i></td><td> = number of guestbook messages written by this user</td></tr></table>';
tt['people_filter_resultorder'].corner='lt';
tt['people_filter_resultorder'].width=460;
tt['people_filter_resultorder'].diff_x=0;
tt['people_filter_resultorder'].diff_y=0;
tt['people_filter_resultorder'].width=460;

tt['pix_info_editfavwhy']=new Object;
tt['pix_info_editfavwhy'].tip='Here you can enter some words about <i>&quot;why&quot;</i> this picture deserves a place on your favlist.<br><br>This text will (only) be visible if someone views this picture in the context of browsing your &quot;All Time PolaVorites&quot;..<br>';
tt['pix_info_editfavwhy'].corner='rt';
tt['pix_info_editfavwhy'].width=280;
tt['pix_info_editfavwhy'].diff_x=4;
tt['pix_info_editfavwhy'].diff_y=0;
tt['pix_info_editfavwhy'].width=280;

tt['pix_filter_onymous']=new Object;
tt['pix_filter_onymous'].tip='<b>Onymous:</b><br>Only show pictures that were not submitted anonymously.<br>(only these pictures can be voted for &quot;XofTheWeek&quot;)';
tt['pix_filter_onymous'].corner='lt';
tt['pix_filter_onymous'].width=200;
tt['pix_filter_onymous'].diff_x=0;
tt['pix_filter_onymous'].diff_y=0;
tt['pix_filter_onymous'].width=200;

tt['pix_info_xnumvotes']=new Object;
tt['pix_info_xnumvotes'].tip='How many people have voted for this picture to become &quot;XofTheWeek&quot; - the award which is bestowed every wednesday at 6:06 AM CET.<br>The winning picture is presented on the Xposed cover page for 1 week and the winner receives a 20 euro coupon for unsaleable.com (todays #1 source for finest polaroid material)<br><br>You can cast your vote by clicking the vote link below the image.<br>(Voting is only possible for pictures that have not been anonymized while being submitted to Xposed)<br>';
tt['pix_info_xnumvotes'].corner='rb';
tt['pix_info_xnumvotes'].width=400;
tt['pix_info_xnumvotes'].diff_x=0;
tt['pix_info_xnumvotes'].diff_y=0;
tt['pix_info_xnumvotes'].width=400;


var debug=0;

var tt_enabled=0; // show or not tooltips
var tt_delay=750;
var tt_fopa=100; // final tooltip opacity
var tt_copa=0; // current tooltip opacity
var tt_fip=''; // fade in progress
var tt_fito='';
var tt_foto='';
var tt_initto='';
var tt_hideto='';
var tt_waitingforFO=0;
var tt_waitingforFI=0;
var tt_sobj; // source of tooltip

var tt_htmltemplate='<table cellpadding="0" cellspacing="0" border="0">';
tt_htmltemplate+='<tr><td width="7" id="lt"><img src="/shared/rc_lt.gif" width="7"></td><td class="tt_top"><img src="/shared/filler.gif"></td><td width="7" id="rt" align="right"><img src="/shared/rc_rt.gif" width="7"></td></tr>';
tt_htmltemplate+='<tr><td class="tt_left"><img src="/shared/filler.gif"></td><td id="tooltiptxt" class="tt_txt">tooltip</td><td class="tt_right"><img src="/shared/filler.gif"></td></tr>';
tt_htmltemplate+='<tr><td id="lb" width="7"><img src="/shared/rc_lb.gif" width="7"></td><td class="tt_bottom"><img src="/shared/filler.gif"></td><td id="rb" width="7" align="right"><img src="/shared/rc_rb.gif" width="7"></td></tr>';
tt_htmltemplate+='</table>';
var tts_htmltemplate='<table cellpadding="0" cellspacing="0" border="0">';
tts_htmltemplate+='<tr><td width="7"><img src="/shared/rcs_lt.gif" width="7"></td><td bgcolor="#000000"><img src="/shared/filler.gif"></td><td width="7" align="right"><img src="/shared/rcs_rt.gif" width="7"></td></tr>';
tts_htmltemplate+='<tr><td bgcolor="#000000"><img src="/shared/filler.gif"></td><td id="stooltiptxt" class="ttshadow_txt">bla</td><td bgcolor="#000000"><img src="/shared/filler.gif"></td></tr>';
tts_htmltemplate+='<tr><td width="7"><img src="/shared/rcs_lb.gif" width="7"></td><td  bgcolor="#000000"><img src="/shared/filler.gif"></td><td width="7" align="right"><img src="/shared/rcs_rb.gif" width="7"></td></tr>';
tts_htmltemplate+='</table>';

function tt_initToolTips()
{
	var tt_div=document.createElement("DIV");
	tt_div.id="tooltip";
	tt_div.style.width=250;
	tt_div.style.visibility="hidden";
	tt_div.style.position="absolute";
	tt_div.style.top=-1000;
	tt_div.style.left=-1000;
	tt_div.style.zIndex=100;
	tt_div.style.opacity=0;
	document.body.appendChild(tt_div);

	var tt_shadowdiv=document.createElement("DIV");
	tt_shadowdiv.id="ttshadow";
	tt_shadowdiv.style.width=250;
	tt_shadowdiv.style.visibility="hidden";
	tt_shadowdiv.style.position="absolute";
	tt_shadowdiv.style.top=-1000;
	tt_shadowdiv.style.left=-1000;
	tt_shadowdiv.style.zIndex=90;
	tt_shadowdiv.style.opacity=0;
	document.body.appendChild(tt_shadowdiv);

	// dummy for IE zIndex problem
	// cant seem to create a borderless iframe on IE with javscript
	// therefore document.write
	if(IE6){
		document.write('<iframe style="position:absolute; visibility: hidden; padding:0px;z-Index:80" id="ttiedummy" marginheight="0" marginwidth="0" frameborder="0" scrolling="auto"></iframe>');
	}
}

function get_absx(obj){
	return sumOffsets(obj,"offsetLeft")
}
function get_absy(obj){
	return sumOffsets(obj,"offsetTop")
}
function sumOffsets(obj,na){
	var off=0;
	while(obj){
		off+=obj[na];
		obj=obj.offsetParent
	}
	return off;
}

function setTTOpacity(value)
{
	var ttdiv=document.getElementById('tooltip');
	ttdiv.style.opacity = value/100;
	ttdiv.style.filter = 'alpha(opacity=' + value + ')';

	var shadow=document.getElementById('ttshadow');
	value=Math.round(value/20);
	shadow.style.opacity = value/100;
	shadow.style.filter = 'alpha(opacity=' + value + ')';
}

function tts_mouseOver(link, txt, pos, difx, dify, wi, delay)
{
	// function with txt passed as parameter and chooseable delay overriding ini-default...
	link.over=1; // for safari
	var f_init=initSToolTip(link,txt, pos, difx, dify, wi);
	tt_initto=setTimeout(f_init,delay);
}

function initSToolTip(link,txt, pos, difx, dify, wi)
{
	return (function (){
		if(!link.over){
			return;
		}
		var ttswitch;// anotha tooltip initialised?
		if((typeof(tt_sobj)=='object')&&(link!=tt_sobj)){
			ttswitch=1;
		}else{
			ttswitch=0;
		}
		tt_sobj=link;

		// if is  fading out .. wait a bit
		if((tt_fip=='out') || (tt_waitingforFO)){
			var f_init=initSToolTip(link,txt, pos, difx, dify, wi);
			tt_initto=setTimeout(f_init,25);
			tt_waitingforFI=1;
			return;
		}

		var offx=difx;
		var offy=dify;
		var ttwidth=wi;
		var p=pos;

		if(typeof(offx)=='undefined'){
			offx=4;
		}
		if(typeof(offy)=='undefined'){
			offy=2;
		}
		if((typeof(ttwidth)=='undefined')||(!ttwidth)){
			ttwidth=250;
		}
		if((p != 'lb')&&(p != 'lt')&&(p != 'rb')&&(p != 'rt')){
			p='lb';
		}
		var dx, dy;

		if((!tt_fip) || (ttswitch)) { // safari multiple onMouseOver quirx
			// make clean from template
			document.getElementById('tooltip').innerHTML=tt_htmltemplate;
			document.getElementById('ttshadow').innerHTML=tts_htmltemplate;

			//make width
			document.getElementById('tooltip').style.width=ttwidth;
			document.getElementById('ttshadow').style.width=ttwidth;

			//make spitz
			document.getElementById(p).innerHTML='<img src="/shared/filler.gif">';
			document.getElementById(p).className='tt_p'+p;
			document.getElementById('tooltiptxt').innerHTML=txt;
			document.getElementById('stooltiptxt').innerHTML=txt;

			switch(p){
				case 'lt':
					dx=get_absx(tt_sobj)+tt_sobj.offsetWidth+offx;
					dy=get_absy(tt_sobj)+tt_sobj.offsetHeight+offy;
				break;
				case 'rt':
					dx=get_absx(tt_sobj)-document.getElementById('tooltip').offsetWidth-offx;
					dy=get_absy(tt_sobj)+tt_sobj.offsetHeight+offy;
				break;
				case 'lb':
					dx=get_absx(tt_sobj)+tt_sobj.offsetWidth+offx;
					dy=get_absy(tt_sobj)-document.getElementById('tooltip').offsetHeight-offy;
				break;
				case 'rb':
					dx=get_absx(tt_sobj)-document.getElementById('tooltip').offsetWidth-offx;
					dy=get_absy(tt_sobj)-document.getElementById('tooltip').offsetHeight-offy;
				break;
			}
			document.getElementById('tooltip').style.left=dx;
			document.getElementById('tooltip').style.top=dy;
			document.getElementById('ttshadow').style.left=dx+2;
			document.getElementById('ttshadow').style.top=dy+1;
			if(IE6){
				document.getElementById('ttiedummy').style.left=dx;
				document.getElementById('ttiedummy').style.top=dy;
				document.getElementById('ttiedummy').style.width=document.getElementById('ttshadow').offsetWidth;
				document.getElementById('ttiedummy').style.height=document.getElementById('ttshadow').offsetHeight;
				document.getElementById('ttiedummy').style.zIndex=80;
			}
			tt_copa=0;
			setTTOpacity(tt_copa);
			document.getElementById('tooltip').style.visibility="visible";
			document.getElementById('ttshadow').style.visibility="visible";
			
			tt_fip='in';
			tt_waitingforFI=0;
			setTimeout('fi_toolTip()',10);
		}
	});
}

function tt_mouseOver(link,nam)
{
	if(!tt_enabled){
		return;
	}

	// delay + safari quirx workaround
	link.over=1; // for safari
	var f_init=initToolTip(link,nam);
	tt_initto=setTimeout(f_init,tt_delay);
}


function initToolTip(link,nam)
{
	return (function (){
		if(!link.over){
			return;
		}
		var ttswitch;// anotha tooltip initialised?
		if((typeof(tt_sobj)=='object')&&(link!=tt_sobj)){
			ttswitch=1;
		}else{
			ttswitch=0;
		}
		tt_sobj=link;

		// if is  fading out .. wait a bit
		if((tt_fip=='out') || (tt_waitingforFO)){
			var f_init=initToolTip(link,nam);
			tt_initto=setTimeout(f_init,25);
			tt_waitingforFI=1;
			return;
		}

		var txt=tt[nam].tip;
		var offx=tt[nam].diff_x;
		var offy=tt[nam].diff_y;
		var ttwidth=tt[nam].width;
		var p=tt[nam].corner;

		if(typeof(offx)=='undefined'){
			offx=4;
		}
		if(typeof(offy)=='undefined'){
			offy=2;
		}
		if((typeof(ttwidth)=='undefined')||(!ttwidth)){
			ttwidth=250;
		}
		if((p != 'lb')&&(p != 'lt')&&(p != 'rb')&&(p != 'rt')){
			p='lb';
		}
		var dx, dy;

		if((!tt_fip) || (ttswitch)) { // safari multiple onMouseOver quirx
			// make clean from template
			document.getElementById('tooltip').innerHTML=tt_htmltemplate;
			document.getElementById('ttshadow').innerHTML=tts_htmltemplate;

			//make width
			document.getElementById('tooltip').style.width=ttwidth;
			document.getElementById('ttshadow').style.width=ttwidth;

			//make spitz
			document.getElementById(p).innerHTML='<img src="/shared/filler.gif">';
			document.getElementById(p).className='tt_p'+p;
			document.getElementById('tooltiptxt').innerHTML=txt;
			document.getElementById('stooltiptxt').innerHTML=txt;

			switch(p){
				case 'lt':
					dx=get_absx(tt_sobj)+tt_sobj.offsetWidth+offx;
					dy=get_absy(tt_sobj)+tt_sobj.offsetHeight+offy;
				break;
				case 'rt':
					dx=get_absx(tt_sobj)-document.getElementById('tooltip').offsetWidth-offx;
					dy=get_absy(tt_sobj)+tt_sobj.offsetHeight+offy;
				break;
				case 'lb':
					dx=get_absx(tt_sobj)+tt_sobj.offsetWidth+offx;
					dy=get_absy(tt_sobj)-document.getElementById('tooltip').offsetHeight-offy;
				break;
				case 'rb':
					dx=get_absx(tt_sobj)-document.getElementById('tooltip').offsetWidth-offx;
					dy=get_absy(tt_sobj)-document.getElementById('tooltip').offsetHeight-offy;
				break;
			}
			document.getElementById('tooltip').style.left=dx;
			document.getElementById('tooltip').style.top=dy;
			document.getElementById('ttshadow').style.left=dx+2;
			document.getElementById('ttshadow').style.top=dy+1;
			if(IE6){
				document.getElementById('ttiedummy').style.left=dx;
				document.getElementById('ttiedummy').style.top=dy;
				document.getElementById('ttiedummy').style.width=document.getElementById('ttshadow').offsetWidth;
				document.getElementById('ttiedummy').style.height=document.getElementById('ttshadow').offsetHeight;
				document.getElementById('ttiedummy').style.zIndex=80;
			}
			tt_copa=0;
			setTTOpacity(tt_copa);
			document.getElementById('tooltip').style.visibility="visible";
			document.getElementById('ttshadow').style.visibility="visible";
			
			tt_fip='in';
			tt_waitingforFI=0;
			setTimeout('fi_toolTip()',10);
		}
	});
}

function fi_toolTip()
{

	if(tt_copa<tt_fopa){
		tt_fip='in';
		tt_copa+=20;
		setTTOpacity(tt_copa);
		tt_fito=setTimeout('fi_toolTip()',tt_copa);
	}else{
		tt_fip='vis';
		if(IE6){
			document.getElementById('ttiedummy').style.visibility="visible";
			document.getElementById('ttiedummy').style.zIndex=80;

			document.getElementById('ttshadow').style.visibility="visible";
			document.getElementById('ttshadow').style.zIndex=90;
			document.getElementById('tooltip').style.visibility="visible";
			document.getElementById('tooltip').style.zIndex=100;
			// 4 additional lines above have to be in some damned versions of IE6...
		}
	}
}
function tt_mouseOut(link)
{
	if(!tt_enabled){
		return;
	}

	link.over=0;
	var f_hide=hideToolTip(link);
	tt_foto=setTimeout(f_hide,25);
}
function hideToolTip(link)
{
	return (function(){
		// http://www.jibbering.com/faq/faq_notes/closures.html#clSto
		if(link.over){
			return;
		}

		// if is  fading in .. wait a bit
		if(tt_fip=='in'){
			var f_hide=hideToolTip(link);
			setTimeout(f_hide,100);
			tt_waitingforFO=1;
			return;
		}

		//set fadeOut timeout
		if(tt_copa>0){
			setTimeout('fo_toolTip()',25);
		}
		if(IE6){
			document.getElementById('ttiedummy').style.visibility="hidden";
		}
	});
}
function forceHideToolTips()
{
	var tt=document.getElementById('tooltip');
	var tts=document.getElementById('ttshadow');
	var ttie=document.getElementById('ttiedummy');
	if(tt){
		tt.style.visibility="hidden";
	}
	if(tts){
		tts.style.visibility="hidden";
	}
	if(IE6){
		if(ttie){
			ttie.style.visibility="hidden";
		}
	}
	tt_fip='';
}
function fo_toolTip()
{
	tt_waitingforFO=0;
	if(tt_copa>0){
		tt_fip='out';
		tt_copa-=10;
		setTTOpacity(tt_copa);
		setTimeout('fo_toolTip()',tt_copa);
	}else{
		document.getElementById('tooltip').style.visibility="hidden";
		document.getElementById('ttshadow').style.visibility="hidden";
		tt_fip='';
	}
}

function log(txt)
{
	var logwin=document.getElementById('debuglog');
	logwin.value+='\n'+txt;
}

