ContentInfo = "";
thumbshow = "";
stickycontent= "";
topColor = "dae4e8";
subColor = "dae4e8";
var mouse_X;
var mouse_Y;
var videopos;
var icon_img=1235;
var icon_width=30;
var icon_height=31;
var tip_active = 0;
var icon_width1=315;
function update_tip_pos(){
var temp = eval(document.body.offsetWidth-500);
var temp2 = eval(document.body.offsetHeight-80);
if (navigator.userAgent.match('AppleWebKit')){
var temp3 =eval(document.body.scrollTop-50);
}else{
var temp3 =eval(document.documentElement.scrollTop-50);
}
if (mouse_X > temp)
{
document.getElementById('ToolTip').style.left = mouse_X -390 +'px';
}else {
document.getElementById('ToolTip').style.left = mouse_X +20 +'px';
}
if (mouse_Y > temp2){
document.getElementById('ToolTip').style.top  = mouse_Y-80 +'px';
}
else if (mouse_Y > temp3)
if(mouse_Y>100)
{
document.getElementById('ToolTip').style.top  = mouse_Y-50 +'px';
}
else {
document.getElementById('ToolTip').style.top  = mouse_Y+10 +'px';
}
}

function update_tip_pos_for_image(){
var tempa = eval(document.body.offsetWidth-500);
var tempa2 = eval(document.body.offsetHeight-30);
if (navigator.userAgent.match('AppleWebKit')){
var tempa3 =eval(document.body.scrollTop-30);
}else{
var tempa3 =eval(document.documentElement.scrollTop-30);
}
if (mouse_X > tempa)
{
document.getElementById('imagetip').style.left = mouse_X -125 +'px';
}else {
document.getElementById('imagetip').style.left = mouse_X +20 +'px';
}
if (mouse_Y > tempa2){
document.getElementById('imagetip').style.top  = mouse_Y-30 +'px';
}
else if (mouse_Y > tempa3)
{
document.getElementById('imagetip').style.top  = mouse_Y-30 +'px';
}
else {
document.getElementById('imagetip').style.top  = mouse_Y+10 +'px';
}
}

var ie = document.all?true:false;
//if (!ie) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMouseXY;

function getMouseXY(e) {
if (ie) { // grab the x-y pos.s if browser is IE
mouse_X = event.clientX + document.documentElement.scrollLeft;
if (navigator.userAgent.match('AppleWebKit')){
mouse_Y = event.clientY + document.body.scrollTop;
videopos=eval(document.body.scrollTop+200)+'px'
}else{
mouse_Y = event.clientY + document.documentElement.scrollTop;
videopos=eval(document.documentElement.scrollTop+200)+'px'
}
}
else { // grab the x-y pos.s if browser is NS
mouse_X = e.pageX;
mouse_Y = e.pageY;
if (navigator.userAgent.match('AppleWebKit')){
videopos=eval(document.body.scrollTop+200)+'px'
}else{
videopos=eval(document.documentElement.scrollTop+200)+'px'
}
}
if (mouse_X < 0){mouse_X = 0;}
if (mouse_Y < 0){mouse_Y = 0;}
if (videopos< 0){videopos = 0;}

if(tip_active){update_tip_pos();update_tip_pos_for_image();}
}


function EnterContent(TContent){
ContentInfo = '<table border="0" cellpadding="0" cellspacing="0" width="372"><tr><td class="tooltip_img" style="background-position: 0 -1296px"><img src='+global_imgpath+'/images/blank.gif width=11 height=12></td><td class="tooltip_img" style="background-position: 0 -1779px;" colspan="2"><img src='+global_imgpath+'/images/blank.gif width="345" height="12"></td><td class="tooltip_img" style="background-position: 0 0px"><img src='+global_imgpath+'/images/blank.gif width="16" height="12"></td></tr><tr><td width=\'11\' style=\'background:url('+global_imgpath+'/images/tooltip-lftbar.png) #dae4e8 repeat-y\'><img src='+global_imgpath+'/images/blank.gif width=11 height=5></td><td valign=top bgcolor=#dae4e8 style="font-size:11px" width='+icon_width+'><img src='+global_imgpath+'/images/blank.gif width='+icon_width+' height='+icon_height+'  class="tooltip_img" style="font-size:10px;background-position: 0 -'+icon_img+'px" id="favicon_comp"></td><td width='+icon_width1+' bgcolor=#dae4e8><font style="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px;">'+TContent+'</font></td><td width="15" style="background:url('+global_imgpath+'/images/tooltip-rtbar.png) #dae4e8 repeat-y"><img src='+global_imgpath+'/images/blank.gif width="16" height="5"></td></tr><tr><td class="tooltip_img" style="background-position:0 -1338px"><img src='+global_imgpath+'/images/blank.gif width=11 height=16 alt=""></td><td class="tooltip_img" style="background-position:0 -1384px" colspan="2"><img src='+global_imgpath+'/images/blank.gif width="345" height="16"></td><td class="tooltip_img" style="background-position: 0 -1430px"><img src='+global_imgpath+'/images/blank.gif width="16" height="16"></td></tr></table>';
}
function tip_it(which,  TContent, casevalue){
	if(which){
     update_tip_pos();
		 version=0;
	 tip_active = 1;
     t = window.setTimeout("update_tip_pos();document.getElementById('ToolTip').style.visibility = 'visible';", 500);
	 if (casevalue=="genious"){
     icon_img=1476;
	 icon_width=22;
	 icon_height=31;
	 icon_width1=323;
	 }else{
     icon_img=1235;
	 icon_width=30;
	 icon_height=31;
	 icon_width1=315
	 }
	 EnterContent(TContent);
	 document.getElementById('ToolTip').innerHTML = ContentInfo;
	} 
	
	else{
	  tip_active = 0;
	  clearTimeout(t);
	  document.getElementById('ToolTip').style.visibility = "hidden";
	}
}

function EnterThumbContent(showimg) {    
thumbshow = '<table  border=0 cellspacing=0 cellpadding=0 width=60><tr><td width="6" class="tooltip_img" style="background-position:  0 -1045px"><img src='+global_imgpath+'/images/blank.gif width=6 height=8 alt=""></td><td width="5" class="tooltip_img" style="background-position:  0 -1083px"><img src='+global_imgpath+'/images/blank.gif width="5" height="8" alt=""></td><td style="background: url('+global_imgpath+'/images/tooltip_sprite__rev1.png) repeat-x 0 -1121px;" align="right"><img src='+global_imgpath+'/images/blank.gif width="1" height="8" alt=""></td><td width="4" class="tooltip_img" style="background-position:  0 -1159px"><img src='+global_imgpath+'/images/blank.gif width="4" height="8" alt=""></td><td width="6" class="tooltip_img" style="background-position:  0 -1197px"><img src='+global_imgpath+'/images/blank.gif width="6" height="8" alt=""></td></tr><tr><td style="background: url('+global_imgpath+'/images/dhtml-popup4.png) repeat-y;" width="6"><img src='+global_imgpath+'/images/blank.gif width="6" height="29" alt=""></td><td bgcolor="#FDF9E2" width="5"><img src='+global_imgpath+'/images/blank.gif width="5" height="8" alt=""></td><td bgcolor="#DEE7EB" style="font-size:11px" align="center" id="totalimgheight"><img src='+global_imgpath+'/images/user/large-thumb/'+showimg+'></td><td bgcolor="#FDF9E2"><img src='+global_imgpath+'/images/blank.gif width="4" height="8" alt=""></td width="4"><td style="background: url('+global_imgpath+'/images/dhtml-popup5.png)  repeat-y;"><img src='+global_imgpath+'/images/blank.gif width="6" height="29" alt=""></td></tr><tr><td width="6" class="tooltip_img" style="background-position:  0 -889px"><img src="'+global_imgpath+'/images/blank.gif" width="6" height="9" alt=""></td><td width="5" class="tooltip_img" style="background-position:  0 -928px"><img src='+global_imgpath+'/images/blank.gif width="5" height="9" alt=""></td><td style="background: url('+global_imgpath+'/images/tooltip_sprite__rev1.png) #FDF9E2 repeat-x 0 -967px"><img src='+global_imgpath+'/images/blank.gif width="1" height="9" alt=""></td><td width="4" class="tooltip_img" style="background-position:  0 -1006px"><img src='+global_imgpath+'/images/blank.gif width="4" height="9" alt=""></td><td width="6" class="tooltip_img" style="background-position:  0 -30px"><img src='+global_imgpath+'/images/blank.gif width="6" height="9" alt=""></td></tr></table>';
}
function showtrail(which, imagename){
	if(which){
	 update_tip_pos_for_image();
	version=0;
	 tip_active = 1;
     t = window.setTimeout("document.getElementById('imagetip').style.visibility = 'visible';", 500);
	 EnterThumbContent(imagename);
	document.getElementById('imagetip').innerHTML = thumbshow;
	} 
	
	else{
	  tip_active = 0;
	  clearTimeout(t);
	  document.getElementById('imagetip').style.visibility = "hidden";
	}
}
//////////////////////////////
function update_tip_pos_for_merken(){
var tempb = eval(document.body.offsetWidth-500);
var tempb2 = eval(document.body.offsetHeight-30);
if (navigator.userAgent.match('AppleWebKit')){
var tempb3 =eval(document.body.scrollTop-30);
}else{
var tempb3 =eval(document.documentElement.scrollTop-30);
}
if (mouse_X > tempb)
{
document.getElementById('sticky_holder').style.left = eval(mouse_X -90) +'px';
}else {
document.getElementById('sticky_holder').style.left = eval(mouse_X +20) +'px';
}

if (mouse_Y > tempb2){
document.getElementById('sticky_holder').style.top  = eval(mouse_Y-30) +'px';
}
else if (mouse_Y > tempb3)
{
document.getElementById('sticky_holder').style.top  = eval(mouse_Y-30) +'px';
}
else {
document.getElementById('sticky_holder').style.top  = eval(mouse_Y+10) +'px';
}
}
/////////////////////////////
var ie = document.all?true:false;
//if (!ie) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMouseXY;

function getMouseXY(e) {
if (ie) { // grab the x-y pos.s if browser is IE
mouse_X = event.clientX + document.documentElement.scrollLeft;
//alert(document.body.offsetWidth);
if (navigator.userAgent.match('AppleWebKit')){
mouse_Y = event.clientY + document.body.scrollTop;
videopos=eval(document.body.scrollTop+200)+'px'
}else{
mouse_Y = event.clientY + document.documentElement.scrollTop;
videopos=eval(document.documentElement.scrollTop+200)+'px'
}
}
else { // grab the x-y pos.s if browser is NS
mouse_X = e.pageX;
mouse_Y = e.pageY;
if (navigator.userAgent.match('AppleWebKit')){
videopos=eval(document.body.scrollTop+200)+'px'
}else{
videopos=eval(document.documentElement.scrollTop+200)+'px'
}
}
if (mouse_X < 0){mouse_X = 0;}
if (mouse_Y < 0){mouse_Y = 0;}
if (videopos < 0){videopos = 0;}

//if(tip_active){update_tip_pos_for_merken()}
}
function Enterstickcontent(showsticky) {
stickycontent = '<table width=364 border=0 cellspacing=0 cellpadding=0><tr><td width=6 class="tooltip_img" style="background-position:0 -1815px"><img src='+global_imgpath+'/images/blank.gif width=6 height=29 alt=></td><td width=5 class="tooltip_img" style="background-position:0 -1862px"><img src='+global_imgpath+'/images/blank.gif width=5 height=29 alt=></td><td style="background: url('+global_imgpath+'/images/tooltip_sprite__rev1.png) repeat-x 0 -1905px;" valign=bottom><table width=100% cellpadding=0 cellspacing=0 border=0><tr> <td valign=bottom class="tooltip_img" style="background-position:0 -2060px"><img src='+global_imgpath+'/images/blank.gif width=24 height=23 alt=G></td><td align=right><a onClick="document.getElementById(\'sticky_layer\').style.display=\'none\';"><img src='+global_imgpath+'/images/'+global_lang+'/dhtml-popup11.png width=90 height=17 alt=\'\' border=0></a></td></tr></table></td><td width=4><img src='+global_imgpath+'/images/dhtml-popup3a.png width=4 height=29 alt=></td><td width=6><img src='+global_imgpath+'/images/dhtml-popup3b.png width=6 height=29 alt=></td></tr><tr><td style="background: url('+global_imgpath+'/images/dhtml-popup4.png) repeat-y;" width=6><img src='+global_imgpath+'/images/blank.gif width=6 height=29 alt=></td><td bgcolor=#FDF9E2>&nbsp;</td><td bgcolor=#FDF9E2><p style=font-size:14px;margin-bottom:5px;>'+showsticky+'</td><td bgcolor=#FDF9E2>&nbsp;</td><td style="background: url('+global_imgpath+'/images/dhtml-popup5.png)  repeat-y;" width=6><img src='+global_imgpath+'/images/blank.gif width=6 height=29 alt=></td></tr><tr><td width=6 class="tooltip_img" style="background-position:   0 -889px"><img src='+global_imgpath+'/images/blank.gif width=6 height=9 alt=></td><td width=5 class="tooltip_img" style="background-position:  0 -928px"><img src='+global_imgpath+'/images/blank.gif width=5 height=9 alt=></td><td style="background: url('+global_imgpath+'/images/tooltip_sprite__rev1.png) #FDF9E2 repeat-x 0 -967px;"><img src='+global_imgpath+'/images/blank.gif width=340 height=9 alt=></td><td width=4 class="tooltip_img" style="background-position:  0 -1006px"><img src='+global_imgpath+'/images/blank.gif width=4 height=9 alt=></td><td width=6 class="tooltip_img" style="background-position:  0 -30px"><img src='+global_imgpath+'/images/blank.gif width=6 height=9 alt=></td></tr></table>';
}
function tip_merken(which,  showsticky){
	if(which){
   update_tip_pos_for_merken();
   version=0;
	 tip_active = 1;
	 Enterstickcontent( showsticky);
	 document.getElementById('sticky_layer').innerHTML = stickycontent;
	 setpos();
	} 
	
	else{
	  tip_active = 0;
	}
}
function setpos() {
    var chk1=document.getElementById('sticky_holder').style.left;
    var chk2=document.getElementById('sticky_holder').style.top;
    document.getElementById('sticky_layer').style.left=chk1;
    document.getElementById('sticky_layer').style.top=chk2;
    document.getElementById('sticky_layer').style.display = 'block';
}
