{
var SF_FNB_normal = "#336699";
var SF_FNB_hover="orange";
var SF_FNB_WIDTH= 150;//200;
var SF_FNB_HEIGHT = 28;
var SF_FNB_NAME = "svpn_tool_fnb";
var SF_FNB_MIN="0";
var SF_FNB_MAX="2";
var SF_FNB_CLOSE="r";
var SF_FNB_FONT="font-family:webdings;cursor:hand";
var SF_FLAG_isIE = !!(window.attachEvent && !window.opera);
var SF_FLAG_isIpad = /ipad/.test(navigator.userAgent.toLowerCase());
if(!SF_FLAG_isIE)
{
SF_FNB_MIN="~";
SF_FNB_MAX="+";
SF_FNB_CLOSE="X";
SF_FNB_FONT="padding-right:4px;padding-left:4px;cursor:default;font-weight: bold;";
}
var SF_FNB_contenthtml =""
+""
+""
+ ""
+ "";
var TMP_OLDUNLOAD_FUNC = null;
var SF_flag_fnbmove = false;
function SF_FUNC_IsEasyLink()
{
if(typeof(SF_g_Config) != "undefined")
{
return true;
}
var tags = document.getElementsByTagName('script');
if(tags)
{
for(var i=0;i self.innerWidth-15){
return self.innerWidth-15;
}
else{
return self.innerWidth;
}
}
}
catch( e){return 0;}
}
function SF_FUNC_GetClientHeight()
{
try{
if(SF_FLAG_isIE){
var wHeight = document.body.clientHeight || document.documentElement.clientHeight;
if ( SF_FUNC_GetContentWidth() <= document.body.clientWidth-20 ){
return wHeight+20;
}
else{
return wHeight;
}
}
else{
if(SF_FUNC_GetContentWidth() > self.innerWidth-16){
return self.innerHeight-16;
}
else{
return self.innerHeight;
}
}
}
catch(e){return 0;}
}
function SF_FUNC_GetScrollPosX()
{
try{
if(SF_FLAG_isIE){
return document.body.scrollLeft;
}
else{
return window.pageXOffset;
}
}
catch(e){return 0;}
}
function SF_FUNC_GetScrollPosY()
{
try{
if ( SF_FLAG_isIE){
if (typeof window.pageYOffset != 'undefined'){
return window.pageYOffset;
}
else if (typeof document.compatMode != 'undefined' &&
document.compatMode != 'BackCompat'){
return document.documentElement.scrollTop;
}
else if (typeof document.body != 'undefined'){
return document.body.scrollTop;
}
}
else{
return window.pageYOffset;
}
}
catch (e){return 0;}
}
function SF_FUNC_GetMousePosX( e )
{
try{
if (SF_FLAG_isIE){
return event.clientX+document.body.scrollLeft;
}else{
return e.screenX;
}
}
catch(e){return 0;}
}
function SF_FUNC_GetMousePosY( e )
{
try
{
if ( SF_FLAG_isIE ) {
return event.clientY+document.body.scrollTop;
}
else{
return e.screenY;
}
}
catch(e){return 0;}
}
function SF_FUNC_unloadFNB()
{
try
{
if(typeof( top.SF_FLAG_fnbMutex ) != "unknown")
top.SF_FLAG_fnbMutex = false;
}catch(e){
return ;
}
if ( TMP_OLDUNLOAD_FUNC != null )
{
TMP_OLDUNLOAD_FUNC();
}
}
function SF_FUNC_NoOp()
{
return false;
}
var lastx = 0;
var lasty = 0;
var lastscrollx = 0;
var lastscrolly = 0;
function SF_FUNC_startdragfnb( obj )
{
SF_flag_fnbmove=true;
if ( SF_FLAG_isIE )
{
lastx = parseInt(event.clientX+document.body.scrollLeft);
lasty = parseInt(event.clientY+document.body.scrollTop);
}
else
{
lastx = Event.screenX;
lasty = Event.screenY;
//lastx = parseInt(document.getElementById(SF_FNB_NAME).style.left);
//lasty = parseInt(document.getElementById(SF_FNB_NAME).style.top);
}
if ( document.attachEvent )
{
document.attachEvent( "onmousemove", SF_FUNC_dragfnb );
document.attachEvent( "onmouseup", SF_FUNC_stopdragfnb );
document.attachEvent( "onselectstart",SF_FUNC_NoOp);
}
else
{
document.addEventListener( "mousemove", SF_FUNC_dragfnb, true );
document.addEventListener( "mouseup", SF_FUNC_stopdragfnb, true );
}
obj.parentNode.style.backgroundColor=SF_FNB_hover; obj.parentNode.style.borderColor =SF_FNB_hover;
}
function SF_FUNC_dragfnb( e )
{
if(SF_flag_fnbmove)
{
var obj = get_fnb_obj();
if(!obj)
return;
var newx = SF_FUNC_GetMousePosX( e );
var newy = SF_FUNC_GetMousePosY( e );
var newleft = parseInt( obj.style.left )+( newx-lastx );
var newtop = parseInt( obj.style.top )+( newy-lasty );
if ( newleft < SF_FUNC_GetScrollPosX() )
{
newleft = SF_FUNC_GetScrollPosX();
}
else if ( newleft > get_fnb_maxleft() )
{
newleft = get_fnb_maxleft();
}
if ( newtop < SF_FUNC_GetScrollPosY() )
{
newtop = SF_FUNC_GetScrollPosY();
}
else if ( newtop > get_fnb_maxtop() )
{
newtop = get_fnb_maxtop();
}
obj.style.left = newleft+"px";;
obj.style.top = newtop+"px";;
lastx = newx;
lasty = newy;
}
}
function SF_FUNC_stopdragfnb(e)
{
SF_flag_fnbmove=false;
if ( document.detachEvent ){
document.detachEvent( "onmousemove", SF_FUNC_dragfnb );
document.detachEvent( "onmouseup", SF_FUNC_stopdragfnb );
document.detachEvent( "onselectstart",SF_FUNC_NoOp);
}
else{
document.removeEventListener( "mousemove", SF_FUNC_dragfnb, true );
document.removeEventListener( "mouseup", SF_FUNC_stopdragfnb, true );
}
var fnbWin = get_fnb_obj();
if(!fnbWin)
return;
fnbWin.style.backgroundColor=SF_FNB_normal;
fnbWin.style.borderColor=SF_FNB_normal;
}
function SF_FUNC_fnbonscroll()
{
var newX;
var newY;
var finalX;
var finalY;
var width;
var fnbWin = get_fnb_obj();
if ( fnbWin != null )
{
newX = SF_FUNC_GetScrollPosX();
newY = SF_FUNC_GetScrollPosY();
finalX = parseInt( fnbWin.style.left )+( newX-lastscrollx );
if ( finalX < SF_FUNC_GetScrollPosX() )
{
finalX = SF_FUNC_GetScrollPosX();
}
else if ( finalX > get_fnb_maxleft() )
{
finalX = get_fnb_maxleft();
}
finalY = parseInt( fnbWin.style.top )+( newY-lastscrolly );
if ( finalY < SF_FUNC_GetScrollPosY())
{
finalY = SF_FUNC_GetScrollPosY();
}
else if ( finalY > get_fnb_maxtop())
{
finalY = get_fnb_maxtop();
}
fnbWin.style.top = finalY+"px";
fnbWin.style.left = finalX+"px";
lastscrollx = newX;
lastscrolly = newY;
}
}
var ___fnbResizeCounter = false;
function SF_FUNC_fnbonresize()
{
var fnbWin = get_fnb_obj();
if(!fnbWin)
return;
if ( SF_FLAG_isIE )
{
___fnbResizeCounter = !___fnbResizeCounter;
if ( !___fnbResizeCounter )
{
fnbWin.style.left = get_fnb_maxleft();
fnbWin.style.top = 5;
}
}
else
{
if ( parseInt( fnbWin.style.left ) > get_fnb_maxleft() )
{
fnbWin.style.left = get_fnb_maxleft();
}
if ( parseInt( fnbWin.style.top ) > get_fnb_maxtop() )
{
fnbWin.style.top = get_fnb_maxtop();
}
}
}
function SF_FUNC_DrawFNB()
{
var zIndex = 19327352831;
if ( navigator.userAgent.toLowerCase().indexOf( "opera" ) != -1 )
{
zIndex = 0;
}
var SF_FNB_HTML = "" ;
var scriptNodes = document.getElementsByTagName("script");
var nodesLen = scriptNodes.length;
var target = null;
for(var i=0; i