
  function mouse_over(obj)
    {
        if (obj.className != "stat_hover")
            obj.name = obj.className;
            
        obj.className="stat_hover";
    }

    function mouse_out(obj)
    {
        obj.className=obj.name;
    }
    
    
    

/////////////////////////////////////////////

if(location.href.match(/https/))
	var url = "";
else
	var url = "";
//////// Prototype's $ function
///////////////////////////////
function $jt()
{
  var elements = new Array();
  for (var i = 0; i < arguments.length; i++) { 
    var element = arguments[i];
    if (typeof element == 'string')
	  element = document.getElementById(element);
    if (arguments.length == 1)	
      return element;
    elements.push(element);
  }
  return elements;
}



/////////Prototypes Clipp functions
///////////////////////////////////
function makeClipping(element)
{ 
	if (element._overflow) return element;
    element._overflow = element.style.overflow || 'auto';
    if ((element.style.overflow || 'visible') != 'hidden')
      element.style.overflow = 'hidden';
    return element;
}
/////////Prototypes Clipp functions
///////////////////////////////////
function undoClipping(element)
{
	if (!element._overflow) return element;
	element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
    element._overflow = null;
    return element;
}
/////////Prototypes Dimention functions
///////////////////////////////////////
function getDimentions(e)
{
	element = e;
	var display = element.style.display;
    if (display != 'none' && display != null) // Safari bug
      return {width: element.offsetWidth, height: element.offsetHeight};
	var els = element.style;
    var originalVisibility = els.visibility;
    var originalPosition = els.position;
    var originalDisplay = els.display;
    els.visibility = 'hidden';
    els.position = 'absolute';
    els.display = 'block';
    var originalWidth = element.clientWidth;
    var originalHeight = element.clientHeight;
    
    els.display = originalDisplay;
    els.position = originalPosition;
    els.visibility = originalVisibility;
    return {width: originalWidth, height: originalHeight};
}
//////// Effect for sliding down and show
/////////////////////////////////////////
var orgH = new Object();
function blindDown(elem, id, dur)
{
	if(!dur)
	{
		var dur = 0;
		orgH[elem.id] = getDimentions(elem).height;
		makeClipping(elem);
		elem.style.display = "block";
	}
	elem.style.height = (dur+=25)+"px";
	if(dur <= orgH[elem.id])
		setTimeout(function(){ blindDown(elem, id, dur) },10);
	else
	{
		undoClipping(elem);
		elem.style.height = orgH[elem.id]+"px";
	//	elem.style.padding = "2px";
	//	window.location = "#td_"+id;
	}
}
//////// Effect for sliding up and hide
/////////////////////////////////////////
function blindUp(elem, id, dur)
{
	if(!dur)
	{
		makeClipping(elem);
		var dur = getDimentions(elem).height;
		orgH[elem.id] = dur;
	}
	dur -= 25;
	if(dur > 0)
	{
		elem.style.height = dur+"px";
		setTimeout(function(){ blindUp(elem, id, dur) },10);
	}
	else
	{
		undoClipping(elem);
		elem.style.display = "none";
		elem.style.height = orgH[elem.id]+"px";
	//	elem.style.padding = "2px";
		//window.location = "#td_"+id;
	}
}
//////// Form collapse functions
////////////////////////////////
var tool = "";
var current_url = "";

//////// Tooltip code
///////////////////////
var win_caption
var offsetfromcursorX=12
var offsetfromcursorY=10
var offsetdivfrompointerX=10
var offsetdivfrompointerY=14

    
    var table  = '';
  
    table += '<div id="tooltip_max" class="overlay_dialog" style="display:none; position:absolute; z-index: 99; top:0px; left:0px;"></div>';
     table += '<div id="tooltip" style="display:none; position:absolute;z-index: 100;">';
   // table  = '<div id="tooltip" style="display:none; position:absolute;z-index: 100;opacity: .97;filter: alpha(opacity=97);          BORDER-TOP: #555 1px solid; BORDER-BOTTOM: #555 1px solid; BORDER-LEFT: #555 1px solid;BORDER-RIGHT: #555 1px solid; ">';
  
    table += '<table border="0" cellpadding="0" cellspacing="0" width=100% >';
    table += '  <tr  height="23px"  width=100%>';
    table += '    <td class="dialog_nw"></td>';
    table += '    <td style="BORDER-BOTTOM: #555 0px solid; "  bgcolor="#cdd4da" class="dialog_n">'
            +'<div style="width:100%;">'
            +'<table><tr><td width=100% id="tooltip_caption" style="font-weight:;"></td>'
            
            +'<td width=20px align=right >'
            +'<div id="bt_update" class="dialog_update" onclick="get_view_iframe().src=get_view_iframe_location(); " style="width:16px;" />'
            +'</td>'
                        
            +'<td width=20px align=right >'
            +'<div id="bt_new_win" class="dialog_newwin" onclick=\'window.open((get_view_iframe_location()+"").replace("HideHeader=1","HideHeader=0")); ClosePage(0);\' style="width:16px;" />'
            +'</td>'
            
            +'<td width=20px align=right >'
            +'<div class="dialog_maximize" onclick="if(is_Maximized==0) Maximize(); else Normal_size();" style="width:16px;" />'
            +'</td>'
            +'<td width=20px align=right >'
            +'<div class="dialog_close" onclick="ClosePage();" style="width:20px;" />'
            +'</td>'
            +'</tr></table>'
            +'</div>'
            
            +'</td>';
            
    table += '    <td class="dialog_ne"></td>';
    table += '  </tr>';
    table += '</table>';
  

    table += '<table border="0" cellpadding="0" cellspacing="0" width=100% height=100% style="BORDER-TOP: #555 1px solid; BORDER-BOTTOM: #555 1px solid; BORDER-LEFT: #555 1px solid;BORDER-RIGHT: #555 1px solid; " >';
    table += '  <tr>';
    table += '    <td bgcolor="#edf4fa"  style="width:100%; height:100%;">'
                +'<div style="width:100%; height:100%; padding:0px; font-family:\'Trebuchet MS\'; font-size:10px; color:black" id="tooltipinner"></div>'
                +'</td>';
    table += '  </tr>';


    table += '</table>';
    table += '</div>';
    document.write(table)
    
       
 
     
document.body.onresize=on_resize;
   
function on_resize(e )
{
 if(is_Maximized==1) Maximize(); else Normal_size();
}
    
var ie=document.all
var ns6=false;// document.getElementById && !document.all

var enabletip=false


var disable_div     = document.all? document.all["tooltip_max"] : document.getElementById? $jt("tooltip_max") : ""
var tipobj     = document.all? document.all["tooltipinner"] : document.getElementById? $jt("tooltipinner") : ""
var pointerobj = document.all? document.all["tooltip"]      : document.getElementById? $jt("tooltip") : ""
var tooltip_caption_obj = document.all? document.all["tooltip_caption"]      : document.getElementById? $jt("tooltip_caption") : ""
var bt_new_win_obj = document.all? document.all["bt_new_win"]      : document.getElementById? $jt("bt_new_win") : ""
var bt_update_obj = document.all? document.all["bt_update"]      : document.getElementById? $jt("bt_update") : ""




function ietruebody()
{
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function get_view_iframe()
{
	return document.all? document.all["view_iframe"] : document.getElementById? $jt("view_iframe") : ""
}

function get_view_iframe_location()
{
    try
    {
        if(get_view_iframe()==null )
            return current_url;
           
         if(get_view_iframe().contentDocument==null)
            return get_view_iframe().Document.location;
           
        return get_view_iframe().contentDocument.location;
    }
    catch(e)
    {
          return current_url;
  }
}
var last_document_body_scroll;
var last_document_body_style_overflow;
var last_scroll_x;
var last_scroll_y;
var is_no_scroll;

function noScrollIE() 
{
    if(is_no_scroll==true)
        return;
        
    is_no_scroll=true;    
    last_document_body_scroll=document.body.scroll;
    last_document_body_style_overflow=document.body.style.overflow;

   	last_scroll_x= (ns6)?e.pageX : ietruebody().scrollLeft;
	last_scroll_y= (ns6)?e.pageY : ietruebody().scrollTop;

    document.body.scroll = "no";
    document.body.style.overflow = 'hidden';

    var oTop = document.body.scrollTop;  
    document.body.scrollTop = oTop; 

    scroll(0, 0);
}
function scrollIE() 
{
    if(is_no_scroll==false)
        return;
        
    is_no_scroll=false;
//    document.body.scroll = "yes";
 //   document.body.style.overflow = 'scroll';
    document.body.scroll=last_document_body_scroll;
    document.body.style.overflow=last_document_body_style_overflow;
    
    scroll(last_scroll_x,last_scroll_y);
}

function DisableWin(name)
{
    noScrollIE();

  	var curX=0;
    var curY=0;

    var winwidth=ie&&!window.opera? ietruebody().clientWidth -0: window.innerWidth-20
    var winheight=ie&&!window.opera? ietruebody().clientHeight-0 : window.innerHeight-20

    disable_div.style.top=curY;
 	disable_div.style.left=curX;
  
    disable_div.style.width=(winwidth+20)+"px";
 	disable_div.style.height=(winheight+20)+"px";

    disable_div.style.display = "block"
}
 // sends signed offer to server
function EnableWin()
{
   	scrollIE();
	disable_div.style.display = "none"
}


function OpenPageOnCenter(the_url,thetext,disable_new_win)
{
    ClosePage();
	if(the_url != "")
	{
	 	noScrollIE();
	    bt_new_win_obj.style.display="";
	    bt_update_obj.style.display="";
    
        try
        {
 	        if(disable_new_win==true)
            {
	 	        bt_new_win_obj.style.display="none";
	            bt_update_obj.style.display="none";
	 	    }
	 	}
	 	catch(ex)
	 	{
	 	}

        current_url=the_url;
		if (typeof thetext!="undefined") 
		    win_caption=thetext;

      	var curX=0;//(ns6)?e.pageX : ietruebody().scrollLeft;
	    var curY=0;//(ns6)?e.pageY : ietruebody().scrollTop;


        var winwidth=ie&&!window.opera? ietruebody().clientWidth -0: window.innerWidth-20
	    var winheight=ie&&!window.opera? ietruebody().clientHeight-0 : window.innerHeight-20

        disable_div.style.top=curY;
	 	disable_div.style.left=curX;
	  
        disable_div.style.width=(winwidth+20)+"px";
	 	disable_div.style.height=(winheight+20)+"px";
	
	    var thewidth=winwidth-winwidth/14;
	    var theheight=winheight-winheight/14;
	 	
	 	pointerobj.style.width=thewidth+"px";
	 	pointerobj.style.height=theheight+"px";
		
		
		
		tipobj.style.left=(winwidth/2-(thewidth/2)+curX)+"px" 
	    pointerobj.style.left=tipobj.style.left

		tipobj.style.top=(winheight/2-(theheight/2)+curY-10)+"px"
	    pointerobj.style.top=tipobj.style.top;

		tipobj.innerHTML= "<iframe id=view_iframe border=0 width=100% scrolling=1 frameborder=0 height=100% style='width:100%;height:100%' src='"+the_url+"'></iframe>"
		tooltip_caption_obj.innerHTML= "<nobr style=\"font-size:10px;\">"+win_caption+"</nobr>";
		
		

        disable_div.style.display = "block"
        tipobj.style.display = "block"
        pointerobj.style.display = "block"
       
		enabletip=true;
		//blindDown(tooltip);
		return false;
		
	}
}

function OpenPageOnCenterChild(the_url,caption,disable_new_win)
{
    OpenPageOnCenter(the_url,caption,disable_new_win);
}


function OpenCacsadeWin(the_url,caption,disable_new_win)
{
    OpenPageOnCenter(the_url,caption,disable_new_win);
}
//-------------------------------------------------



//-------------------------------------------------
//
var close_animate_type=1
var close_animate_begin;

function ClosePage(type)
{
    if(pointerobj.style.display == "none")
        return;
        
 	enabletip=false
	if(type!=null)
	{
	    close_animate_type=type;
	}
	else
        close_animate_begin=1;
  
   if(close_animate_type==1)
   {
        ClosePage_Minimize();
        return;
   }
   if(close_animate_type==2)
   {
        ClosePage_Opacity();
        return;
   }


    win_caption="";
	 
	pointerobj.style.opacity="";
    pointerobj.style.filter="";

	disable_div.style.display = "none"
	tipobj.style.display = "none"
	pointerobj.style.display = "none"
	tipobj.style.left="-1000px"
	tipobj.style.backgroundColor=''
	tipobj.style.width=''
	scrollIE();
}
//-------------------------------------------------



//-------------------------------------------------
//
function ClosePage_Minimize()
{
   if(close_animate_begin==1)
   {
        close_animate_begin=0;
        pointerobj.style.opacity=0.8;
        pointerobj.style.filter="alpha(opacity=80)";
  	    tipobj.style.display = "none"
 	    tooltip_caption_obj.innerHTML= "";
    }
    if(parseFloat(pointerobj.style.height)>15 && parseFloat(pointerobj.style.width)>35)
     {
        var step=parseFloat(pointerobj.style.height)/12;
        if(step<10)
            step=10;
        //CollapsStep(step);
        var w_step=step+step/4;
        if(parseFloat(pointerobj.style.height)>step*2)
        {
           pointerobj.style.top=(parseFloat(pointerobj.style.top)+step)+"px";
           pointerobj.style.height=(parseFloat(pointerobj.style.height)-step*2)+"px";
        }
        else
        {
            pointerobj.style.height=0+"px";
        }
        if(parseFloat(pointerobj.style.width)>step*2)
        {
            pointerobj.style.left=(parseFloat(pointerobj.style.left)+w_step)+"px";
            pointerobj.style.width=(parseFloat(pointerobj.style.width)-w_step*2)+"px";
        }
        else
        {
            pointerobj.style.width=0+"px";
        }        
        
        
        setTimeout(function() {ClosePage_Minimize(); },5);
        return;
     }

	enabletip=false

	pointerobj.style.opacity="";
    pointerobj.style.filter="";
	disable_div.style.display = "none"
	tipobj.style.display = "none"
	pointerobj.style.display = "none"
	tipobj.style.left="-1000px"
	tipobj.style.backgroundColor=''
	tipobj.style.width=''
 	scrollIE();
}
//-------------------------------------------------



//-------------------------------------------------
//
var close_animate_opacity=1.0
function ClosePage_Opacity()
{
    if(close_animate_begin==1)
    {
        close_animate_opacity=97;
        close_animate_begin=0;
        //tipobj.style.display = "none"
    }

    if(close_animate_opacity>10)
    {
        close_animate_opacity=close_animate_opacity-10;
        
        pointerobj.style.opacity=close_animate_opacity/100;
        pointerobj.style.filter="alpha(opacity="+close_animate_opacity+")";


        setTimeout(function() {ClosePage_Opacity(); },20);
        return;
    }

	pointerobj.style.opacity="";
    pointerobj.style.filter="";

	tipobj.style.opacity="";
    tipobj.style.filter="";

	disable_div.style.display = "none"
	tipobj.style.display = "none"
	pointerobj.style.display = "none"
	tipobj.style.left="-1000px"
	tipobj.style.backgroundColor=''
	tipobj.style.width=''
 	scrollIE();
}
//-------------------------------------------------



//-------------------------------------------------
//
function ClosePage_Parent()
{
  try
    {
		window.parent.ClosePage();
    }
	catch(e)
	{
    }    
}
//-------------------------------------------------



//-------------------------------------------------
//
var is_Maximized=0;
function Normal_size()
{

    var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
    var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

  	var curX=(ns6)?e.pageX : ietruebody().scrollLeft;
    var curY=(ns6)?e.pageY : ietruebody().scrollTop;


        disable_div.style.top=curY;
	 	disable_div.style.left=curX;
	  
        disable_div.style.width=(winwidth+20)+"px";
	 	disable_div.style.height=(winheight+20)+"px";


    is_Maximized=0;
    var thewidth=winwidth-winwidth/14;
    var theheight=winheight-winheight/14;

 	pointerobj.style.width=thewidth+"px";
 	pointerobj.style.height=theheight+"px";

	pointerobj.style.left=(winwidth/2-(thewidth/2)+curX)+"px" 
	pointerobj.style.top=(winheight/2-(theheight/2)+curY-10)+"px"

}
//-------------------------------------------------



//-------------------------------------------------
//
function Maximize()
{
    var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
    var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

  	var curX=(ns6)?e.pageX : ietruebody().scrollLeft;
    var curY=(ns6)?e.pageY : ietruebody().scrollTop;

    is_Maximized=1;
    var step=7;

   if(parseFloat(pointerobj.style.top)>curY+step)
   {
     pointerobj.style.top=(parseFloat(pointerobj.style.top)-step)+"px";
    pointerobj.style.height=(parseFloat(pointerobj.style.height)+step*2)+"px";
   }
   if(parseFloat(pointerobj.style.left)>curX+step)
    {
    pointerobj.style.left=(parseFloat(pointerobj.style.left)-step)+"px";
    pointerobj.style.width=(parseFloat(pointerobj.style.width)+step*2)+"px";
    }

    if(parseFloat(pointerobj.style.top)>curY+step
        || parseFloat(pointerobj.style.left)>curX+step)
        {
        setTimeout(function() {Maximize();},5);
        return;
        }

    pointerobj.style.left=curX+"px";
    pointerobj.style.top=curY+"px";
  
    pointerobj.style.width=winwidth+"px";
    pointerobj.style.height=(winheight-23)+"px";
}

