var textNN = '';var headerNN = '';var sizeNN = 0;var hold = 0;

function showhint(x,y,w,z){
	headerNN = x;textNN = y; sizeNN = w;zNN = z;
	if ( x == ""){temp = "<table class=\"noshadow\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:"+w+"px;padding:0px;background: transparent none repeat scroll center center;border:none;\"><tr><td class=\"hintul\"></td><td class=\"hintum\"></td><td class=\"hintur\"></td></tr><tr><td class=\"hintml\"></td><td class=\"hintmm\"><div class=\"hintcc\">"+y+"</div></td><td class=\"hintmr\"></td></tr><tr><td class=\"hintbl\"></td><td class=\"hintbm\"></td><td class=\"hintbr\"></td></tr></table>";}
	else if ( y == "") {temp = x;}
	else {temp = "<table class=\"noshadow\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:"+w+"px;padding:0px;background: transparent none repeat scroll center center;border:none;\"><tr><td class=\"hintul\"></td><td class=\"hintum\"></td><td class=\"hintur\"></td></tr><tr><td class=\"hintml\"></td><td class=\"hintmm\"><div class=\"hintt\">"+x+"</div><hr /><div class=\"hintcc\">"+y+"</div></td><td class=\"hintmr\"></td></tr><tr><td class=\"hintbl\"></td><td class=\"hintbm\"></td><td class=\"hintbr\"></td></tr></table>";}
	if(z==1){$("#hint").html(temp);$("#hint").css({width: w});}
	if(hold != 1 && w !=0){$("#hint").html(temp);$("#hint").css({width: w});}
	if (z == 1){$("#hint").css({visibility: "visible"});} else  {if(hold != 1){$("#hint").css({visibility: "hidden"});}}
	if (z == 1){floatrepeat = setInterval(moveNN,100);} else	{if(hold != 1){clearInterval(floatrepeat);}}
}

function moveNN(e) {
	if ($("#hint").css("visibility") == "visible"){
		var scrollTop = $(window).scrollTop();var scrollLeft = $(window).scrollLeft();
		hor = scrollLeft + $(window).width() - $("#hint").width();ver = scrollTop + $(window).height() - $("#hint").height(); 
		posHor = mx + 2;posVer = my + 2; posHor2 = mx - $("#hint").width() - 2;posVer2 = my - $("#hint").height() - 2; 
		if (posVer2<scrollTop){posVer2 = scrollTop + 10;}
		if(hold != 1){if (posVer<ver){$("#hint").css({ top: posVer});} else {$("#hint").css({ top: posVer2});}if (posHor<hor){$("#hint").css({ left: posHor});} else {$("#hint").css({ left: posHor2});}
		}
	}
}
function holdhint(e){
	if($.browser.msie){if(window.event.ctrlKey){if(hold == 0){hold = 1;}else {hold = 0;showhint('','',0,0);}}}
	else	if(e.which==17) {if(hold == 0){hold = 1;}else {hold = 0;showhint('','',0,0);}}
}
var lastScrollY=0;var diffY;
function float(){
	if($("#floatl").length>0){
		if($("#right").length>0){$("#floatl").css({left: Math.floor($("#right").offset().left+10)});}
		if($("#rightwide").length>0){$("#floatl").css({left: Math.floor($("#rightwide").offset().left+40)});}
		diffY = $(window).scrollTop();if (diffY < 350){diffY = 350;}percent=(diffY-lastScrollY)*0.1; 
		if(percent>0){percent=Math.ceil(percent);}else {percent=Math.floor(percent);}
		$("#floatl").css({top: parseInt($("#floatl").offset().top+percent)});lastScrollY=lastScrollY+percent;
	}else{clearInterval(flrepeat);}
}