// JavaScript Document

//START HELP BALLONS VIDEO WALL
if(jQuery(".helptext")){//if1 start
jQuery(".helptext").mousemove(
		function(e)
		{
				if(jQuery("#helpballoon").size()>0)
				{
				var t=parseInt(e.pageY-jQuery("#helpballoon").height()+200);//(t-tup)+"px";
				var l=parseInt(e.pageX+13);//(l+lft+jQuery(this).width())/2+"px";
				var r =parseInt(l) + jQuery("#helpballoon").width();
		
				var scr = screen.width;
				if(r > scr)
				{
					
					l = l-(r-scr);
				}				
				
				
				jQuery("#helpballoon").css({top:t,left:l,visibility:"visible"});
				}
		}
);

	jQuery(".helptext").hover(
		function(e)
		{

			if(jQuery(this).attr("help_text"))
			{

				offset=jQuery(this).offset();
				t=offset.top
				l=offset.left

				if(jQuery("#helpballoon").size()==0)
					jQuery(this).append("<div id='helpballoon' style='position:absolute;visibility:hidden;opacity:1; z-index:15000'>"
								 +"<table width='150' border='0' cellspacing='0' cellpadding='0' style='margin-bottom:10px;margin-right:5px' class='image-tbl'>"   
  +" <tr valign='top'>"    
    +" <td>"+jQuery(this).attr("help_text")+"</td>"    
   +"</tr>"  
 +"</table>"

											 +"</div>");
				//triangle_html="<div class='triangle'><img src='../images/images_modified/video_wall_arrow.gif' style='margin-top:10px' /></div>"
				//jQuery("#helpballoon").html(jQuery(this).attr("help_text")+triangle_html);
					
				jQuery("#helpballoon").fadeTo('fast',1);

var tup;
var lft;
				if(jQuery.browser.msie)
				    {       tup=-20;
							lft=100;
						}else
						{   
							tup=60;
							lft=60;
							}
				
				//t=e.pageY+"px";//(t-tup)+"px";
				//l=e.pageX+"px";//(l+lft+jQuery(this).width())/2+"px";
				//t=e.pageY+"px";	l=e.pageX+"px";
				l=l+15;
				var r =parseInt(l) + jQuery("#helpballoon").width();
		
				var scr = screen.width;
				if(r > scr)
				{
					
					l = l-(r-scr);
				}				
				
				
				jQuery("#helpballoon").css({top:t,left:l,visibility:"visible"});
				//alert(t);

			}	
		},
		function()
		{
			if(jQuery("#helpballoon").size()>0)
				jQuery("#helpballoon").replaceWith("");//.css({visibility:"hidden"});

		}

	)
}//if1 end
//END HELP BALLON
