document.write ('<script language=javascript src=tips.js></script>');

function mask(status){
var DivRef = document.getElementById('popup');
var IfrRef = document.getElementById('divmask');
	if(status){
    DivRef.style.display = "block";
    IfrRef.style.width = DivRef.offsetWidth;
    IfrRef.style.height = DivRef.offsetHeight;
    IfrRef.style.top = DivRef.style.top;
    IfrRef.style.left = DivRef.style.left;
    IfrRef.style.zIndex = DivRef.style.zIndex - 1;
	IfrRef.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
	IfrRef.style.display = "block";
	}else{
	IfrRef.style.display = "none";
	}
}
//fades layer in
ie55  = (document.all&&document.getElementById);
ns6 = (!ie55&&document.getElementById);
opac = 0;
var showing=false;

function fadeIn() {
	if(opac != 90){
		opac+=5;
		if(ie55) {
			mask(true);
			document.getElementById('popup').filters.alpha.opacity = opac;
			}
		if(ns6) document.getElementById('popup').style.MozOpacity = opac/100;
		if (showing)
		setTimeout('fadeIn()', 0);
	}
}

function fadeOut() {
	if(opac > 0){
		opac-=5;
		if(ie55) {
			mask(false);
			document.getElementById('popup').filters.alpha.opacity = opac;
		}
		if(ns6) document.getElementById('popup').style.MozOpacity = opac/100;
		setTimeout('fadeOut()', 0);
	} else {
	MM_showHideLayers('popup','','hide');
	}
}


var denx
var deny

function hidetips(tipsarray){
fadeOut();
}

function showtips(tipsarray){
tipscontent="<b>"+tipsarray[0]+"</b><br>"+tipsarray[1];
MM_changeProp('tips','','innerHTML',tipscontent,'DIV');
MM_changeProp('tips','','style.width',200,'DIV');
MM_showHideLayers('popup','','show');
showing=true;fadeIn();
}

function moveleft(){
	if(ie55){mask(true);};
	var object = document.getElementById("popup");
	if (startmoving){
	    object.style.left = parseInt(object.style.left) + 3 + "px";
	}
	if(parseInt(object.style.left) <= denx){
		setTimeout("moveleft()",0);
	}
}

function moveright(){
	if(ie55){mask(true);};
	var object = document.getElementById("popup");
	if (startmoving){
		object.style.left = parseInt(object.style.left) - 3 + "px";
	}
	if(parseInt(object.style.left) >= denx){
		setTimeout("moveright()",0);
	}
}


function moveup(){
	if(ie55){mask(true);};
	var object = document.getElementById("popup");
	if (startmoving){
	    object.style.top = parseInt(object.style.top) + 3 + "px";
	}
	if(parseInt(object.style.top) <= deny){
		setTimeout("moveup()",0);
	}
}

function movedown(){
	if(ie55){mask(true);};
	var object = document.getElementById("popup");
	if (startmoving){
		object.style.top = parseInt(object.style.top) - 3 + "px";
	}
	if(parseInt(object.style.top) >= deny){
		setTimeout("movedown()",0);
	}
}



function movelayer(){
	var object = document.getElementById("popup");

	 if(parseInt(object.style.left) < denx){
		startmoving=true;
		moveleft();
     }
	 if(parseInt(object.style.left) > denx){
	 	startmoving=true;
		moveright();
	 }
	 if(parseInt(object.style.top) < deny){
		startmoving=true;
		moveup();
     }
	 if(parseInt(object.style.top) > deny){
	 	startmoving=true;
		movedown();
	 }
}

function poslayer(){
	if(ie55){mask(true);};
	var object = document.getElementById("popup");
    object.style.left = denx;
    object.style.top = deny;
}

function advshowtips(tipsarray,width,x,y,offset_x,offset_y){
	//opera Netscape 6 Netscape 4x Mozilla 
	if (window.innerWidth || window.innerHeight){ 
	screenw = window.innerWidth; 
	screenh = window.innerHeight; 
	} 
	//IE Mozilla 
	if (document.body.clientWidth || document.body.clientHeight){ 
	screenw = document.body.clientWidth; 
	screenh = document.body.clientHeight; 
	} 
	var IE=document.all,NS4=document.layers;
	var NS6=(!IE&&document.getElementById), NS=(NS4||NS6); if (!IE && !NS) return false;

	if ((width==null) || (width <= 0)){width=240};

	mouseX = (NS)?document.body.scrollLeft + screenw - width - 60: event.clientX + document.body.scrollLeft;
	mouseY = (NS)?document.body.scrollTop + 30 : event.clientY + document.body.scrollTop;

	if ((offset_x==null) || (offset_x==0)){offset_x=20};
	if ((offset_y==null) || (offset_y==0)){offset_y=-20};

	if ((x==null) || (x<=0)){
		denx=eval(mouseX+offset_x);
	}else {
		denx=x;
	}
	if ((y==null) || (y<=0)){
		deny=eval(mouseY+offset_y);
	} else {
		deny=y;
	}

	if (IE){
        winheight = document.all['popup'].offsetHeight;
	}else{
		winheight = parseInt(document.getElementById('popup').style.height);
	}


//	window.alert("X="+denx+" Y=" + deny);
	MM_changeProp('tips','','style.width',width,'DIV');
	tipscontent="<b>"+tipsarray[0]+"</b><br>"+tipsarray[1];
	MM_changeProp('tips','','innerHTML',tipscontent,'DIV');

	safex = screenw - width - 30;
	safey = screenh + document.body.scrollTop - winheight - 15;

		if (denx > safex){
			denx=safex;
			deny=deny+30;
		}
		if (deny > safey){
			deny=safey;
		}
//	denx = x;
//	deny = y;
	movelayer();
	MM_showHideLayers('popup','','show');
	showing=true;fadeIn();
	tipsshow=true;
	}

//function mouseshowtips(tipsarray,width){
//  var i,j,aLayer,retVal,curDrag=null,curLeft,curTop,IE=document.all,NS4=document.layers;
//  var NS6=(!IE&&document.getElementById), NS=(NS4||NS6); if (!IE && !NS) return false;
//	var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
//  var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
//	tipscontent="<b>"+tipsarray[0]+"</b><br>"+tipsarray[1];
//	if (width==null){
//	width=200;
//	}
//	MM_changeProp('tips','','innerHTML',tipscontent,'DIV');
//	MM_changeProp('tips','','style.width',width,'DIV');
//	denx = mouseX+15;
//	deny = mouseY-55;
//	movelayer();
//	MM_showHideLayers('popup','','show');
//	showing=true;fadeIn();
//	tipsshow=true;
//}




function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS) { //v4.01
  //Copyright 1998 Macromedia, Inc. All rights reserved.

  var i,j,aLayer,retVal,curDrag=null,curLeft,curTop,IE=document.all,NS4=document.layers;
  var NS6=(!IE&&document.getElementById), NS=(NS4||NS6);
  if (!IE && !NS) return false;
  retVal = true;
  if(IE && event) event.returnValue = true;
  if (MM_dragLayer.arguments.length > 1) {
    curDrag = MM_findObj(objName);
	if (!curDrag) return false;
    if (!document.allLayers) { 
      document.allLayers = new Array();
      with (document)
        if (NS4) {
          for (i=0; i<layers.length; i++)
            allLayers[i]=layers[i];
          for (i=0; i<allLayers.length; i++)
            if (allLayers[i].document && allLayers[i].document.layers)
              with (allLayers[i].document)
                for (j=0; j<layers.length; j++)
                  allLayers[allLayers.length]=layers[j];
            } else {
              if (NS6) {
                var spns = getElementsByTagName("span");
                var all = getElementsByTagName("div"); 
                for (i=0;i<spns.length;i++)
                  if (spns[i].style&&spns[i].style.position)
                    allLayers[allLayers.length]=spns[i];
              }
              for (i=0;i<all.length;i++)
                if (all[i].style&&all[i].style.position)
                  allLayers[allLayers.length]=all[i]; 
            }
        }
      curDrag.MM_dragOk=true;
      curDrag.MM_targL=targL;
      curDrag.MM_targT=targT;
      curDrag.MM_tol=Math.pow(tol,2);
      curDrag.MM_hLeft=hL;
      curDrag.MM_hTop=hT;
      curDrag.MM_hWidth=hW;
      curDrag.MM_hHeight=hH;
      curDrag.MM_toFront=toFront;
      curDrag.MM_dropBack=dropBack;
      curDrag.MM_dropJS=dropJS;
      curDrag.MM_everyTime=et;
      curDrag.MM_dragJS=dragJS;
      curDrag.MM_oldZ = (NS4)?curDrag.zIndex:curDrag.style.zIndex;
      curLeft= (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft; 
      if (String(curLeft)=="NaN") curLeft=0; 
      curDrag.MM_startL = curLeft;
      curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop; 
      if (String(curTop)=="NaN") curTop=0;
      curDrag.MM_startT = curTop;
      curDrag.MM_bL=(cL<0)?null:curLeft-cL;
      curDrag.MM_bT=(cU<0)?null:curTop-cU;
      curDrag.MM_bR=(cR<0)?null:curLeft+cR;
      curDrag.MM_bB=(cD<0)?null:curTop+cD;
      curDrag.MM_LEFTRIGHT=0;
      curDrag.MM_UPDOWN=0;
      curDrag.MM_SNAPPED=false; //use in your JS!
      document.onmousedown = MM_dragLayer;
      document.onmouseup = MM_dragLayer;
      if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
    } else {
      var theEvent = ((NS)?objName.type:event.type);
      if (theEvent == 'mousedown') {
        var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
        var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
        var maxDragZ=null;
        document.MM_maxZ = 0;
        for (i=0; i<document.allLayers.length; i++) {
          aLayer = document.allLayers[i];
          var aLayerZ = (NS4)?aLayer.zIndex:parseInt(aLayer.style.zIndex);
          if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ;
          var isVisible = (((NS4)?aLayer.visibility:aLayer.style.visibility).indexOf('hid') == -1);
          if (aLayer.MM_dragOk != null && isVisible)
            with (aLayer) {
              var parentL=0;
              var parentT=0;
              if (NS6) {
                parentLayer = aLayer.parentNode;
                while (parentLayer != null && parentLayer.style.position) {             
                  parentL += parseInt(parentLayer.offsetLeft);
                  parentT += parseInt(parentLayer.offsetTop);
                  parentLayer = parentLayer.parentNode;
                }
            } else if (IE) {
              parentLayer = aLayer.parentElement;       
              while (parentLayer != null && parentLayer.style.position) {
                parentL += parentLayer.offsetLeft;
                parentT += parentLayer.offsetTop;
                parentLayer = parentLayer.parentElement;
              }
            }
        var tmpX=mouseX-(((NS4)?pageX:((NS6)?parseInt(style.left):style.pixelLeft)+parentL)+MM_hLeft);
        var tmpY=mouseY-(((NS4)?pageY:((NS6)?parseInt(style.top):style.pixelTop) +parentT)+MM_hTop);
        if (String(tmpX)=="NaN") tmpX=0;
        if (String(tmpY)=="NaN") tmpY=0;
        var tmpW = MM_hWidth;
        if (tmpW <= 0) tmpW += ((NS4)?clip.width :offsetWidth);
        var tmpH = MM_hHeight;
        if (tmpH <= 0) tmpH += ((NS4)?clip.height:offsetHeight);
        if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null || maxDragZ <= aLayerZ)){
          curDrag = aLayer; maxDragZ = aLayerZ;
        }
      }
    }
    if (curDrag) {
      document.onmousemove = MM_dragLayer;
      if (NS4) document.captureEvents(Event.MOUSEMOVE);
	  curLeft = (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;
      curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;
	  if (String(curLeft)=="NaN") curLeft=0;
	  if (String(curTop)=="NaN") curTop=0;
      MM_oldX = mouseX - curLeft;
      MM_oldY = mouseY - curTop;
      document.MM_curDrag = curDrag;
      curDrag.MM_SNAPPED=false;
      if(curDrag.MM_toFront) {
        eval('curDrag.'+((NS4)?'':'style.')+'zIndex=document.MM_maxZ+1');
        if (!curDrag.MM_dropBack) document.MM_maxZ++;
      }
      retVal = false;
      if(!NS4&&!NS6) event.returnValue = false;
    }
  } else if (theEvent == 'mousemove') {
    if (document.MM_curDrag) with (document.MM_curDrag) {
      var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
      var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
      newLeft = mouseX-MM_oldX; newTop  = mouseY-MM_oldY;
      if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL);
      if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR);
      if (MM_bT!=null) newTop  = Math.max(newTop ,MM_bT);
      if (MM_bB!=null) newTop  = Math.min(newTop ,MM_bB);
      MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT;
      if (NS4) {left = newLeft; top = newTop;}
      else if (NS6){style.left = newLeft; style.top = newTop;}
      else {style.pixelLeft = newLeft; style.pixelTop = newTop;}
      if (MM_dragJS) eval(MM_dragJS);
      retVal = false;
      if(!NS){
		  event.returnValue = false;
	      mask(true);
	  };
	  {
	  }
    }
  } else if (theEvent == 'mouseup') {
    document.onmousemove = null;
	if (NS) document.releaseEvents(Event.MOUSEMOVE);
	if (NS) document.captureEvents(Event.MOUSEDOWN); //for mac NS
	if (document.MM_curDrag) with (document.MM_curDrag) {
      if (typeof MM_targL =='number' && typeof MM_targT == 'number' && (Math.pow(MM_targL-((NS4)?left:(NS6)?parseInt(style.left):style.pixelLeft),2) + Math.pow(MM_targT-((NS4)?top:(NS6)?parseInt(style.top):style.pixelTop),2))<=MM_tol) {
        if (NS4) {
          left = MM_targL;
          top = MM_targT;
        }else if (NS6) {
          style.left = MM_targL;
          style.top = MM_targT;
        }else {
          style.pixelLeft = MM_targL;
          style.pixelTop = MM_targT;
        }
        MM_SNAPPED = true;
        MM_LEFTRIGHT = MM_startL-MM_targL;
        MM_UPDOWN = MM_startT-MM_targT;
      }
      if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS);
      if(MM_dropBack) {
        if (NS4)
          zIndex = MM_oldZ;
        else
          style.zIndex = MM_oldZ;
      }
        retVal = false;
        if(!NS) event.returnValue = false;
      }
      document.MM_curDrag = null;
    }
    if (NS) document.routeEvent(objName);
  } 
  return retVal;
}

function fixshowtips(tipsarray,width,x,y,offset_x,offset_y){
	//opera Netscape 6 Netscape 4x Mozilla 
	if (window.innerWidth || window.innerHeight){ 
	screenw = window.innerWidth; 
	screenh = window.innerHeight; 
	} 
	//IE Mozilla 
	if (document.body.clientWidth || document.body.clientHeight){ 
	screenw = document.body.clientWidth; 
	screenh = document.body.clientHeight; 
	} 
	var IE=document.all,NS4=document.layers;
	var NS6=(!IE&&document.getElementById), NS=(NS4||NS6); if (!IE && !NS) return false;

	if ((width==null) || (width <= 0)){width=240};

	mouseX = (NS)?document.body.scrollLeft + screenw - width - 60: event.clientX + document.body.scrollLeft;
	mouseY = (NS)?document.body.scrollTop + 30 : event.clientY + document.body.scrollTop;

	if (IE)	{
		if ((offset_x==null) || (offset_x==0)){offset_x=20};
		if ((offset_y==null) || (offset_y==0)){offset_y=-20};
	} else {
		offset_x=20;
		offset_y=-20;
	}

	if ((x==null) || (x<=0)){
		denx=eval(mouseX+offset_x);
	}else {
		denx=x;
	}
	if ((y==null) || (y<=0)){
		deny=eval(mouseY+offset_y);
	} else {
		deny=y;
	}

	if (IE){
        winheight = document.all['popup'].offsetHeight;
	}else{
		winheight = parseInt(document.getElementById('popup').style.height);
	}

	MM_changeProp('tips','','style.width',width,'DIV');
	tipscontent="<b>"+tipsarray[0]+"</b><br>"+tipsarray[1];
	MM_changeProp('tips','','innerHTML',tipscontent,'DIV');

	safex = screenw - width - 30;
	safey = screenh + document.body.scrollTop - winheight - 15;

		if (denx > safex){
			denx=safex;
			deny=deny+30;
		}
		if (deny > safey){
			deny=safey;
		}

	poslayer();
	MM_showHideLayers('popup','','show');
	showing=true;fadeIn();
	tipsshow=true;
	}

document.write ("<div id='popup' style='position:absolute; left:400px; top:50px; width:10px; z-index:1001; height: 10px; filter: alpha(opacity=95); -moz-opacity:0%;visibility: hidden' onMouseDown=MM_dragLayer('popup','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'')><table width='100%' border='0' cellpadding='1' cellspacing='0' bgcolor='#868B91'><tr><td><table width='100%' border='0' cellspacing='0' cellpadding='6'><tr><td height='26' background='images/table_bar.gif' class='texti'> Tips & Help</td></tr><tr><td align='center' bgcolor='#FFFFFF'><table width=95% cellpadding=3><tr><td><div id=tips class=textd style='text-align:left'></div></td></tr></table></td></tr><tr><td align='right' bgcolor='#FFFFFF' class='texta'><a href='javascript:;' onclick='hidetips()'>[CLOSE]</a></td></tr></table></td></tr></table></div><nolayer><iframe id='divmask' src='javascript:;' scrolling='no' frameborder='0' style='position:absolute; top:0px; left:0px; display:none;'></iframe></nolayer>")
