// JavaScript Document
function fd(oi, wS) 
{
	return wS ? document.getElementById(oi).style:document.getElementById(oi); 
}
function pw() 
{
	return window.innerWidth != null? window.innerWidth: document.body.clientWidth != null? document.body.clientWidth:null;
} 
var DH = 0;var an = 0;var al = 0;var ai = 0;
if (document.getElementById) {ai = 1; DH = 1;}
else {if (document.all) {al = 1; DH = 1;} 
else { browserVersion = parseInt(navigator.appVersion); 
if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {an = 1; DH = 1;}}} 

function fd(oi, wS) 
{if (ai) return wS ? document.getElementById(oi).style:document.getElementById(oi); 
   if (al) return wS ? document.all[oi].style: document.all[oi];
    if (an) return document.layers[oi];
	}

function pw() {return window.innerWidth != null? window.innerWidth: document.body.clientWidth != null? document.body.clientWidth:null;}
   
function popUp(evt,oi,len)
{
	 if (DH)
	 {	
	 	 var wp = pw();
	 	 ds = fd(oi,1); 
		 dm = fd(oi,0); 
		 st = ds.visibility; 
		 if (dm.offsetWidth) 
		 	{
				eh=dm.offsetHeight;ew = dm.offsetWidth;
			} 
		 else if(dm.clip.width)
			ew = dm.clip.width;
			if (st == "visible" || st == "show") 
				{ 
					ds.visibility = "hidden"; 
				}
			else  
				{ 
					if (evt.y || evt.pageY) 
						{
							if(evt.pageY) 
								{
									tv = evt.pageY + 20;
									if(evt.pageX < window.screen.width/8*5)
									{
										lv = evt.pageX + 10;
									}
									else
									{
										if(len <= 4)
										{
											lv = evt.pageX - 280;
										}
										else
										{
											lv = evt.pageX - 320;
										}
									}
								}
							else
							{ 
								if(evt.x < window.screen.width/8*5)
									{
										tv = evt.y + 20 + document.body.scrollTop; 
										lv = evt.x  + 10;
									}
								else
									
									{
										tv = evt.y + 20 + document.body.scrollTop; 
										if(len<=4)
										{
											lv = evt.x  - 280;
										}
										else
										{
											lv = evt.x  - 320;
										}
										
									}
							}
							if (evt.screenY+eh>window.screen.height-80)
								{
									tv=tv-(evt.screenY+eh-window.screen.height+90);	
								} 
							if (lv + ew > wp)
							 lv -= ew/2;
							if (!an)
						    {
								lv += 'px';tv += 'px';
							}
							ds.left = lv; ds.top = tv;
							}
							ds.visibility = "visible";
							}
						}
					}
	
	function mouseover_popUp(evt,oi,len)
{
	 if (DH)
	 {	
	 	 var wp = pw();
	 	 ds = fd(oi,1); 
		 dm = fd(oi,0); 
		 st = ds.visibility; 
		 if (dm.offsetWidth) 
		 	{
				eh=dm.offsetHeight;ew = dm.offsetWidth;
			} 
		 else if(dm.clip.width)
			ew = dm.clip.width;
			if (st == "hidden")  
				{ 
					if (evt.y || evt.pageY) 
						{
							if(evt.pageY) 
								{
									tv = evt.pageY + 20;
									if(evt.pageX < window.screen.width/8*5)
									{
										lv = evt.pageX + 10;
									}
									else
									{
										if(len <= 4)
										{
											lv = evt.pageX - 280;
										}
										else
										{
											lv = evt.pageX - 320;
										}
									}
								}
							else
							{ 
								if(evt.x < window.screen.width/8*5)
									{
										tv = evt.y + 20 + document.body.scrollTop; 
										lv = evt.x  + 10;
									}
								else
									
									{
										tv = evt.y + 20 + document.body.scrollTop; 
										if(len<=4)
										{
											lv = evt.x  - 280;
										}
										else
										{
											lv = evt.x  - 320;
										}
										
									}
							}
							if (evt.screenY+eh>window.screen.height-80)
								{
									tv=tv-(evt.screenY+eh-window.screen.height+90);	
								} 
							if (lv + ew > wp)
							 lv -= ew/2;
							if (!an)
						    {
								lv += 'px';tv += 'px';
							}
							ds.left = lv; ds.top = tv;
							}
							ds.visibility = "visible";
							}
						}
					}
					
function mouseout_popUp(evt,oi,len)
{
	 if (DH)
	 {	
	 	 var wp = pw();
	 	 ds = fd(oi,1); 
		 dm = fd(oi,0); 
		 st = ds.visibility; 
		 if (dm.offsetWidth) 
		 	{
				eh=dm.offsetHeight;ew = dm.offsetWidth;
			} 
		 else if(dm.clip.width)
			ew = dm.clip.width;
			if (st == "visible" || st == "show") 
				{ 
					ds.visibility = "hidden"; 
				}
			 
	}
	}
	function mouseover_bg(tr)
 { 
    
   var cell;
   var tblrowcell;
   //var tblthis;
    //alert(document.getElementById("TVSIQuoteTable").id);
   //tblthis = parent.frames[0].document.getElementById("TVSIQuoteTable");
   //alert(i);
   //row = tblthis.rows.length;
   //document.getElementById("TVSIQuoteTable").rows[i-1].cells[3].innerHTML= i;
   cell = tr.cells.length;
   //alert(tblthis.rows[i].cells[1].className);
   //alert(i);
   for (j=0;j<cell;j++){
             //tblrowcell = parent.frames[0].document.getElementById("TVSIQuoteTable").rows[id].cells[j].className;
			 tblrowcell = tr.cells[j].className;
	 		//alert(tblrowcell)
			 if (tblrowcell.search("_2") == -1) {
			   tblrowcell = tblrowcell + "_2";
			   //tblthis.rows[id].cells[j].className = tblrowcell;
			   tr.cells[j].className = tblrowcell;
			 }
		  
	 }
//	// alert(tblthis.rows[i].cells[1].className);
 }
	 function mouseout_bg(tr)
 { 
   
   var cell;
   var tblrowcell;
   //var tblthis;
   //tblthis = parent.frames[0].document.getElementById("TVSIQuoteTable");
    cell = tr.cells.length;   //row = tblthis.rows.length;
   //alert(row);
   for (j=0;j<cell;j++){
             //tblrowcell = parent.frames[0].document.getElementById("TVSIQuoteTable").rows[id].cells[j].className;
			 tblrowcell = tr.cells[j].className;
	 		//alert(tblrowcell)
 			 if (tblrowcell.search("_2") != -1) {
			  tblrowcell = tblrowcell.substring(0,tblrowcell.length-2);
			 //tblthis.rows[id].cells[j].className = tblrowcell;
			 tr.cells[j].className = tblrowcell;
			 }
			  
	 }
	 
	//alert(tblthis.rows[i].cells[j-1].className );
 }
 